uid
stringlengths
6
55
question
stringlengths
34
465
context_short
sequence
context_long
sequence
tags
sequence
answer
stringlengths
1
25
relation
stringclasses
1 value
onejar@java@44
onejar -- one-jar lets developer package a @placeholder application together with its dependency jars into a single executable-jar file .
{ "confidence": [ 46.230499267578125, 44.644996643066406, 44.41584777832031, 42.949222564697266, 42.72762680053711, 41.944610595703125, 41.68949508666992, 41.43804931640625, 40.04724884033203, 39.962181091308594, 39.743873596191406, 39.74380874633789, 39.527008056640625, 39.360755920410156, 38.926109313964844, 38.890281677246094, 38.808143615722656, 37.91817092895508, 37.4422492980957, 37.28761291503906, 37.13750076293945, 37.124107360839844, 36.934104919433594, 36.4975471496582, 35.928470611572266, 35.895286560058594, 35.875553131103516, 35.6297607421875, 35.39582061767578, 35.39582061767578, 35.33599853515625, 35.07933807373047, 34.99771499633789, 34.874725341796875, 34.843746185302734, 34.76081848144531, 34.46369171142578, 34.3758659362793, 34.23428726196289, 34.17086410522461, 34.1142578125, 34.03314208984375, 33.60890197753906, 33.27971267700195, 33.16774368286133, 33.06061935424805, 33.03204345703125, 32.990577697753906, 32.74067306518555, 32.7374153137207, 32.68806076049805, 32.59238815307617, 32.59238815307617, 32.59238815307617, 32.5451774597168, 32.540977478027344, 32.53957748413086, 32.53636169433594, 32.45206832885742, 32.351959228515625, 32.299537658691406, 32.257076263427734, 31.642066955566406, 31.642066955566406, 31.502914428710938, 31.475189208984375, 31.423778533935547, 31.334869384765625, 31.239151000976562, 31.122142791748047, 31.085037231445312, 30.848745346069336, 30.68529510498047, 30.667043685913086, 30.637203216552734, 30.298751831054688, 30.291662216186523, 30.231220245361328, 29.968618392944336, 29.818878173828125, 29.818878173828125, 29.780132293701172, 29.620752334594727, 29.579723358154297, 29.579723358154297, 29.579723358154297, 29.505687713623047, 29.48154067993164, 29.48154067993164, 29.413766860961914, 29.413766860961914, 29.08885383605957, 29.050601959228516, 29.036840438842773, 29.03095245361328, 29.010395050048828, 29.010395050048828, 29.00221061706543, 28.95168685913086, 28.95168685913086 ], "content": [ "All I want is for onejar to package each one in a separate jar .", "This is somehow related to one-jar which is used to package native files along with jar files into a self-executable jar .", "Im creating an executable runable jar in the build.gradle using the oneJar gradle plugin .", ".. . .. . So.. . .. . .. . Q1 : Is OneJar intended only for executable jars", "When I package this application and its dependencies into a single executable-jar with one-jar and try to create an EntityManagerFactory Hibernate throws this exception : .. . .. . I am using the onejar-maven-plugin version 1.4.5 to generate myapplication-one-jar.jar .. . .. . I would really appreciate suggestions for ways to get around this .", "OneJar packages all of your code into a JAR file that also contains other JAR files in the lib directory or as a reference to them in other dirs outside the JAR depending on the onejar system you are using .", "I need to produce a jar file that will be used by others as a library lets call it myLib.jar thus the jar does not need to be executable .", "Check this link http : blog.dub.podval.org 2009 10 creating-executable-jars-with-maven.html you have to add the one-jar jar as excluded in Maven pom.xml file .", "Actually the property file is in a jar inside the jar packaged with one-jar .", "dist the jar from maven-jar-plugin gets generated not the jar from onejar .", "I am creating a Spring app with Embedded jetty in a single jar package using the OneJar Maven Plugin https : code.google.com p onejar-maven-plugin .", "Use a tool other than one-jar to create an executable fat jar .", "the deployer is yet another self executable-jar that is packaged with oneJar https : github.com sbt sbt-onejar but the packaging is modified to include the other projects artifacts .", "I m packaging an application of mine in a single jar using the One-Jar tool : .. . .. . http : one-jar.sourceforge.net .. . .. . It works nike but I have a problem with a service implemented in a dependency module which is implemented in a separate jar .", "your onejar fat JAR is myApp.jar and within it are many other JAR files in lib dependency1.jar lib dependency2.jar and within those is your merchant.id instead of the top level jar", "Check this : blog.dub.podval.org 2009 10 http : blog.dub.podval.org 2009 10 creating-executable-jars-with-maven.html you have to add the one-jar jar as excluded in maven", "Is the resource merchant.id within a JAR within the onejar lib directory", "Here is the problem : .. . .. . I have packaged my Java application into a single jar using the Maven plugin One-Jar http : code.google.com p onejar-maven-plugin .", "jar content : .. . .. . one-jar content :", "I managed to create an executable-jar with one-jar plugin .", "When the app gets packaged as a onejar the resulting onejar contains a nested jar inside of it under main my-jar.jar .", "Yes I am using a plugin called onejar that creates a fat jar .", "I added into Build.scala : artifact in Compile oneJar art art.copy classifier Some one-jar addArtifact artifact in Compile oneJar oneJar .", "If you use Maven this plugin https : code.google.com p onejar-maven-plugin can be used to invoke one-JAR during the build lifecycle .", ".. . One-Jar supports all of these mechanisms within the context of a One-Jar file which may contain Jar files that have duplicate resources .", "BUT when this jar is embedded in the application fat-jar created by One-Jar the the service it is NOT discovered by the service loader mechanism .", "I Hope One-Jar is a solution for ma problem But How to do One-Jar in Netbeans IDE or how to wrap all the dependency libraries with the application", "You can use a Fat-jar Layout if you unpack all the jogamp jars and natives : .. . .. . It is also possible to use the Eclipse extended one-jar implementation Export - Java.Runnable JAR file - Library handling : Package required libraries into generated JAR this classloader implementation do provide a URL handler for it s jar-in-jar resources .", "you want jar download it s own dependency", "but if the forms dependency is not present java -jar fails .", "It unpacks the dependent jars and stores the class files directly in the fat Jar rather than having jars within the jar .", "I am using sbt with the one-jar plugin but when I run the one-jar executable that has been created I get a continuous stream of messages that look like the following : .. . .. . I tried passing parameters to the jvm as suggested in a couple of the responses to one-jar remove verbose warning information on application load http : stackoverflow.com questions 3662659 one-jar-remove-verbose-warning-information-on-application-load but I continue to get the annoying warnings .", "However when I package my application by one-jar and run it via java -jar myapp 2.10-1.0-onejar.jar a runtime-error occur .", "I am creating the jar file using sbt-one-jar .", "Yep so what I m trying to achieve is for onejar to create one .jar file per each class with main that it finds in my src .", "I m trying to use one-jar to generate one jar file that contains clojure jar file and java class file : Creating one jar file that for execution from Java Clojure http : stackoverflow.com questions 12341993 creating-one-jar-file-that-for-execution-from-java-clojure .. . .. . Following the instruction http : one-jar.sourceforge.net index.php page getting-started file quickstart I could generate directories using one-jar-appgen-0.97.jar .", "How the class loader whether standard or OneJar didn t get confused between the of the outer jar and the inner jar I don t know .", "I have created an OpenGL project with Scala and JOGL and am trying to package it into a .jar file using sbt and the one-jar plugin .", "It could work but I m not sure when it is a JAR within a JAR with a file in it .", "When the resource is within a JAR within the fat JAR you have the problem described in : stackoverflow.com questions 21361931 http : stackoverflow.com questions 21361931 how-to-get-an-url-for-a-resource-directory-when-using-onejar and stackoverflow.com questions 941754 http : stackoverflow.com questions 941754 how-to-get-a-path-to-a-resource-in-a-java-jar-file 941785 and .. . and onejar uses its own class loader not the system one you are using : stackoverflow.com a 20636830 3679676 http : stackoverflow.com a 20636830 3679676", "My objective is to create a single distributable jar file for Android projects which includes a few other jar files .", "I have a project that is build using SBT which packages a single jar using the one-jar plugin .", "However running from command-line both the normal jar and oneJar doesn t work as you can see below : .. . .. . java -jar testlog4j-1.0.jar .. . .. . java -jar testlog4j.1.0.one-jar.jar .. . .. . Your help is highly appreciated .", "I would like to use maven assembly to produce a jar file henceforth big-fat jar which contains all the installation files JARs + docs + others as well as the installer JAR the result-of building the installer project .", "This problem is referenced from these other Stack Overflow posts therefore this is pretty much a duplicate question : .. . .. . Classpath resources inside one-jar packaged via sbt http : stackoverflow.com questions 20635556 classpath-resources-inside-one-jar-packaged-via-sbt 22940040 22940040 .. . How to get a path to a resource in a Java JAR file http : stackoverflow.com questions 941754 how-to-get-a-path-to-a-resource-in-a-java-jar-file 941785 .. . How to get an URL for a resource directory when using OneJar", "Is there a way to add an arbitrary classpath entry to a JAR file manifest using onejar-maven-plugin", "Since it builds the first executable-jar into another jar I will need to change my code to find the path of the parent executable-jar to write log and properties files .", "I have a jar file that references 6 other jars through a manifest file .", "One-Jar is incomplete i.e .", "For one-jar plugin When building the one-jar file DOMConfigurator.configure method of log4j was not able to parse the log4j.xml file anymore as can be seen in the question above .", "Formerly with ant I created a self-contained jar file with one-jar and then wrapped this into a exe file with launch4j .", "I m using Dr Tuffs OneJar for Maven to build a fat jar including all my dependencies etc .", "I am using the onejar-maven-plugin to generate the jar for my project and it all goes well .", "the problem is that the jar contains a lot of unnecessary files and the exclude syntax doesn t seem to work in the oneJar .", "To be clear you re still wanting a fat jar you just don t want one-jar added to the file name", "The fat jar will take 4 times as long to download as the 4 separate Jars .", "Is there any option in one-jar to build only one jar with libraries", "Alternativel I d also happy with any vanilla OneJar solutions that help me produce a fat JAR wherein my own .class files would be directly under the fat JAR as opposed to under lib myproject.jar .", "one-jar packages your resources under the main dir in the output jar .", "That jar in turn has that template.html file packaged under its root .", "So I wonder what the problem with the jar file and my application is .", "for the main testlog4j-1.0.jar log4j.xml it is indeed there as the One-Jar plugin bundles the first jar into another .", "Thanks for clarifying that one-jar is therefore the incorrect approach .", "I d start with the command to assemble the project - is this one-jar", "Did you read other SO articles like stackoverflow.com questions 5688329 http : stackoverflow.com questions 5688329 onejar-with-maven-wont-copy-resource-into-jar", "I solved this by making the launch4j task createExe dependent on the onejar fatjar or any other fat jar creation method .", "It seems jsvc doesn t use the jars inside another jar", "One-jar creates a jar files that contains libraries and classes .", "Is there a way to tell the sbt-onejar SBT plugin to produce a JAR in such way that the .class files of my project are in expanded form and not under lib myproject.jar", "not only remove it from the dependency tree but also not include it at all in the resulting jar", "How does one turn-off these warnings when using sbt-onejar", "For pack the application in a executable .jar file I use One-Jar http : one-jar.sourceforge.net index.php page getting-started file quickstart Command Line Approch but it don t work correctly and I have this errors : .. . .. . I have done these steps : .. . .. . I have create from Eclipse an runnable .jar file : right clik on the project-- Export--- Runnable Jar File .. . .. . I Create a working directory Tool contains directories main and lib .. . .. . Copy my main application jar file create on step 1 into root main named MyApplication.jar and library dependencies into root lib the opencv java259.jar .. . .. . I have Unjar the one-jar-boot-0.97.jar file into the root directory .. . .. . Edit the boot-manifest.mf : .. . .. . Manifest-Version : 1.0 .. . .. . Ant-Version : Apache Ant 1.7.1 .. . .. . Created-By : One-Jar 0.97 Ant taskdef .. . .. . One-Jar-Main-Class : main.MyApplication .. . .. . Main-Class : com.simontuffs.onejar.Boot .. . .. . But I have the errors when i execute the command-line : .. . .. . C : Users User Desktop Tool jar -cvfm . . one-jar.jar boot-manifest.mf .", "I m using the com.smokejumperit.gradle.OneJarPlugin plugin source here https : github.com RobertFischer gradle-plugins blob master src main groovy OneJarPlugin.groovy and clearly it gets the list of files to include in the onejar here : .. . .. . jar.output.files is used for publishing so I don t want a this second jar file being published and the two project.configurations would define dependencies for the main source jar and I don t want this second jar to be a dependency of that either .", "I have an sbt project that should create a runnable jar file .", "I recommend to try the gradle-one-jar https : github.com rholder gradle-one-jar plugin which appears to be more flexible .", "With the given command-line jar -cvfm . . one-jar.jar boot-manifest.mf . the file boot-manifest.mf must be in the current directory where jar is executed .", "I have a maven project which I would like to package in an executable-jar .", "Following is my sbt about result : .. . .. . Following is the runtime-error message : .. . .. . Following is the part of the result-of jar -tf myapp 2.10-1.0.jar where myapp 2.10-1.0.jar is in myapp 2.10-1.0-onejar.jar generated by one-jar :", "I am using the most recent version of sbt-onejar https : github.com sbt sbt-onejar .", "I have a jar which is created using onejar-maven-plugin which is meant to listen to jms messages from tibco and process accordingly .", "I read on other posts that OneJar may be helpful but I am not sure how to indicate that main resides inside the inner jar .", "I am using JSVC as follows which works for Jars made with the Maven assembly plugin etc : .. . .. . The error is this : .. . .. . Does anyone know if it is even possible to use JSVC and One-Jar together since One-Jar uses a custom class loader", "One-Jar now compile but the when the .jar start i have the problem of the load openCV...this non work correctly", "Do you mean a class that simply loads the jar file into the classpath or something", "I have a property file inside a self-executing .jar .", "Did you look inside the fat jar and see this file there as well", "It could produce a URL for a JAR within a JAR which the rest of Java wouldn t understand for example file : path to jarfile bot.jar config file.txt or worse .", "It looks like the problem is related to one-jar the packaging tool I m using .", "The one-jar method is purely used for ease of distribution in a non-Maven way .", "I ran jar tf to look at the contents of the main jar and I see the missing jar inside .", "The missing jar is gluegen-rt-natives-windows-amd64.jar .. . .. . This is the error I get : .. . .. . This is the output from jar tf :", "I m trying to find a tutorial on how to use One-Jar without eclipse with no success .", "I have a project that only builds the fat onejar file for testing purposes .", "Loading resources when using One-JAR is documented here http : one-jar.sourceforge.net index.php page details file resources .", ": .. . .. . Tried with below answers in SO : .. . .. . Q1 http : stackoverflow.com questions 2552793 reading-xml-file-inside-a-jar-package .. . .. . Q2 http : stackoverflow.com questions 3369794 how-to-a-read-file-from-jar-in-java", "it does not provide a URL handler for it s jar-in-jar resources .", "@rompetroll I run the jar using a simple java -jar myonejar.jar .", "One-jar works fine when there is only one such class .", "It won t see files that are in the same directory as the jar file .", "My native library s dependent libraries are in jar file ." ] }
{ "confidence": [ 64.73149871826172, 61.890174865722656, 61.344459533691406, 60.94236755371094, 60.327789306640625, 58.74840545654297, 55.968040466308594, 55.67256164550781, 53.73504638671875, 53.50554656982422, 52.814735412597656, 52.300559997558594, 51.95659637451172, 51.807098388671875, 51.113372802734375, 50.59375, 50.54454040527344, 50.531341552734375, 49.69347381591797, 49.01262664794922 ], "content": [ "Question : I have an application that uses JPA and Hibernate ORM 4.3.8 . When I package this application and its dependencies into a single executable-jar with one-jar and try to create an EntityManagerFactory Hibernate throws this exception : .. . .. . I am using the onejar-maven-plugin version 1.4.5 to generate myapplication-one-jar.jar .. . .. . I would really appreciate suggestions for ways to get around this . Here are two possible options : .. . .. . 1 . Use a tool other than one-jar to create an executable fat jar . The alternatives may have the same issue . 2 . Create a custom classloader similar to this http : dev.eclipse.org mhonarc lists jetty-users msg01174.html but I can not find a way to get JPA Hibernate to use this classloader . Thank you . Comment : Your questions mentions myapplication-one-jar.jar . But the stacktrace has myapplication.one-jar.jar and myapplication.jar . Have you investigated that yet Comment : @sgp15 Sorry for the confusion . The jars are not really named myapplication . I tried to make the stack-trace more readable by changing the name . The jars are named correctly . The one-jar solution worked perfectly until I introduced JPA hibernate into the application . .. . Answer : Switching from using One Jar to using Maven Shade fixed this problem although it had the downside of needing to resolve conflicting class names .", "Question : I have an SBT project that contains multiple classes with main i.e . MyClass extends App . One-jar works fine when there is only one such class . If it finds multiple classes it prompts me to choose which one I want to package : .. . .. . I d like to configure one-jar to automatically package all main classes . In documentation https : github.com sbt sbt-onejar it defines default main class as mainClass in run in Compile so it looks like it expects only one value . If this is not possible I m curious why not . : .. . .. . For now I can only think of some hacks like creating a surrogate project for each jar or setting a mainClass in SBT each time before calling one-jar multiple times per build . These approaches obviously have their deficiencies . .. . Answer : It s not about SBT or onejar plugin . When you pack your project into the jar file both main classes would be packed . JAR File specification http : docs.oracle.com javase 6 docs technotes guides jar jar.html defines that you can have as many classes with main method as you want but there should be only one class with main method defined in Main-Class attribute per JAR Comment : Yep so what I m trying to achieve is for onejar to create one .jar file per each class with main that it finds in my src . It might happen that jars will be identical but Main-class attr will be set to a different value in each one . Onejar can clearly discover these candidates . All I want is for onejar to package each one in a separate jar . Comment : @AlekseyIzmailov There is a task discoveredMainClasses in Compile make your custom task which depends on it and for each main class run onejar Comment : Thanks @Alexlv I ll try that . I was hoping to avoid creating custom tasks : . Comment : @AlekseyIzmailov If you don t want to make a custom task then do a simple command . You can avoid task dependency and call execute other task with Project.runTask", "Question : Here is the problem : .. . .. . I have packaged my Java application into a single jar using the Maven plugin One-Jar http : code.google.com p onejar-maven-plugin . Now I want to run the application as a Unix Daemon using JSVC i.e . Apache Commons Daemon . I am using JSVC as follows which works for Jars made with the Maven assembly plugin etc : .. . .. . The error is this : .. . .. . Does anyone know if it is even possible to use JSVC and One-Jar together since One-Jar uses a custom class loader The jar runs just fine when I run java -jar my-one-jar.jar . What can be done Thank you for any insight .. . Answer : If you use the poorly-documented Maven Shade Plugin https : maven.apache.org plugins maven-shade-plugin usage.html instead of One-jar they can achieve similar results as each other it should solve your problems . It unpacks the dependent jars and stores the class files directly in the fat Jar rather than having jars within the jar . I have used it to create an executable-jar for running under JSVC with some success . Of course things are seldom as simple as they sound . With the Shade plugin you may have to do some work to relocate classes http : maven.apache.org plugins maven-shade-plugin examples class-relocation.html when there are conflicts in your dependency tree or use resource transformers https : maven.apache.org plugins maven-shade-plugin usage.html to handle your non-Java resource files . But hopefully not . Of course Mkyong.com has a guide on this http : www.mkyong.com maven create-a-fat-jar-file-maven-shade-plugin", "Question : null .. . Answer : I need to produce a jar file that will be used by others as a library lets call it myLib.jar thus the jar does not need to be executable . The library depends on some other 3rd-party jars but i will not expect from the ones who use myLib.jar to include them in his hers Buildpath . While searching i found OneJar http : one-jar.sourceforge.net index.php page getting-started file quickstart and followed the 2 steps at the top of the page . Unfortunately this did not worked for me since when i tried to include myLib.jar in a new project i was not able to use the expected classes . .. . .. . So.. . .. . .. . Q1 : Is OneJar intended only for executable jars If not how could i achieve what i have described above . Q2 : If OneJar is intended only for executables is their another way to produce the myLib.jar library .. . .. . PS : If there is a need to add more information please let me know in order to edit my quetsion . Comment : Why not just package your own classes in myLib.jar and then inform users of your dependencies . Better yet if you used a build tool like Maven or Gradle you could declare your dependencies so that when they include your library they get them automagically Comment : Ideally i wanted to distribute just one jar without any dependencies and without expecting from the users to do anything else besides including this jar to buildpath . If this is not possible i may try something like maven . Comment : Also why do you think that this is a requirement It is totally reasonable to expect users of your library to have to have your dependencies on their classpath at runtime . I have never been discouraged from using a library simply because it had dependencies . Comment : Have you checked the license terms for your dependencies to make sure that it is OK to repackage the JARs . For at least some open-source licenses repackaging goes against the spirit if not the letter of the license . I m thinking of LGPL s rules about linking .. . which are intended to make it easier for your users to use a different version of the dependencies . Comment : You are going to create headaches when some wants to use myLib.jar with other libraries . Suppose myLib.jar had dependancy A version 1 . Some other library may have dependency A version 2 . You re forcing both versions into their path .", "Question : Here is the problem : .. . .. . I have packaged my Java application into a single jar using the Maven plugin One-Jar http : code.google.com p onejar-maven-plugin . Now I want to run the application as a Unix Daemon using JSVC i.e . Apache Commons Daemon . I am using JSVC as follows which works for Jars made with the Maven assembly plugin etc : .. . .. . The error is this : .. . .. . Does anyone know if it is even possible to use JSVC and One-Jar together since One-Jar uses a custom class loader The jar runs just fine when I run java -jar my-one-jar.jar . What can be done Thank you for any insight .. . Answer : I had to add all jars dependencies to the classpath option from jsvc . It seems jsvc doesn t use the jars inside another jar", "Question : Is there a way to add an arbitrary classpath entry to a JAR file manifest using onejar-maven-plugin I found the way to configure maven-jar-plugin to do this http : stackoverflow.com questions 1510071 maven-how-can-i-add-an-arbitrary-classpath-entry-to-a-jar but it appears that there is no such option for onejar-maven-plugin . This is not done to find additional classes otherwise why use the onejar plugin right but rather to locate a configuration file that must be external to the JAR . Is there a direct solution or a workaround for this .. . Answer : Is the usage of the one-jar plugin really required You can achieve the same goal packaging in one single jar your application AND all the required dependencies including transitive ones AND add configuration for Class-Path AND using a more stable standard plugin applying the following approach : .. . .. . Configure the Class-Path entry in your application Jar using the Maven Jar Plugin and the approach http : stackoverflow.com questions 1510071 maven-how-can-i-add-an-arbitrary-classpath-entry-to-a-jar you mentioned in the question .. . Use the Maven Assembly Plugin http : maven.apache.org plugins maven-assembly-plugin to package one single JAR including dependencies as explained here http : stackoverflow.com questions 574594 how-can-i-create-an-executable-jar-with-dependencies-using-maven in another stackoverflow question answer . An example of one-jar executable file without using the one-jar plugin could be as following : .. . .. . If you need to further play with classpath and Maven I would suggest to also check this question here https : stackoverflow.com questions 34144178 maven-how-to-query-the-executable-classpath on stackoverflow .", "Question : null .. . Answer : Im creating an executable runable jar in the build.gradle using the oneJar gradle plugin . the problem is that the jar contains a lot of unnecessary files and the exclude syntax doesn t seem to work in the oneJar . i tried all those together and none of the worked", "Question : I expect this is trivial but I m on a deadline so I apologise if this is a stupid question . I m using Dr Tuffs OneJar for Maven to build a fat jar including all my dependencies etc . However when I use jar tf xxx.one-jar.jar it lists the things I d expect like my normal jar but also all of Dr Tuffs code . The below is just an excerpt from the command : .. . .. . I m hoping there s a property I can set in my pom file to stop it doing this . Comment : Check this : blog.dub.podval.org 2009 10 http : blog.dub.podval.org 2009 10 creating-executable-jars-with-maven.html you have to add the one-jar jar as excluded in maven Comment : And this is what s so great about SO - 7 minutes to get help . Awesome . I ll take a look at that blog and post my solution unless someone beats me to it . Thanks Pablo . Comment : Pablo - if you want to put that as an actual answer I ll accept . .. . Answer : Check this link http : blog.dub.podval.org 2009 10 creating-executable-jars-with-maven.html you have to add the one-jar jar as excluded in Maven pom.xml file .", "Question : I have the following piece of code : .. . .. . The following when run from intelliJ works fine and finds the resource . But when run using the bundled jar - gives NPE . Path for resource : src main resources merchant.id .. . Path for code : src main java Route.kt .. . .. . Following is the maven config snippet : .. . .. . Is there any other war to get URL for the above resource which would work with one-jar or other way of making a fat jar . jar content : .. . .. . one-jar content : Comment : Important information is missing from your question . Where is merchant.id located in the source Did you look inside the fat jar and see this file there as well If it is not there did you look at how to make sure resources are copied into the fat jar Did you read other SO articles like stackoverflow.com questions 5688329 http : stackoverflow.com questions 5688329 onejar-with-maven-wont-copy-resource-into-jar Or stackoverflow.com questions 23276836 http : stackoverflow.com questions 23276836 onejar-and-resource-loading Comment : @JaysonMinard Yes the file is there - as said in the question - this executes from intelliJ perfectly fine . Path for resource : src main resources Path for code : src main java Route.kt Comment : Is the resource merchant.id within a JAR within the onejar lib directory I.e . your onejar fat JAR is myApp.jar and within it are many other JAR files in lib dependency1.jar lib dependency2.jar and within those is your merchant.id instead of the top level jar Comment : note it working in intellij isn t related information since OneJar completely changes what and how clases and resources are packaged compared to intellij running from the flat-file system Comment : When the resource is within a JAR within the fat JAR you have the problem described in : stackoverflow.com questions 21361931 http : stackoverflow.com questions 21361931 how-to-get-an-url-for-a-resource-directory-when-using-onejar and stackoverflow.com questions 941754 http : stackoverflow.com questions 941754 how-to-get-a-path-to-a-resource-in-a-java-jar-file 941785 and .. . and onejar uses its own class loader not the system one you are using : stackoverflow.com a 20636830 3679676 http : stackoverflow.com a 20636830 3679676 .. . Answer : OneJar packages all of your code into a JAR file that also contains other JAR files in the lib directory or as a reference to them in other dirs outside the JAR depending on the onejar system you are using . It uses a custom class loader to make this work . Therefore it defeats your use of the system class loader . One way to defeat this is to use a class from the same JAR as the resource you want to load and therefore its class loader is probably setup correctly into the JAR or nested JAR or magic location in Narnia of your resource : .. . .. . Where MyClass is a class from the same JAR as merchant.id and the path to the resource must be absolute with the leading .. . .. . Be sure to get the stream and not the resource URL which might not be usable to you since it isn t an understandable URL to the system . It could produce a URL for a JAR within a JAR which the rest of Java wouldn t understand for example file : path to jarfile bot.jar config file.txt or worse . It could work but I m not sure when it is a JAR within a JAR with a file in it . A secondary option : .. . .. . Check your resource names : .. . .. . In your question you say to read resource merchant.id but then show JAR contents having merchant.id.soft.applepaydev-v1.csr .. . make sure these names match if you are trying to load this exact resource . .. . .. . Resource loading in onejar must be customized which is ugly . In a link-to one resource that talks about resource loading with onejar http : one-jar.sourceforge.net index.php page details file resources : .. . .. . There are a number of ways that Java supports finding and opening resources : .. . .. . URL findResource String resource : returns a resource or null if not found . Enumeration findResources String resource : returns an enumeration of resource URL s which match the given string .. . URL.openConnection : opens a connection to a resource by its URL . .. . One-Jar supports all of these mechanisms within the context of a One-Jar file which may contain Jar files that have duplicate resources . This problem is referenced from these other Stack Overflow posts therefore this is pretty much a duplicate question : .. . .. . Classpath resources inside one-jar packaged via sbt http : stackoverflow.com questions 20635556 classpath-resources-inside-one-jar-packaged-via-sbt 22940040 22940040 .. . How to get a path to a resource in a Java JAR file http : stackoverflow.com questions 941754 how-to-get-a-path-to-a-resource-in-a-java-jar-file 941785 .. . How to get an URL for a resource directory when using OneJar http : stackoverflow.com questions 21361931 how-to-get-an-url-for-a-resource-directory-when-using-onejar .. . Onejar and resource loading http : stackoverflow.com questions 23276836 onejar-and-resource-loading .. . .. . Googling turns up many more resources . Comment : What I did was to add another class with the function to access the resource . Then used the MyClass : : class.java.getResource Comment : getResource or getResourceAsStream .. . interesting if getResource works I should edit my answer then . Comment : It does - I just didn t want the cruft of creating a new class . But fun in cotillon didn t allow me to do the same . Comment : You can put your main within the companion-object of a class instead of letting it go to the default created class add the @JvmStatic annotation and it can be run directly from your new class . Then you have both .", "Question : Edit : Question Rewritten : .. . .. . I created a new minimal example to illustrate my problem . First here is the source code of a simple class App.java : .. . .. . Second Here is the pom.xml file of the project .. . .. . Third I have my log4j.xml under src main resources folder : .. . .. . OK building the application and running in Netbeans works perfectly as expected logging out into both the console and a file under the log directory . However running from command-line both the normal jar and oneJar doesn t work as you can see below : .. . .. . java -jar testlog4j-1.0.jar .. . .. . java -jar testlog4j.1.0.one-jar.jar .. . .. . Your help is highly appreciated . Comment : What does application crashes exactly mean Is there a stack-trace If yes please add it to your question . Have you unzipped the jar files and checked what s in it Are all files therein as expected and at the right place Is the MANIFEST.MF OK Comment : Thank you @GeroldBroser for your comment I completely rewritten the question with a minimal reproducible example . I hope this is clear enough . Best Regards .. . Answer : The first problem with NoClassDefFoundError was setting correct classpaths I solved this by adding the maven-dependencies-plugin and included the class prefix attribute in the maven-jar-plugin . For one-jar plugin When building the one-jar file DOMConfigurator.configure method of log4j was not able to parse the log4j.xml file anymore as can be seen in the question above . I was able to replace this by log4j.properties file and using the PropertyConfigurator.configure method . Then the problem would be solved . However OneJar is causing another problem for me . Since it builds the first executable-jar into another jar I will need to change my code to find the path of the parent executable-jar to write log and properties files . For this reason I changed into the maven-assembly-plugin using its non deprecated single goal . In this case I can also keep the nice log4j.xml file . Below is the new pom.xml file : .. . .. . Moreover I uploaded the testing project into github : .. . .. . I Hope someone will find this useful . Comment : This helped me out greatly . Thanks . On minor note : You should mention that the maven-assembly-plugin is building a somewhat shaded jar https : maven.apache.org plugins maven-shade-plugin and that the classpathPrefix lib classpathPrefix property is unnecessary because the jar will have all the dependencies embedded within it . You only need this if you are using a non-shaded light-weight jar because the jar will reference the lib directory which exists beside the light-weight jar sans dependencies .", "Question : I have a project that only builds the fat onejar file for testing purposes . Thus there s a separate testing class that I don t want as a dependency to the main source but I do want it included into the onejar . Odd scenario I know . I m using the com.smokejumperit.gradle.OneJarPlugin plugin source here https : github.com RobertFischer gradle-plugins blob master src main groovy OneJarPlugin.groovy and clearly it gets the list of files to include in the onejar here : .. . .. . jar.output.files is used for publishing so I don t want a this second jar file being published and the two project.configurations would define dependencies for the main source jar and I don t want this second jar to be a dependency of that either . This second jar file is built with a task : .. . .. . .. . so I can access the resulting FileCollection via integrationJar.outputs.files . If there was a clear way to add that to oneJar.input.files I d be golden but I can t figure out how to do that . I ve tried something like this : .. . .. . .. . but the result for the last print is still missing the integration jar file . Ideas Comment : Just put a dummy class in the main source that depends on the jar in question . Ugly but effective . Comment : Not sure what you mean exactly . Can you give an example The integration jar file is separate because it has some dependencies I don t want the main source to have like jetty . Do you mean a class that simply loads the jar file into the classpath or something Not sure what that might look like . .. . Answer : I m not familiar with the implementation of that plugin but I d be surprised if inputs.files determined what gets included . Usually inputs is just consumed by Gradle s up-to-date check . I recommend to try the gradle-one-jar https : github.com rholder gradle-one-jar plugin which appears to be more flexible . Comment : This looks like it ll work well . Not sure why I was trying the other one.. .", "Question : null .. . Answer : what am I trying to do : .. . .. . first let me present a very simplified version of what i m trying to achieve . consider the following multi-project : .. . .. . the backend is packaged with oneJar https : github.com sbt sbt-onejar and performs as a standalone process that does the background work . the frontend is a web-service play http : www.playframework.com project packaged as a zip file with dist . the deployer is yet another self executable-jar that is packaged with oneJar https : github.com sbt sbt-onejar but the packaging is modified to include the other projects artifacts . the deployer job is to initialize the system . it deploys the other artifacts to specified machines and initializes the distributed-system . what is my problem : .. . .. . basically i m trying unsuccessfully to get the play s dist zip artifact the backend oneJar self executable artifact packaged inside the deployer jar with other resources files .. . .. . the deployer jar should look like : .. . .. . what do I have so far : .. . .. . build.sbt .. . .. . backend build.sbt .. . .. . frontend build.sbt .. . .. . deployer build.sbt .. . .. . notice that in the root build.sbt i have per-configuration classpath dependencies http : www.scala-sbt.org release docs Getting-Started Multi-Project.html per-configuration-classpath-dependencies optional- compile . Iv e put it there after looking at the ivy.xml file : .. . .. . and seeing that the dist.zip artifact is only found in optional scope I thought I could get this artifact as a dependency that way not seem to be working though.. . . also when i tried out the commented out lines i got an error saying it s the wrong type . .. . .. . as i m writing the question i figured out what I ve done wrong.. . .. . .. . UPDATE : .. . .. . there s a few things i missed to much snippets were copy pasted.. . . first the deployer should not dependOn backend frontend at all . just aggregate . moreover these artifacts backend frontend should not be visible on deployer s classpath at all . so this line : .. . .. . is unneeded . also the code to transform the mappings in oneJar in the deployer build.sbt file could be much more simple . only need to take care of resources . and finally the commented out lines should actually be : .. . .. . that s pretty much it .", "Question : I have an application packaged inside of a onejar which uses Velocity for templating . In my maven project setup I have a file in base src main resources template.html . When the app gets packaged as a onejar the resulting onejar contains a nested jar inside of it under main my-jar.jar . That jar in turn has that template.html file packaged under its root . Apparently maven copied it from src main resources into the root of the package .. . .. . I d like to load that template as a resource in Velocity . I ve read I need to use a ClassPathResourceLoader to do that so I have code that looks like this : .. . .. . This fails every time with an exception that none of Velocity s resource loaders can find the file . I have two questions - first is this even the right way to configure the use of the ClasspathResourceLoader And second if that were configured properly what path would I specify so that template.html could be found inside of that inner nested jar .. . Answer : I managed to find the answer after a lot of digging . The code to use the ClasspathResourceLoader is as follows : .. . .. . Secondly many people are telling me that inside of a nested jar the standard classpath loader shouldn t even be able to find the template.html file . I was told that some fancy third party classloader would be necessary . OneJar provides such a fancy loader . Once I got the code correct to use the ClasspathResourceLoader things seemed to resolve . The thing to keep in mind is that is relative to the classpath root . So when base src main resources template.html got repackaged as template.html in the root directory of the unpacked JAR that meant that template.html was the right resource path to load . That path template.html is of course relative to the nested inner JAR . How the class loader whether standard or OneJar didn t get confused between the of the outer jar and the inner jar I don t know .", "Question : I have a maven project which I would like to package in an executable-jar . It s using quite a few dependencies like spring and so on . It was suggested in a few posts to use OneJar to avoid a lot of headaches . This is what I have currently in my pom.xml : .. . .. . In my Spring configuration one of the classes needs to pass the a resource src main resources coolfile.bin path to an external library jsch method : .. . .. . When I run Application.java from the IDE eclipse the entire application loads successfully . Although when I run mvn clean install the onejar jar is built under the target folder but when I try to run it with java -jar coolproject.one-jar.jar the following error is displayed : .. . .. . If I inspect coolproject.one-jar.jar I can find the coolproject.jar under the main folder and if I inspect that I can see coolfile.bin in its root . So in theory the resource should be found What am I missing .. . Answer : Turns out that FileInputStream would not find the path specified by resource . Luckily jsch provides another method where you can pass the byte array of the file rather than its location :", "Question : I am using sbt with the one-jar plugin but when I run the one-jar executable that has been created I get a continuous stream of messages that look like the following : .. . .. . I tried passing parameters to the jvm as suggested in a couple of the responses to one-jar remove verbose warning information on application load http : stackoverflow.com questions 3662659 one-jar-remove-verbose-warning-information-on-application-load but I continue to get the annoying warnings . How does one turn-off these warnings when using sbt-onejar I am using the most recent version of sbt-onejar https : github.com sbt sbt-onejar . Comment : Would you mind sharing the build configuration so one could reproduce your error and work it out I d rather not have to spend time on doing it myself . .. . Answer : tl dr There s no easy way to turn the messages off since they come from System.err . I know little about the plugin so I unzipped the JarClassLoader class as follows : .. . .. . In the class at line 998 there s the call to WARNING method : .. . .. . The method WARNING is implemented as follows : .. . .. . It s led me to claim that turning it off is impossible unless you can shut down the entire System.err that I don t know being possible . Comment : Thanks . Not the answer that I really wanted though.. .", "Question : I am using the onejar-maven-plugin to generate the jar for my project and it all goes well . But when I try to change it to a sub-folder for eg . dist the jar from maven-jar-plugin gets generated not the jar from onejar . The onejar plugin does not have an output directory option . How do I change the output directory of the onejar generated file to a subfolder eg . dist Comment : Why do you need to change the folder inside target folder Why defining a outputDirectory for maven-jar-plugin If you like to create a single jar which contains all dependencies just take a look at maven-assembly-plugin which handles this . Comment : Thats what I finally did . I think this question can be closed . .. . Answer : I finally went with maven-assembly-plugin . Has lots of configuration options .", "Question : I have an application packaged inside of a onejar which uses Velocity for templating . In my maven project setup I have a file in base src main resources template.html . When the app gets packaged as a onejar the resulting onejar contains a nested jar inside of it under main my-jar.jar . That jar in turn has that template.html file packaged under its root . Apparently maven copied it from src main resources into the root of the package .. . .. . I d like to load that template as a resource in Velocity . I ve read I need to use a ClassPathResourceLoader to do that so I have code that looks like this : .. . .. . This fails every time with an exception that none of Velocity s resource loaders can find the file . I have two questions - first is this even the right way to configure the use of the ClasspathResourceLoader And second if that were configured properly what path would I specify so that template.html could be found inside of that inner nested jar .. . Answer : specify the path where your template.html resides using as relative-path .. . .. . and use setProperty like below", "Question : Is there a way to tell the sbt-onejar SBT plugin to produce a JAR in such way that the .class files of my project are in expanded form and not under lib myproject.jar Alternatively is it possible to tell sbt-onejar to produce a JAR that when it s loaded it actually unpacks expands the nested JARs into a temporary folder and loads them from there so that things like getResource .. . return paths to physical files as opposed to jar : file : .. . URLs Alternativel I d also happy with any vanilla OneJar solutions that help me produce a fat JAR wherein my own .class files would be directly under the fat JAR as opposed to under lib myproject.jar . I m asking because Jetty does not seem to be able to load JSP files from inside of nested JAR files . There does seem to be a workaround by using a custom resource loader see http : dev.eclipse.org mhonarc lists jetty-users msg01174.html for a report of the same problem and the workaround but I don t seem to be able to get my servlets to actually use the overridden getResource method provided in the workaround . .. . Answer : After having read sbt-onejar s source code : .. . .. . However I ve realized using OneJar with Jetty is quite a problematic beast due to how Jetty loads JSP files doesn t seem to work with nested JARs http : dev.eclipse.org mhonarc lists jetty-users msg01174.html so I m looking into alternatives now . EDIT : I ve found https : github.com xerial sbt-pack and it seems to achieve the same effect as OneJar with the difference of being standard and thus free of problems much faster more customizable and allows defining of convenient custom program entry points .", "Question : I am trying to build an installer for a couple of Java Maven projects using Eclipse . I would like to use maven assembly to produce a jar file henceforth big-fat jar which contains all the installation files JARs + docs + others as well as the installer JAR the result-of building the installer project . I want the installer to unpack the big-fat jar and therefore I want the main class to be included in the installer jar . The user will get the big-fat jar and I want java -jar big-fat.jar to execute the main inside installer.jar . To recap here is the structure of the big-fat jar : .. . .. . big-fat-jar : .. . --installer.jar .. . --application.jar .. . --readme.doc .. . --META-INF : .. . ----MANIFEST.MF .. . .. . .. . where installer.jar is the Java program which unpacks big-fat-jar and contains main application.jar is the application being installed there may be multiple jars or wars instead of just one application.jar and readme.doc stands for any docs . My question is : what do I do to make the main inside installer.jar be called when the user executes java -jar big-fat-jar I read on other posts that OneJar may be helpful but I am not sure how to indicate that main resides inside the inner jar . Comment : You ll have to put the main class directly in big-fat.jar otherwise it won t be an executable-jar . Java has no built-in mechanism for digging into a nested jar to find the main class . .. . Answer : I have never tried this with a jar inside another jar as you have described but I think it could work if you specify this in your Manifest.txt file . You could do this like so : .. . .. . In the example above the MyClass file will have the main method that will be called when running java -jar jarname.jar .. . .. . Please see the top of this page for more information : https : docs.oracle.com javase tutorial deployment jar appman.html .. . .. . Head First Java by Sierra and Bates also goes over how to do this with a class but not a Java jar inside another Java jar . I hope this helps . Thank-you for reading this . Comment : Thanks for your answer . I just tried it out but I am not sure that it works . Comment : You could add some System.out.println Print - The main method just ran type of statements to your main method and rebuild the jar and try again . : D", "Question : My objective is to create a single distributable jar file for Android projects which includes a few other jar files . As I understand a standard jar file is not allowed to have other jar files inside so guess I need to learn a trick here . I have been trying to set up One-Jar http : one-jar.sourceforge.net for this but I keep hitting issues . Are there any dev guides for using One-jar with Android projects using Eclipse Are there any other good alternatives out there I should look at .. . Answer : jarjar https : code.google.com p jarjar is pretty good at this . When you use it together http : sonatype.github.com jarjar-maven-plugin with Maven https : maven.apache.org its super easy to make a large collection of dependencies a single jar . Although there s nothing stopping you including multiple jars as dependencies in an Android project ." ] }
[ "yes-answer-long", "yes-answer-short" ]
java
UNK_RELATION
mail-form@html-form@98
mail-form -- mail forms are a user interaction pattern where a user enters mail contents into an @placeholder and some program constructs an email message from that and sends it .
{ "confidence": [ 47.629066467285156, 46.649208068847656, 44.76659393310547, 43.37704849243164, 43.06362533569336, 43.03996276855469, 42.66167449951172, 42.41991424560547, 42.187957763671875, 40.30827331542969, 40.0500602722168, 39.732513427734375, 39.56974411010742, 39.46769714355469, 39.18897247314453, 38.533424377441406, 37.9224967956543, 37.36038589477539, 37.059669494628906, 36.90278625488281, 36.90278625488281, 36.90278625488281, 36.90278625488281, 36.40552520751953, 36.40552520751953, 35.985572814941406, 35.94418716430664, 35.94418716430664, 35.94418716430664, 35.94418716430664, 35.88008117675781, 35.38950729370117, 34.331520080566406, 34.13047790527344, 34.13047790527344, 34.00938415527344, 33.884273529052734, 33.8197135925293, 33.59664535522461, 33.57579803466797, 33.57579803466797, 33.57579803466797, 33.57579803466797, 33.297794342041016, 33.091163635253906, 32.99317169189453, 32.99317169189453, 32.96185302734375, 32.93790054321289, 32.933799743652344, 32.677181243896484, 31.859272003173828, 31.577884674072266, 31.577884674072266, 31.577884674072266, 31.577884674072266, 31.577884674072266, 31.544376373291016, 31.510467529296875, 31.235313415527344, 30.64178466796875, 30.580322265625, 30.316329956054688, 30.216899871826172, 30.132545471191406, 29.764175415039062, 29.764175415039062, 29.764175415039062, 29.764175415039062, 29.245086669921875, 29.12234115600586, 28.812152862548828, 28.495044708251953, 28.11524772644043, 27.64760971069336, 27.636611938476562, 27.535049438476562, 27.533069610595703, 27.431377410888672, 27.431377410888672, 26.861167907714844, 26.68106460571289, 26.63829231262207, 26.632272720336914, 26.627042770385742, 26.28154754638672, 26.249197006225586, 25.91470718383789, 25.09018325805664, 25.09018325805664, 25.014644622802734, 24.979721069335938, 24.979721069335938, 24.955062866210938, 24.818565368652344, 24.818565368652344, 24.687339782714844, 24.66619873046875, 24.582456588745117, 24.582456588745117 ], "content": [ "private function sendEmail mail mail this- email admin this- subject this- message this- telephone From : . this- name .", "This question already has an answer here : .. . .. . PHP mail-form doesn t complete sending e-mail questions 24644436 php-mail-form-doesnt-complete-sending-e-mail 20 answers .. . .. . So everything works except that i dont recieve an email after sending and wonder why", "I have a php mail-form where people can email an attachment through the web form .", "Use smtp mail class", "Try this : .. . .. . Don t use mail .. . .. . There are lots of lots of issues with the PHP mail function .", "Try using the following function it sends the mail with multipart data", ": Could not execute mail delivery program usr local bin sendmail -oi -t in on line 21 Thankyou for your email", "The message .. . .. . The message you re passing to the mail function is not valid HTML .", "Good evening for my website I am using a mail-form .", "I m using this method to send mail .", "mail can do none of that .", "I also don t get an e-mail then .", "My mailform is supported with a form.lib.php file where the mailsubject is defined and printed to the mail .", "I am always using mixed mail when sending HTML-formatted Mail cause some people have html disabled .", "Nice and all but the whole string we create is displayed as is in the mail.. . Is there a way for the file my user uploads to be actually attached to the mail and not encoded in it", "Am sure you meant message hello - Do read up on the subjects php.net mail http : php.net mail and php.net header http : www.php.net header - I for one won t spend the time debugging your code .", "Mail doesn t get sent .", "keeps getting this error Could not execute mail delivery program usr local bin sendmail -oi -t in Html .. . .. . PHP", "I am using mail-form and simple-form to create a contact form-for my website .", "@JamieTaylor - OP needs to understand the basic fundamentals in sending mail not my job .", "phpversion if mail this- response status 1 this- response html p Thank You p", "you say it s only being emailed is that with the mail function", "It seems like it tried to send the mail now but got another error instead .", "The latter don t actually send e-mail .", "PHP s mail function needs to be caught and shot .", "We ve been following this walk-through https : rubyonrailshelp.wordpress.com 2014 01 08 rails-4-simple-form-and-mail-form-to-make-contact-form .", "My question is : How can I create a simple php mail-form that will always work", "In regards to : How can I create a simple php mail-form that will always work", "I m new to PHP and i am trying to add reCaptcha in a PHP mail-form .", "So I m working on a mail-form for my site and I got i working .", "Assuming you are sending plain text mail line-breaks would be ok either as multiline message or added manually i.e .", "I tried to copy the vacancies into the subject define field but then the subject of the mail is empty .", "I m trying to make a simple php form that sends info to my email .", "I would always like if someone can direct me to a cross-browser mail-form .", "got the answer here stackoverflow.com questions 31639073 http : stackoverflow.com questions 31639073 mail-form-gem-with-sidekiq-worker .", "You can simply send to in mail method like you are sending from subject and other variables .", "I m using the mail-form gem https : github.com plataformatec mail-form to handle my website s contact form .", "That contact form when submitted will be sent to the user email specified in the profile attribute .", "I am using Mail form gem Here is what is showing up in my server after a contact form is successful submitted by No email is appearing in my inbox : .. . .. . Here is my development.rb", "The mail-server for @thisdomain.com is hosted with an external webmail service provided by GoDaddy .", "You should use for example PHPMailer instead of native function mail .", "don t use mail use one of the libraries swiftmail or phpmailer", "I do not know anything about said php mail to comment on that .", "From the docs http : guides.rubyonrails.org action mailer basics.html action-mailer-configuration : .. . .. . Determines whether deliveries are actually carried out when the deliver method is invoked on the Mail message .", "The documentation states : .. . .. . To customize the e-mail template that is used create a file called contact.erb in app views mail-form .", "one day everything is fine and it gets e-mailed to me the next day the confirmation message comes up but nothing gets sent to my e-mail .", "Perhaps try to add the correct HTML structure for a mail html body Here your HTML message body html but really not sure :", "NVM : I found it here sanwebe.com 2011 01 send-php-mail-with-attachment http : www.sanwebe.com 2011 01 send-php-mail-with-attachment", "As for emailing Zend Mail http : framework.zend.com manual en zend.mail.html has a very easy to use interface for dealing with email-attachments .", "I have the following mail function : .. . .. . The problem I have is that when the form is used and the message hits my inbox the HTML is being displayed as plain text and not being displayed properly .", "So if the user enters an email-address and clicks on send he need to get the message that he is subscribed to the newsletter without leaving the page .", "I am developing a php form that collects personal information from a user .", "In the mailform I have this code : .. . .. . This makes that this field is indeed showing the vacancy number in the mail that is send .", "I need to always get an e-mail once a person clicks Submit on my site and this coding isn t working for me", "PHP .net has a function called mail which you can read up on .", "I suggest you take a look at Swift Mailer http : swiftmailer.org and don t use the Mail Transport Swift MailTransport", "In Page model write callback as below : .. . .. . Now in MyMailer write send thank you email action and create mailer view for thank you mail .", "I found the following article on Parallels website for this issue .. . .. . http : kb.parallels.com en 116927 .. . .. . Resolution .. . .. . Disable the mail service for the domain.tld subscription : .. . .. . You can also disable the mail service on the subscription using the command-line utility mail : .. . .. . To disable the mail service for every subscription on the server use the following command : .. . .. . I wish I knew how to do this for every subscription through phpMyAdmin my running a mySQL query.. .", "I m using a form with php to allow users to send mail from my website and everything works fine except when you want to add more than one item amount and boxeach to the form .", "I am completely new to PHP and just learned to do the basic mail-form work by basically trial and error along with tutorials on the internet .", "It s working just fine...........except that for some reason I m unable to set the recipient s email-address : TO .. . .. . The code works this way : .. . .. . a the user is asked to provide his login username b php sends an sql query to the database c if the username is found php takes the email-address and sends a Reset Link via email d this reset-link has a unique token attached to it e the user clicks on the link in his email and is re-directed to a new page where he resets his password .. . .. . Everything is working fine...........except for the email structure itself .", "Additionally most servers have PEAR installed to some extent and in the best cases they have Pear Mail and Pear Mail Mime .", "We are attempting to use the Rails MailForm Gem to generate a Contact Form for each instance of campsite within our application so that when the form is completed by a user an email is sent straight from the form to the camp site owner .", "I know a message could be posted with flash but an email to the user would be better in my case .", "Hi I m trying to use the Boostrap Validator plugin for a simple php mail-form but for some reason every time i fill it out correctly and hit send .", "My guess is that your config environments development.rb file is not set up to send mail but to use a test mode on localhost", "2nd stop using mail it works but does a poor job a library that makes a direct connection to the smpt server is far better", "This gives you the advantage of not mixing languages unnecessarily as well as not having to figure out the quirks of mail .", "I suppose I should clarify - I ve been using the standard php mail for quite a while .", "The vacancy number that we fetched in my previous topic should be printed as the mail subject so my crm system is using it to registrate the response .", "Unfortunately my mail forms on my website on the VPS thisdomain.com can not be set to send to any emails @thisdomain.com because it doesn t seem to look at the MX records on the DNS which point to the web server .", "something like if isset REQUEST email and filter-var REQUEST email FILTER VALIDATE EMAIL echo form valid else ...show your form .. .", "This question already has an answer here : .. . .. . mail-form gem with sidekiq worker questions 31639073 mail-form-gem-with-sidekiq-worker 1 answer .. . .. . I m using mail-form gem and have the following code .. . .. . When I submit my contact form it takes a few seconds to send a message and redirect to home page .", "I m currently using mail-form + simple-form gems to send an email to myself after a user submits a contact us form on my site .", "MailForm : : Notifier contact : processed outbound mail in 254.3ms Sent mail to espinozab100@gmail.com 13.7ms Date : Tue 12 Jan 2016 13 : 53 : 40 -0600 From : Brandon espinozab100@gmail.com To : espinozab100@gmail.com Message-ID : 569559c47546e 4ce03ffba94141fc935c5@Bespinoza10MBP.local.mail Subject : Contact Form Mime-Version : 1.0 Content-Type : text html charset UTF-8 Content-Transfer-Encoding : 7bit h4 style text-decoration : underline Contact Form h4 p b Name : b Brandon p p b Email : b espinozab100@gmail.com p p b Message : b TEST SUBJECT p true", "See more details at http : a2zsollution.com php-secure-e-mail .. . .. . What is the simplest way to accomplish this", "Well it sends an email alright but an empty one .", "Then once ActionMailer sends email I update this field or retry later .", "Using the Mail form Gem in rails I can verify that my mail configuration is correct however I don t receive any errors in my logs .", "So is there any good reason to keep using the Perl script or should I just advise him to drop it in favor of PHP mail", "Building mail multipart mixed and add some Lines to devide the parts trenner .. . .. . The main difference from my working solution to your solution is the property Content-Transfer-Encoding which is 7bit for text part and quoted-printable for html", "I have a contact form which send a email with the fields that are filled in .", "I d like to be able to send a second email to the user s email-address with a Thank you message and some other copy directly after submission .", "Since you haven t posted your configuration I would advise you to go through the guides http : guides.rubyonrails.org action mailer basics.html action-mailer-configuration and setup your development profile for mail .", "From should have the syntax From : email or From : name email .", "By sending the message it should take the user to a different page where it says Thank You for your Message .", "I started experiencing problems with having the information e-mailed to me one day everything is fine and it gets e-mailed to me the next day the confirmation message comes up but nothing gets sent to my e-mail .", "2 You can send the email of the user when you can call contact me .", "How would I get rails to send an email to an address with the message in", "I want to create a simple modal message for successful email dispatch .", "http : codular.com php-jquery-contact-form .. . .. . Google ajax email form and you will get many hits .", "My goal is to have a general contact form In which I can link a contact button on a individual user-profile .", "My goal is to simply link the .. . .. . to something like .. . .. . I have no idea how to specify the user for the form or if its possible .", "Working from the assumption your form and your class now both refer to : message is your enquiry params method referring to the same : message attribute", "Sorry but the only other advice I can offer is to use print r msg just before the mail call and view these details in your browser view-source so that you can check them .", "I m not familiar with Perl and my inclination is to just use the PHP mail function and drop the Perl script rather than spend time trying to figure out how to use it correctly .", "http : php.net manual en function.mail.php .. . .. . Ajax is another good method to use for email forms .", ". this- email .", "What do I have to include in the code so that it is checked before sending that the email subject and message is filled out", "For example if you are collecting the user s firstname lastname email-address and a message then you don t have to use SSL ." ] }
{ "confidence": [ 60.28063201904297, 56.622581481933594, 56.095523834228516, 56.09203338623047, 55.55857849121094, 54.19634246826172, 53.23921585083008, 52.703792572021484, 52.58133316040039, 51.78413009643555, 51.414146423339844, 51.16246032714844, 51.11695861816406, 50.04405975341797, 50.03556823730469, 49.6696891784668, 48.921207427978516, 46.67851638793945, 46.45866775512695, 46.35102081298828 ], "content": [ "Question : This question already has an answer here : .. . .. . PHP mail-form doesn t complete sending e-mail questions 24644436 php-mail-form-doesnt-complete-sending-e-mail 20 answers .. . .. . So everything works except that i dont recieve an email after sending and wonder why keeps getting this error Could not execute mail delivery program usr local bin sendmail -oi -t in Html .. . .. . PHP Comment : Use smtp mail class Comment : Is this the correct way to declare a message in message .. . Answer : Maybe your header and message definition is not ok . Try this :", "Question : null .. . Answer : I m trying to make a simple php form that sends info to my email . It works mostly okay except doesn t seem to pick up all the form information . My html is : .. . .. . And the email.php is : .. . .. . The subject line works as I d expect but the email body has nothing in it . However if I change the line above to : .. . .. . Then that works as you d expect . I can t spot any difference between how I m treating x and y though - can anyone help Thanks . Comment : If you change message line to message hello then that works really Am sure you meant message hello - Do read up on the subjects php.net mail http : php.net mail and php.net header http : www.php.net header - I for one won t spend the time debugging your code . Comment : @Fred-ii- If PHP can t find a value assigned to a constant it displays the constant as a string . Comment : That will only screw up the headers . @JamieTaylor - OP needs to understand the basic fundamentals in sending mail not my job . I ve been doing this for too long . Comment : @Fred-ii- Sorry I wasn t trying to correct you . I was pointing out that this is why OP may have thought it worked Comment : Thanks @Fred-ii- : will do . Any ideas about the actual problem", "Question : I m not the greatest with PHP but I managed to use this pre existing code to get my new telephone field validated like the rest . Now I don t know exactly where to put it in order for it to be added to my email . I tried a couple spots but the form stopped working all together . Comment : private function sendEmail mail mail this- email admin this- subject this- message this- telephone From : . this- name . . this- email . r n . Reply-To : . this- email . r n . X-Mailer : PHP . phpversion if mail this- response status 1 this- response html p Thank You p Comment : That was my first guess .. . Answer : I figured it out I joined it with a . to the this- message .. . .. . Its not pretty when out putted but it works : D", "Question : I have the following mail function : .. . .. . The problem I have is that when the form is used and the message hits my inbox the HTML is being displayed as plain text and not being displayed properly . So I can see all the inline HTML element i.e . the .. . will be shown as part of the paragraph and not display a new line . Any help would be awesome EDIT : Comment : What email-client do you use I ve run your code and opend email in Outlook Express - it was absolutely ok .. . Answer : Try using the following function it sends the mail with multipart data", "Question : I already have a form set up on my site . I created the form code myself . I started experiencing problems with having the information e-mailed to me one day everything is fine and it gets e-mailed to me the next day the confirmation message comes up but nothing gets sent to my e-mail . This is very critical for my line of work . My question is : How can I create a simple php mail-form that will always work This is the code I have now : .. . .. . Is there any other easier convenient way or coding I can use that will work properly I need to always get an e-mail once a person clicks Submit on my site and this coding isn t working for me Comment : one day everything is fine and it gets e-mailed to me the next day the confirmation message comes up but nothing gets sent to my e-mail . - Q : Did you modify anything since it did work and did you keep a working copy of the one that was working Comment : One thing I noticed is that you do not have a closing brace for rSubmit .click function Comment : Try adding a brace to your like this see if that works . The one underneath n Exp . Date : + expirydate2 .val Comment : Are you over your 50 email limit from Squaresend Comment : @Fred I did not modify anything since then since it was working fine .. . Answer : In regards to : How can I create a simple php mail-form that will always work .. . .. . There are many PHP based forms that can be found on the Web and you will find many by Googling php form with validation for example . Make sure that it includes proper validation and sanitization . Here is one example on tutsplus.com http : net.tutsplus.com tutorials php sanitize-and-validate-data-with-php-filters .. . .. . Also consult Sanitize filters http : php.net manual en filter.filters.sanitize.php on PHP.net and here also http : php.net manual en filter.examples.sanitization.php for examples . PHP .net has a function called mail which you can read up on . Click here to see it . http : php.net manual en function.mail.php .. . .. . Ajax is another good method to use for email forms . Here is one example . http : codular.com php-jquery-contact-form .. . .. . Google ajax email form and you will get many hits .", "Question : I have the following mail function : .. . .. . The problem I have is that when the form is used and the message hits my inbox the HTML is being displayed as plain text and not being displayed properly . So I can see all the inline HTML element i.e . the .. . will be shown as part of the paragraph and not display a new line . Any help would be awesome EDIT : Comment : What email-client do you use I ve run your code and opend email in Outlook Express - it was absolutely ok .. . Answer : I am always using mixed mail when sending HTML-formatted Mail cause some people have html disabled . Building mail multipart mixed and add some Lines to devide the parts trenner .. . .. . The main difference from my working solution to your solution is the property Content-Transfer-Encoding which is 7bit for text part and quoted-printable for html", "Question : Good evening for my website I am using a mail-form . Apparently it is saying that the message was sent eve though nothing was filled out . I also don t get an e-mail then . What do I have to include in the code so that it is checked before sending that the email subject and message is filled out Thank you for you help Comment : something like if isset REQUEST email and filter-var REQUEST email FILTER VALIDATE EMAIL echo form valid else ...show your form .. . .. . Answer : You need to check for REQUEST email instead of isset REQUEST email and do the same for the other variables . The function isset checks to see if the variable has any value including if the variable was defined as nothing .", "Question : I m currently using mail-form + simple-form gems to send an email to myself after a user submits a contact us form on my site . I then also submit the fields to a database . Everything here is working fine . I d like to be able to send a second email to the user s email-address with a Thank you message and some other copy directly after submission . I know a message could be posted with flash but an email to the user would be better in my case . Can someone please provide some guidance on how this would be done based on the code below Thanks Model : page.rb .. . .. . Controller : pages controller.rb .. . Answer : You can write a after create callback to trigger thank you email . In Page model write callback as below : .. . .. . Now in MyMailer write send thank you email action and create mailer view for thank you mail . Hope this helps . Thanks", "Question : I have the following mail function : .. . .. . The problem I have is that when the form is used and the message hits my inbox the HTML is being displayed as plain text and not being displayed properly . So I can see all the inline HTML element i.e . the .. . will be shown as part of the paragraph and not display a new line . Any help would be awesome EDIT : Comment : What email-client do you use I ve run your code and opend email in Outlook Express - it was absolutely ok .. . Answer : The message .. . .. . The message you re passing to the mail function is not valid HTML . This could be a reason your client isn t showing it properly . Try this : .. . .. . Also make sure attribute-values in tags are wrapped in double-quotes not single-quotes . So it s a href link a and not a href link a . The headers .. . .. . Some notes on the headers you re using though I don t think this is causing your problem : .. . .. . Headers should be separated by r n not n like your MIME-Version . From should have the syntax From : email or From : name email . Reply-To should have the syntax Reply-To : email or Reply-To : name email . Return-Path should have the syntax Return-Path : email . You should add a Content-Length header . Try this : .. . .. . Don t use mail .. . .. . There are lots of lots of issues with the PHP mail function . You should really consider using a 3rd party library for sending emails . I suggest you take a look at Swift Mailer http : swiftmailer.org and don t use the Mail Transport Swift MailTransport", "Question : Imagine a user that would like to put a form on their website that would allow a website visitor to upload a file and a simple message which will immediately be emailed ie the file is not stored on the server or if it is then only temporarily as a file attachment with the note in the message body . See more details at http : a2zsollution.com php-secure-e-mail .. . .. . What is the simplest way to accomplish this Simplest in terms of : .. . .. . Size code-golf .. . Ease of implementation ideally all in one file needs few to no external resources .. . Not obfuscated for the sake of obfuscation tradeoffs for size are fine .. . Self contained example if called without a form post it displays the form .. . .. . This is nearly the reverse of : How to get email and their attachments from PHP http : stackoverflow.com questions 114953 how-to-get-email-and-their-attachments-from-php . It almost could have been answered in Compiling email with multiple attachments in PHP http : stackoverflow.com questions 720455 compiling-email-with-multiple-attachments-in-php but it doesn t actually show code . Comment : I would offer my own solution but judging by previous code-golf competitions I would be soundly beaten .. . Answer : Just for fun I thought I d knock it up . It ended up being trickier than I thought because I went in not fully understanding how the boundary part works eventually I worked out that the starting and ending -- were significant and off it went . Very barebones really and obviously the using inline CSS to hide the form is a bit cheap and you d almost certainly want a bit more feedback to the user Also I d probably spend a bit more time working out what the actual Content-Type for the file is rather than cheating and using application octet-stream but that part is quite as interesting . Comment : This is the best response so far in my opinion as you are the only one to provide full code which the question specifically asks for . +1 . Comment : It s fine to use md5 for the boundary for golf but for production you should double check that the boundary doesn t occur in the encoded attachment . Some encodings are safer eg Base64 will never accidently match a boundary that has in it Comment : Is there any way to attach multiple-files Comment : @MalphasWats if we want to send the image then how to do it Comment : Nice and all but the whole string we create is displayed as is in the mail.. . Is there a way for the file my user uploads to be actually attached to the mail and not encoded in it NVM : I found it here sanwebe.com 2011 01 send-php-mail-with-attachment http : www.sanwebe.com 2011 01 send-php-mail-with-attachment", "Question : This question is an exact duplicate of : .. . .. . My php script for mailing a form is not working questions 16990822 my-php-script-for-mailing-a-form-is-not-working 1 answer .. . .. . Ironically enough even though my code is syntax-wise completely correct when I test it it sends a message to the email addressed to that has nothing content wise nor attachment wise . Anyone can tip me on what may have gone wrong Here s the HTML and PHP any help is appreciated thanks HTML : .. . .. . PHP Comment : You should use for example PHPMailer instead of native function mail . Comment : where is the irony Comment : Well it sends an email alright but an empty one . Comment : After message has been added to msg you add some more text to message but the variable is not used anymore after that . There is also some unused text after you add message to msg . Not sure what you are trying to do there . Comment : I actually don t know much what I am doing RST this is me learning PHP on the go basically while doing an actual thing . And I am Brazilian Dagon . .. . Answer : change this Line 72 .. . .. . To this Comment : Sorry Alpha Root but it didn t make a difference I still get an empty email Comment : She saved her message in msg not in message... .", "Question : null .. . Answer : I am using mail-form and simple-form to create a contact form-for my website . I have used Mandrill as my email delivery service . Everything appears to be working fine according to my logs but I do not get an email delivered to me when I do this . Where I have example@gmail.com is where my actual email is declared and it is entered correctly . I am working in a development-environment . Do you guys know why I am not receiving the messages Comment : Are you using a production key for Mandrill or a test key The latter don t actually send e-mail . Comment : My guess is that your config environments development.rb file is not set up to send mail but to use a test mode on localhost Comment : You both make valid points that are equally correct thanks for shedding some light .", "Question : Why would Contact form email not be coming into my inbox I am using Mail form gem Here is what is showing up in my server after a contact form is successful submitted by No email is appearing in my inbox : .. . .. . Here is my development.rb .. . Answer : You need to set config.action mailer.perform deliveries true in your configuration file . From the docs http : guides.rubyonrails.org action mailer basics.html action-mailer-configuration : .. . .. . Determines whether deliveries are actually carried out when the deliver method is invoked on the Mail message . Comment : just added that no email was delivered however", "Question : I have the following mail function : .. . .. . The problem I have is that when the form is used and the message hits my inbox the HTML is being displayed as plain text and not being displayed properly . So I can see all the inline HTML element i.e . the .. . will be shown as part of the paragraph and not display a new line . Any help would be awesome EDIT : Comment : What email-client do you use I ve run your code and opend email in Outlook Express - it was absolutely ok .. . Answer : I m using this method to send mail . Maybe you can see something it can help :", "Question : I have the following mail function : .. . .. . The problem I have is that when the form is used and the message hits my inbox the HTML is being displayed as plain text and not being displayed properly . So I can see all the inline HTML element i.e . the .. . will be shown as part of the paragraph and not display a new line . Any help would be awesome EDIT : Comment : What email-client do you use I ve run your code and opend email in Outlook Express - it was absolutely ok .. . Answer : Try to replace the lines : .. . .. . With : Comment : No joy outlook and my webmail program are still displaying the inline HTML elements . Comment : Oops I fixed a typo in my answer . Not sure if it works but can you retry Comment : I missed the . too haha . It s still not doing the job I m afraid . The edit above shows what I m getting in the email . Comment : Mmhh. . stange . Perhaps try to add the correct HTML structure for a mail html body Here your HTML message body html but really not sure : Comment : @Diamondo25 . SMTP isn t really weird . It s pretty well defined http : www.faqs.org rfcs rfc821.html . And to my understanding the CRLF from the RFC is the same as r n . Carriage return followed by a linefeed.. . It goes back to typewriters .", "Question : null .. . Answer : I have a php mail-form where people can email an attachment through the web form . I wanted to limit the size of the file that people can send and I go that working great . But the problem I am having is that the form will not submit if people do not include an attachment . Comment : The first step would be : remove the @ and try to avoid using it in the future -- errors should be detected and fixed and not hidden . Then you ll see the error message . Please post it here . Comment : 2nd stop using mail it works but does a poor job a library that makes a direct connection to the smpt server is far better Comment : I removed the @ and nothing happened - same thing.. . the form submits but i dont get an email", "Question : I recently started working on a web project which was already in progress the guy who built the foundation for it had the signup page sending the form fields to a formmail Perl script so that he could get an email when a user signs up . I m not familiar with Perl and my inclination is to just use the PHP mail function and drop the Perl script rather than spend time trying to figure out how to use it correctly . So is there any good reason to keep using the Perl script or should I just advise him to drop it in favor of PHP mail Any pros and cons or is it entirely subjective I realize that this question may be flagged as subjective just looking for advice . .. . Answer : I d recommend a third option : an external PHP mailer class such as PHPMailer . This gives you the advantage of not mixing languages unnecessarily as well as not having to figure out the quirks of mail . It also does things like SMTP email itself if required and can assemble attachments and alternate sections . mail can do none of that . PHP s mail function needs to be caught and shot . It s one of the quirkiest and odd functions that PHP has and requires some knowledge of how SMTP and often MIME work to call . If you do want to figure out how to use put it behind an API call once you have . Comment : I suppose I should clarify - I ve been using the standard php mail for quite a while . I already have it built into the site for email verification and password reset requests . I m just wanting to know if there s any particular advantage to using a separate perl script Comment : If there s nothing else on the site in Perl then no . Comment : Alright thanks", "Question : This question is an exact duplicate of : .. . .. . My php script for mailing a form is not working questions 16990822 my-php-script-for-mailing-a-form-is-not-working 1 answer .. . .. . Ironically enough even though my code is syntax-wise completely correct when I test it it sends a message to the email addressed to that has nothing content wise nor attachment wise . Anyone can tip me on what may have gone wrong Here s the HTML and PHP any help is appreciated thanks HTML : .. . .. . PHP Comment : You should use for example PHPMailer instead of native function mail . Comment : where is the irony Comment : Well it sends an email alright but an empty one . Comment : After message has been added to msg you add some more text to message but the variable is not used anymore after that . There is also some unused text after you add message to msg . Not sure what you are trying to do there . Comment : I actually don t know much what I am doing RST this is me learning PHP on the go basically while doing an actual thing . And I am Brazilian Dagon . .. . Answer : I believe the line-endings for mime-boundaries and their content lines should be r n rather than n . n can be used for the plain text content . Mime-boundaries should also be unique I believe and you appear to have two of the same name . But I haven t used them so someone may correct me Comment : That is sort of redundant I guess but it didn t make a difference on the resulting message even after deleting the second mime boundary . And I ve added the r n too . Comment : It should be r n not r n . Comment : Oops my bad . I wrote it wrong . Comment : Nope it didn t make a difference . Sorry for the delay I was waiting on the server to respond which wasn t . Comment : If it is printing the mime details then these details are not formed correctly . Sorry but the only other advice I can offer is to use print r msg just before the mail call and view these details in your browser view-source so that you can check them .", "Question : Imagine a user that would like to put a form on their website that would allow a website visitor to upload a file and a simple message which will immediately be emailed ie the file is not stored on the server or if it is then only temporarily as a file attachment with the note in the message body . See more details at http : a2zsollution.com php-secure-e-mail .. . .. . What is the simplest way to accomplish this Simplest in terms of : .. . .. . Size code-golf .. . Ease of implementation ideally all in one file needs few to no external resources .. . Not obfuscated for the sake of obfuscation tradeoffs for size are fine .. . Self contained example if called without a form post it displays the form .. . .. . This is nearly the reverse of : How to get email and their attachments from PHP http : stackoverflow.com questions 114953 how-to-get-email-and-their-attachments-from-php . It almost could have been answered in Compiling email with multiple attachments in PHP http : stackoverflow.com questions 720455 compiling-email-with-multiple-attachments-in-php but it doesn t actually show code . Comment : I would offer my own solution but judging by previous code-golf competitions I would be soundly beaten .. . Answer : In order to add the file to the email as an attachment it will need to be stored on the server briefly . It s trivial though to place it in a tmp location then delete it after you re done with it . As for emailing Zend Mail http : framework.zend.com manual en zend.mail.html has a very easy to use interface for dealing with email-attachments . We run with the whole Zend Framework installed but I m pretty sure you could just install the Zend Mail library without needing any other modules for dependencies . With Zend Mail sending an email with an attachment is as simple as : .. . .. . If you re looking for a one-file-package to do the whole form email attachment thing I haven t seen one . But the individual components are certainly available and easy to assemble . Trickiest thing of the whole bunch is the email attachment which the above recommendation makes very simple .", "Question : This question is an exact duplicate of : .. . .. . My php script for mailing a form is not working questions 16990822 my-php-script-for-mailing-a-form-is-not-working 1 answer .. . .. . Ironically enough even though my code is syntax-wise completely correct when I test it it sends a message to the email addressed to that has nothing content wise nor attachment wise . Anyone can tip me on what may have gone wrong Here s the HTML and PHP any help is appreciated thanks HTML : .. . .. . PHP Comment : You should use for example PHPMailer instead of native function mail . Comment : where is the irony Comment : Well it sends an email alright but an empty one . Comment : After message has been added to msg you add some more text to message but the variable is not used anymore after that . There is also some unused text after you add message to msg . Not sure what you are trying to do there . Comment : I actually don t know much what I am doing RST this is me learning PHP on the go basically while doing an actual thing . And I am Brazilian Dagon . .. . Answer : The msg is broken off with the semi-colon at the end of the first line : .. . .. . The following lines are therefore invalid syntax . This also happens further down . Also note that ids cannot contain spaces . Comment : Okay so I ve fixed the things you ve suggested and now I ve received a long email when using message as suggested below with Content-Disposition : attachment . filename C : WINDOWS Temp php5E29.tmp . Content-Transfer-Encoding : base64 and a bunch of random letters right after . Comment : And when using msg in line 72 as originally was I receive an email with only xb360b0fb0d701f96589fd0f97d502387x . Content-Type : text plain charset iso-8859- on it" ] }
[ "yes-answer-long", "yes-answer-short" ]
html-form
UNK_RELATION
microsoft-web-deploy@iis@111
microsoft-web-deploy -- microsoft-web-deploy is a tool to simplify the migration management and deployment of @placeholder web servers applications and sites .
{ "confidence": [ 67.18606567382812, 66.10218811035156, 58.5138053894043, 56.791831970214844, 56.387908935546875, 55.502159118652344, 54.190242767333984, 53.607913970947266, 53.607913970947266, 53.58073806762695, 53.207515716552734, 52.760807037353516, 52.47726058959961, 51.542640686035156, 50.941001892089844, 50.89321517944336, 50.71064376831055, 50.625370025634766, 50.414424896240234, 50.396705627441406, 50.280887603759766, 49.816612243652344, 49.43404769897461, 49.38421630859375, 49.242149353027344, 48.8155403137207, 48.499813079833984, 47.87018585205078, 47.753273010253906, 47.751338958740234, 47.751338958740234, 47.751338958740234, 47.304019927978516, 46.571380615234375, 46.352657318115234, 46.270729064941406, 46.02452850341797, 46.02452850341797, 45.692562103271484, 45.53569030761719, 45.53569030761719, 45.27605438232422, 45.27605438232422, 45.27605438232422, 45.27605438232422, 45.27605438232422, 45.27605438232422, 45.27605438232422, 45.27605438232422, 45.27605438232422, 44.89812469482422, 44.62015151977539, 44.464324951171875, 44.10716247558594, 43.860198974609375, 43.449031829833984, 43.270591735839844, 43.270591735839844, 43.004913330078125, 43.003299713134766, 42.89363098144531, 42.64447021484375, 42.64447021484375, 42.64447021484375, 42.59720230102539, 42.57859420776367, 42.40830612182617, 42.37242889404297, 42.347347259521484, 42.30967330932617, 42.07875061035156, 42.05501937866211, 41.607276916503906, 41.584232330322266, 41.505126953125, 41.31211471557617, 41.25291442871094, 41.054500579833984, 40.178932189941406, 40.169185638427734, 40.169185638427734, 40.169185638427734, 40.169185638427734, 40.169185638427734, 40.169185638427734, 40.169185638427734, 40.169185638427734, 40.169185638427734, 39.518959045410156, 39.518959045410156, 39.518959045410156, 39.518959045410156, 39.518959045410156, 39.50775146484375, 39.40604782104492, 39.1343994140625, 39.10232925415039, 38.84672927856445, 38.81496810913086, 38.46274185180664 ], "content": [ "Installed Web Deploy 3.6 and Web deploy 3.6 for Hosting servers .. . 4 .", "Web Deploy is supported See Features section http : www.iis.net downloads microsoft web-deploy but the Automatic Backup feature is not .", "I m trying to migrate a site to a new server using Microsoft Web Deploy .", "Have you checked the web app deploy page http : azure.microsoft.com en-us documentation articles web-sites-deploy", "And then later deploy that Web Deploy Package .", "Visual Studio s deploy tooling is or at least was generally referred to as the Web Publishing Pipeline and consists of MS Build targets tasks that wrap MSDeploy among other things .. . .. . You can call MSDeploy.exe programfiles IIS Microsoft Web Deploy V3 msdeploy.exe directly to generate packages and deploy to remote IIS servers .", "I am using the Web Deploy 3.5 tool to deploy our .NET 4.0 WCF web service with the help of PackageWeb nuget .", "Web Deploy MSDeploy is actually a completely standalone product .", "The Web Deploy Agent Service requires administrator access .", "Could you also add microsoft-web-deploy synonim for webdeploy or vice versa", "I managed to get VS2010 to deploy automatic backups by stealing some ideas from this question : msdeploy Web Deploy failing with 401 auth issues http : stackoverflow.com questions 4428562 msdeploy-web-deploy-failing-with-401-auth-issues 4898553 4898553 .. . .. . First install Web Deploy v3.5 http : www.iis.net downloads microsoft web-deploy on your local computer - the one with VS2010 installed on it .", "Is a Web Deploy Package subsequent deployment of that package the best way to do this", "In my case I installed Web Deploy BEFORE installing the management service .", "regular not Azure server using Web Deploy", "and the services are started Web Deployment Agent Service and Web Management Service .", "What I want is to support deployment using web deploy without Visual Studio for supporting non ASP.NET developer .", "That in the web.config prevents web deploy from detecting a database to add to the web package for web deploy packaging .", "I had the exact same problem I removed Web Deploy 3.5 and re-installed Web Deploy 3.6", "From the Web Platform Installer 5.0 I installed Web Deploy 3.5 + Web Deploy 3.5 without bundled SQL Support .. . 5 .", "Made sure Web Management Service Web Deployment Agent Service is started and set to Automatic .. . .. . What am i missing", "How do you deploy a web deploy package from the command-line", "Is there any web deploy client other than Visual Studio", "I have managed to setup Web Deploy Automatic Backups by following this guide http : www.iis.net learn publish using-web-deploy web-deploy-automatic-backups which works great .", "I m using Web Deploy and Publish Web dialog for application deploy .", "On the side note : I have followed those same Microsoft instructions http : www.iis.net learn publish using-web-deploy web-deploy-automatic-backups but got nowhere with the PowerShell commands so I have used their Manual Configuration instructions instead .", "http : i.stack.imgur.com sAFeb.png .. . .. . I will get the same error building a web-deployment package or web deploy .", "We have two Windows Server 2008-R2 servers that are being used to test drive Web Deploy : QA and Staging .", "Downloaded Microsoft Web Platform Installer 5.0 .", "I already know how to create a Web Deploy Package that creates the following files .. . .. . I just don t know how to deploy that package to Windows Azure Web Sites", "You need to first install Web Deploy on the IIS Server .", "So I m not sure what s missing to start web deploy .", "So I stopped the apache process and then Web Deploy started fine .", "In Visual Studio 2013 there is a Custom option where you can specify the connection settings and choose between Web Deploy Web Deploy Package FTP and Filesystem .", "Microsoft is being super sneaky about this but it appears they have removed the ability to use web deploy remotely from ALL non server os s .", "Is it possible to run npm-install and bower-install on an IIS server running web deploy after deployment", "I followed this http : martinbuberl.com blog deploy-aspnet-mvc-on-amazon-ec2-with-web-deploy tutorial .. . .. . I installed web deploy 3.5 and added the website in iis on ec2 instance im still getting this error .", "I use web deploy command-line batch files to sync Staging and Production servers .", "We use a CI server Jenkins to compile an ASP.NET project and deploy to our web servers .", "IIRC web deploy support is not there yet .", "I cannot figure out a way to publish a web project in Visual Studio 2015 CTP using web deploy or FTP .", "I am trying to publish a website from my computer to an IIS web server via web deploy .", "Using IIS-10 Web Deploy v3.6 Windows 10 .", "I tried using the Authtype flag in web deploy but that didn t do it for me .", "Install Web deploy 3.5 on youre local machine too using WPI", "Remove Web Deploy 3.6 and reinstall 3.5 and see if it solves your issue .", "Uninstalling Web Deploy 3.6 and installing 3.5 helped to me .", "How can i configure Web Deploy on Windows 10", "i found information about Web Deploy on Windows 8 there it isn t working .", "Uninstalled Web Deploy 3.6 from control panel didn t help .", "Downloaded Web Deploy 3.6 installer then ran uninstall from the installation menu .", "I ve made sure I have the Management Service Delegation rule set up as directed in this blog post http : blogs.msdn.com b amol archive 2011 02 09 allowing-non-admin-users-to-deploy-web-applications-on-iis-7-using-web-deploy-2-0.aspx .", "Also the archive.xml is somewhat deficient as it contains just this info : .. . .. . My PC and both servers have Web Deploy 3.5 installed via Platform Installer .", "If you want to be on Web Deploy 3.6 you can uninstall 3.5 and reinstall 3.6 the uninstallation from Web Deploy 3.5 does not uninstall the missed components so Web Deploy 3.6 works fine when 3.5 was installed before .", "I would like to try the Web Deploy method to deploy our website .", "Check this link for more info : Installing and Configuring Web Deploy on IIS 8.0 or Later http : www.iis.net learn install installing-publishing-technologies installing-and-configuring-web-deploy-on-iis-80-or-later .. . .. . On a different note ASP.NET vNext is still in beta so even if you try to deploy it won t run there .", "I plan to Publish the MVC project into a web deploy package and add queries to the deployment as part of the package .", "preferably with Web Deploy .. . .. . How I think I can accomplish this .. . .. . I suspect that the best way to do this is to create a Web Deploy Package at Test build time .", "It sounds like Web Deploy 3.6 beta supports the new content models in ASP.NET 5 ASP.NET vNext and I guess that the VS 2015 Web-Deploy client doesn t support it yet .", "Following this document http : www.iis.net learn publish using-web-deploy web-deploy-automatic-backups and using Powershell I ve enabled the backups TurnOn-Backups -On true then Configure-Backups -SiteName test1 -Enabled true so Get-BackupSettings -SiteName test1 tells me the backup is enabled .", "Connected to srvr using the Web Deployment Agent Service but could not authorize .", "Customize the profile to support Web Deploy publish", "Web deploy works when I publish from visual-studio but fails when I call msdeploy.exe .", "Setup the publish settings to use Web Deploy just like I have done for many projects .", "UPDATE : I ve figured out that jenkinsApache service is running on port 80 which wasn t allowing Web Deploy Agent to start .", "We use MSDeploy WebDeploy to deploy 50+ applications web win service database with great success .", "There s documentation on how to do so here : Configuring a Site for Delegated Non-Administrator Deployment http : www.iis.net learn install installing-publishing-technologies installing-and-configuring-web-deploy-on-iis-80-or-later 00", "On a side note you can also edit your web deploy configuration via IIS Manager at the server level using the Configuration Editor must have the Management role installed .", "I am having a problem with Web Deploy packages recognizing SQL .", "For example have you ensured that the web-applications dll is built prior to the deployment packaging", "I want to use a cruisecontrol.net like web deploy to transform my base web-config file using a debug or release adaptation to transform the config file .", "The QA server also has Web Deployment Tool 2.1 installed before 3.5 .", "I know there s reference from Deploy to an Azure WebRole without Visual Studio http : stackoverflow.com questions 22336929 deploy-to-an-azure-webrole-without-visual-studio but this is not deployment to azure server but for my company web server IIS .", "When I click publish ASP.NET 5 project in visual-studio only 3 target I can choose : Microsoft Azure Web Apps .. . Import .. . File System .. . .. . There re no Web Deploy or Web Deploy package as shown in ASP.NET 4.6 Project .", "But this option caused problem when our server attacked by virus when one of our developer deploy their web apps via windows share .", "UPDATE .. . .. . Forgot to mention that I have also set the delegation permissions as described at https : blogs.msdn.microsoft.com amol 2011 02 09 allowing-non-admin-users-to-deploy-web-applications-on-iis-7-using-web-deploy-2-0", "The path for express is .. . IDE VWDExpressExtensions Microsoft Web Tools Publish .", "This web server hosts not only ASP.NET web application but also for PHP web apps for my company apps .", "Seems it needs the Web Management Service to be installed FIRST .", "2 3 - Yes you could include SQL into the web-deployment package but it would be deploy each time the package is deployed .", "I have an azure VM with IIS and all the required firewall rules for web deploy setup .", "Yet we rely on the ability to use Web Deploy Publishing via Visual Studio and is integral to our development-process .", "Also is there a way to utilize web deploy within cruise control or is that breaking the rules somehow", "I ve been digging around in the web deploy package and looking at the cmd file that it generates .", "I m in a new environment that isn t set up for web-deploy yet so I haven t tried it myself .", "I had the exact same problem it turned out I had installed Web Deploy 3.6 on top of 3.5 .", "I found out that some components dont get installed propper when using Web Deploy 3.6 .", "Uninstalling Web Deploy 3.6 then installing 3.5 then 3.6 worked for me after an hour of headache .", "Event Log Entry : .. . .. . .. . .. . .. . .. . This occurred when trying to publish content via Web Deploy to a Website using a Replicated DFS share .", "I am using the post here http : stackoverflow.com questions 3097489 how-to-publish-web-with-msbuild 15387814 15387814 to deploy MVC5 application to IIS 8 .", "C : inetpub wwwroot mywebsite MyProjectName deploy .. . .. . I want the code to deploy directly to C : inetpub wwwroot mywebsite where Default Web Site is pointing .", "I am trying to make sure that my app gets deployed to a specific application-pool that already exists when using Web Deploy .", "This is the web deploy command .. . .. . On the target server I can see two security log failure .. . .. . The computer attempted to validate the credentials for an account .", "I ve scoured the web for an answer or hints but does anyone have any information on how to deploy an ASP.NET vNext application to a traditional i.e .", "For several months I have been using Web Deploy to publish ASP.NET Web Applications but for some days now I more and more often receive different errors .", "I m investigating what s involved in deploying an ASP.NET MVC web application to Azure as an App Service using Web Deploy from Visual Studio 2015 .", "Web Deploy Package seems undeveloped for SQL but is there a fix for my issue or a better way to do an all-in-one deploy for IIS SQL", "How can I perform Web Deploy on ASP.NET 5 project", "Try updating your target machine to https : svr : 8172 msdeploy.axd to use the Web Management Service handler .", "I am not trying DACPACs at the moment because I ran into issues where they were not including pre and post deployment scripts in them when using Web Deploy Tool .", "i also checked the web-deployment service running in services.msc" ] }
{ "confidence": [ 71.55976104736328, 67.30238342285156, 65.3816909790039, 64.61798858642578, 63.79553985595703, 63.44561004638672, 62.57783508300781, 61.70951843261719, 58.712013244628906, 58.271141052246094, 57.52090072631836, 56.799034118652344, 56.3447265625, 55.75102996826172, 55.00220489501953, 53.867637634277344, 53.1982421875, 52.75861358642578, 51.48881530761719, 51.04026794433594 ], "content": [ "Question : I have a IIS v7.5 as my web server . This web server hosts not only ASP.NET web application but also for PHP web apps for my company apps . What I want is to support deployment using web deploy without Visual Studio for supporting non ASP.NET developer . Previously we used windows share SMB to support deployment for non ASP.NET developer . But this option caused problem when our server attacked by virus when one of our developer deploy their web apps via windows share . I know there s reference from Deploy to an Azure WebRole without Visual Studio http : stackoverflow.com questions 22336929 deploy-to-an-azure-webrole-without-visual-studio but this is not deployment to azure server but for my company web server IIS . Is there any web deploy client other than Visual Studio Comment : Did you find any solution to this problem I have exactly the same requirement at the moment . Comment : Still no ideal solution . There is possibility to use command-line version but never try it . .. . Answer : Web Deploy MSDeploy is actually a completely standalone product . Visual Studio s deploy tooling is or at least was generally referred to as the Web Publishing Pipeline and consists of MS Build targets tasks that wrap MSDeploy among other things .. . .. . You can call MSDeploy.exe programfiles IIS Microsoft Web Deploy V3 msdeploy.exe directly to generate packages and deploy to remote IIS servers . The tool is Windows only obviously .", "Question : I am trying to deploy my application using the following msdeploy command : .. . .. . Getting the following error : .. . .. . I tried the same command for 6 other servers and it worked fine but not working for 2 of the servers which are configured the same way . 1 . All the IIS installables are in-place .. . 2 . Firewall inbound rule for port 8172 TCP is in-place There are no issues with the other Firewall rules as i have turned the Firewalls off .. . 3 . Installed Web Deploy 3.6 and Web deploy 3.6 for Hosting servers .. . 4 . Made sure Web Management Service Web Deployment Agent Service is started and set to Automatic .. . .. . What am i missing .. . Answer : Added the rule to security group for port 8172 and it started working . But i have no clue why it was working from Visual studio before and not from command-prompt .", "Question : What we do today .. . .. . Currently we Web Deploy to Windows Azure Web Sites WAWS via MSBuild for our test environment using the following command .. . .. . What I want to accomplish .. . .. . I want to create a prod build deployment at the same time as our test build not in the same call to MSBuild unless its possible and later at some time that the build passes testing deploy the prod build to prod via the command-line . preferably with Web Deploy .. . .. . How I think I can accomplish this .. . .. . I suspect that the best way to do this is to create a Web Deploy Package at Test build time . And then later deploy that Web Deploy Package . What I need to know .. . .. . 1 . Is a Web Deploy Package subsequent deployment of that package the best way to do this 2 . How do you deploy a web deploy package from the command-line Right now its painfully easy to deploy via MSBuild with the right parameter set I d like to keep it that simple . I already know how to create a Web Deploy Package that creates the following files .. . .. . I just don t know how to deploy that package to Windows Azure Web Sites Comment : Have you seen PackageWeb sedodream.com 2011 12 24 PackageOncePublishAnywhere.aspx http : sedodream.com 2011 12 24 PackageOncePublishAnywhere.aspx I think it will help you simplify this . Comment : @SayedIbrahimHashimi the code process does not appear to work as of Mar-2016 . Is there potential for an update Comment : @Snowy if you are having a problem please file an issue at github.com sayedihashimi package-web issues https : github.com sayedihashimi package-web issues Comment : @allen - Did you find solution for it Comment : @Yogi yep we call the x.deploy.cmd with the azure deployment credentials and that will properly deploy it to the azure website .. . Answer : We ended up using this batch-file to deploy the package to azure . I named the variables the same as the variables you get when you download the azure deployment credentials from the azure control panel .", "Question : What we do today .. . .. . Currently we Web Deploy to Windows Azure Web Sites WAWS via MSBuild for our test environment using the following command .. . .. . What I want to accomplish .. . .. . I want to create a prod build deployment at the same time as our test build not in the same call to MSBuild unless its possible and later at some time that the build passes testing deploy the prod build to prod via the command-line . preferably with Web Deploy .. . .. . How I think I can accomplish this .. . .. . I suspect that the best way to do this is to create a Web Deploy Package at Test build time . And then later deploy that Web Deploy Package . What I need to know .. . .. . 1 . Is a Web Deploy Package subsequent deployment of that package the best way to do this 2 . How do you deploy a web deploy package from the command-line Right now its painfully easy to deploy via MSBuild with the right parameter set I d like to keep it that simple . I already know how to create a Web Deploy Package that creates the following files .. . .. . I just don t know how to deploy that package to Windows Azure Web Sites Comment : Have you seen PackageWeb sedodream.com 2011 12 24 PackageOncePublishAnywhere.aspx http : sedodream.com 2011 12 24 PackageOncePublishAnywhere.aspx I think it will help you simplify this . Comment : @SayedIbrahimHashimi the code process does not appear to work as of Mar-2016 . Is there potential for an update Comment : @Snowy if you are having a problem please file an issue at github.com sayedihashimi package-web issues https : github.com sayedihashimi package-web issues Comment : @allen - Did you find solution for it Comment : @Yogi yep we call the x.deploy.cmd with the azure deployment credentials and that will properly deploy it to the azure website .. . Answer : Have you checked the web app deploy page http : azure.microsoft.com en-us documentation articles web-sites-deploy Azure commandlets in powershell are popular . Comment : I ve been digging around in the web deploy package and looking at the cmd file that it generates . I think I can use this in conjunction with the deployment settings that you can download from azure . I ll try it and post the results if it works", "Question : I am using the Web Deploy 3.5 tool to deploy our .NET 4.0 WCF web service with the help of PackageWeb nuget . We have two Windows Server 2008-R2 servers that are being used to test drive Web Deploy : QA and Staging . Both servers are configured to create up to 20 automatic backups per application during deployments . For some reason our Staging server generates backup ZIP files that only contain two files : .. . .. . archive.xml .. . systemInfo.xml .. . .. . The Contents directory is not there and there is no error being logged in Windows Event Logs . What s worse is that the servers are configured to not continue up on backup failure continueSyncOnBackupFailure false but this obvious failure to add the Contents directory is seemingly not regarded as an error by the tool so the tool happily continues to deploy the package . Also the archive.xml is somewhat deficient as it contains just this info : .. . .. . My PC and both servers have Web Deploy 3.5 installed via Platform Installer . The deployment user account is an administrative account Active Directory user on the QA server and a local user on Staging . The QA server also has Web Deployment Tool 2.1 installed before 3.5 . Without a meaningful logging and abundant manuals there is not much to go by . I am hoping that this is something someone had resolved in the past . Thanks a lot Comment : I take it nobody had this problem . Just in case it is important - the failing server is at Rackspace . .. . Answer : I recently had this I looked up each of the parameters in my command and found the problem was that I had this in the command : .. . .. . This was turning off the Content being backed up . You can read more about the various parameters from Technet : http : technet.microsoft.com en-gb library dd569089 28v ws.10 29.aspx", "Question : I am trying to publish a website from my computer to an IIS web server via web deploy . I have 3 servers . All servers have installed the same things Webdeploy etc . and the services are started Web Deployment Agent Service and Web Management Service . On the first server I have no problems on connecting . But the other two servers give me some error when I Validate Connection in Visual Studio to the IIS . When I look at the logs on the IIS server there are my accesses listet with html code 200 ok . An error ocurred when the request was processed on the remote computer . Filename : MACHINE WEBROOT .. . .. . Error : The configuration section system.webServer management delegation cannot be read because it is missing schema .. . .. . I really have no idea what could solve this problem and hope you are able to help me . .. . Answer : I had the exact same problem it turned out I had installed Web Deploy 3.6 on top of 3.5 . Remove Web Deploy 3.6 and reinstall 3.5 and see if it solves your issue . Comment : Thank you very much . I found out that some components dont get installed propper when using Web Deploy 3.6 . Uninstalling Web Deploy 3.6 and installing 3.5 helped to me . If you want to be on Web Deploy 3.6 you can uninstall 3.5 and reinstall 3.6 the uninstallation from Web Deploy 3.5 does not uninstall the missed components so Web Deploy 3.6 works fine when 3.5 was installed before . Comment : Uninstalling Web Deploy 3.6 then installing 3.5 then 3.6 worked for me after an hour of headache . OS is Win Server 2012 R2 . Thank you . Comment : I had the exact same problem I removed Web Deploy 3.5 and re-installed Web Deploy 3.6 Comment : In my case I installed Web Deploy BEFORE installing the management service . I tried to to a change on the install to include the management service or you can add the feature from add remove windows features but that didn t help got the error on this post . In the end a simple uninstall and reinstall of 3.6 was what worked for me . Seems it needs the Web Management Service to be installed FIRST . Typical MS instructions don t even mention this at all . Comment : I had exactly the same case as @JamesWilkins .", "Question : How can i configure Web Deploy on Windows 10 Should it work i found information about Web Deploy on Windows 8 there it isn t working . How is it in Windows 10 Thanks Comment : I m having this problem too trying to run it to deploy on a dev machine with Windows 10 Pro . Web Management Service is installed and running but not listening on any port as far as I can see so I can t connect to it . IIS management tools don t show up in IIS either and there s precious little info about the whole thing for Windows 10 . .. . Answer : Ok I did this in Windows 10 : .. . .. . 1 . Uninstalled Web Deploy 3.6 from control panel didn t help . 2 . Downloaded Web Deploy 3.6 installer then ran uninstall from the installation menu . 3 . Downloaded Microsoft Web Platform Installer 5.0 . 4 . From the Web Platform Installer 5.0 I installed Web Deploy 3.5 + Web Deploy 3.5 without bundled SQL Support .. . 5 . I seem to have the deploy context menu back when I right-click a site . Comment : U need to have the Management service running port 8172 DEFAULT to accept the requests .", "Question : I ve set up Web Deploy on a destination server and I can verify this because I ve created a Publish Profile in Visual Studio and it validates works when I use my credentials . Now I want to set it up with an IIS Manager User so I can share those credentials instead of managing multiple accounts . I created an IIS Manager User gave it access to the site I publish and try to verify the Publish Profile still works . It fails . Connected to srvr using the Web Deployment Agent Service but could not authorize . Make sure you are an administrator on srvr . Learn more at : http : go.microsoft.com fwlink LinkId 221672 ERROR USER NOT ADMIN . .. . The remote-server returned an error : 401 Unauthorized . Looking at the Security logs in Server Manager I can see that it tried and failed to validate the IIS Manager User as an account . Why is srvr looking for an account for the IIS Manager User How can I set it up to use another account Do I need to do something special under Management Service Delegation If so what All the instructions I ve found seem to set up what I ve already got despite claims of including how to set up non-admins or IIS Manager Users . .. . Answer : The Web Deploy Agent Service requires administrator access . Try updating your target machine to https : svr : 8172 msdeploy.axd to use the Web Management Service handler . For more information on the various deployment methods take a look at my blog post https : blog.richardszalay.com 2013 02 02 building-a-deployment-pipeline-with-msdeploy-part-4-server-configuration or the Microsoft documentation https : technet.microsoft.com en-us library ee461175 v ws.10 .aspx . Keep in mind that if you are using an IIS user you ll need to make sure you ve configured delegation rules such that the contentPath provider will be able to write to the website s directory with the correct permissions . To be honest I d recommend creating a local Windows user and configuring it for non-administrator deployments . There s documentation on how to do so here : Configuring a Site for Delegated Non-Administrator Deployment http : www.iis.net learn install installing-publishing-technologies installing-and-configuring-web-deploy-on-iis-80-or-later 00", "Question : I ve been struggling to setup automatic backup but seems to have hit a wall . Following this document http : www.iis.net learn publish using-web-deploy web-deploy-automatic-backups and using Powershell I ve enabled the backups TurnOn-Backups -On true then Configure-Backups -SiteName test1 -Enabled true so Get-BackupSettings -SiteName test1 tells me the backup is enabled . However whenever I do a publish from Visual Studio - no backup is created . I ve set the backup path the permissions are set to allow everything for everyone. . so I have no idea what else I can check . Comment : I m actually working on this same issue . I ll let you know when I figure it out . : .. . Answer : Short Answer : Currently broken in VS 2010 Web One Click Publish feature . : .. . .. . I spent nearly an entire week working closely with the MS Dev team and trying everything imaginable on this one and have yet to find a solution that doesn t involve the msdeploy.exe command utility i.e . no luck for doing this from VS directly using the Web One Click Publish feature . : .. . .. . Hopefully they make a patch to address this issue in VS 2010 SP1 . Web Deploy is supported See Features section http : www.iis.net downloads microsoft web-deploy but the Automatic Backup feature is not . I know this isn t the answer you were looking for nor was I but the sad fact of the matter nevertheless . I think the best you can hope for at this point is as Sayed answered here http : social.msdn.microsoft.com Forums eu msbuild thread 03f5d7aa-2a52-4149-80dd-66dda87f4b5a and while old remains the only solution at this time Note : The msbuild tab for the old VS 2008 Web Site template is now Build Events under the Compile tab in VS 2010 Web App projects . Only downside to this method is that it will create a backup every time you compile not just when you deploy . Otherwise you ll have to write a special script that you run prior to each publish . On a side note you can also edit your web deploy configuration via IIS Manager at the server level using the Configuration Editor must have the Management role installed . enter image description here http : i.stack.imgur.com Fhhfw.png Comment : Thanks . That is a pretty big feature to miss on MS part. . Comment : @Eugene Indeed . Makes me sad face . : Comment : You guys rock : the turnedOn item has been missing from my configuration This is in my opinion the most misleading part about the automatic backups . I have added that item to my server configuration and voila the backups are being created . On the side note : I have followed those same Microsoft instructions http : www.iis.net learn publish using-web-deploy web-deploy-automatic-backups but got nowhere with the PowerShell commands so I have used their Manual Configuration instructions instead . The instructions say nothing about the turnedOn element - what a grave omission . Comment : I ve managed to get one-click publishing with VS2010 to successfully create backups . Please see my answer below and let me know if it works for you", "Question : null .. . Answer : In Services when I try and start the Web Deployment Service I get the error .. . .. . The Event Viewer says .. . .. . I m setting Jenkins up on this server and according to netstat -aon the PID matches up with the listener on Port 80 . But that s the same as my other Jenkins servers . So I m not sure what s missing to start web deploy . UPDATE : I ve figured out that jenkinsApache service is running on port 80 which wasn t allowing Web Deploy Agent to start . On our other jenkins server we don t use apache it looks like we forward requests on port 80 to Tomcat . So I stopped the apache process and then Web Deploy started fine . Then I edited the server.xml file and uncommented this line : .. . .. . That line was uncommented in our other server . But I can no longer get to the web interface for jenkins .", "Question : I m developing an ASP.NET Web Forms application under Visual Studio 2012 . I m using Web Deploy and Publish Web dialog for application deploy . I m trying to deploy a database-schema using the Update database feature . I entered a connection-string pointing to remote SQL Server . If I click the Test connection button Visual Studio says test connection is succeeded . enter image description here http : i.stack.imgur.com hBh4C.png .. . .. . Then I go to Preview tab and click the Preview database link . enter image description here http : i.stack.imgur.com Wtn1m.png .. . .. . And in the opened window I have the message .. . .. . Web deployment task failed . Could not generate deployment script . Unable to connect to target server . Learn more at : http : go.microsoft.com fwlink LinkId 221672 ERROR EXECUTING METHOD . Other project files are deployed normally . I m able to connect to SQL Server using SQL Server Management Service . But why the database could not be updated I tried to disable server firewall - with no luck . Visual Studio Professional 2012 .. . SQL Server 2012 .. . Web Deploy 3.0 .. . .. . Update .. . .. . All works fine if I use SQL Server Authentication with the sa login instead of Windows Authentication in connection-string for DatabaseEntitiesRaw . But Windows Authentication works fine for SSMS and I want to use it since I m deploying only from computers within my company s domain . Is it true that dbDacFx doesn t work with Windows Authentication Comment : What happens if you just deploy instead of preview Comment : @aclear16 The same error in the output window : 2 C : Program Files x86 MSBuild Microsoft VisualStudio v11.0 Web Microsoft.Web.Publishing.targets 4377 5 : Error ERROR EXECUTING METHOD : Web deployment task failed . Could not deploy package . Unable to connect to target server.. . Comment : You probably need to enable EF Code first migration . Use the link next the triangle with the exclamation point in it . Comment : @aclear16 I m trying to deploy this database as a stand-alone one without any connection to the EF since I m using a Data First approach . Comment : Problem was in the authentication method . See the update section in the initial question . .. . Answer : Deploy script runs from AUTHORITY LOCAL SERVICE user so you have to add this user to SQL server . Do not foget to add db owner role for the user .", "Question : I ve been struggling to setup automatic backup but seems to have hit a wall . Following this document http : www.iis.net learn publish using-web-deploy web-deploy-automatic-backups and using Powershell I ve enabled the backups TurnOn-Backups -On true then Configure-Backups -SiteName test1 -Enabled true so Get-BackupSettings -SiteName test1 tells me the backup is enabled . However whenever I do a publish from Visual Studio - no backup is created . I ve set the backup path the permissions are set to allow everything for everyone. . so I have no idea what else I can check . Comment : I m actually working on this same issue . I ll let you know when I figure it out . : .. . Answer : I managed to get VS2010 to deploy automatic backups by stealing some ideas from this question : msdeploy Web Deploy failing with 401 auth issues http : stackoverflow.com questions 4428562 msdeploy-web-deploy-failing-with-401-auth-issues 4898553 4898553 .. . .. . First install Web Deploy v3.5 http : www.iis.net downloads microsoft web-deploy on your local computer - the one with VS2010 installed on it . Now edit your VS2010 environment config : .. . .. . Find the assemblyBinding node and add the following just inside it : .. . .. . Save and restart VS2010 . You should now find you can use one click publishing in VS2010 to push to a server running Web Deploy v3 and if you ve configured backups correctly on the server see @Chiramisu s answer then backups should be successfully created Woop Comment : This worked great .", "Question : I am having a problem with Web Deploy packages recognizing SQL . I am using Visual Studio 2015 SQL Server 2014 SSDT Database Project . The workflow is create a MVC project create a Database project and use the Web Deploy Package to run SQL queries on the DB project . I plan to Publish the MVC project into a web deploy package and add queries to the deployment as part of the package . I am not trying DACPACs at the moment because I ran into issues where they were not including pre and post deployment scripts in them when using Web Deploy Tool . The problem happens when publishing a web deploy package using the connection-string below . That in the web.config prevents web deploy from detecting a database to add to the web package for web deploy packaging . deloy package missing database http : i.stack.imgur.com jNnAt.png .. . .. . Whenever I change to a normal connection-string even something as simple as this : .. . .. . Then web-deployment package works and you get the proper UI . deloy package working http : i.stack.imgur.com SIa5R.png .. . .. . Anyone know how to get the database to show up using a configsource in the web.config connectionstrings As an alternative I was looking into getting parameters.xml to replace the blank connection-string to include the configSource above but have had no luck . The idea was to remove the Default connection and replace it with the config source . Removing the default connection works but the configSource does not . Web Deploy Package seems undeveloped for SQL but is there a fix for my issue or a better way to do an all-in-one deploy for IIS SQL Comment : We use MSDeploy WebDeploy to deploy 50+ applications web win service database with great success . We found early on that trying to place web and sql-in the same package was problematic so we went to individual packages for each . This worked out much better . We automated the deployment of the packages in a Thoughtworks GO pipeline . .. . Answer : Use WebDeploy Parameterization to manually create parameters for the separate config file . Skip down to Step 3 - Create a parameter file in the following link : .. . .. . http : www.iis.net learn publish using-web-deploy web-deploy-parameterization .. . .. . This may also be helpful : .. . .. . http : www.dotnetcatch.com 2014 09 08 parameterizationpreview-visual-studio-extension", "Question : The title needs some expansion . In summary I am finding it impossible to : .. . .. . Deploy a web site to an IIS 8 host .. . Using a Web Deploy Package .. . Using the out-of-the-box publish functionality in VS 2013 .. . Using a non-admin IIS Manager User which is delegated permission to deploy to the given site .. . .. . It all seems to come down to one small detail that messes it all up but I should describe my process up to the point where it all falls apart . I create a publish profile Publish in VS 2013 configured to publish to a web package . I then fire the following command at a developer command-prompt : .. . .. . This goes through a build-process and I now see the expected package and deployment files in the PublishedWebsites Web Package folder . My next step is run this from the Web Package folder : .. . .. . This is where the problem comes in . This results in the following expanded command formatted for ease of reading : .. . .. . whose execution results in : .. . .. . I can fix this problem by manually re-running just the expanded command and tagging on the site parameter to the MsDeploy.axd URL like so : .. . .. . However I cannot see any way to have this set through Web.deploy.cmd which was auto-generated by MSBuild . If I try this : .. . .. . It results in this again formatted for ease of reading : .. . .. . I can perform this process fine using an admin account . But it seems that the non-admin requires this site querystring value and the auto-generated Web.deploy.cmd just isn t having any of that . Am I missing something obvious here Is there a permission I m missing on the IIS Management side I ve made sure I have the Management Service Delegation rule set up as directed in this blog post http : blogs.msdn.com b amol archive 2011 02 09 allowing-non-admin-users-to-deploy-web-applications-on-iis-7-using-web-deploy-2-0.aspx . .. . Answer : You can put the M : parameter in quotes like so :", "Question : How can i configure Web Deploy on Windows 10 Should it work i found information about Web Deploy on Windows 8 there it isn t working . How is it in Windows 10 Thanks Comment : I m having this problem too trying to run it to deploy on a dev machine with Windows 10 Pro . Web Management Service is installed and running but not listening on any port as far as I can see so I can t connect to it . IIS management tools don t show up in IIS either and there s precious little info about the whole thing for Windows 10 . .. . Answer : Microsoft is being super sneaky about this but it appears they have removed the ability to use web deploy remotely from ALL non server os s . Even in Windows 7 if you do all of the newest updates the deploy menu vanishes in IIS . So if you want to use web deploy it seems like your only option is to shell out some bucks for a server os . HOWEVER I was able to get FTP publishing configured and working on my Windows 10 machine which works almost as well . Just install the FTP server under control panel programs and settings install windows components . Then open iis mgr and right-click on your site and a configure FTP publishing option should pop-up . The configuration is a pain and not straightforward but if you mess with it you ll figure it out . Then in Visual Studio right-click on your project hit publish then in the first screen in the drop down there is the good old fashioned ftp option . Good luck EDIT .. . .. . From OP s response another solution is to simply share the root folder on the server so for example .. . .. . C : inetpub www .. . .. . Then mount that share on your development box I mounted it as the P : drive for production and Q : drive for qa . Then in visual-studio on the publish screen just select deploy to file system and deploy to that mapped-drive works like a charm and is far simpler than setting up FTP . Comment : Thanks for your reply . I know how to use FTP publishing . I prefer to use shared folders and deploy to folder in my local network . It s easier . Comment : That is another option I actually hadn t considered lets get this documented too as I know there are a ton of noob devs frustrated as can be over this right now . If you just share the root folder and deploy directly to that is that all you have to do Can you deploy to a unc path or do you have to mount the share Comment : I share app folder on server mount it locally and deploy to mounted localization . Comment : I tried that this weekend and it s soo much simpler than setting up ftp . It s amazing to me how often the simple things escape me.. .", "Question : When I click publish ASP.NET 5 project in visual-studio only 3 target I can choose : Microsoft Azure Web Apps .. . Import .. . File System .. . .. . There re no Web Deploy or Web Deploy package as shown in ASP.NET 4.6 Project . How can I perform Web Deploy on ASP.NET 5 project Comment : IIRC web deploy support is not there yet . Comment : check out this question : stackoverflow.com questions 29787379 http : stackoverflow.com questions 29787379 non-azure-deployment-through-vs-2015-rc 29791193 29791193 Comment : I suggest you look at using dnu to create deployments though webdeploy is unlikely to help you . .. . Answer : Publishing an ASP.NET 5 project to an IIS server with Web Deploy requires a few additional steps in comparison to an ASP.NET 4 project . Before asp.net dev team provide a better solution you can just follow the instruction from docs.asp.net Publishing to IIS with Web Deploy using Visual Studio 2015 https : docs.asp.net en latest publishing iis-with-msdeploy.html .. . .. . To publish an ASP.NET 5 application to a remote IIS server the following steps are required . 1 . Configure your remote IIS server to support ASP.NET 5 .. . 2 . Create a publish profile .. . 3 . Customize the profile to support Web Deploy publish", "Question : null .. . Answer : I m trying to migrate a site to a new server using Microsoft Web Deploy . The command I m using is the following : .. . .. . When I run it locally on the server itself it copies all of the site information that I want but it sets the Connect As user in the site s Basic Settings as SANDBOX sandbox usr . But as I m working on automation I m not running the script locally I m executing it from a uDeploy server . When I execute it from my uDeploy server everything gets put onto the server but the user that s set is sandbox usr which isn t what I want . I tried using the Authtype flag in web deploy but that didn t do it for me . Any ideas Comment : have you tried starting it with start-process and pass it credentials this way Since i dont see where you declare the user i assume it uses the user that runs the command Comment : @Paul the user account that s running the scripts in both local and remote script execution are SANDBOX pcort . What I did to get the IIS package was create a template of the IIS set up we wanted and then we re going to deploy that to servers . What I m not understanding is why the domain is there when I run it locally but not when I run it remotely .", "Question : The title needs some expansion . In summary I am finding it impossible to : .. . .. . Deploy a web site to an IIS 8 host .. . Using a Web Deploy Package .. . Using the out-of-the-box publish functionality in VS 2013 .. . Using a non-admin IIS Manager User which is delegated permission to deploy to the given site .. . .. . It all seems to come down to one small detail that messes it all up but I should describe my process up to the point where it all falls apart . I create a publish profile Publish in VS 2013 configured to publish to a web package . I then fire the following command at a developer command-prompt : .. . .. . This goes through a build-process and I now see the expected package and deployment files in the PublishedWebsites Web Package folder . My next step is run this from the Web Package folder : .. . .. . This is where the problem comes in . This results in the following expanded command formatted for ease of reading : .. . .. . whose execution results in : .. . .. . I can fix this problem by manually re-running just the expanded command and tagging on the site parameter to the MsDeploy.axd URL like so : .. . .. . However I cannot see any way to have this set through Web.deploy.cmd which was auto-generated by MSBuild . If I try this : .. . .. . It results in this again formatted for ease of reading : .. . .. . I can perform this process fine using an admin account . But it seems that the non-admin requires this site querystring value and the auto-generated Web.deploy.cmd just isn t having any of that . Am I missing something obvious here Is there a permission I m missing on the IIS Management side I ve made sure I have the Management Service Delegation rule set up as directed in this blog post http : blogs.msdn.com b amol archive 2011 02 09 allowing-non-admin-users-to-deploy-web-applications-on-iis-7-using-web-deploy-2-0.aspx . .. . Answer : I can t see a way around this using the process I ve laid out . My solution here is to simply take the expanded MSDeploy.exe command-line and use it directly instead of the generated .deploy.cmd file . Of course if anyone comes along with an actual solution to my original problem I ll happily mark that one as the answer . Until then this is my solution .", "Question : I would like to try the Web Deploy method to deploy our website . Before my questions I would like to provide a few details about the current deployment procedure : .. . .. . 1 . It is an enterprise site is hosted on multiple servers with continuous-deployment . 2 . The files are not in Release mode but in Debug mode . 3 . We manually copy-paste only the current assignment related files . Say this week the Accounts module is to be deployed then the files to be deployed are .. . mysite App Code Models accounts.cs .. . mysite pages accounts.aspx accounts.aspx.cs .. . .. . The 3 files will be copied to the respective folders in all the servers manually . This has been the procedure for years here . 4 . The project mysite is an ASP.NET Website and not ASP.NET Web Application in VS2013 which means these options are unavailable - Package Publish Web Package Publish SQL .. . .. . I have created the packages in the dev system .. . i using the publish option web-deployment package in Visual Studio and also .. . ii export application in IIS gives the option to select the files .. . .. . 1 . Is it possible to create a package only for the files I need in this case accounts.cs accounts.aspx accounts.aspx.cs using VS publish feature . 2 . Is it possible to include custom SQL scripts file in the package . using IIS or VS .. . 3 . If the answer is a Yes for Q2 then it should be executed only once not for all servers . Because there is only one DB server . How can it be done . I did not go for the Installing package part yet . .. . Answer : 1 - Not through VS because there is no extension point that I know of into MSBuild for Websites . Sayed has a great post http : sedodream.com 2012 08 06 PlansRegardingWebsiteProjectsAndWebDeploymentProjects.aspx which describes how Websites are treated differently than Apps . Alternative - You could copy the files you wish to deploy to a new folder and then use the MSDeploy.exe commandline tool to create a customer MSDeploy package which you can deploy to your server . 2 3 - Yes you could include SQL into the web-deployment package but it would be deploy each time the package is deployed . We have found its better to seperate our SQL deployments into its own package so we can deploy it only when we want to . This post describes how we handle our SQL deployments - https : dotnetcatch.com 2016 02 10 deploying-a-database-project-with-msdeploy", "Question : I followed this http : martinbuberl.com blog deploy-aspnet-mvc-on-amazon-ec2-with-web-deploy tutorial .. . .. . I installed web deploy 3.5 and added the website in iis on ec2 instance im still getting this error . enter image description here http : i.stack.imgur.com Lf89h.jpg .. . .. . Im using public dns as the service url .. . .. . Thanks in advance .. . .. . Edit : im using visual-studio-2012 and website is in .NET 4.5 Comment : was there any errors while installing Comment : @utility no error everything went fine exactly like the tutorial each n every step except i changed the name of the website . i also checked the web-deployment service running in services.msc .. . Answer : Install Web deploy 3.5 on youre local machine too using WPI" ] }
[ "yes-answer-long", "yes-answer-short" ]
iis
UNK_RELATION
sql-order-by@sql@60
sql-order-by -- an order by clause in sql specifies that a @placeholder select statement returns a result set with the rows being sorted by the values of one or more columns .
{ "confidence": [ 46.93069076538086, 45.66767501831055, 43.77873229980469, 43.342323303222656, 43.087188720703125, 42.46581268310547, 41.757476806640625, 40.94301986694336, 40.426448822021484, 40.3275146484375, 40.18508529663086, 39.913543701171875, 39.423370361328125, 38.65650939941406, 38.57689666748047, 37.96049880981445, 37.65321350097656, 37.498291015625, 37.49496841430664, 37.04969787597656, 36.98221969604492, 36.952415466308594, 36.806419372558594, 36.24320983886719, 36.1939697265625, 36.034515380859375, 35.93278884887695, 35.849609375, 35.815223693847656, 35.751739501953125, 35.662437438964844, 35.648460388183594, 35.531768798828125, 35.526336669921875, 35.462074279785156, 35.39225387573242, 35.39225387573242, 35.119197845458984, 35.11727523803711, 34.86040115356445, 34.83354949951172, 34.68825149536133, 34.68476867675781, 34.37519073486328, 34.37519073486328, 34.32666778564453, 34.29677200317383, 34.21529769897461, 34.15238571166992, 34.000919342041016, 33.93327713012695, 33.846717834472656, 33.82053756713867, 33.74079132080078, 33.6824951171875, 33.640907287597656, 33.634674072265625, 33.58084487915039, 33.47593688964844, 33.36774444580078, 33.28517532348633, 33.270137786865234, 33.23591995239258, 33.23591995239258, 33.19473648071289, 33.185123443603516, 33.17789840698242, 33.15985870361328, 33.14638137817383, 32.921878814697266, 32.84053421020508, 32.82636642456055, 32.804664611816406, 32.7599983215332, 32.71427917480469, 32.71427917480469, 32.69204330444336, 32.601417541503906, 32.59741973876953, 32.567203521728516, 32.528263092041016, 32.528263092041016, 32.48486328125, 32.43603515625, 32.43603515625, 32.346900939941406, 32.31201934814453, 32.21820831298828, 32.21437454223633, 32.16239929199219, 32.16239929199219, 32.16239929199219, 32.05363845825195, 32.05363845825195, 32.00162124633789, 31.97330093383789, 31.940196990966797, 31.923099517822266, 31.858272552490234 ], "content": [ "When using a CASE statement which is standard SQL SQL Server can very well use an expression in the ORDER BY clause .", "The WHERE clause in SQL does not affect the sort order the ORDER BY clause does that .", "If the ORDER BY clause is specified the returned rows are sorted in the specified order .", "In short : .. . .. . Does a Group By clause in an Query gaurantee that the output data will be sorted on the Group By columns in order even if there is NO Order By clause", "The order of the columns in the SELECT clause is very important .", "Need the result set of the SQL query in the order of the param values what i gave in the in function order .", "SQL can only return them in an order specified in the order by clause or in any order if there s no such clause .", "For MS SQL the only thing that reliably delivers the rows in a certain order is an explicit ORDER BY clause .", "In fact SQL standard does not even allow the ORDER BY clause to appear in this subquery we allow it because ORDER BY .. . LIMIT .. . changes the result the set of rows not only their order .", "In Oracle what is the the default ordering of rows for a select query if no order by clause is specified .", "If you want the records in a particular order you need to specify an ORDER BY clause that tells SQL the order you want .", "As this is worked out prior to the ORDER BY statement being processed the ORDER BY clause has no effect on which one is chosen .", "There is no way in SQL to specify that a sort order should follow the ordering of items in an IN clause .", "Try this query : .. . .. . When you don t specifies the table in ORDER BY just the alias they will order the result-of the select .", "but the order by i used in the select sql is not working .", "Here http : stackoverflow.com questions 13135347 sql-statement-returns-wrong-values-top-n-order-by Bye", "Your select statement has no order by and therefor the database is free to return the rows in any order it likes .", "The IN clause describes a set of values and sets do not have order .", "If you don t specify an ORDER BY clause explicitly there is no guaranteed order that the results will be sorted in .", "I just added brackets to encapsulate the SQL prior to apply the ORDER BY clause .", "Bottom line as already very well said by ammoQ : if you need the rows sorted use an ORDER BY clause .", "According to ANSI SQL you can only ORDER BY selected columns when SELECT DISTINCT .", "The ONLY way to get a sorted result is to use ORDER BY .", "As I know from the relational-database theory a select statement without an order by clause should be considered has not particular order .", ".. . You need to treat the subquery in the FROM clause as a set of rows in some unspecified and undefined order and put the ORDER BY on the top-level SELECT .", "For no order by that is the expected result and no 2nd where -evaluation with order by so 6 rows .", "Read about ORDER BY clause : w3schools.com sql sql orderby.asp http : www.w3schools.com sql sql orderby.asp", "Take a look at SQL queries in LINQ : order by http : www.codeducky.org sql-queries-in-linq order-by .", "In SQL the ORDER BY clauses are processed in specific order .", "That s the point without an order by clause the order of any query is undefined as per the various SQL standards .", "There is one order by clause per union .", "So how in SQL would you select the rows from base and order by the name column in a totally different table that is player", "unfortunately MS SQL doesn t allow an order by clause in the update .", "You can use a CASE statement in your ORDER BY clause and COALESCE the values .", "While it s obviously good practice to order by the columns in the select I m surprised that this actually has any impact on the result set .", "Is it possible to do a SELECT statement with a predetermined order ie .", "Is it possible to specify an arbitrary order for a MySQL SELECT statement", "The ORDER BY clause acts on the entire set .", "Hi Hauser I am using order by in my select sql .", "I need to render the result-of an array in alphabetical order : .. . .. . should I use a SQL query SELECT FROM table ORDER BY l.name DESC", "The LIMIT clause can be used to constrain the number of rows returned by the SELECT statement .", "What I think is that you probably don t understand that the ORDER BY clause works as a nested ordering and not as an independent ordering of the values of the columns .", "A simple observation : In this case the ORDER BY clause is for SELECT VibeFGEvents .", "SQL 101 : sets have no order .", "It results in an ORDER BY RAND SQL query .", "You need to write some SQL in order to count the association alias the count to a name and order by that name : .. . .. . More on sql counts here http : www.tutorialspoint.com sql sql-count-function.htm", "If you need a specific order use an order by clause .", "For obvious reasons if you create a new table insert a few rows and do a select without a where clause it will return the rows in the order they were inserted .", "SQL beginner concepts : a table is a set of data without defined order if you want an order you HAVE to specify it on the select querying the data .", "I tried using the solution provided in SQL query to return rows in random order http : stackoverflow.com questions 1117761 sql-query-to-return-rows-in-random-order to fetch random records in my query .", "If there isn t one then SQL Server will default to returning the rows in whatever order it deems most efficient .", "I want to run a SQL query in Postgres that is exactly the reverse of the one that you d get by just running the initial query without an order by clause .", "Note to this solution is that you get result sorted in reverse order .", "AS SQL is based on Set thoery and Set does not guarantee any order thus if you don t specify a particular order explicityly order will not be guaranteed .", "Is Case statement in order by clause affect the performance", "This breaks if sql has limit offset after order by", "I missed one function in order by clause .", "More specifically can I assume that the rows will be returned in insertion order that is the same order in which the rows were inserted into the table", "SQL ORDER BY the IN value list http : stackoverflow.com questions 866465 sql-order-by-the-in-value-list .. . .. . Is there any other way to do it", "when i select the rows it is displaying in correct order .", "If you want to order your result by id in the order specified in the in-clause you can make use of FIND IN SET as :", "MySQL and indeed all SQL table servers return rows in formally unpredictable order in the absence of ORDER BY .", "I m looking for the official T-SQL documentation for ORDER BY RAND and ORDER BY NEWID .", "ORDER BY is the only way to guarantee the order of results in a query in standard SQL .", "If you don t specify a sort order using ORDER BY SQL will pick its own order which will typically be the order of the primary-key but could be anything .", "I am wondering if there is away possibly a better way to order by the order of the values in an IN clause .", "MERGE statement allows me to pick TOP 10 rows but I could not put ORDER BY clause anywhere .", "OP wants the rows to be returned in the order rows were selected for the insert statement .", "When adding select- order .. . to a previously combined Select in Zend Framework 2 the order by will only be added to the first Select statement .", "I ve tried the SQL statement through Sybase Central Interactive SQL and it is showing the records in the desired order but when the form is used in my application it shows the records sorted by orderline.forcompid .", "SELECT FROM table name ORDER BY value", "This won t solve the problem as the index referenced in ORDER BY will not be affected by replacing values in the SELECT statement and thereby won t correct the ordering .", "It may not be obvious to all that this only works if your result set is sorted by that key in ascending order for descending order the same idea works but change lastid to lastid .", "Remove the ORDER BY clause in your function and write it in your SELECT clause like this", "Something in the ORDER BY clause", "and again the error in the order by clause .", "For this to happen the query has to return rows in a consistent order so it has to be sorted .", "The order by clause does not support expressions but you can add a field with the expression to the select and order by it .", "Then if you had no result check the next sql statement for the same time and so on .", "If you replace the VALUES statement with something else that does the same thing but in ANSI SQL then this should work on any SQL database .", "The IDs are put in an IN clause in the correct order .", "Tip : use the IN expression in the ORDER BY clause .", "Why convert in the order by clause - the result is the same and faster if you don t convert", "The ORDER BY clause orders all rows returned by the entire compound query .", "Rows in a table or in a subquery in the FROM clause do not come in any specific order .", "order is a reserved word in SQL case does not matter .", "Well short of you cannot rely on the order of the rows being returned .", "But if you have an ORDER BY in there then the ENTIRE matching result set is ordered then the LIMIT is applied to that sorted set .", "@MehrdadAfshari : No MSSQL is too stupid to process equivalency tests in the ORDER BY clause .", "No it is not easy since there is no initial order order is undefined without an ORDER BY clause", "Speculating what the order will be when you don t specify the ORDER BY clause is pointless .", "You must use an order by clause if you want a specific order .", "If there is another index due to a where clause it comes in a random order depending how sql-server decides to search for things .", "That is the reason SQL Server will not allow you to use an order by clause in a derived table unless you are also using the top keyword .", "It won t hurt but at least in SQL Server the SELECT statement won t barf if some of the rows have null .", "My question is : .. . .. . Does MySQL give any guarantees to which order the result set rows will be given", "To get those rows returned in a deterministic order add some expressions to the ORDER BY clause some combination of expressions that are unique for a row .", "Without an Order By clause the order returned is undefined .", "SQL tables have no strong order and any select you do on ANY table is ALWAYS arbitrary order which can change between calls UNLESS you do an order in the SELECT ." ] }
{ "confidence": [ 59.11635971069336, 55.95038604736328, 55.042362213134766, 53.81914138793945, 53.68079376220703, 53.57839584350586, 53.45415115356445, 53.3609619140625, 52.2365608215332, 51.593326568603516, 51.495140075683594, 51.413692474365234, 51.368003845214844, 51.32563018798828, 51.0320930480957, 50.982784271240234, 50.829280853271484, 50.80717468261719, 50.67609405517578, 50.2451171875 ], "content": [ "Question : How can one programmatically sort a union query when pulling data from two tables For example .. . .. . Throws an exception .. . .. . Note : this is being attempted on MS Access Jet database engine Comment : Expect odd semantics from the Jet database engine . .. . Answer : I think this does a good job of explaining . The following is a UNION query that uses an ORDER BY clause : .. . .. . .. . select supplier id supplier name .. . from suppliers .. . where supplier id 2000 .. . UNION .. . select company id company name .. . from companies .. . where company id 1000 .. . ORDER BY 2 .. . .. . .. . Since the column names are different between the two select statements it is more advantageous to reference the columns in the ORDER BY clause by their position in the result set . In this example we ve sorted the results by supplier name company name in ascending order as denoted by the ORDER BY 2 . .. . The supplier name company name fields are in position 2 in the result set . Taken from here : http : www.techonthenet.com sql union.php", "Question : When querying the db for a set of ids mysql doesnot provide the results in the order by which the ids were specified . The query i am using is the following : .. . .. . in return the result provided is in the order 1 3 5 7 9 . How can i avoid this auto sorting Comment : I once receive this request from one of my company developer I simply reply Seems you have the precise information of 7 1 5 9 3 why you still need to sort it again Comment : @ajreal i get these ids from another server . n i need to query the db in the relevant order . i dont wanna sort it the db returns in a sorted way. . i wanna avoid the sorting : Comment : . . ARGGGGG...you already have these IDs in the ORDER of 7 1 5 9 3 why you need to sort it again Two solution query one id by id . Or use a place holder array that is your original order and fetch the results from database in whatever order loop the place holder array and set it accordingly . You already has the chicken why you still wondering how the egg laying .. . Answer : There is no auto-sorting or default sorting going on . The sorting you re seeing is most likely the natural sorting of rows within the table ie . the order they were inserted . If you want the results sorted in some other way specify it using an ORDER BY clause . There is no way in SQL to specify that a sort order should follow the ordering of items in an IN clause . Comment : More accurately there is no way to specify ordering in the WHERE clause . Comment : @JonhFx : +1 Thanks for broadening the scope of my statement . Comment : read the question try it on your query. . it sorts when you specify the in keyword. . anyways. . i just added ORDER BY FIELD id values in the end and it worked. . Comment : @Nauman Bashir : I did re-read the question and stand by my answer . There is no sorting going on without an ORDER BY . You re getting the results back in the order that they happen to be present in the table which in your case happens to be in ascending order of the id column . But this simply isn t true in the general case . In any case your solution that uses ORDER BY FIELD is a good one . Stick with it .", "Question : I m developing a form in order to have an order form-for procurement purposes . I ve a Datawindow as a report object inside my main form . This datawindow sub-report has a select to retrieve the orderlines for that order form . Everything is working fine except the ORDER BY clause . I need to sort the order lines by order line number orderline.orderlineno in descending order . I ve tried the SQL statement through Sybase Central Interactive SQL and it is showing the records in the desired order but when the form is used in my application it shows the records sorted by orderline.forcompid . It s very weird .. . .. . Is there any mistake in my SQL statement or another thing in Power Builder that I m missing Datawindow sub-report SQL .. . .. . EDIT : MODIFIED SQL Comment : how the outer select looks like Comment : @Sachu I ve added the Sql statement of the main form . Comment : im asking about the select .. . select.. . union select.. . orderby 1 asc Comment : There is no outer select . I just added brackets to encapsulate the SQL prior to apply the ORDER BY clause . Removing the brackets the result is the same as before Comment : do some this like select orderline.orderlineno ....from select...union select...union orderby 1 asc give alias to each column in the inside select and use it in outer select..this way i achieve sort in my pgms..dont know whether it will solve ur issue .. . Answer : Follow the step. . .. . .. . 1 . First give alias for the columns inside select statements..since its union the alias should match in all queries . 2 . put an outer select with the alias names and do orderby using the alias of the column u needed . Keep in mind that order by will effect the execution time. . .. . .. . look sample below Comment : It worked like a charm . Thanks Comment : glad to hear it helped .", "Question : I found this question on a website and was trying to solve it to no avail . There is a table of Nobel prize winners with columns name year and subject . The question is this : Show the 1984 winners and subject ordered by subject and winner name but list Chemistry and Physics last . I came up with the following : .. . .. . which gives the result : .. . .. . I however require that the order of winners for each subject be further sorted by name i.e . the result above should become Caesar Milstein as 3rd followed by Georges J.K . Kahler and then Niels K . Jerne . Comment : just add the second order criteria to your ORDER BY : ORDER BY CASE WHEN ......END subject winner Comment : As most people here have pointed out adding winner to the ORDER BY clause should resolve this . However I am running the query on the mentioned website itself and I m guessing perhaps wrongly it is the use of MariaDB that results in a different output . In any case the addition of winner to the ORDER BY is causing the results to be sorted only by winner ignoring the subject column . The page I found this question on is this - sqlzoo.net wiki SELECT from Nobel Tutorial - Question no . 14 in case anyone is curious about the source . Comment : SQLZOO seems happy with SELECT winner subject FROM nobel WHERE yr 1984 ORDER BY subject IN Physics Chemistry subject winner . Note that SQL Server does not treat IN as an operator that returns 0 or 1 the return-type is listed as BOOLEAN . There is a boolean https : msdn.microsoft.com en-us library ms188074.aspx Anchor 0 data type but you cannot get a firm grip on one : Unlike other SQL Server data types a Boolean data type cannot be specified as the data type of a table column or variable and cannot be returned in a result set . Comment : @HABO - That s it It works . Thank you so much . Strange that the use of CASE gave a faulty output . Just to clarify though - SQL Server would not give the same output for the given query Comment : At SQLZOO you can use SELECT winner subject subject IN Physics Chemistry FROM nobel WHERE yr 1984 ORDER BY subject IN Physics Chemistry subject winner and output a strangely named column with the result-of the IN clause . SQL Server just has Incorrect syntax near the keyword IN . to say about that . .. . Answer : Thanks everyone for the help . However as I mentioned in one of the comments the specific website I tested these queries on didn t give me an output for the answers posted here . What worked though is posted by HABO in this comment http : stackoverflow.com questions 38234260 added-condition-to-order-by-statement noredirect 1 comment63925659 38234260 .", "Question : I m developing a form in order to have an order form-for procurement purposes . I ve a Datawindow as a report object inside my main form . This datawindow sub-report has a select to retrieve the orderlines for that order form . Everything is working fine except the ORDER BY clause . I need to sort the order lines by order line number orderline.orderlineno in descending order . I ve tried the SQL statement through Sybase Central Interactive SQL and it is showing the records in the desired order but when the form is used in my application it shows the records sorted by orderline.forcompid . It s very weird .. . .. . Is there any mistake in my SQL statement or another thing in Power Builder that I m missing Datawindow sub-report SQL .. . .. . EDIT : MODIFIED SQL Comment : how the outer select looks like Comment : @Sachu I ve added the Sql statement of the main form . Comment : im asking about the select .. . select.. . union select.. . orderby 1 asc Comment : There is no outer select . I just added brackets to encapsulate the SQL prior to apply the ORDER BY clause . Removing the brackets the result is the same as before Comment : do some this like select orderline.orderlineno ....from select...union select...union orderby 1 asc give alias to each column in the inside select and use it in outer select..this way i achieve sort in my pgms..dont know whether it will solve ur issue .. . Answer : Your SQL was fine . Might as well leave off the order by on the union . Set the sort order in the datawindow itself . Drag the column want to sort by over to the right hand side and uncheck the Ascending box . This always overrides SQL sort .", "Question : I found this question on a website and was trying to solve it to no avail . There is a table of Nobel prize winners with columns name year and subject . The question is this : Show the 1984 winners and subject ordered by subject and winner name but list Chemistry and Physics last . I came up with the following : .. . .. . which gives the result : .. . .. . I however require that the order of winners for each subject be further sorted by name i.e . the result above should become Caesar Milstein as 3rd followed by Georges J.K . Kahler and then Niels K . Jerne . Comment : just add the second order criteria to your ORDER BY : ORDER BY CASE WHEN ......END subject winner Comment : As most people here have pointed out adding winner to the ORDER BY clause should resolve this . However I am running the query on the mentioned website itself and I m guessing perhaps wrongly it is the use of MariaDB that results in a different output . In any case the addition of winner to the ORDER BY is causing the results to be sorted only by winner ignoring the subject column . The page I found this question on is this - sqlzoo.net wiki SELECT from Nobel Tutorial - Question no . 14 in case anyone is curious about the source . Comment : SQLZOO seems happy with SELECT winner subject FROM nobel WHERE yr 1984 ORDER BY subject IN Physics Chemistry subject winner . Note that SQL Server does not treat IN as an operator that returns 0 or 1 the return-type is listed as BOOLEAN . There is a boolean https : msdn.microsoft.com en-us library ms188074.aspx Anchor 0 data type but you cannot get a firm grip on one : Unlike other SQL Server data types a Boolean data type cannot be specified as the data type of a table column or variable and cannot be returned in a result set . Comment : @HABO - That s it It works . Thank you so much . Strange that the use of CASE gave a faulty output . Just to clarify though - SQL Server would not give the same output for the given query Comment : At SQLZOO you can use SELECT winner subject subject IN Physics Chemistry FROM nobel WHERE yr 1984 ORDER BY subject IN Physics Chemistry subject winner and output a strangely named column with the result-of the IN clause . SQL Server just has Incorrect syntax near the keyword IN . to say about that . .. . Answer : As everyone has mentioned you just need winner added . But you can simplify this a bit too : Comment : Your CASE is semantically different if subject can be NULL i.e . the OP s CASE will return 3 for NULL values putting them at the end of the list . Comment : @HABO Thanks that is very true and worth noting . But as OP didn t mention that in any way I find it more likely that he didn t realize he could remove that line then that he was accounting for NULL Comment : subject is indeed nullable but for the sake of this question it is assumed that there are no NULL fields", "Question : I found this question on a website and was trying to solve it to no avail . There is a table of Nobel prize winners with columns name year and subject . The question is this : Show the 1984 winners and subject ordered by subject and winner name but list Chemistry and Physics last . I came up with the following : .. . .. . which gives the result : .. . .. . I however require that the order of winners for each subject be further sorted by name i.e . the result above should become Caesar Milstein as 3rd followed by Georges J.K . Kahler and then Niels K . Jerne . Comment : just add the second order criteria to your ORDER BY : ORDER BY CASE WHEN ......END subject winner Comment : As most people here have pointed out adding winner to the ORDER BY clause should resolve this . However I am running the query on the mentioned website itself and I m guessing perhaps wrongly it is the use of MariaDB that results in a different output . In any case the addition of winner to the ORDER BY is causing the results to be sorted only by winner ignoring the subject column . The page I found this question on is this - sqlzoo.net wiki SELECT from Nobel Tutorial - Question no . 14 in case anyone is curious about the source . Comment : SQLZOO seems happy with SELECT winner subject FROM nobel WHERE yr 1984 ORDER BY subject IN Physics Chemistry subject winner . Note that SQL Server does not treat IN as an operator that returns 0 or 1 the return-type is listed as BOOLEAN . There is a boolean https : msdn.microsoft.com en-us library ms188074.aspx Anchor 0 data type but you cannot get a firm grip on one : Unlike other SQL Server data types a Boolean data type cannot be specified as the data type of a table column or variable and cannot be returned in a result set . Comment : @HABO - That s it It works . Thank you so much . Strange that the use of CASE gave a faulty output . Just to clarify though - SQL Server would not give the same output for the given query Comment : At SQLZOO you can use SELECT winner subject subject IN Physics Chemistry FROM nobel WHERE yr 1984 ORDER BY subject IN Physics Chemistry subject winner and output a strangely named column with the result-of the IN clause . SQL Server just has Incorrect syntax near the keyword IN . to say about that . .. . Answer : Just add the winner to your order by statement : -", "Question : I was wondering how sql-server sorts it s data . I noticed that if I have a table that doesn t contain the column Id and you select data without ORDER BY sql-server doesn t automatically sort on the primary column . Does anyone know what rule sql-server follows to sort it s data Comment : +1 good question .. . Answer : Although it s good to wonder about how it might be explained that you often see the same order I d like to point out that it never a good idea to rely on implicit order caused by the particular implementation of the underlying database engine . In other words its nice to know why but you should never ever rely on it . For MS SQL the only thing that reliably delivers the rows in a certain order is an explicit ORDER BY clause . Not only do different RDMBS-es behave differently one particular instance may behave differently due to an update patch . Not only that even the state of the RDBMS software may have an impact : a warm database behaves differently than a cold one a small table behaves differently than a large one . Even if you have background information about the implementation ex : there is a clustered-index thus it is likely the data will be returned by order of the clustered-index there is always a possibility that there is another mechanism you don t know about that causes the rows to be returned in a different order ex1 : if another session just did a full table scan with an explicit ORDER BY the resultset may have been cached a subsequent full scan will attempt to return the rows from the cache ex2 : a GROUP BY may be implemented by sorting the data thus impacting the order the rows are returned ex3 : If the selected columns are all in a secondary index that is already cached in memory the engine may scan the secondary index instead of the table most likely returning the rows by order of the secondary index . Here s a very simple test that illustrates some of my points . First startup SQL server I m using 2008 . Create this table : .. . .. . Examine the table and witness that a clusted index was created to support the primary-key on the id column . For example in sql-server management studio you can use the tree view and navigate to the indexes folder beneath your table . There you should see one index with a name like : PK test ord 3213E83F03317E3D Clustered .. . .. . Insert the first row with this statement : .. . .. . Insert more rows by repeating this statement 16 times : .. . .. . You should now have 65536 rows : .. . .. . Now select all rows without using an order by : .. . .. . Most likely the results will be returned by order of the primary-key although there is no guarantee . Here s the result I got which is indeed by order of primary-key : .. . .. . the is not a column but the ordinal position of the row in the result .. . .. . Now create a secondary index on the name column : .. . .. . Select all rows but retrieve only the name column : .. . .. . Most likely the results will be returned by order of the secondary index idx name since the query can be resolved by only scanning the index i.o.w . idx name is a covering index . Here s the result I got which is indeed by order of name . Now select all columns and all rows again : .. . .. . Here s the result I got : .. . .. . as you can see quite different from the first time we ran this query . It looks like the rows are ordered by the secondary index but I don t have an explanation why that should be so . Anyway the bottom line is - don t rely on implicit order . You can think of explanations why a particular order can be observed but even then you can t always predict it like in the latter case without having intimate knowledge of implementation and runtime state .", "Question : I am working on a plsql procedure where i am using an insert-select statement . I need to insert into the table in ordered manner . but the order by i used in the select sql is not working . is there any specific way in oracle to insert rows in orderly fashion Comment : Table are sets there is no order in a table unless you retrieve the data with an order by Comment : sorry Mihai couldn t understand you . I retrieved the data using order by clause only . but still the insert is in a random order Comment : Rows in a table are not ordered . You have to use an order by when you select the rows from the table you inserted into . The order by in the insert statement is essentially useless Comment : Mr Pedantic Man Says : Ordering on insert is not always useless . In the case of some classes of table compression the ordering during a insert + APPEND .. . can have a dramatic affect on how much compression happens . Still in that case the order of insert does not necessarily determine order on select . Comment : @ShannonSeverance .. . and also for reducing clustering factor on particular indexed column s as well . .. . Answer : I m pretty sure that Oracle does not guarantee to insert rows to a table in any specific order even if the rows were inserted in that order . Performance and storage considerations far outweigh ordering considerations as every user might have a different preference for order .. . .. . Why not just use an ORDER BY clause in your SELECT statement Or better yet create a VIEW that already has the ORDER BY clause in it Comment : Hi Hauser I am using order by in my select sql . when i select the rows it is displaying in correct order . but when i use it in insert-select it inserts in random order Comment : @lourdh : the order by you use in the insert statement is useless . You need to use an order by when you select from the table you inserted into Comment : @a horse with no name is exactly right . You can t control the order with which data is inserted into the table but you don t need to - because you can control it whenever you query it using the ORDER BY clause in your SELECT statements . Do you have any special need for controlling order of inserted data If so tell us about it and we ll see if we have any good advise . : Comment : @DougieHauser For my case I had a table of Countries that had new records i.e . South Sudan put into it that were not alphabetical with the rest of the records above them . This makes for more not much more but still more coding when binding the table to a dropdown on a page with .DataBind where you are not controlling the SQL you get so it makes sense to start with the table instead . For me I was able to use insert + append into New Countries select ID NAME from Old Countries order by NAME ASC to much success .", "Question : I am working on a plsql procedure where i am using an insert-select statement . I need to insert into the table in ordered manner . but the order by i used in the select sql is not working . is there any specific way in oracle to insert rows in orderly fashion Comment : Table are sets there is no order in a table unless you retrieve the data with an order by Comment : sorry Mihai couldn t understand you . I retrieved the data using order by clause only . but still the insert is in a random order Comment : Rows in a table are not ordered . You have to use an order by when you select the rows from the table you inserted into . The order by in the insert statement is essentially useless Comment : Mr Pedantic Man Says : Ordering on insert is not always useless . In the case of some classes of table compression the ordering during a insert + APPEND .. . can have a dramatic affect on how much compression happens . Still in that case the order of insert does not necessarily determine order on select . Comment : @ShannonSeverance .. . and also for reducing clustering factor on particular indexed column s as well . .. . Answer : The typical use-case for an ordered insert is in order to co-locate particular value in the same blocks effectively reducing the clustering factor on indexes on columns by which you have ordered the data . This generally requires a direct path insert .. . There s nothing invalid about this as long as you accept that it s only worthwhile for bulk data that the data will load above the high water mark only and that there are locking issues involved . Another approach which achieves mostly the same effect but which is more arguably more suitable for OLTP systems is to create the table in a cluster . Comment : but that is not lourdh s intention . The OP expects the rows returned in the order they were inserted when selecting them - which is a wrong assumption . And not even the append hint with an order by will guarantee that . Comment : @a horse with no name indeed but I m just focusing on the idea that an insert with order by is of no value . Comment : @a horse with no name ACTUALLY it worked for me to both insert in the right order and show it when doing a SELECT on the table afterwards so why can t it be guaranteed when dealing with static data i.e . ID NAME in a table of Countries that inserting this data into another New Countries Table using the + append hint won t always work Would like to know so I know when to use this hint and when not to.. . Comment : @vapcguy : Because rows in a relational-database are NOT sorted . Without an order by the DBMS is free to return the rows in any order it likes . The append hint has nothing to do with sorting rows . Comment : @a horse with no name True but that s why you append an ORDER BY clause on your INSERT statement like in this answer above . I get that by itself the hint won t do this .", "Question : I want my query to return the rows of the table where a column contains a specific value first and then return the rest of the rows alphabetized . If I have a table something like this example : .. . .. . And using that table I want to my query to return the rows which contain New York first and then the rest of the rows alphabetized by city . Is this possible to do using only one query .. . Answer : If your SQL dialect is intelligent enough to treat boolean expressions as having a numeric value then you can use : Comment : This answer makes me feel dumb . Well done chaos . Comment : Does it work on MSSQL Comment : @MehrdadAfshari : No MSSQL is too stupid to process equivalency tests in the ORDER BY clause . Comment : @chaos : that is simply wrong . Se Rob Farley s answer . Comment : @chaos : the above statement does indeed not run with SQL Server but that s because the syntax is non-standard and only works for MySQL . When using a CASE statement which is standard SQL SQL Server can very well use an expression in the ORDER BY clause . too stupid to process equivalency tests is simply wrong . If at all it should read : does not support MySQL s implicit casting of boolean true to the value 1 one .", "Question : I have a Postgresql 9.4.1 table like this.. . Rows are ordered by the serial column how can I display the same table but reordering all the rows based on the username column alphabetically descending I would like Postgres to do it automatically on real-time on a separate table . I guess I can use View How can I do that Comment : Read about ORDER BY clause : w3schools.com sql sql orderby.asp http : www.w3schools.com sql sql orderby.asp Comment : Rows in a table are not ordered . Any order you seen when not using order by is pure coincidence . If you want to see them ordered use an order by when selecting . That is the only way to get a guaranteed order . postgresql.org docs current static sql-select.html SQL-ORDERBY http : www.postgresql.org docs current static sql-select.html SQL-ORDERBY Comment : what about creating a view can that be done automatically .. . Answer : Sure you can use a VIEW http : www.postgresql.org docs current interactive sql-createview.html to return ordered rows . And another one for your rows sorted by the serial column : .. . .. . Read @a horse s comment http : stackoverflow.com questions 36958645 postgresql-reorder-rows-based-on-username-column-alphabetically-descendat comment61478949 36958645 addressing your basic misconception . The order holds unless it s overruled by another ORDER BY in the outer query . Views work with early-binding : Only columns present at the time of creation are included . SELECT FROM tbl or TABLE tbl http : stackoverflow.com a 30276023 939860 are resolved to the list of currently existing column . If the underlying table is changed later that s not cascaded to the view automatically . Comment : thanks erwin I knew I could use SELECT FROM tbl ORDER BY ircusername ASC stmtserial ASC I just didn t know how to create it into a VIEW", "Question : Assume that the following query is issued to a MySQL database : .. . .. . Note that no ORDER BY clause is given . My question is : .. . .. . Does MySQL give any guarantees to which order the result set rows will be given More specifically can I assume that the rows will be returned in insertion order that is the same order in which the rows were inserted into the table Why Why not .. . .. . Assume the following table structure : Comment : Duplicate : stackoverflow.com questions 1793147 http : stackoverflow.com questions 1793147 sql-best-practice-to-deal-with-default-sort-order Comment : OMG Ponies : Thanks for the link - it contains some very useful answers . I wouldn t consider that question an exact duplicate since it is very general whereas my question is MySQL specific . Comment : See also : stackoverflow.com questions 899514 http : stackoverflow.com questions 899514 default-row-ordering-for-select-query-in-oracle Oracle MySQL and basically all RDBMSs should be same in regards to default order stackoverflow.com questions 1807079 http : stackoverflow.com questions 1807079 how-to-reverse-the-default-ordering-in-mysql .. . Answer : From Retrieving Data Using the MySQL SELECT Statement : The SELECT Statement http : www.informit.com articles article.aspx p 482319 .. . .. . The data displayed is not ordered . Usually records are retrieved in the same order in which they were inserted into the database .. . .. . Yes as per the comment .. . .. . Although records are normally retrieved in the order in which they are inserted into the database you cannot rely on a particular order being preserved . If your database is backed up and restored or if a maintenance operation is performed on the database MySQL might alter the order in which records are stored internally . Comment : Annnnd.. . right after that : Although records are normally retrieved in the order in which they are inserted into the database you cannot rely on a particular order being preserved . You can never rely on this because as soon as a data page is full rows are moved around . Comment : That is true I do aggree with the fact that without an orderby you are not sure what you get back .", "Question : I have a query that looks like this : .. . .. . SELECT article FROM table1 ORDER BY publish date LIMIT 20 .. . .. . How does ORDER BY work Will it order all records then get the first 20 or will it get 20 records and order them by the publish date field If it s the last one you re not guaranteed to really get the most recent 20 articles . Comment : Note that if some publish date s are equal ordering by them does not give determinate results meaning that if you use LIMIT for pagination you may end up getting the same items on different pages .. . Answer : The LIMIT clause can be used to constrain the number of rows returned by the SELECT statement . LIMIT takes one or two numeric arguments which must both be nonnegative integer constants except when using prepared statements . With two arguments the first argument specifies the offset of the first row to return and the second specifies the maximum number of rows to return . The offset of the initial row is 0 not 1 : .. . .. . SELECT FROM tbl LIMIT 5 10 Retrieve rows 6-15 .. . .. . To retrieve all rows from a certain offset up to the end of the result set you can use some large number for the second parameter . This statement retrieves all rows from the 96th row to the last : .. . .. . SELECT FROM tbl LIMIT 95 18446744073709551615 .. . .. . With one argument the value specifies the number of rows to return from the beginning of the result set : .. . .. . SELECT FROM tbl LIMIT 5 Retrieve first 5 rows .. . .. . In other words LIMIT row count is equivalent to LIMIT 0 row count . All details on : http : dev.mysql.com doc refman 5.0 en select.html Comment : Isn t it retrieve rows 5-14 Comment : @adonis No it s not . The example is right from the MySQL Documentation http : dev.mysql.com doc refman 5.0 en select.html Comment : Number 5 is the 6th row . 5 rows 0 through 4 are ignored . Comment : But using LIMIT without ORDER BY may give inconsistent results Unfortunately the entire result set must be ordered before the LIMIT is applied or the the DBMS is free to arbitrarily order the result and then OFFSET and LIMIT on that set . I ve read that this may be due to the DBMS selecting an alternate Query Plan based on OFFSET and LIMIT thus the arbitrary order .", "Question : I found this question on a website and was trying to solve it to no avail . There is a table of Nobel prize winners with columns name year and subject . The question is this : Show the 1984 winners and subject ordered by subject and winner name but list Chemistry and Physics last . I came up with the following : .. . .. . which gives the result : .. . .. . I however require that the order of winners for each subject be further sorted by name i.e . the result above should become Caesar Milstein as 3rd followed by Georges J.K . Kahler and then Niels K . Jerne . Comment : just add the second order criteria to your ORDER BY : ORDER BY CASE WHEN ......END subject winner Comment : As most people here have pointed out adding winner to the ORDER BY clause should resolve this . However I am running the query on the mentioned website itself and I m guessing perhaps wrongly it is the use of MariaDB that results in a different output . In any case the addition of winner to the ORDER BY is causing the results to be sorted only by winner ignoring the subject column . The page I found this question on is this - sqlzoo.net wiki SELECT from Nobel Tutorial - Question no . 14 in case anyone is curious about the source . Comment : SQLZOO seems happy with SELECT winner subject FROM nobel WHERE yr 1984 ORDER BY subject IN Physics Chemistry subject winner . Note that SQL Server does not treat IN as an operator that returns 0 or 1 the return-type is listed as BOOLEAN . There is a boolean https : msdn.microsoft.com en-us library ms188074.aspx Anchor 0 data type but you cannot get a firm grip on one : Unlike other SQL Server data types a Boolean data type cannot be specified as the data type of a table column or variable and cannot be returned in a result set . Comment : @HABO - That s it It works . Thank you so much . Strange that the use of CASE gave a faulty output . Just to clarify though - SQL Server would not give the same output for the given query Comment : At SQLZOO you can use SELECT winner subject subject IN Physics Chemistry FROM nobel WHERE yr 1984 ORDER BY subject IN Physics Chemistry subject winner and output a strangely named column with the result-of the IN clause . SQL Server just has Incorrect syntax near the keyword IN . to say about that . .. . Answer : Order By case When Subject in Chemistry Physics then 1 else 0 end winner Subject", "Question : I used the following query with MySQL 5.5 or previous versions for years without any problems : .. . .. . The order of the result was always descending as I needed . Last week I just migrated to a new MySQL Version In fact I migrated to MariaDB 10.0.14 and now the same query with the same database is not sorted descending anymore . It is sorted ascending or sorted using the natural order not sure in fact . So can somebody could tell me if this is a bug or if this is a change of the behaviour in recent versions of MySQL MariaDB Thank you . G . Plante Comment : Possibly relevant : mariadb.com kb en mariadb https : mariadb.com kb en mariadb group-by-trick-has-been-optimized-away .. . Answer : After a bit of digging I can confirm both your scenarios : .. . .. . MySQL 5.1 does apply the ORDER BY inside the subquery . MariaDB 5.5.39 on Linux does not apply the ORDER BY inside the subquery when no LIMIT is supplied . It does however correctly apply the order when a corresponding LIMIT is given : .. . .. . Without that LIMIT there isn t a good reason to apply the sort inside the subquery . It can be equivalently applied to the outer query . Documented behavior : .. . .. . As it turns out MariaDB has documented this behavior https : mariadb.com kb en mariadb faq general-faq why-is-order-by-in-a-from-subquery-ignored and it is not regarded as a bug : .. . .. . A table and subquery in the FROM clause too is - according to the SQL standard - an unordered-set of rows . Rows in a table or in a subquery in the FROM clause do not come in any specific order . That s why the optimizer can ignore the ORDER BY clause that you have specified . In fact SQL standard does not even allow the ORDER BY clause to appear in this subquery we allow it because ORDER BY .. . LIMIT .. . changes the result the set of rows not only their order . .. . You need to treat the subquery in the FROM clause as a set of rows in some unspecified and undefined order and put the ORDER BY on the top-level SELECT . So MariaDB also recommends applying the ORDER BY in the outermost query or a LIMIT if necessary . Note : I don t currently have access to a proper MySQL 5.5 or 5.6 to confirm if the behavior is the same there and SQLFiddle.com is malfunctioning . Comments on the original bug report https : mariadb.atlassian.net browse MDEV-3926 closed as not-a-bug suggest that MySQL 5.6 probably behaves the same way as MariaDB . Comment : Thank you very much . I applied the order by to the outermost query and it work well now . Comment : @Michael It is typical for order by not to apply inside a subquery isn t it I don t think any db would guarantee that ordering . Comment : @Pacerier As noted in the quoted docs SQL standard does not even allow the ORDER BY clause to appear in this subquery so most RDBMS probably won t allow it . Comment : Unfortunately for MySQL 5.5 at least select distinct order by limit is much slower than select distinct from select order by limit - with a few million rows the difference is on the order of 1000x .", "Question : I found this question on a website and was trying to solve it to no avail . There is a table of Nobel prize winners with columns name year and subject . The question is this : Show the 1984 winners and subject ordered by subject and winner name but list Chemistry and Physics last . I came up with the following : .. . .. . which gives the result : .. . .. . I however require that the order of winners for each subject be further sorted by name i.e . the result above should become Caesar Milstein as 3rd followed by Georges J.K . Kahler and then Niels K . Jerne . Comment : just add the second order criteria to your ORDER BY : ORDER BY CASE WHEN ......END subject winner Comment : As most people here have pointed out adding winner to the ORDER BY clause should resolve this . However I am running the query on the mentioned website itself and I m guessing perhaps wrongly it is the use of MariaDB that results in a different output . In any case the addition of winner to the ORDER BY is causing the results to be sorted only by winner ignoring the subject column . The page I found this question on is this - sqlzoo.net wiki SELECT from Nobel Tutorial - Question no . 14 in case anyone is curious about the source . Comment : SQLZOO seems happy with SELECT winner subject FROM nobel WHERE yr 1984 ORDER BY subject IN Physics Chemistry subject winner . Note that SQL Server does not treat IN as an operator that returns 0 or 1 the return-type is listed as BOOLEAN . There is a boolean https : msdn.microsoft.com en-us library ms188074.aspx Anchor 0 data type but you cannot get a firm grip on one : Unlike other SQL Server data types a Boolean data type cannot be specified as the data type of a table column or variable and cannot be returned in a result set . Comment : @HABO - That s it It works . Thank you so much . Strange that the use of CASE gave a faulty output . Just to clarify though - SQL Server would not give the same output for the given query Comment : At SQLZOO you can use SELECT winner subject subject IN Physics Chemistry FROM nobel WHERE yr 1984 ORDER BY subject IN Physics Chemistry subject winner and output a strangely named column with the result-of the IN clause . SQL Server just has Incorrect syntax near the keyword IN . to say about that . .. . Answer : I think this works", "Question : I feel like this is obvious but i m struggling . Must be because it s a monday . I have a licenses table in MySQL which has fields id int start date date licensable id int licensable type string and fixed end point boolean . I want to get all licenses where the start date is equal to or less than today group them by licensable id and licensable type and then get the most recently starting one so I can get the fixed end point field out of it along with licensable id and licensable type . This is what i m trying : .. . .. . At the moment the ORDER BY field seems to be being ignored and it s just returning the values from the first license for each group rather than the most recent . Can anyone see what I m doing wrong Do I need to make a nested query Comment : Invalid ORDER BY . When GROUP BY and SELECT DISTINCT and UNION etc only select list items may be specified in the ORDER BY . .. . Answer : The reason this doesn t give you the results you want is how GROUP CONCAT works . With standard SQL any field in the SELECT must either be also mentioned in the GROUP BY clause or must be an aggregate field there is an exception for fields 100 related to a field that is returned but many flavours of SQL do not support this . MySQL does allow a field to be in the SELECT clause which is not an aggregate value and is not mentioned in the GROUP BY clause and allowing this was the default until recently . However for these fields there could be multiple values for the GROUP BY fields and in this case which one is chosen is not defined . As this is worked out prior to the ORDER BY statement being processed the ORDER BY clause has no effect on which one is chosen . There are a few normal ways to do this . You can use a as Gordon has suggested or similarly and possibly more efficiently depending on records and indexes you can use a sub query to get the latest rows date for each of your important rows and then join that back to your main table : - .. . .. . In some situations another option is to ab use the GROUP CONCAT and SUBSTRING INDEX functions . This way you can GROUP BY the fields you want to but do a GROUP CONCAT or the other fields in the descending order of the date . Then use SUBSTRING INDEX to get everything up to the first comma the default delimiter for GROUP CONCAT : - .. . .. . Obviously this has issues if the latest row has a null value hence I have used COALESCE to fudge in non null values . Also if the field contains commas you will need to use an alternative delimiter . And if the field is large then you might have issues with the max field length for GROUP CONCAT default is 1024 I think . Comment : Thanks for the explanation", "Question : This only happens for queries that force GROUP BY after ORDER BY . Goal : .. . .. . Get latest balance for each unit for the given cardID . Table : .. . .. . Query : .. . .. . Expected Result MySQL v5.5.38 : .. . .. . Unexpected Result MySQL v5.7.13 : .. . .. . After upgrading to MySQL v5.7.13 the result returns the initial balances as-if no deduction occurred for the given card . Is this a bug in MySQL version Would you suggest any other more reliable way to solve this Comment : See MySQL Handling of GROUP BY https : dev.mysql.com doc en group-by-handling.html . .. . Answer : This is a bug in your use of the database . MySQL is quite explicit that when you include columns in the SELECT clause in an aggregation query -- and they are not in the GROUP BY -- then they come from indeterminate rows . Such syntax is specific to MySQL . It is not only a bad idea to learn but it simply normally not work in other databases . You can do what you want in various ways . Here is one : .. . .. . This has the advantage that it can use an index on cardBalances unit CardId date . Comment : Thanks your query is meaningful and works as expected . But I didn t quite understand why this same query returns different results . I get that they become indeterminate rows but it s the fact that versions handle this in a different way . Comment : Grouping with just using takes the top row . However sql is working on sets unordered of tuples unless specifically ordered . your subquery might be explicitly ordered your query however sees a temporary result which is a table and it should group it .. . if the table is sorted or not is at that point irrelevant . So the result is indeterminate and it wouldn t even work in other database systems because is not an aggregate column in your query . mysql is .. . sloppy . and now you have to do real sql Comment : different versions with different results : could be optimization btw . ordering is usually expensive so if there is no necessity to do it .. . don t do it o", "Question : When querying the db for a set of ids mysql doesnot provide the results in the order by which the ids were specified . The query i am using is the following : .. . .. . in return the result provided is in the order 1 3 5 7 9 . How can i avoid this auto sorting Comment : I once receive this request from one of my company developer I simply reply Seems you have the precise information of 7 1 5 9 3 why you still need to sort it again Comment : @ajreal i get these ids from another server . n i need to query the db in the relevant order . i dont wanna sort it the db returns in a sorted way. . i wanna avoid the sorting : Comment : . . ARGGGGG...you already have these IDs in the ORDER of 7 1 5 9 3 why you need to sort it again Two solution query one id by id . Or use a place holder array that is your original order and fetch the results from database in whatever order loop the place holder array and set it accordingly . You already has the chicken why you still wondering how the egg laying .. . Answer : The WHERE clause in SQL does not affect the sort order the ORDER BY clause does that . If you don t specify a sort order using ORDER BY SQL will pick its own order which will typically be the order of the primary-key but could be anything . If you want the records in a particular order you need to specify an ORDER BY clause that tells SQL the order you want . If the order you want is based solely on that odd sequence of IDs then you d need to specify that in the ORDER BY clause . It will be tricky to specify exactly that . It is possible but will need some awkward SQL code and will slow down the query significantly due to it no longer using a key to find the records . If your desired ID sequence is because of some other factor that is more predictable say for example you actually want the records in alphabetical name order you can just do ORDER BY name or whatever the field is . If you really want to sort by the ID in an arbitrary sequence you may need to generate a temporary field which you can use to sort by : Comment : well. . thanks for the info. . but i am generating the query on run time. . so this would be a bit lengthy. . i just added ORDER BY FIELD id values at the end of the query. . im just worried about the performance issues" ] }
[ "yes-answer-long", "yes-answer-short" ]
sql
UNK_RELATION
caffeine@java-8@50
caffeine -- caffeine is an open-source cache for @placeholder and above .
{ "confidence": [ 46.16142272949219, 44.89084243774414, 44.886009216308594, 44.886009216308594, 44.886009216308594, 44.700565338134766, 41.47770690917969, 40.61042022705078, 40.34769058227539, 39.32146453857422, 38.57377624511719, 38.57377624511719, 38.57377624511719, 35.71305847167969, 35.71305847167969, 35.71305847167969, 35.71305847167969, 34.106658935546875, 34.106658935546875, 34.106658935546875, 33.3322868347168, 32.61539840698242, 32.10142517089844, 32.10142517089844, 32.10142517089844, 31.372692108154297, 31.372692108154297, 31.372692108154297, 31.245943069458008, 31.245943069458008, 31.245943069458008, 31.245943069458008, 31.245943069458008, 28.310548782348633, 22.125268936157227, 21.401443481445312, 20.006662368774414, 20.006662368774414, 19.191936492919922, 19.191936492919922, 19.191936492919922, 19.191936492919922, 19.191936492919922, 18.094505310058594, 18.094505310058594, 18.094505310058594, 17.422855377197266, 16.670581817626953, 16.670581817626953, 15.23378849029541, 15.23378849029541, 15.23378849029541, 14.562137603759766, 14.562137603759766, 13.809864044189453, 12.879703521728516, 12.879703521728516, 12.879703521728516, 12.879703521728516, 12.879703521728516, 12.879703521728516, 12.879703521728516, 12.879703521728516, 12.879703521728516, 12.879703521728516, 12.879703521728516, 12.879703521728516, 12.879703521728516, 12.879703521728516, 12.879703521728516, 12.879703521728516, 12.879703521728516, 12.879703521728516, 12.879703521728516, 12.879703521728516, 12.879703521728516, 12.879703521728516, 12.879703521728516, 12.879703521728516, 12.879703521728516, 12.879703521728516, 12.879703521728516, 12.879703521728516, 12.879703521728516, 12.879703521728516, 12.879703521728516, 12.879703521728516, 12.879703521728516, 12.879703521728516, 12.879703521728516, 12.879703521728516, 12.879703521728516, 12.879703521728516, 12.879703521728516, 12.879703521728516, 12.879703521728516, 12.879703521728516, 12.879703521728516, 12.879703521728516, 12.879703521728516 ], "content": [ "References to ConcurrentLinkedHashMap lead to Caffeine", "https : github.com ben-manes caffeine blob master simulator src main java com github benmanes caffeine cache simulator policy sketch WindowTinyLfuPolicy.java", "Caffeine does not implement LRU as its cache eviction policy .", "Is there a way to configure the maximum eden space size in caffeine cache", "I m trying to create a simple non-loading cache with Caffeine .", "The signature for Cache.get https : github.com ben-manes caffeine blob master caffeine src main java com github benmanes caffeine cache Cache.java L82 takes a key K and a mapping Function K V .", "Read more about Caffeine configuration .", "Iteration in eviction order is only exposed through the Policy http : static.javadoc.io com.github.ben-manes.caffeine caffeine 2.0.3 com github benmanes caffeine cache Policy.Eviction.html hottest-int- api .", "The Caffeine documentation includes a page on Efficiency https : github.com ben-manes caffeine wiki Efficiency which discusses the rationale for this design choice .", "I m trying to use Caffeine as LRU cache so entries that were added first will be evicted first .", "@AndyTurner sorry I couldn t find a tag for the caffeine library .", "I want to use Caffeine for caching and I need to have a write-behind .", "Maybe even with a note that these are things that are possible to implement on top of that CacheWriter but are not available in Caffeine .", "I m using Caffein https : github.com ben-manes caffeine as Jcache .", "reference here https : github.com ben-manes caffeine wiki JCache .", "When Caffeine support is added to the next release of Spring that workaround can be removed .", "@BenManes currently we are using version 2.0.3 of caffeine lib", "Instead Caffeine uses a policy called TinyLFU http : arxiv.org pdf 1512.00727.pdf .", "@bgme one Caffeine v1.x used LRU and the goal in 2.x was to adopt a more efficient alternative .", "Because many users would have Guava and might migrate the builder is called Caffeine to reduce confusion .", "When the access time is updated after a get https : github.com ben-manes caffeine blob master jcache src main java com github benmanes caffeine jcache CacheProxy.java L173 the new time set to the current millis and not adjusted https : github.com ben-manes caffeine blob master jcache src main java com github benmanes caffeine jcache CacheProxy.java L1065 by the expiry duration .", "In the simulator https : github.com ben-manes caffeine wiki Simulator you can adjust the window size by modifying the percent-main in the configuration file https : github.com ben-manes caffeine blob master simulator src main resources reference.conf L171 .", "Since Caffeine does not in fact implement LRU I don t think you can reliably expect it to exhibit strict LRU behavior when you inspect the entries in the cache .", "Caffeine was heavily inspired by the Guava Cache https : code.google.com p guava-libraries wiki CachesExplained which similarly provides concurrent access and has approximate LRU behavior .", "I am trying to build a cache using https : github.com ben-manes caffeine where I need to fetch all entries during boot up time and I do not know all the keys before hand .", "Kevin has said he favors transitioning Google over to Caffeine after the JDK8 release but I think how the relationship will evolve is still an unknown .", "The documentation https : github.com ben-manes caffeine wiki Writer speaks of write-back cache so it should be possible but there is no example there on how to configure it .", "I d like Caffeine too feel like a library flexible small obvious focused to avoid the mistakes many framework authors make .", "also we re using spring 4.2.4 and waiting for a 4.4 to come in so there will caffeine support in it .", "Also note that version 2.0.3 https : github.com ben-manes caffeine releases fixed some JCache issues .", "I released version 2.1.0 https : github.com ben-manes caffeine releases tag v2.1.0 which includes this fix .", "Caffeine prefers to use an O 1 design that eagerly cleans up expired entries by using fixed durations .", "I added a warning https : github.com ben-manes caffeine wiki JCache to the documentation about this feature as it could be error prone .", "loadAll is allowed https : github.com ben-manes caffeine wiki Population loading to return a larger mapping than the keys requested and all will be cached but only the requested entries returned .", "Nevertheless the recommended option is to use default settings https : github.com ben-manes caffeine blob master jcache src main resources reference.conf where store-by-value option is disabled and copier is necessary : .. . .. . Alternatively you can just disable store-by-value setting by :", "It appears that you imported the ElasticSearch s Cache interface to assign to the result-of the cache builder .", "For the production facing cache the window size is not a configuration parameter .", "You should be able to construct a cache like", "A quick test of your code against the Guava cache shows similar results .", "By its nature a cache is fast temporary storage to provide optimized lookups .", "This prior question also has a great discussion of LRU cache options in Java .", "How would you implement an LRU cache in Java 6", "My CachLoader has something like this and trying to cache all at startup .", "http : stackoverflow.com questions 221525 how-would-you-implement-an-lru-cache-in-java-6", "But looks like I will need to know all the keys before hand if I want to prefetch all entries in to cache", "If you want to load everything then you might not have a key-value cache and Guava s Suppliers.memoizeWithExpiration could be a better fit .", "I would not expect program behavior to change drastically dependent on whether the cache implements strict LRU an approximation of LRU LFU or some other eviction policy .", "You would need to subclass it and override removeEldestEntry http : docs.oracle.com javase 7 docs api java util LinkedHashMap.html removeEldestEntry java.util.Map.Entry with logic to signal when the cache has grown larger than you want it .", "I have implemented a CacheWriter but I don t understand how to configure it to for example only call the writer once every 10 seconds If something changed to the cache ofcourse .", "When cache is set to copying instances you should choose adequate Copier which will handle that .", "So you can just write : .. . .. . or .. . .. . It depends on if you want to be safe in case of cache key-value mutations .", "Alternatively using the Guava adapters plus Spring Cache integration is a lighter more predictable shim .", "I have a problem setting up a jcache with spring-cache abstraction http : docs.spring.io spring docs current spring-framework-reference html cache.html .", "I have configured my cache as follows : .. . .. . Also I have the @Service that uses it in following way : .. . .. . So I have the next behavior .", "Its JCache adapter uses default specification JCache settings which states that entries never expires and are stored by value copied when put retrieved from cache .", "Ran this code : .. . .. . Which prints : .. . .. . But I expected .. . .. . What am I doing wrong", "Quoting that page : .. . .. . TinyLfu relies on a frequency sketch to probabilistically estimate the historic usage of an entry .", "If you absolutely must have LRU behavior then the JDK standard LinkedHashMap http : docs.oracle.com javase 7 docs api java util LinkedHashMap.html is a good straightforward choice .", "If multi-threaded usage is necessary then you ll need to wrap operations with appropriate synchronization .", "I am not aware of any standard-library that would provide predictable externally observable LRU results and true concurrent access without a coarse-grained lock .", "You might reconsider whether it s really a requirement to have strict externally observable LRU results .", "Thanks but I need it to be concurrent .", "@bgme one I just edited my answer to state that I m not aware of any library that provides both concurrency and strict externally observable LRU results .", "However I also added a potential rationale for why you don t really need absolutely strict LRU as a program requirement .", "At this point the answer contains all the options I m aware of for you .", "I hope this helps .", "Good luck", "So Guava it is :", "This corresponds to ConcurrentLinkedHashMap s optional ascending descending iterators .", "Note that CLHM is relatively strict LRU but due to concurrency some skew might be visible .", "Guava is strict if concurrencyLevel 1 is used but does not expose eviction order .", "@BenManes thanks", "Great to have a response from the author .", "If not what is the default size", "What does this have to do with Guava", "@AndyTurner I think the confusion is my prior involvement with Guava and Caffeine s similarities .", "The term eden was borrowed from JVM generational garbage collectors where most objects die young and are not promoted .", "We later decided on window when coming up with a name for the eviction policy Window TinyLFU .", "That makes it easy to experiment with different trace files when evaluating policies and the impact of tuning options .", "This value is hard coded to 1 which was near optimal across a variety of workloads and avoids TinyLFU s degredation scenarios .", "In some workloads OLTP disk traces a larger value has a small gain but not enough to expose a configuration option .", "Doing so wouldn t carry its conceptual weight by confusing most users and leak implementation details .", "This is very helpful .", "Thanks", "@andrsncpr I work right by the Caltrain station near Amplitude so feel free to email me if you play around and want to grab lunch to discuss .", "sounds good Ben :", "you can add eden space declaration at the start of JVM using the parameters : .. . .. . -XX : NewSize size .. . .. . -XX : MaxNewSize size .. . .. . Ideally Eden space 3 8 total heap size .", "I want to limit the amount of times I write to the database .", "CacheWriter is an extension point and the documentation describes the use-cases where it may make sense .", "Those cases are beyond the scope of the library and if implemented instead could have been too rigid .", "The writer is called atomically during a normal write operation but not a computation .", "This ensures that a sequential order of changes is observed for a given key .", "For write-behind the writer would add the entry into a queue that is processed asynchronously e.g .", "to batch the operations .", "When implementing this capability you might want to consider .. . .. . Coalescing the updates e.g .", "collect into a LinkedHashMap .. . Performing a batch prior to a periodic write-behind if it exceeds a threshold size .. . Loading from the write-behind buffer if the operations have not yet been flushed This avoids an inconsistent view e.g .", "due to eviction .. . Handling retrials rate-limiting and striping depending on the the characteristics of the external resource", "Ah that was totally not clear .", "Maybe the first section that has no title can get a title Usage and the other 3 titles can be grouped under a new title Possible use cases .", "In the end I went with Hazelcast as they have write-behind out of the box ." ] }
{ "confidence": [ 55.72339630126953, 55.093238830566406, 53.83050537109375, 53.44981384277344, 49.68144989013672, 48.73704528808594, 47.249534606933594, 45.897064208984375, 43.45635986328125 ], "content": [ "Question : Is there a way to configure the maximum eden space size in caffeine cache If not what is the default size https : github.com ben-manes caffeine blob master simulator src main java com github benmanes caffeine cache simulator policy sketch WindowTinyLfuPolicy.java Comment : What does this have to do with Guava Comment : @AndyTurner sorry I couldn t find a tag for the caffeine library . Comment : @AndyTurner I think the confusion is my prior involvement with Guava and Caffeine s similarities . Kevin has said he favors transitioning Google over to Caffeine after the JDK8 release but I think how the relationship will evolve is still an unknown . .. . Answer : you can add eden space declaration at the start of JVM using the parameters : .. . .. . -XX : NewSize size .. . .. . -XX : MaxNewSize size .. . .. . Ideally Eden space 3 8 total heap size .", "Question : I m trying to use Caffeine as LRU cache so entries that were added first will be evicted first . Ran this code : .. . .. . Which prints : .. . .. . But I expected .. . .. . What am I doing wrong .. . Answer : Caffeine does not implement LRU as its cache eviction policy . Instead Caffeine uses a policy called TinyLFU http : arxiv.org pdf 1512.00727.pdf . The Caffeine documentation includes a page on Efficiency https : github.com ben-manes caffeine wiki Efficiency which discusses the rationale for this design choice . Quoting that page : .. . .. . TinyLfu relies on a frequency sketch to probabilistically estimate the historic usage of an entry . Since Caffeine does not in fact implement LRU I don t think you can reliably expect it to exhibit strict LRU behavior when you inspect the entries in the cache . If you absolutely must have LRU behavior then the JDK standard LinkedHashMap http : docs.oracle.com javase 7 docs api java util LinkedHashMap.html is a good straightforward choice . You would need to subclass it and override removeEldestEntry http : docs.oracle.com javase 7 docs api java util LinkedHashMap.html removeEldestEntry java.util.Map.Entry with logic to signal when the cache has grown larger than you want it . If multi-threaded usage is necessary then you ll need to wrap operations with appropriate synchronization . Caffeine was heavily inspired by the Guava Cache https : code.google.com p guava-libraries wiki CachesExplained which similarly provides concurrent access and has approximate LRU behavior . A quick test of your code against the Guava cache shows similar results . I am not aware of any standard-library that would provide predictable externally observable LRU results and true concurrent access without a coarse-grained lock . You might reconsider whether it s really a requirement to have strict externally observable LRU results . By its nature a cache is fast temporary storage to provide optimized lookups . I would not expect program behavior to change drastically dependent on whether the cache implements strict LRU an approximation of LRU LFU or some other eviction policy . This prior question also has a great discussion of LRU cache options in Java . How would you implement an LRU cache in Java 6 http : stackoverflow.com questions 221525 how-would-you-implement-an-lru-cache-in-java-6 Comment : Thanks but I need it to be concurrent . References to ConcurrentLinkedHashMap lead to Caffeine Comment : @bgme one I just edited my answer to state that I m not aware of any library that provides both concurrency and strict externally observable LRU results . However I also added a potential rationale for why you don t really need absolutely strict LRU as a program requirement . At this point the answer contains all the options I m aware of for you . I hope this helps . Good luck Comment : So Guava it is : Comment : @bgme one Caffeine v1.x used LRU and the goal in 2.x was to adopt a more efficient alternative . Iteration in eviction order is only exposed through the Policy http : static.javadoc.io com.github.ben-manes.caffeine caffeine 2.0.3 com github benmanes caffeine cache Policy.Eviction.html hottest-int- api . This corresponds to ConcurrentLinkedHashMap s optional ascending descending iterators . Note that CLHM is relatively strict LRU but due to concurrency some skew might be visible . Guava is strict if concurrencyLevel 1 is used but does not expose eviction order . Comment : @BenManes thanks Great to have a response from the author .", "Question : Is there a way to configure the maximum eden space size in caffeine cache If not what is the default size https : github.com ben-manes caffeine blob master simulator src main java com github benmanes caffeine cache simulator policy sketch WindowTinyLfuPolicy.java Comment : What does this have to do with Guava Comment : @AndyTurner sorry I couldn t find a tag for the caffeine library . Comment : @AndyTurner I think the confusion is my prior involvement with Guava and Caffeine s similarities . Kevin has said he favors transitioning Google over to Caffeine after the JDK8 release but I think how the relationship will evolve is still an unknown . .. . Answer : The term eden was borrowed from JVM generational garbage collectors where most objects die young and are not promoted . We later decided on window when coming up with a name for the eviction policy Window TinyLFU . In the simulator https : github.com ben-manes caffeine wiki Simulator you can adjust the window size by modifying the percent-main in the configuration file https : github.com ben-manes caffeine blob master simulator src main resources reference.conf L171 . That makes it easy to experiment with different trace files when evaluating policies and the impact of tuning options . For the production facing cache the window size is not a configuration parameter . This value is hard coded to 1 which was near optimal across a variety of workloads and avoids TinyLFU s degredation scenarios . In some workloads OLTP disk traces a larger value has a small gain but not enough to expose a configuration option . Doing so wouldn t carry its conceptual weight by confusing most users and leak implementation details . Comment : This is very helpful . Thanks Comment : @andrsncpr I work right by the Caltrain station near Amplitude so feel free to email me if you play around and want to grab lunch to discuss . Comment : sounds good Ben :", "Question : I m trying to create a simple non-loading cache with Caffeine . This fails to compile with the Error reported : .. . .. . Any suggestions would be greatly appreciated . .. . Answer : It appears that you imported the ElasticSearch s Cache interface to assign to the result-of the cache builder . The builder syntax you showed is Guava s CacheBuilder . Because many users would have Guava and might migrate the builder is called Caffeine to reduce confusion . You should be able to construct a cache like", "Question : null .. . Answer : Here s the code : .. . .. . The problem is that the cache.get gives the error : .. . .. . What exactly is expected in the get method I couldn t find any examples and I don t understand why it would require another function . Comment : The signature for Cache.get https : github.com ben-manes caffeine blob master caffeine src main java com github benmanes caffeine cache Cache.java L82 takes a key K and a mapping Function K V . You re only providing a key . The javadocs seem fairly clear to me as to how these two arguments work together if there s something you don t get about them you ll need to be more specific . Comment : Sounds like you meant to use getIfPresent K", "Question : I have a problem setting up a jcache with spring-cache abstraction http : docs.spring.io spring docs current spring-framework-reference html cache.html . I m using Caffein https : github.com ben-manes caffeine as Jcache . I m just cannot understand what i m doing wrong . Would you explain how to do it properly What i m getting is NPE at line cacheManager.createCache .. . Comment : Thanks for your feedback In the next version 2.1.0 the CaffeineConfiguration will disable store-by-value and set copier to JavaSerializationCopier at construction in case store-by-value is enabled and no copier explicitly set . This should be friendlier initial settings so other users won t be surprised by this exception . .. . Answer : Read more about Caffeine configuration . Its JCache adapter uses default specification JCache settings which states that entries never expires and are stored by value copied when put retrieved from cache . reference here https : github.com ben-manes caffeine wiki JCache . When cache is set to copying instances you should choose adequate Copier which will handle that . So you can just write : .. . .. . or .. . .. . It depends on if you want to be safe in case of cache key-value mutations . Nevertheless the recommended option is to use default settings https : github.com ben-manes caffeine blob master jcache src main resources reference.conf where store-by-value option is disabled and copier is necessary : .. . .. . Alternatively you can just disable store-by-value setting by : Comment : yes solved my problem . thank you for explanation Comment : @Mark JCache is pretty weird at times . Alternatively using the Guava adapters plus Spring Cache integration is a lighter more predictable shim . When Caffeine support is added to the next release of Spring that workaround can be removed . So unless you are using JCache APIs I tend to recommend users avoid it . The jsr107 TCK is not overly robust so improving the the adapter s tests and error messaging is on my to-do list . Comment : @BenManes yeap there is a bound to jcache api . also we re using spring 4.2.4 and waiting for a 4.4 to come in so there will caffeine support in it . anyway thank you for a hint :", "Question : I want to use Caffeine for caching and I need to have a write-behind . I want to limit the amount of times I write to the database . The documentation https : github.com ben-manes caffeine wiki Writer speaks of write-back cache so it should be possible but there is no example there on how to configure it . I have implemented a CacheWriter but I don t understand how to configure it to for example only call the writer once every 10 seconds If something changed to the cache ofcourse . .. . Answer : CacheWriter is an extension point and the documentation describes the use-cases where it may make sense . Those cases are beyond the scope of the library and if implemented instead could have been too rigid . The writer is called atomically during a normal write operation but not a computation . This ensures that a sequential order of changes is observed for a given key . For write-behind the writer would add the entry into a queue that is processed asynchronously e.g . to batch the operations . When implementing this capability you might want to consider .. . .. . Coalescing the updates e.g . collect into a LinkedHashMap .. . Performing a batch prior to a periodic write-behind if it exceeds a threshold size .. . Loading from the write-behind buffer if the operations have not yet been flushed This avoids an inconsistent view e.g . due to eviction .. . Handling retrials rate-limiting and striping depending on the the characteristics of the external resource Comment : Ah that was totally not clear . Maybe the first section that has no title can get a title Usage and the other 3 titles can be grouped under a new title Possible use cases . Maybe even with a note that these are things that are possible to implement on top of that CacheWriter but are not available in Caffeine . In the end I went with Hazelcast as they have write-behind out of the box . Comment : Thanks I ll improve the documentation then . I think a community extension to offer this capability would be nice . I d like Caffeine too feel like a library flexible small obvious focused to avoid the mistakes many framework authors make . Hopefully it is extensible enough to be used as a building block to handle aspects outside of its scope .", "Question : I have configured my cache as follows : .. . .. . Also I have the @Service that uses it in following way : .. . .. . So I have the next behavior . 1 . When I m calling the service method first time it takes 5 seconds then doing some work as expected . 2 . Calling method the second time with same parameters - caching works - returns result immediately .. . 3 . Calling the third time with same parameters again results in Thread.sleep .. . .. . And all over again . How to solve this Is that the issue about proxying What did I miss Comment : Perhaps there is a bug in the cache s expiration logic The TCK doesn t provide much coverage here unfortunately so more tests are desirable for the JCache adapter . Can you wrap this into a sample so that I can debug it with you Also note that version 2.0.3 https : github.com ben-manes caffeine releases fixed some JCache issues . Comment : I think you found a bug . When the access time is updated after a get https : github.com ben-manes caffeine blob master jcache src main java com github benmanes caffeine jcache CacheProxy.java L173 the new time set to the current millis and not adjusted https : github.com ben-manes caffeine blob master jcache src main java com github benmanes caffeine jcache CacheProxy.java L1065 by the expiry duration . I ll fix this and add some additional tests over the weekend . Sorry about that . Comment : @BenManes currently we are using version 2.0.3 of caffeine lib Comment : @BenManes that s cleared something waiting for a bugfix . thank you for replying Comment : I pushed a fix available as a snapshot . I ll spend time over the weekend to add JCache tests and try to have a release out Sunday night . .. . Answer : As discussed in the comments this was a bug in the JCache adapter . Thank you for letting me know about this problem . I released version 2.1.0 https : github.com ben-manes caffeine releases tag v2.1.0 which includes this fix . That release also includes friendlier initial settings for CaffeineConfiguration which you identified in another post http : stackoverflow.com q 34809817 19450 . While the core library is heavily tested the JCache adapters relied too heavily on the JSR s TCK test compatibility kit . Unfortunately that test suite isn t very effective so I added tests to help avoid these types of mistakes in the future . This issue only occurred in JCache because its version of expiration is not supported by Caffeine s core library . Caffeine prefers to use an O 1 design that eagerly cleans up expired entries by using fixed durations . JCache uses per-entry lazy expiration and the specification authors assume a capacity constraint is used to eventually discard expired entries . I added a warning https : github.com ben-manes caffeine wiki JCache to the documentation about this feature as it could be error prone . While none of the other JCache implementations go beyond this a pending task is to decide on a mechanism to help mitigate this JCache design flaw . Thanks again for reporting this issue . As always feel free to reach out if you have any other issues or feedback to share . Comment : thank you for fast bugfixing and detailed explanation for what happened great to see that", "Question : null .. . Answer : I am trying to build a cache using https : github.com ben-manes caffeine where I need to fetch all entries during boot up time and I do not know all the keys before hand . My CachLoader has something like this and trying to cache all at startup . But looks like I will need to know all the keys before hand if I want to prefetch all entries in to cache Am I missing anything So say I call cache.getAll 10 and only 10-- 100 will be cached even though the loadAll method returns 3 entries 10-- 100 20-- 400 30-- 900 Comment : What is your specific question Comment : my question is do I need to know all possible keys before hand so that i can prefetch all possible entries Comment : loadAll is allowed https : github.com ben-manes caffeine wiki Population loading to return a larger mapping than the keys requested and all will be cached but only the requested entries returned . If you want to load everything then you might not have a key-value cache and Guava s Suppliers.memoizeWithExpiration could be a better fit . Comment : Thanks a lot for the reply Ben . looks like i do not need to know all possible keys . I can pass in a fake key and load them all in loadAll" ] }
[ "yes-answer-long", "yes-answer-short" ]
java-8
UNK_RELATION
tweenlite@actionscript-3@190
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 @placeholder and actionscript-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, 47.62403106689453, 44.155826568603516, 43.80375671386719, 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.78803253173828, 38.78803253173828, 38.78803253173828, 38.091888427734375, 38.091888427734375, 37.462158203125, 37.4456787109375, 36.80663299560547, 36.766571044921875, 36.73687744140625, 36.58549499511719, 36.58549499511719, 36.58549499511719, 36.58549499511719, 36.58549499511719, 36.58549499511719, 36.58549499511719, 35.479244232177734, 35.479244232177734, 35.479244232177734, 35.479244232177734, 35.43926239013672, 34.835269927978516, 34.34516525268555, 34.15336990356445, 33.53225326538086, 33.396881103515625, 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.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.56372833251953, 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 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 m using TweenLite to create a slide animation of 3 images .", "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 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 .", "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 .", "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 .", "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 .", "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 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 .", "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 .", "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 .", "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": [ 89.73081970214844, 78.06262969970703, 75.86360168457031, 75.10126495361328, 71.00037384033203, 69.9157485961914, 67.64118957519531, 64.70419311523438, 64.57530975341797, 63.705352783203125, 60.82856750488281, 59.346595764160156, 57.02317810058594, 56.37470245361328, 54.78533172607422, 53.35560607910156, 52.31000518798828, 51.074928283691406, 50.06974792480469, 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 : 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 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 : 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 : 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 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 : 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-3
UNK_RELATION
varnish@caching@72
varnish -- varnish is an open-source reverse http-proxy with extensive @placeholder abilities i.e .
{ "confidence": [ 53.05947494506836, 49.19336700439453, 48.16217041015625, 46.10299301147461, 43.922576904296875, 43.922576904296875, 42.649803161621094, 42.341793060302734, 42.187808990478516, 41.81730651855469, 41.53175354003906, 41.4271240234375, 40.981788635253906, 40.981788635253906, 40.981788635253906, 40.81800079345703, 40.783592224121094, 40.722171783447266, 40.722171783447266, 40.25567626953125, 40.16935729980469, 40.137298583984375, 39.9619026184082, 39.951866149902344, 39.951866149902344, 39.951866149902344, 39.83860778808594, 39.83860778808594, 39.83860778808594, 39.83860778808594, 39.83860778808594, 39.83860778808594, 39.599578857421875, 39.456443786621094, 39.240150451660156, 39.240150451660156, 38.94039535522461, 38.94039535522461, 38.94039535522461, 38.94039535522461, 38.94039535522461, 38.8881950378418, 38.687339782714844, 38.5377082824707, 38.35771560668945, 38.35771560668945, 38.356590270996094, 38.356590270996094, 38.356590270996094, 38.20344543457031, 38.192806243896484, 38.15784454345703, 38.02826690673828, 38.007469177246094, 38.006080627441406, 38.006080627441406, 37.949623107910156, 37.804901123046875, 37.7794303894043, 37.7794303894043, 37.77145004272461, 37.702186584472656, 37.702186584472656, 37.702186584472656, 37.702186584472656, 37.702186584472656, 37.57979965209961, 37.53958511352539, 37.51054763793945, 37.51054763793945, 37.474151611328125, 37.474151611328125, 37.4583740234375, 37.37162399291992, 37.310367584228516, 37.310367584228516, 37.310367584228516, 37.310367584228516, 37.276039123535156, 37.249786376953125, 36.74916076660156, 36.69697570800781, 36.69697570800781, 36.620872497558594, 36.620872497558594, 36.5759391784668, 36.560401916503906, 36.560401916503906, 36.55900955200195, 36.55900955200195, 36.55900955200195, 36.55900955200195, 36.55900955200195, 36.55900955200195, 36.55900955200195, 36.55900955200195, 36.55900955200195, 36.53850555419922, 36.5240592956543, 36.5240592956543 ], "content": [ "So Nginx will be act as a cache and Varnish as a reverse proxy then", "Varnish is in front of the webserver it works as a reverse http-proxy that caches .", "I m trying to implement a rubygems reverse proxy using Varnish 4.1 .", "I now wish to deploy a varnish reverse proxy server in front of it .", "The same applies for whatever reverse proxy you use such as Varnish in your case .", "Varnish is a reverse-caching proxy that resides in front of your app web server .", "New to varnish not new to HTTP .", "I have only one public ip-address so use Varnish as a reverse proxy for multiple servers .", "You can compile varnish from source using the instructions found in the varnish documentation https : www.varnish-cache.org docs trunk installation install.html compiling-varnish-from-source .", "but varnish is nothing .", "1st physical server Varnish Apache - port 80 port 8080 ip-address 10.0.0.40 .. . .. . 2nd physical server 3 Drupal Vhosts - port 80 ip-address 10.0.0.30 .. . .. . 3rd physical server 2 Non Drupal Vhosts - port 80 ip-address 10.0.0.31 .. . .. . In etc sysconfig varnish .. . .. . DAEMON OPTS -a : 80 -T localhost : 6082 -f etc varnish default.vcl -u varnish -g varnish -S etc varnish secret -s file var lib varnish varnish storage.bin 1G .. . .. . In default vcl .. . .. . backend default .host 127.0.0.1 .port 8080 .. . .. . Reverse proxy is working ok and I can see Varnish cache working by checking http header .", "Have you looked into varnish-modules https : github.com varnish varnish-modules", "When varnish crashes due to panic where will varnish dump the logs traces", "How to redirect in Varnish 3 .. . .. . How to redirect in Varnish 4", "Note : Varnish Version installed is varnish-3.0.2-1.el5.x86 64 .. . .. . Thanks .", "Our varnish server is Centos 7 it has installed Varnish 4 .", "I am using Apache + Nginx reverse proxy with Varnish v4 .. . .. . When i am trying to test varnish at isvarnishworking.com than on very first time i am getting Yes", "In Varnish 4 it defaults to off .", "We are using Varnish 4", "subroutines can be highly simplified when using Varnish Cache 4.1 i.e .", "I m a newbie to Varnish Cache .", "Enable full page caching using Varnish a super fast caching HTTP reverse proxy .", "Is there anything more than Varnish is a dedicated proxy Symfony is also managing other features so Varnish is better", "How can I be sure that symfony built-in reverse proxy is not being used causing this problem when varnish is up", "This methods works flawlessly with the Symfony Reverse Proxy but now I want to try and if significant performance gain switch to Varnish .", "I have a reverse proxy server on which mod-security is configured to be used as web application firewall and varnish is for cache .", "From the backend or from varnish", "The version of varnish is 4.1.0 .", "Varnish sends a 503 to the consumer .", "Sorry I m new to Varnish .", "when varnish uses it", "my varnish version is 3.0.1 .", "Your client is using HTTP to communicate with Varnish .", "I m new to Varnish and to reverse proxies in general .", "I m using Varnish version 4 .", "A stalled object is not available in the Varnish storage .", "Does it work without Varnish", "It s on the same VPS as varnish .", "Varnish 4 caching enabled", "Varnish simply forwards this to the client .", "Varnish is not cacheing as expected .", "Using Latest versions of all Softwares mentioned Symfony 2.6.4 Varnish 4.0+ .. . .. . My Symfony App.php is the default one with APC enabled but Symfony Reverse Proxy disabled my Varnish config is Pasted .", "Stopped varnish planning to work with config .", "Varnish 4.0", "Can you install the VMOD cookie https : github.com varnish varnish-modules blob master docs cookie.rst", "I have varnish 4 and i m using the below command to purge varnish cache url and it s working but using BAN .", "Varnish has three backends configured .", "With Varnish 3 inline C is on by default .", "Add Following lines in Varnish Config", "I configured Symfony and FOSHttpCacheBundle following the Varnish configuration instructions in the FOSHttpCache documentation http : foshttpcache.readthedocs.org en stable varnish-configuration.html varnish-tagging .", "In the VCL configuration of you varnish .. . 3 .", "Varnish speaks HTTP to the backends .", "The previous 2 Heroku application stacks came with a Varnish http : www.varnish-cache.org layer which automatically reverse-proxy-cached content based on http-headers .", "Here is a guide on Varnish installation http : www.section.io varnish-install-quick-and-detailed that includes metric setup", "Is this setting deprecated in Varnish 4", "Is there a varnish module for Boxen", "client-varnish and varnish-backend to be over https .", "For Varnish to process ESI one needs to add .. . .. . to the vcl backend response vcl fetch in Varnish 3 in ones VCL .", "Is this possible to do this with Varnish", "Is there a better varnish alternative for this", "We re about to set up a cache and reverse proxy for our site and we re deciding whether to use Varnish or Nginx .", "etc varnish-vcl recv.conf : .. . .. . etc varnish recv exmaple.conf : .. . .. . Any clue", "I enabled varnish like bitnami wiki s How to enable Varnish", "https : wiki.bitnami.com Components Varnish How to enable Varnish.3f and Varnish enabled successfully", "etc default varnish and etc varnish default.vcl is configured as follows .", "Is there a way to bypass varnish cache-control in my plugin without working on varnish", "similar question Varnish 4 on 12.04 http : askubuntu.com questions 520850 varnish-4-on-12-04 on askubuntu http : askubuntu.com", "Basically in this case Varnish will only cache contents for guest i.e .", "i have a few varnish cache s running and want to be able to ban purge content on the local varnish node and from there i also want to purge the remote varnishes so i can purge on all varnish hosts .", "While i dont face this problem in Varnish 3.. . .. . .. . here is my varnish 4.1.2 configuration.. . .. . .. . default.conf .. . .. . And etc default varnish .. . .. . Can anyone help me through out the problem", "As per the varnish ebook varnishncsa -displays Varnish access logs varnishlog is used to access request-specific data .", "When varnish crashes due to segfault where will varnish puts the messages and core dump", "The ESI requests will also be processed by varnish .", "https : www.symfony.fi entry symfony-benchmarks-symfony-proxy-vs-varnish", "On the second server runs only a Varnish server which backend is the Varnish on the first server .", "My problem is that when i download a file from the second server it will cached at the second varnish but not at the first varnish .", "Is there a possibility that the first varnish server also cache the file when it s the backend of the second varnish server", "Config from Varnish 1 192.168.0.2 : 80 : .. . .. . Config from Varnish 2 192.168.0.3 : 80 :", "http : wordpress.org plugins varnish-http-purge", "Found that the issue was related to the puppet module for deploying varnish .", "I installed varnish 3.0.5 on amazon linux but fail to start the varnish .. . .. . Then I try to change the default varnish-vcl and try to use varnishd -d -f etc sysconfig varnish to locate the issue with following errors .. . .. . The fulll varnish file is as following :", "Varnish : will receive requests from Nginx and pass it to Apache .", "After verifiying Nginx was working Varnish was enabled .", "and Finally if varnish is not a good contender should I switch to some other reverse proxy .", "Are there any benchmarks on how high the performance impact is if the ESI round tips an native reverse proxy like varnish", "I have debian 8 nginx and varnish 4.0.2 .. . .. . I want to update varnish cli buffer value from 8k to 16k .", "Follow this to start to end solutions for varnish .. . .. . http : rajeshganjeer.wordpress.com 2014 05 28 varnish-with-magento-terpentine", "Here is the configuration related to HTTP cache in my Symfony config.yml file : .. . .. . And Varnish configuration in etc varnish default.vcl :", "Varnish does not support ssl .", "No varnish commands in syslog .", "Found mine at etc varnish", "etc default varnish .. . 2 .", "etc varnish default.vcl", "try this : .. . .. . if varnish 3.0 and up .", "Varnish cache will not be purged this way .", "That works for Varnish 2 .", "Varnish is caching the pages .", "This means on a request - varnish level 1 processes and routes to - varnish level 2 which routes to - application .. . .. . Question : if the application now adds esi within the content is it possible to define something like namespaces something that some esi are handled within level 2 varnish and other ones within level 1 varnish", "I installed Varnish 4.1.3 on Joomla .", "This doesn t seem to work on Varnish 4 ." ] }
{ "confidence": [ 56.70248031616211, 55.700130462646484, 55.511940002441406, 51.752899169921875, 51.525390625, 51.48588943481445, 51.19668960571289, 50.22929382324219, 49.69758224487305, 49.47120666503906, 49.002498626708984, 48.895626068115234, 48.6203727722168, 48.474266052246094, 48.30652618408203, 48.098724365234375, 48.09794998168945, 48.04610061645508, 47.853782653808594, 46.972564697265625 ], "content": [ "Question : I have only one public ip-address so use Varnish as a reverse proxy for multiple servers . Here is the configuration . 1st physical server Varnish Apache - port 80 port 8080 ip-address 10.0.0.40 .. . .. . 2nd physical server 3 Drupal Vhosts - port 80 ip-address 10.0.0.30 .. . .. . 3rd physical server 2 Non Drupal Vhosts - port 80 ip-address 10.0.0.31 .. . .. . In etc sysconfig varnish .. . .. . DAEMON OPTS -a : 80 -T localhost : 6082 -f etc varnish default.vcl -u varnish -g varnish -S etc varnish secret -s file var lib varnish varnish storage.bin 1G .. . .. . In default vcl .. . .. . backend default .host 127.0.0.1 .port 8080 .. . .. . Reverse proxy is working ok and I can see Varnish cache working by checking http header . However I am not sure above configuration is correct or optimal especially only one backend definition on default vcl file . Any advice .. . Answer : I suggest the following approach : .. . .. . NGINX VARNISH APACHE .. . .. . Nginx : to handle SSL termination easily and also you can use it to cache the static content . As far as I know that Nginx is better than Varnish in caching the static content also Varnish is not supposed to cache the static content . Varnish : will receive requests from Nginx and pass it to Apache . Apache : will act as a load balancer which will send the requests to the backend servers Drupal Non-drupal .. . .. . Check the following resources : .. . .. . 1- HTTPS Everywhere With Nginx Varnish And Apache https : www.smashingmagazine.com 2015 09 https-everywhere-with-nginx-varnish-apache .. . .. . 2- Simple load-balancing with Apache https : support.rackspace.com how-to simple-load-balancing-with-apache .. . .. . If my answer is not clear enough let me know . Comment : Okay . At this point I don t plan to use HTTPS so I am not sure what is a good point to use another layer which is Nginx cause post you have mentioned talks about Varnish as a cache as well . Comment : Using Nginx makes it easier to manage SSL also its better to cache the static content using NGINX Comment : Ok . So Nginx will be act as a cache and Varnish as a reverse proxy then If so Nginx will run port 80 for http no ssl Varnish port 80 for Nginx and 8080 for Apache and Apache port 8080 for Varnish and 80 for back end servers Comment : Nginx will be on PUBLIC IP : 80 Works as a cache for static content and to manage SSL if exist Varnish will be on LOCALHOST : 80 Receiving from NGINX and sending to Apache and Caching the dynamic-content PHP requests for exmple Apache will be on LOCALHOST : 8080 or 82 Which receives from Varnish and sending to the backend servers Comment : Thank you . I think I understand it . After verifiying Nginx was working Varnish was enabled . It look like everything is cache so age count is not increasing .", "Question : null .. . Answer : Ok so I have a Symfony 2 app that has been working ok . I now wish to deploy a varnish reverse proxy server in front of it . My app uses a slightly different approach from the usual in that I installed Suncat Mobile Detection Bundle where I detect a users device from within Twig and select which layout to extend e.g Layout.html.twig if mobile extends mobile.html.twig if desktop extends desktop.html.twig if tab extends tab.html.twig and all of this extend Base.html.twig . This is very convenient for me as I get a mobile tab and desktop optimized app easily . This comes at a cost however as I cannot cache the whole page as the mobile detection will not work my work-around was to set cache to 0 then render esi controllers for the page content and cache accordingly . This methods works flawlessly with the Symfony Reverse Proxy but now I want to try and if significant performance gain switch to Varnish . Currently I have Nginx ssl termination to Apache with symfony reverse proxy now I wish test and or switch to Nginx ssl termination to Varnish to Apache . I have bought a separate VPS for Varnish on which I can test irrespective of Nginx . I have read and followed many docs and it seems to work when I request static resources from the backend such as images I get a cache hit but my Symfony pages do not show cache hits on varnishstat . Using Latest versions of all Softwares mentioned Symfony 2.6.4 Varnish 4.0+ .. . .. . My Symfony App.php is the default one with APC enabled but Symfony Reverse Proxy disabled my Varnish config is Pasted . Any help or direction is much appreciated . Thanks . Comment : Did you try to use the Vary cache-header with a corresponding custom header Such as Vary : X-User-Agent Accept-Encoding and then have e.g . X-User-Agent with 3 distinct values : desktop tab mobile . Let Varnish determine the user-agent also within the config and add it the vcl hash subroutine . This way you will have 3 distinct objects in varnish for the same url .", "Question : I have a reverse proxy server on which mod-security is configured to be used as web application firewall and varnish is for cache . I have blocked a country but as request hit Varnish and getting served . The setup is like below .. . .. . Request Varnish 80 Mod security HTTPD 8080 .. . .. . On opening page on 8080 the rule is working but on 80 the request is getting served by the Varnish . .. . Answer : You will need to put your geolocation rules into varnish for it to get use of varnish alternatives are really bad for cache hitrates . Theres a VMOD for geo-location called https : github.com varnish libvmod-geoip", "Question : I m trying to implement a rubygems reverse proxy using Varnish 4.1 . Clients inside my intranet do not have a general outbound NAT so I need Varnish to internally follow all redirects preferably caching both the 302 from rubygems.org and the response from the CDN server . Here s my default.vcl : .. . .. . If I curl -i http : localhost latest specs.4.8.gz Varnish throws an HTTP 503 and logs the following : .. . .. . It does not seem to be requesting the new URL even after updating req.url and restarting the request . .. . Answer : This is not a definitive answer but here are some thoughts : .. . .. . 1 req.url holds only the path part of a URL but does not contain the protocol and host part of an URL . So it seems plain wrong to me when you assign http : rubygems.global.ssl.fastly.net latest specs.4.8.gz to req.url in vcl deliver and then restart . In my opinion the restarted request will not hit rubygems.global.ssl.fastly.net but still rubygems.org - the defined default backend . So I guess you would need to define a second backend rubygems.global.ssl.fastly.net and and set when you restart . You also need to do something like this not tested .. . .. . 2 retry and restart are different concepts in varnish 4 .. . .. . That is why bereq.retries always shows 0 . You need to look at req.restarts", "Question : I am always asking this question : why use Varnish instead of Symfony proxy Is there anything more than Varnish is a dedicated proxy Symfony is also managing other features so Varnish is better Or just because Varnish is written in C I didn t find any link where I can have a technical point about why Varnish proxy is better than Symfony proxy . Do you have any information to share with me about this .. . Answer : It outperforms Symfony cache by a large margin and also has-many features that Symfony s HTTP cache does not have . https : www.symfony.fi entry symfony-benchmarks-symfony-proxy-vs-varnish", "Question : Is it possible to set a cache-control header communicating with a reverse proxy to ignore query parameters in determining what is a unique uri or in short : validate a cache even if some query parameters have changed Sometimes query parameters have nothing to do with the rendering of the page at least from a server-side perspective . For instance all utm variables from Google Adwords . These are needed for the javascript on your page so you don t want to strip them away and redirect to a cached page but at the same time it would be advantageous not to treat two uri s which are basically the same but have different utm parameters as unique when communicating with a reverse proxy . An example : .. . .. . 1 . http : www.example.com search sort price .. . .. . 2 . http : www.example.com search sort price utm campaign shoes .. . .. . Is there anyway to tell the reverse proxy using the HTTP 1.1 spec i.e . some type of http header that it can just treat these two pages as the same .. . Answer : You can filter the query-string in vcl recv and there is also a Varnish module for that 1 . Also you have to keep in mind that query-string parameter order matters in this case 2 .. . .. . See also this related question 3 .. . .. . 1 https : www.varnish-cache.org vmod querystring .. . .. . 2 http : cyberroadie.wordpress.com 2012 01 05 varnish-reordering-query-string .. . .. . 3 Stripping out select querystring attribute value pairs so varnish will not vary cache by them http : stackoverflow.com questions 13144172 stripping-out-select-querystring-attribute-value-pairs-so-varnish-will-not-vary", "Question : I have a Rails app that is running on port 8080 that I need to trick to think it s running on port 80 . I am running Varnish on port 80 and forwarding requests to nginx on port 8080 but when the user tries to login with OmniAuth and the Devise gem generates a url to redirect back to the server it thinks its on port 8080 which then the user will see . Is there any way to trick the Rails app to hard code the port as 80 I would think it s a bad practice or have nginx forward the request as-if it s running on port 80 Since I am not running a nginx proxy to the Rails app I can t think of a way to trick the port . Has anyone ran into this issue before if so what sort of configuration is needed to fix it Thanks in advance EDIT : Both nginx and Varnish are running on the same server . .. . Answer : Set up X-Forwarded-Port in Varnish . See this example http : www.cynapse.com community home cyn.in-users varnish-configuration and the other results from a Google search for varnish x-forwarded-port http : www.google.com search sourceid chrome ie UTF-8 q varnish+x-forwarded-port . You must also of course set up X-Forwarded-For and X-Forwarded-Proto . .. . .. . The headers X-Forwarded-For X-Forwarded-Proto and X-Forwarded-Port are a way for HTTP reverse proxies such as Nginx Squid or Varnish to communicate to the back-end HTTP application server your Rails application running in Thin or Unicorn who the user actually is and how the user actually connected . For example suppose you have Nginx in front of your Rails application . Your Rails application was booted with Thin and is listening on 127.0.0.1 : 8080 while Nginx is listening on 0.0.0.0 : 80 for HTTP and 0.0.0.0 : 443 for HTTPS . Nginx is configured to proxy all connections to the Rails app . Then your Rails app will think that any user s IP address is 127.0.0.1 the port is 8080 and the scheme is http even if the actual user connected from 1.2.3.4 and requested the page via https on port 443 . The solution is to configure Nginx to set the headers : .. . .. . and the Rails app should use these parameters instead of the default ones . The same applies for whatever reverse proxy you use such as Varnish in your case . Comment : This isn t a very descriptive answer . Do I need to setup X-Forwarded-For and X-Forwarded-Proto in nginx or Varnish Do I still have Varnish listen on Port 80 Comment : I have updated my answer with more description hopefully making the X-Forwarded-For system clear .", "Question : Here s the situation . I have clients over a secured network https that talk to multiple backends . Now I wanted to establish a reverse proxy for majorly load-balancing based on header data or cookies and a little caching . So I thought varnish could be of use . But varnish does not support ssl-connection . As I ve read at many places quoting Varnish does not support SSL termination natively . But I want every connection ie . client-varnish and varnish-backend to be over https . I cannot have plaintext data anywhere throughout network there are restrictions so nothing else can be used as SSL-Terminator or can be . So here are the questions : .. . .. . Firstly what does this mean if someone can explain in simple terms that Varnish does not support SSL termination natively . Secondly is this scenario good to implement using varnish and Finally if varnish is not a good contender should I switch to some other reverse proxy . If yes then which will be suitable for the scenario HA Nginx etc . .. . Answer : what does this mean if someone can explain in simple terms that Varnish does not support SSL termination natively .. . .. . It means Varnish has no built-in support for SSL . It can t operate in a path with SSL unless the SSL is handled by separate software . This is an architectural decision by the author of Varnish who discussed his contemplation of integrating SSL into Varnish back in 2011 . He based this on a number of factors not the least of which was wanting to do it right if at all while observing that the de facto standard-library for SSL is openssl which is a labyrinthine collection of over 300 000 lines-of-code and he was neither confident in that code base nor in the likelihood of a favorable cost benefit ratio . His conclusion at the time was in a word no . That is not one of the things I dreamt about doing as a kid and if I dream about it now I call it a nightmare . .. . https : www.varnish-cache.org docs trunk phk ssl.html .. . .. . He revisited the concept in 2015 . His conclusion again was no . Code is hard crypto code is double-plus-hard if not double-squared-hard and the world really don t need another piece of code that does an half-assed job at cryptography . .. . .. . .. . .. . When I look at something like Willy Tarreau s HAProxy http : haproxy.org I have a hard time to see any significant opportunity for improvement . .. . No Varnish still won t add SSL TLS support . .. . Instead in Varnish 4.1 we have added support for Willys PROXY protocol which makes it possible to communicate the extra details from a SSL-terminating proxy such as HAProxy to Varnish . .. . https : www.varnish-cache.org docs trunk phk ssl again.html .. . .. . This enhancement could simplify integrating varnish into an environment with encryption requirements because it provides another mechanism for preserving the original browser s identity in an offloaded SSL setup . is this scenario good to implement using varnish If you need Varnish use it being aware that SSL must be handled separately . Note though that this does not necessarily mean that unencrypted traffic has to traverse your network.. . though that does make for a more complicated and CPU hungry setup . nothing else can be used as SSL-Terminator or can be The SSL can be offloaded on the front side of Varnish and re-established on the back side of Varnish all on the same machine running Varnish but by separate processes using HAProxy or stunnel or nginx or other solutions in front of and behind Varnish . Any traffic in the clear is operating within the confines of one host so is arguably not a point of vulnerability if the host itself is secure since it never leaves the machine . if varnish is not a good contender should I switch to some other reverse proxy .. . .. . This is entirely dependent on what you want and need in your stack its cost benefit to you your level of expertise the availability of resources and other factors . Each option has its own set of capabilities and limitations and it s certainly not unheard-of to use more than one in the same stack . Comment : Hi this is a really good explanation . It is not just security but audit certification restrictions . So even if the plain text is on same machine it is visible to system administrator and even this is not acceptable . So whatever I ll use to route the traffic from within I need it to route SSL traffic as well . So I ll probably now use HAProxy for load distribution . Comment : Ok on a different note do you know if HAProxy can be used to distribute load based on Http s header parameters and or cookies Comment : @vish4071 yes HAProxy can inspect the payload and make the same routing decisions on HTTPS as HTTP as long as HAProxy terminates the SSL connection . It can re-establish SSL to the back-end so the unencrypted data is only within the HAProxy process which is different than what happens with Varnish but really no different than what happens inside the web server itself -- the encrypted data must be decrypted by the web server or it couldn t be processed by the application .", "Question : null .. . Answer : We re about to set up a cache and reverse proxy for our site and we re deciding whether to use Varnish or Nginx . We have complex cache-busting requirements and we effectively require surrogate-key or tag-based cache invalidation . Varnish offers Hashtwo http : book.varnish-software.com 4.0 chapters Cache Invalidation.html with this functionality . Does Nginx offer this in any form", "Question : First please forgive me for total lack of understanding of Varnish . This is my first go at doing anything with Varnish . I am following the example at : http : www.kalenyuk.com.ua magento-performance-optimization-with-varnish-cache-47.html .. . .. . However when I install and run this Varnish does not seem to cache . I do get the X-Varnish header with a single number and a Via header that has a value of 1.1 varnish .. . .. . I have been told by my ISP it is because of the following cookie that Magento sets : .. . .. . Set-Cookie : frontend 6t2d2q73rv9s1kddu8ehh8hvl6 expires Thu 17-Feb-2011 14 : 29 : 19 GMT path domain XX.X.XX.XX httponly .. . .. . They said that I either have to change Magento to handle this or configure Varnish to handle this . Since changing Magento is out of the question I was wondering if someone can give me a clue as to how I would configure Varnish to handle this cookie Comment : what should the cookie look like What s wrong with that cookie Comment : Varnish does not play well with Cookies it will never cache . So I have to either remove the cookie doubtful or configure Varnish to not send the cookie back to Apache when it requests it . Comment : I will add an support email-address to the Magento Connect page so you can send your questions to our ticket-system . Comment : This type of question doesn t really belong on Stack Overflow as it s not a programming question . You should take a look at area51.stackexchange.com proposals 25439 magento http : area51.stackexchange.com proposals 25439 magento and see about getting a proper place to put these kind of questions .. . Answer : http : moprea.ro 2011 may 6 magento-performance-optimization-varnish-cache-3 describes the Magento extension that enables full page cache with varnish . This extension relies on Varnish config published on github . These are the features already implemented : .. . .. . 1 . Workable varnish config .. . 2 . Enable full page caching using Varnish a super fast caching HTTP reverse proxy . 3 . Varnish servers are configurable in Admin under System Configuration General - Varnish Options .. . 4 . Automatically clears only cached pages when products categories and CMS pages are saved . 5 . Adds a new cache type in Magento Admin under System Cache Management and offers the possibility to deactivate the cache and refresh the cache . 6 . Notifies Admin users when a category navigation is saved and Varnish cache needs to be refreshed so that the menu will be updated for all pages . 7 . Turns off varnish cache automatically for users that have products in the cart or are logged in etc . 8 . Default varnish configuration offered so that the module is workable . Screen shots : https : github.com madalinoprea magneto-varnish wiki", "Question : What I need to do to install varnish-4.1.3-beta1 in a CentOS 7 Since I don t find the rpm in the repo https : repo.varnish-cache.org . .. . Answer : You can compile varnish from source using the instructions found in the varnish documentation https : www.varnish-cache.org docs trunk installation install.html compiling-varnish-from-source .", "Question : The previous 2 Heroku application stacks came with a Varnish http : www.varnish-cache.org layer which automatically reverse-proxy-cached content based on http-headers . The new Heroku cedar stack doesn t have this Varnish layer . Heroku suggests using rack-cache http : rtomayko.github.com rack-cache and memcache http : addons.heroku.com memcache instead . Does this have disadvantages compared to the previous stacks with the varnish layer With rack-cache aren t there fewer servers serving the caching layer and in a less optimized way http : devcenter.heroku.com articles http-routing .. . http : devcenter.heroku.com articles http-caching .. . http : devcenter.heroku.com articles cedar Comment : If you re using Rails 3.1 you can throw your static assets up on a bamboo stack app so you get the benefits of Varnish for that and leave the rest as a Cedar app . Or you can put them on a CDN described here : devcenter.heroku.com articles cdn-asset-host-rails31 https : devcenter.heroku.com articles cdn-asset-host-rails31 .. . Answer : My blog is hosted on Heroku I wrote a quick post about setting it up with Fastly Varnish . Fastly is a hosted Varnish solution that will sit in front of your Heroku app and serve cached responses . http : www.hward.com scale-rails-with-varnish-http-caching-layer .. . .. . I ve seen really great response times . If you can get a good cache hit-rate with Varnish you should be able to throttle back a good percentage of your dyno s .", "Question : The previous 2 Heroku application stacks came with a Varnish http : www.varnish-cache.org layer which automatically reverse-proxy-cached content based on http-headers . The new Heroku cedar stack doesn t have this Varnish layer . Heroku suggests using rack-cache http : rtomayko.github.com rack-cache and memcache http : addons.heroku.com memcache instead . Does this have disadvantages compared to the previous stacks with the varnish layer With rack-cache aren t there fewer servers serving the caching layer and in a less optimized way http : devcenter.heroku.com articles http-routing .. . http : devcenter.heroku.com articles http-caching .. . http : devcenter.heroku.com articles cedar Comment : If you re using Rails 3.1 you can throw your static assets up on a bamboo stack app so you get the benefits of Varnish for that and leave the rest as a Cedar app . Or you can put them on a CDN described here : devcenter.heroku.com articles cdn-asset-host-rails31 https : devcenter.heroku.com articles cdn-asset-host-rails31 .. . Answer : A more modern answer with 20 20 hindsight : .. . .. . To get the caching performance approaching that of bamboo on cedar-14 this is the usual pattern : .. . .. . 1 . Configure http : guides.rubyonrails.org caching with rails.html Rails https : devcenter.heroku.com articles http-caching to generate appropriate caching headers i.e . Etags Cache-Control Last-Modified etc . 2 . Stick fastly http : www.fastly.com varnish as a service or cloudflare https : www.cloudflare.com in front of your app . If app headers were set correctly profile-like pages that need to be fresh won t be cached as opposed to static assets . I would recommend redis-rails as a rack cache backend if you re doing caching at multiple layers FE CF FY page action fragment etc . .", "Question : I am trying for a while to use vmods with varnish . But it seems I need to build varnish from source if I want to integrate a vmod for example statsd . But I have already running varnish successfully by installing it via rpm on my centos7 machine . My question is is it possible to use a vmod when varnish is installed from rpm How to do it .. . Answer : With Varnish 4.0 from RPM you can install vmods from source without any recompiling . Install the varnish-libs-devel first and then do the normal autogen.sh + configure + make install sequence in the vmod source directory . This of course depends on the vmod in question still has an available 4.0 version but most of the common ones still do .", "Question : I have just installed varnish and its ready to serve web pages . Problem is that we are hitting open files limit . We have already set ulimit to varnish user . We want to find a file where we can write this configuration : .. . Answer : This is on centos linux server .. . .. . you will also have to change httpd config file to change the port if you want to put varnish in front of apache .. . .. . Source : How to install and configure Varnish with Apache on Centos 6 http : namhuy.net 2372 how-to-install-and-configure-varnish-with-apache-on-centos-6.html", "Question : I am trying for a while to use vmods with varnish . But it seems I need to build varnish from source if I want to integrate a vmod for example statsd . But I have already running varnish successfully by installing it via rpm on my centos7 machine . My question is is it possible to use a vmod when varnish is installed from rpm How to do it .. . Answer : Unless you are using one of the supplied vmods I would still install the source perhaps on a build machine and build your vmods there and then deploy your vmods to your production server . Or if you have something like an ansible script untar the source build your vmod move it into place and remove the source . Building varnish from the source will not override your binaries that originate from the RPMs - the executables will be in different directories . You may need to alter the order of your path if you keep both versions present .", "Question : I am stucked now . Searched alot but never find answer . I am using Apache + Nginx reverse proxy with Varnish v4 .. . .. . When i am trying to test varnish at isvarnishworking.com than on very first time i am getting Yes Sort of And when i referesh the page immediately only than i get Yes After that when i don t referesh till 2 minutes than again i will get Yes Sort of I think varnish is not serving the content from its cache . Some where something is wrong . Maybe the nginx.conf file or default.vcl .. . .. . I tried to increase connection timeout in nginx.conf as well but no luck . I tried to add no-cache in nginx as well but again no luck . Maybe i setup wrong . Please guide me . Will be thankful . I never find answer of this problem . Maybe i missed something to see correctly from internet guides : .. . .. . Please help . Thanx Comment : There s really no way to debug this without seeing your sanitized configuration .. . Answer : The default time-to-live ttl for a cached object in varnish is 120 seconds https : www.varnish-cache.org docs 4.0 reference varnishd.html default-ttl . The ttl for an object to be cached can be set in different ways : .. . .. . 1 . In the Cache-Control headers max-age or s-maxage of the backends response .. . 2 . In the VCL configuration of you varnish .. . 3 . Specifying the -t option of the varnishd process .. . .. . Option 1 would be my first option and option 2 the second .", "Question : I m trying to speed up my benchmark 3-tier web architecture and I have some general questions related to Memcache d and Varnish . What is the difference It seems to me that Varnish is behind the web server caching web pages and doesn t require change in code just configuration . On the other side Memcached is general purpose caching system and mostly used to cache result from database and does require change in get method first cache lookup . Can I use both Varnish in front web server and Memcached for database caching What is a better option scenario 1 - mostly write .. . scenario 2 - mostly read .. . scenario 3 - read and write are similar .. . Answer : Varnish is in front of the webserver it works as a reverse http-proxy that caches . You can use both . Mostly write -- Varnish will need to have affected pages purged . This will result in an overhead and little benefit for modified pages . Mostly read -- Varnish will probably cover most of it . Similar read-write -- Varnish will serve a lot of the pages for you Memcache will provide info for pages that have a mixture of known and new data allowing you to generate pages faster . An example that could apply to stackoverflow.com : adding this comment invalidated the page cache so this page would have to be cleared from Varnish and also my profile page which probably isn t worth caching to begin with . Remembering to invalidate all affected pages may be a bit of an issue . All the comments however are still in Memcache so the database only has to write this comment . Nothing else needs to be done by the database to generate the page . All the comments are pulled by Memcache and the page is recached until somebody affects it again perhaps by voting my answer up . Again the database writes the vote all other data is pulled from Memcache and life is fast . Memcache saves your DB from doing a lot of read work Varnish saves your dynamic web server from CPU load by making you generate pages less frequently and lightens the db load a bit as well if not for Memcache . Comment : +1 excellent answer . Comment : Land mapped thank you Comment : this : perhaps by voting my answer up made me vote up your answer Comment : so it is not recommended to sites like stackoverflow or site like facebook with activity feed page to use varnish . is it", "Question : I have went through this article http : After 20going 20through 20this 20article 20I 20am 20having 20the 20following 20doubts . 20Can 20some 20one 20help 20me 20to 20clarify 20this : - . Can some one help me to clarify the following doubts about the various log locations of varnish 1 . As per the varnish ebook varnishncsa -displays Varnish access logs varnishlog is used to access request-specific data . Can some let me know what logs then go in var log messages var log syslog 2 . When varnish crashes due to panic where will varnish dump the logs traces I know panic.show shows the panic messages in cli . Is there a way I can view the panic messages in some files 3 . When varnish crashes due to segfault where will varnish puts the messages and core dump 4 . How can I dump the 503 Guru Meditation errors in a file I am having these doubts on varnish 4.1 in Debian based systems . .. . Answer : 1 var log syslog and var log messages are normally for syslogd . Varnish does not configure these they should already be setup . 2 I have always viewed Varnish messages in syslog var log messages .. . .. . 3 Core files are system specific . The first thing you need to do is enable core files on your system . You need to put ulimit -c unlimited in the varnish startup script . For an OS with init.d edit the etc rc.d init.d varnish file and add the above line to the start section . As to where the core files are stored you can use something like : .. . .. . echo tmp core e . p sudo tee proc sys kernel core pattern .. . .. . You are also probably going to want to build varnish from the source and turn on debug flags so that your core files have a symbol-table that you can look at . Running ulimit -c unlimited at the command-line and restarting Varnish is not going to work .", "Question : I have a Varnish 4.0.3 server on Centos 7.2 . Varnish has three backends configured . I am receiving intermittent 503 s from Varnish . I have pulled a tcpdump during a 503 event and I saw : .. . .. . Consumer makes request to Varnish .. . Varnish opens socket to backend . Backend responds in 500ms .. . Varnish sends a ACK FIN to the Backend . Varnish sends a 503 to the consumer . Backend sends a ACK FIN to Varnish .. . .. . The requests that fail do not fundementally appear different from requests that are succeeding . The failure rate is 1 per 20k requests . .. . Answer : Your client is using HTTP to communicate with Varnish . The HTTP response 503 represents mean The server is currently unable to handle the request due to a temporary overloading or maintenance of the server . The implication is that this is a temporary condition which will be alleviated after some delay . So this error is sent by the Varnish server indicating above reason . Regards Sudhansu" ] }
[ "yes-answer-long", "yes-answer-short" ]
caching
UNK_RELATION
clojuresque@gradle@48
clojuresque -- clojuresque is now a plugin for @placeholder which adds clojure support .
{ "confidence": [ 54.52537536621094, 47.564735412597656, 37.728126525878906, 33.237648010253906, 33.237648010253906, 22.23639678955078, 21.773691177368164, 20.835439682006836, 19.784564971923828, 19.607240676879883, 16.940793991088867, 14.488961219787598, 14.488961219787598, 14.488961219787598, 14.488961219787598, 14.488961219787598, 14.488961219787598, 14.488961219787598, 14.488961219787598, 14.488961219787598, 14.488961219787598, 14.488961219787598, 14.488961219787598, 14.488961219787598, 14.488961219787598, 14.488961219787598, 14.488961219787598, 14.488961219787598, 14.488961219787598, 14.488961219787598, 14.488961219787598, 14.488961219787598, 14.488961219787598, 14.488961219787598, 14.488961219787598 ], "content": [ "I m trying to use Gradle for Clojure Clojuresque I have this build.gradle .", "I m trying to use gradle Clojuresque to build clojure code run it and get uberjar .", "I use hints from http : dev.clojure.org display doc Getting+Started+with+Gradle https : bitbucket.org kotarak clojuresque wiki Getting 20Started and Could not find us.bpsm : edn-java : 0.4.3 error with Gradle for Clojure Clojuresque http : stackoverflow.com questions 29000395 could-not-find-us-bpsmedn-java0-4-3-error-with-gradle-for-clojure-clojuresq .", "execute the jar file .. . .. . This is the command to run the code : .. . .. . uberjar .. . .. . There are three modifications needed : hints from https : github.com DevonStrawn Clojuresque-Boilerplate blob master UberJar build.gradle .", "References .. . .. . https : github.com johnrengelman shadow .. . Boiler plate - https : github.com DevonStrawn Clojuresque-Boilerplate .. . Building a uberjar with Gradle http : stackoverflow.com questions 10986244 building-a-uberjar-with-gradle", "It also produces uber jar with shadowJar task that has clojure dependency built-in and can enables hello.core to be run with the following command : .. . .. . EDIT2 .. . .. . Now the github example produces runnable jar .", "Create the class files .. . .. . The source code should be located in . src main clojure as it is the default directory .", "With these changes jar file is generated and can be run when valid cp provided - I ve no clojure installed so can t check it easily .", "You re missing maven-central repository : .. . .. . And you both modify gradle source sets or move hello core.clj to src main clojure where gradle by default looks for sources .", "With gradle build task there is no error and I have a jar file but I don t see any class file generated I don t think the generated jar contains nothing especially when I compared the results from manual build Compile clojure source into class AOT from command-line not using lein http : stackoverflow.com questions 29011295 compile-clojure-source-into-class-aot-from-command-line-not-using-lein .", "Execute the uberjar .. . .. . Now just one jar for the execution .. . .. . The new build.gradle file .. . .. . Shadow jar .. . .. . From Opal s answer I add the gradle script that create shadowJar .", "When I execute gradle tasks I have errors .", "I checked that there is no http : clojars.org repo us bpsm directory .", "What might be wrong", "The missing artifact is located in maven-central repository .", "The following script works fine :", "and adding it to the second repositories would not hurt either or jcenter", "This is the grade script .", "This is the core.clj .. . .. . What might be wrong", "Also how to run the code and get uberjar like lein run and lein uberjar does", "I zipped the directory in https : dl.dropboxusercontent.com u 10773282 share 2015 clojure test.zip", "Could you please provide a sample project on github", "@Opal : I m not sure if need a sample project because it has only two files gradle and core.clj and the code is in the problem .", "I don t know how to set it all up .", "If I had a sample project I would try without it it s problematic .", "However there are users who probably know the solution .", "@Opal : I zipped the directory and uploaded in the Dropbox .", "I see that you ve worked it out I also added configured project .", "One can specify source file in gradle file though .", "The other issue was with missing dependencies : .. . .. . gradle build will generate the class files .", "Get the jar file .. . .. . We need to set the main class for the jar file .", "I m not exactly sure if the setup is quite necessary gradle jar will generate the jar file .", "It contains the MAINFEST file that sets up the Main-Class .", "Or use these two lines-of-code instead of the manifest change code : .. . .. . Execute the shadow jar .. . .. . Get the ubjer jar .. . .. . It s the same as uberjar .", "EDIT .. . .. . Here https : github.com Opalo stackoverflow tree master 29015575 a sample project can be found that has all the changes I introduced ." ] }
{ "confidence": [ 61.58161544799805, 60.08023452758789, 57.12260055541992 ], "content": [ "Question : I m trying to use gradle Clojuresque to build clojure code run it and get uberjar . I use hints from http : dev.clojure.org display doc Getting+Started+with+Gradle https : bitbucket.org kotarak clojuresque wiki Getting 20Started and Could not find us.bpsm : edn-java : 0.4.3 error with Gradle for Clojure Clojuresque http : stackoverflow.com questions 29000395 could-not-find-us-bpsmedn-java0-4-3-error-with-gradle-for-clojure-clojuresq . This is the grade script . With gradle build task there is no error and I have a jar file but I don t see any class file generated I don t think the generated jar contains nothing especially when I compared the results from manual build Compile clojure source into class AOT from command-line not using lein http : stackoverflow.com questions 29011295 compile-clojure-source-into-class-aot-from-command-line-not-using-lein . This is the core.clj .. . .. . What might be wrong Also how to run the code and get uberjar like lein run and lein uberjar does I zipped the directory in https : dl.dropboxusercontent.com u 10773282 share 2015 clojure test.zip Comment : Could you please provide a sample project on github Comment : @Opal : I m not sure if need a sample project because it has only two files gradle and core.clj and the code is in the problem . Comment : I don t know how to set it all up . If I had a sample project I would try without it it s problematic . However there are users who probably know the solution . Comment : @Opal : I zipped the directory and uploaded in the Dropbox . Comment : I see that you ve worked it out I also added configured project . .. . Answer : Create the class files .. . .. . The source code should be located in . src main clojure as it is the default directory . One can specify source file in gradle file though . The other issue was with missing dependencies : .. . .. . gradle build will generate the class files . Get the jar file .. . .. . We need to set the main class for the jar file . I m not exactly sure if the setup is quite necessary gradle jar will generate the jar file . execute the jar file .. . .. . This is the command to run the code : .. . .. . uberjar .. . .. . There are three modifications needed : hints from https : github.com DevonStrawn Clojuresque-Boilerplate blob master UberJar build.gradle . Execute the uberjar .. . .. . Now just one jar for the execution .. . .. . The new build.gradle file .. . .. . Shadow jar .. . .. . From Opal s answer I add the gradle script that create shadowJar . It contains the MAINFEST file that sets up the Main-Class . Or use these two lines-of-code instead of the manifest change code : .. . .. . Execute the shadow jar .. . .. . Get the ubjer jar .. . .. . It s the same as uberjar . References .. . .. . https : github.com johnrengelman shadow .. . Boiler plate - https : github.com DevonStrawn Clojuresque-Boilerplate .. . Building a uberjar with Gradle http : stackoverflow.com questions 10986244 building-a-uberjar-with-gradle", "Question : I m trying to use gradle Clojuresque to build clojure code run it and get uberjar . I use hints from http : dev.clojure.org display doc Getting+Started+with+Gradle https : bitbucket.org kotarak clojuresque wiki Getting 20Started and Could not find us.bpsm : edn-java : 0.4.3 error with Gradle for Clojure Clojuresque http : stackoverflow.com questions 29000395 could-not-find-us-bpsmedn-java0-4-3-error-with-gradle-for-clojure-clojuresq . This is the grade script . With gradle build task there is no error and I have a jar file but I don t see any class file generated I don t think the generated jar contains nothing especially when I compared the results from manual build Compile clojure source into class AOT from command-line not using lein http : stackoverflow.com questions 29011295 compile-clojure-source-into-class-aot-from-command-line-not-using-lein . This is the core.clj .. . .. . What might be wrong Also how to run the code and get uberjar like lein run and lein uberjar does I zipped the directory in https : dl.dropboxusercontent.com u 10773282 share 2015 clojure test.zip Comment : Could you please provide a sample project on github Comment : @Opal : I m not sure if need a sample project because it has only two files gradle and core.clj and the code is in the problem . Comment : I don t know how to set it all up . If I had a sample project I would try without it it s problematic . However there are users who probably know the solution . Comment : @Opal : I zipped the directory and uploaded in the Dropbox . Comment : I see that you ve worked it out I also added configured project . .. . Answer : You re missing maven-central repository : .. . .. . And you both modify gradle source sets or move hello core.clj to src main clojure where gradle by default looks for sources . With these changes jar file is generated and can be run when valid cp provided - I ve no clojure installed so can t check it easily . EDIT .. . .. . Here https : github.com Opalo stackoverflow tree master 29015575 a sample project can be found that has all the changes I introduced . It also produces uber jar with shadowJar task that has clojure dependency built-in and can enables hello.core to be run with the following command : .. . .. . EDIT2 .. . .. . Now the github example produces runnable jar .", "Question : I m trying to use Gradle for Clojure Clojuresque I have this build.gradle . When I execute gradle tasks I have errors . I checked that there is no http : clojars.org repo us bpsm directory . What might be wrong .. . Answer : The missing artifact is located in maven-central repository . The following script works fine : Comment : and adding it to the second repositories would not hurt either or jcenter" ] }
[ "yes-answer-long", "yes-answer-short" ]
gradle
UNK_RELATION
fit-protocol@binary-data@87
fit-protocol -- flexible and interoperable data-transfer protocol is an interoperable @placeholder transfer protocol designed to be compact and extensible .
{ "confidence": [], "content": [] }
{ "confidence": [], "content": [] }
[ "yes-answer-long", "yes-answer-short" ]
binary-data
UNK_RELATION
staruml@uml@68
staruml -- staruml is a free open-source unified modeling language @placeholder and model-driven architecture mda tool .
{ "confidence": [ 51.86732482910156, 51.67723083496094, 51.25145721435547, 47.11695861816406, 46.16543960571289, 46.16543960571289, 45.84733963012695, 45.43846130371094, 45.43846130371094, 45.43846130371094, 45.43846130371094, 45.13562774658203, 43.76033401489258, 43.64762878417969, 43.64762878417969, 43.64762878417969, 42.58131408691406, 42.58131408691406, 42.58131408691406, 42.42898941040039, 41.963401794433594, 41.963401794433594, 41.963401794433594, 41.242523193359375, 41.242523193359375, 41.242523193359375, 41.242523193359375, 41.242523193359375, 41.242523193359375, 41.242523193359375, 41.177223205566406, 40.897090911865234, 39.799232482910156, 39.799102783203125, 39.727294921875, 39.55830001831055, 39.55830001831055, 39.55830001831055, 38.65940856933594, 38.30029296875, 37.98467254638672, 37.98467254638672, 37.98467254638672, 37.98467254638672, 37.98467254638672, 37.98467254638672, 37.98467254638672, 37.98467254638672, 36.42131805419922, 36.30044937133789, 36.30044937133789, 36.30044937133789, 36.30044937133789, 36.30044937133789, 36.30044937133789, 36.26138687133789, 36.26138687133789, 36.26138687133789, 35.18312454223633, 35.18312454223633, 35.08307647705078, 34.48561096191406, 33.8439826965332, 33.635990142822266, 33.59636688232422, 33.59636688232422, 33.59636688232422, 33.59636688232422, 33.59636688232422, 33.59636688232422, 33.42844009399414, 33.373374938964844, 31.912139892578125, 31.912139892578125, 31.912139892578125, 31.912139892578125, 31.912139892578125, 31.912139892578125, 31.912139892578125, 31.912139892578125, 31.912139892578125, 31.912139892578125, 31.912139892578125, 30.910627365112305, 30.910627365112305, 30.910627365112305, 30.910627365112305, 30.910627365112305, 30.910627365112305, 30.794816970825195, 30.794816970825195, 30.447185516357422, 29.89883804321289, 29.226402282714844, 29.226402282714844, 29.226402282714844, 28.109079360961914, 28.109079360961914, 28.109079360961914, 27.902503967285156 ], "content": [ "StarUML is the best open-source UML Tool .. . .. . After performing an exhaustive test on every free UML tool I could find I decided StarUML was the best .", "StarUML is a very powerful free and easy-to-use UML modeling tool but it seems the project stopped .", "The original starUML 5.0 is still for free .", "StarUML 2.0 is using a Commercial License and can be purchased on their website however StarUML 1.0 stills open-source under GPL License .", "I am using StarUml 2.6.0", "Is there anyway to draw multiobject using staruml", "I am having problems modeling matrixes of a not defined number of places in StarUML.. .", "StarUML is too distracting .", "+ Now staruml 2.0 is charged .", "Is StarUML java version dead", "Google staruml api .", "Install StarUML with dpkg sudo dpkg -i StarUML-v2.7.0-64-bit.deb", "How can I draw that using staruml", "So I started to draw in staruml .", "So I d say the StarUML is not dead .", "UPDATE .. . .. . StarUML seems to be not dead anymore .", "The StarUML support https : groups.google.com forum topic staruml NhnC4EMTUIo has confirmed this limitation .", "@Rock : Since StarUML is undergoing a rebirth can you upvote my answer for people interested in StarUML plugin to discover this answer", "I finally decided to import my StarUML projects http : www.genmymodel.com staruml and reuse the them online in genmymodel .", "If i want to use StarUml for this diagram is this right tool for this diagram", "I am using StarUML 2.1.2 .", "I m creating a sequence-diagram in StarUML .", "StarUML will always leave the out of the declaration .", "I guess it is because I m familiar with the original StarUML .", "Unfortunately StarUml has no such a thing that s why the confusion .", "I don t know how to draw it in StarUML .", "Unfortunately this is not possible in the current version 2.7 of StarUML .", "The developers of StarUML knew exactly what they were doing .", "unfortunately ArgoUML lacks usability in direct comparison to StarUML", "Sounds like Tigris is no longer supporting StarUML .", "I am drawing a sequence-diagram using staruml tool.I can not find any tool to draw a multiobject .", "I exported all my StarUML projects to XMI files and then I imported them all in GenMyModel http : www.genmymodel.com staruml .", "I have not tried other modeling tools...just want to know how to do this with StarUML .", "I m trying to open an .uml file I received from someone else but StarUML just won t open it .", "StarUML 5.0 API Documentation http : staruml.sourceforge.net docs api-doc kind of heavy at first but useful for accessing StarUML objects within addin scripts .", "Does starUML not come with a update-site link", "How do I show an overloaded operator in starUML .", "StarUML defines arrays a little differently to standard UML .", "The StarUML tool is downloaded quite heavily but development seems to have been abandoned as of 2005 with a stable release version 5.0 .", "As described on the official website the main difference is that StarUML 1.0 is not maintained and supported anymore the project missed sponsors to keep it maintained as open-source .", "But I m finding it difficult to import sequence-diagram from argouml to staruml .", "Is there a way using StarUML for reverse-engineering Python code to a class diagramm", "I am using the latest starUML BETA and I m having these problems .", "Go to File Import StarUML 1 File .uml .. . .. . .. . And then select your file .", "How to draw nested-class form of composite notation in starUML", "I have made improvements on StarUML and am interested in contributing them .", "Just-a-minute StarUML seems to have been rebooted as of 2010-July-19 .", "The other thing the StarUML interface can be extended through AddIns", "How can I delete a lifeline from a sequence-diagram in StarUML without deleting it from the model", "does anybody know how to create an abstract method in staruml 5.0", "I m trying draw statechart in StarUML found that the transition line overlapping .", "Please help me to add the StarUML plugin into Eclipse IDE .", "Here https : groups.google.com forum topic staruml WCr9NZWHjoU is an answer to your question .", "But it is not allowable to enter -guids : Guid since StarUML automatically discards the square brackets .", "I believe you first have to add that capability to StarUML via an extension .", "I have recently discovered that a new stable version of StarUML StarUML 2 http : staruml.io has been released after the project being abandoned for a long time .", "Refer the project news and an announcement in the project forums : Kick-off with Java-based StarUML Project http : sourceforge.net projects staruml forums forum 510442 topic 3768161", "Some links to get you excited .. . .. . StarUML 5.0 Developer Guide http : staruml.sourceforge.net docs developer-guide en toc.html a pretty straight-forward guide for extending StarUML features .", "Copying Operand in starUML 2 Beta http : i.stack.imgur.com 81hSB.png .. . .. .", "Pasting operand in starUML 2 Beta http : i.stack.imgur.com V6ZMA.png .. . .. . 4 .", "In the StarUML docs they say there are modules for language support but I couldn t find any further information about where and how to install and use .", "I figured out I could import my staruml project in modern web-based UML tools hit import staruml uml in gg some tools convert StarUML to UML2 diagrams online with convenient diagramming capabilities such as fine-grained snap-to-grid .", "@kammy The original StarUML referred as 5.0 or 1 + all versions of WhiteStarUML", "NO STARUML DOES NOT PERMIT YOU TO INSERT AND IMAGE IN THE DIAGRAM it only permits utf8 encoded files for your network map i would recommend you use DIA which is an other modeling app", "Also you should not provide an answer staruml but a problem uml class-diagram from python code .", "I have just emailed the gentleman behind white staruml fork about contributing them .", "I went digging deeper and found out that StarUML saves project data in a single .uml file .", "I looked in modules staruml-standard and discovered that most of the files were also in plain simple XML .", "After a beta-Test for StarUML 2.0 the new version has just been released 12 29 14 .", "Tigris people - duckbill hyunsoo jwnara niklaus SF people hyunsoo jwnara niklauslee plasticduckbill staruml .", "I have a StarUml ER diagram and I am looking for an extension or a way to generate all the tables from the diagram to a PostgreSQL script .", "Here s http : repository.genmymodel.com agencew2 ArrayListorAggregation what I would design in your case and the Java code I generated feel free to fork : .. . .. . Notice you can import StarUML http : www.genmymodel.com staruml projects in GenMyModel if you d like to quickly design generate online .", "The UML standard says that such a method should be italic but it seems that is not possible in staruml 5.0 for a single method", "I am trying to display the arguments in a sequence-diagram using staruml .. . .. . Is it possible to display the arguments like this", "Do you mean is this an adequate way of displaying it or how do you do it in the specific application staruml", "See this answer http : stackoverflow.com questions 18497197 how-to-create-a-abstract-method-in-staruml-5 for a walkthrough on how to do it .", "I am just starting with UML StarUML 5 so please excuse this really basic question .", "Regarding the failure of StarUML to implement the relationship correctly you might be better off just implementing the List yourself .", "Previously I used for my work StarUml on Windows all the data is saved with .uml extension .", "Now we move to iOS and I was pretty happy with the announcement of the new StarUML 2 for Mac .", "In StarUML 5.0 I am trying to define a class with an attribute of the type Guid an array of Guid Structure .", "I want to copy some plain text such as method name class name comments to StarUML but ctrl+v does not work .", "I have installed StarUML in different platform such as Windows OS X and Ubuntu 16.04 .", "If StarUML supports UML 1.4 1.5 you should be able to export an XMI file from ArgoUML to at least get the basics over but the diagrams will have to be redrawn .", "WhiteStarUML http : whitestaruml.sourceforge.net is a fork from the original StarUML project that provides modern continuation of the project using up-to-date development tools and libraries .", "This also means that you can write UML models without even opening StarUML for automation purposes because it s just XML .", "Otherwise as far I tested StarUML 2.0 some features were added and it seems to be a good product for the price around 70 for a personal license .", "If you mind taking a look a new incarnation based directly on the code of StarUML called WhiteStarUML http : sourceforge.net projects whitestaruml was started .", "It may not be as stable yet but currently all features of StarUML should be usable and some updates like Java 1.5 or Unicode support were added .", "If you are using StarUML 2 Beta you can go through these simple steps : .. . .. . 1 .", "FYI I have been using WhiteStarUML which is a derivative of StarUML -- the solution I proposed works for both .", "StarUML seems to accepts if I provide the length of the array like -guids : Guid 10 but in the code generated by StarUML this field is something like .. . .. . Or I can add an asterisk like -guids : Guid in the code generated the field is like this .. . .. . this is not what i want neither even with the fact that in C++ a pointer and an array is conceptually interchangeable .", "I used this modeler because I looked for many modeler and the most of them seems to be ... . StarUML isn t the best tool for that stuff I think but it s not so complicated like other programs I had tested .", "Have you looked into this stackoverflow.com questions 7949622 http : stackoverflow.com questions 7949622 staruml-class-diagram-add-attribute-of-the-type-guid", "I m trying to install starUML on ubuntu-15.04 but I always have this message .. . .. . Dependency is not satisfiable libgcrypt11 1.4.5 .. . .. . Could someone help me", "But it exports to XML v2.1 and I need it in 1.x so I had to install an older version of StarUml...But thank you very much", "Please refer how to set alt combinedFragment at starUML http : blog.csdn.net time hunter article details 9428061 due to I have no 10 reputation to post image .", "I m using StarUML to make some diagrams and have the grid enabled but I can t find any option to make objects snap to grid.. .", "I get an following Error when I try to generate the Java Code from StarUML class-diagram .. . .. . Java Profile has not been included .", "I ve used the both original StarUML Unfortunately it was abandoned so long time because it was developed for a commercial program first by a company in South Korea.. . but the company went bankrupt ." ] }
{ "confidence": [ 73.33651733398438, 70.2119369506836, 70.17306518554688, 67.49151611328125, 65.23868560791016, 65.23868560791016, 64.54588317871094, 62.677734375, 61.88703918457031, 60.349098205566406, 55.67667770385742, 55.02817916870117, 54.47995376586914, 53.467498779296875, 53.280029296875, 52.853851318359375, 51.494659423828125, 49.65620040893555, 49.64278793334961, 47.48464584350586 ], "content": [ "Question : StarUML is a very powerful free and easy-to-use UML modeling tool but it seems the project stopped . Does anyone know what happened Is it possible to get a new version of it Comment : I have made improvements on StarUML and am interested in contributing them . Please contact me if you like . Comment : Can you share your inprovements Comment : Yes I am willing to share them . They were a lot of work . I have just emailed the gentleman behind white staruml fork about contributing them . .. . Answer : UPDATE .. . .. . StarUML seems to be not dead anymore . After a beta-Test for StarUML 2.0 the new version has just been released 12 29 14 . StarUML 2.0 is using a Commercial License and can be purchased on their website however StarUML 1.0 stills open-source under GPL License . As described on the official website the main difference is that StarUML 1.0 is not maintained and supported anymore the project missed sponsors to keep it maintained as open-source . Basically .. . .. . If you use occasionally UML without complex features you can use Star UML 1.0 or any other free UML software . Otherwise as far I tested StarUML 2.0 some features were added and it seems to be a good product for the price around 70 for a personal license .", "Question : StarUML is a very powerful free and easy-to-use UML modeling tool but it seems the project stopped . Does anyone know what happened Is it possible to get a new version of it Comment : I have made improvements on StarUML and am interested in contributing them . Please contact me if you like . Comment : Can you share your inprovements Comment : Yes I am willing to share them . They were a lot of work . I have just emailed the gentleman behind white staruml fork about contributing them . .. . Answer : StarUML is the best open-source UML Tool .. . .. . After performing an exhaustive test on every free UML tool I could find I decided StarUML was the best . Unfortunately it s missing a few features : PHP Code generation reverse engineer and the ability to generate reports and estimates . BUT DON T STOP READING YET I went digging deeper and found out that StarUML saves project data in a single .uml file . This file is writing in plain old XML . Which means you can do whatever you want with it because it s in a simple predictable format . You could feed it to another application like a PHP application to generate all kinds of fun stuff like reports estimates put the model data into a database generate code for whatever language you want etc . This also means that you can write UML models without even opening StarUML for automation purposes because it s just XML . The other thing the StarUML interface can be extended through AddIns I looked in modules staruml-standard and discovered that most of the files were also in plain simple XML . I quickly wrote my own add-in and soon had a new menu item for generating PHP code . I also created a profile for PHP and added in a few tagged values one such being PHP Method Body an essential for round-trip engineering to preserve the method body by pulling it into the StarUML project to be written back out when you generate the code again . I still haven t actually hooked the menu items I created to any script but it looks really simple if you take a peek at how the staruml-standard addin does it . The XML menu item has a script attribute referencing a .vbs Visual Basic file . I looked at one of these .vbs files ConvCol2Seq.vbs which converts a Collaboration Diagram to a Sequence Diagram . Down at the bottom after all the helper functions the main code begins . In the first few lines of the main code the script creates an object with App CreateObject StarUML.StarUMLApplication and then the script has access to tons of features through the object named App . My next thought was There must be an API that will tell me how to use these objects Sure enough Google staruml api . The developers of StarUML knew exactly what they were doing . Create a solid tool and leave it wide open for expansion . Great work So as long as you follow the pattern in the XML it seems you can do whatever you want . I wonder if the API includes function for automatically generating graphics for a diagram If so I could batch generate graphic files for all diagrams then write a PHP app to automatically generate documentation reports and estimates with graphic diagrams included . So I d say the StarUML is not dead . It s alive but just bored because we are under-utilizing it s abilities . Some links to get you excited .. . .. . StarUML 5.0 Developer Guide http : staruml.sourceforge.net docs developer-guide en toc.html a pretty straight-forward guide for extending StarUML features . StarUML 5.0 API Documentation http : staruml.sourceforge.net docs api-doc kind of heavy at first but useful for accessing StarUML objects within addin scripts .", "Question : StarUML is a very powerful free and easy-to-use UML modeling tool but it seems the project stopped . Does anyone know what happened Is it possible to get a new version of it Comment : I have made improvements on StarUML and am interested in contributing them . Please contact me if you like . Comment : Can you share your inprovements Comment : Yes I am willing to share them . They were a lot of work . I have just emailed the gentleman behind white staruml fork about contributing them . .. . Answer : At the end of this page http : modeling-languages.com content uml-tools you can find a couple of links to lists of other open-source UML tools .", "Question : StarUML is a very powerful free and easy-to-use UML modeling tool but it seems the project stopped . Does anyone know what happened Is it possible to get a new version of it Comment : I have made improvements on StarUML and am interested in contributing them . Please contact me if you like . Comment : Can you share your inprovements Comment : Yes I am willing to share them . They were a lot of work . I have just emailed the gentleman behind white staruml fork about contributing them . .. . Answer : Just for point of reference there s a page providing some synopsis about the inactivity at Wikipedia http : en.wikipedia.org wiki StarUML : it looks like the project stalled in being refactored from Delphi to Java . Of course it s an open-source project and would be available for further revision inasmuch . There s been more development in Eclipse UML 2 support http : www.eclipse.org uml2 since then . There are also some third party UML tools available for Eclipse : some free some not . MyClipse has some UML support http : www.myeclipseide.com htmlpages-func-display-pid-19.html for example it s not free but is available also supporting UML 2 http : www.myeclipseide.com htmlpages-func-display-pid-442.html . Other tools are available of course - those simply caught my own attention this evening .", "Question : StarUML is a very powerful free and easy-to-use UML modeling tool but it seems the project stopped . Does anyone know what happened Is it possible to get a new version of it Comment : I have made improvements on StarUML and am interested in contributing them . Please contact me if you like . Comment : Can you share your inprovements Comment : Yes I am willing to share them . They were a lot of work . I have just emailed the gentleman behind white staruml fork about contributing them . .. . Answer : If you mind taking a look a new incarnation based directly on the code of StarUML called WhiteStarUML http : sourceforge.net projects whitestaruml was started . It may not be as stable yet but currently all features of StarUML should be usable and some updates like Java 1.5 or Unicode support were added .", "Question : StarUML is a very powerful free and easy-to-use UML modeling tool but it seems the project stopped . Does anyone know what happened Is it possible to get a new version of it Comment : I have made improvements on StarUML and am interested in contributing them . Please contact me if you like . Comment : Can you share your inprovements Comment : Yes I am willing to share them . They were a lot of work . I have just emailed the gentleman behind white staruml fork about contributing them . .. . Answer : I ve recently discovered that StarUML2 http : staruml.io has just started in beta . Unfortunately StarUML2 has to be installed on your machine and there s no collaborative mode . I finally decided to import my StarUML projects http : www.genmymodel.com staruml and reuse the them online in genmymodel . HTH", "Question : StarUML is a very powerful free and easy-to-use UML modeling tool but it seems the project stopped . Does anyone know what happened Is it possible to get a new version of it Comment : I have made improvements on StarUML and am interested in contributing them . Please contact me if you like . Comment : Can you share your inprovements Comment : Yes I am willing to share them . They were a lot of work . I have just emailed the gentleman behind white staruml fork about contributing them . .. . Answer : Yes apparently the project has been dead for some time now . The same can happen to open-source and commercial products for different reasons but fortunately there are alternatives . Check this thread on the project page http : sourceforge.net forum forum.php thread id 1879127 forum id 510442 . Comment : There is a fork WhiteStarUML that is actively developed see sourceforge.net projects whitestaruml http : sourceforge.net projects whitestaruml Comment : It has been took over by MKLab having a currently free 2.0Beta evaluation version that seems promising : staruml.io http : staruml.io", "Question : StarUML is a very powerful free and easy-to-use UML modeling tool but it seems the project stopped . Does anyone know what happened Is it possible to get a new version of it Comment : I have made improvements on StarUML and am interested in contributing them . Please contact me if you like . Comment : Can you share your inprovements Comment : Yes I am willing to share them . They were a lot of work . I have just emailed the gentleman behind white staruml fork about contributing them . .. . Answer : The StarUML tool is downloaded quite heavily but development seems to have been abandoned as of 2005 with a stable release version 5.0 . But hey Just-a-minute StarUML seems to have been rebooted as of 2010-July-19 . Originally written in Delphi looks like its being converted to an eclipse plug-in in java . Don t know how long it ll take to do the conversion though . Seems like there are two developers working on it right now . Best of Luck to these guys . Anybody with experience in Eclipse plug-ins and Java wanna help Refer the project news and an announcement in the project forums : Kick-off with Java-based StarUML Project http : sourceforge.net projects staruml forums forum 510442 topic 3768161 Comment : @Rock : Since StarUML is undergoing a rebirth can you upvote my answer for people interested in StarUML plugin to discover this answer Thanks . Comment : Is StarUML java version dead No activity since July 2010.. . pity Comment : Seems like it as the SVN traffic is only read-only transactions .", "Question : StarUML is a very powerful free and easy-to-use UML modeling tool but it seems the project stopped . Does anyone know what happened Is it possible to get a new version of it Comment : I have made improvements on StarUML and am interested in contributing them . Please contact me if you like . Comment : Can you share your inprovements Comment : Yes I am willing to share them . They were a lot of work . I have just emailed the gentleman behind white staruml fork about contributing them . .. . Answer : The last CVS commit in SF was on 2006-08-07 . If you go to the Tigris website it says that the project is being moved to SF and the Tigris site will be closed out . Sounds like Tigris is no longer supporting StarUML . Tigris is supporting ArgoUML how they ever supported two is instersting enough . So converted to SF and forgotten I would also add that the Admins on SF are basically the same as the ones listed on Tigris telling me that the list of Admins may be old and not changing . Tigris people - duckbill hyunsoo jwnara niklaus SF people hyunsoo jwnara niklauslee plasticduckbill staruml . Comment : Thanks for your answer .", "Question : StarUML is a very powerful free and easy-to-use UML modeling tool but it seems the project stopped . Does anyone know what happened Is it possible to get a new version of it Comment : I have made improvements on StarUML and am interested in contributing them . Please contact me if you like . Comment : Can you share your inprovements Comment : Yes I am willing to share them . They were a lot of work . I have just emailed the gentleman behind white staruml fork about contributing them . .. . Answer : The last news item is from January 2008 and there were lots on 2007 so if it isn t dead it s at least on life support . If you re looking for an alternative take a look at Jude Community http : jude.change-vision.com jude-web product community.html or ArgoUML http : argouml.tigris.org . Comment : ArgoUML does not support template parameters as of 14.9.2009 but it s being worked on . Comment : unfortunately ArgoUML lacks usability in direct comparison to StarUML", "Question : null .. . Answer : I am drawing a sequence-diagram using staruml tool.I can not find any tool to draw a multiobject . Is there anyway to draw multiobject using staruml", "Question : In StarUML 5.0 I am trying to define a class with an attribute of the type Guid an array of Guid Structure . But it is not allowable to enter -guids : Guid since StarUML automatically discards the square brackets . I have not tried other modeling tools...just want to know how to do this with StarUML . StarUML seems to accepts if I provide the length of the array like -guids : Guid 10 but in the code generated by StarUML this field is something like .. . .. . Or I can add an asterisk like -guids : Guid in the code generated the field is like this .. . .. . this is not what i want neither even with the fact that in C++ a pointer and an array is conceptually interchangeable . I am coding in C .. . Answer : StarUML defines arrays a little differently to standard UML . For your specific problem I would use to define the array . The first example below describes this . Define an array with an undefined number of elements : .. . .. . Define an array with a specific number of elements : .. . .. . Define a base 0 array with an undefined number of elements : .. . .. . Define a base 1 array with an undefined number of elements : .. . .. . Define a specific base array with a specific number of elements : Comment : I ve had a look at the Code Generation process for all the languages . It seems that none of the languages are generated correctly . StarUML will always leave the out of the declaration .", "Question : I must design a simple diagram of an architecture like network map . Can I import and insert small image in a diagram Which diagram you recommended me .. . Answer : NO STARUML DOES NOT PERMIT YOU TO INSERT AND IMAGE IN THE DIAGRAM it only permits utf8 encoded files for your network map i would recommend you use DIA which is an other modeling app", "Question : I have recently discovered that a new stable version of StarUML StarUML 2 http : staruml.io has been released after the project being abandoned for a long time . WhiteStarUML http : whitestaruml.sourceforge.net is a fork from the original StarUML project that provides modern continuation of the project using up-to-date development tools and libraries . What are the pros and cons of both tools .. . Answer : I ve used the both original StarUML Unfortunately it was abandoned so long time because it was developed for a commercial program first by a company in South Korea.. . but the company went bankrupt . and StarUML2.0 I think WhiteStarUML is not very different from the original one . StarUML2.0 is much better to see - anyway it is prettier . It s undeniable . : and UI looks better . - But I felt it is a little bit uncomfortable when I draw some kind of diagrams.. . for me especially sequence-diagram . I guess it is because I m familiar with the original StarUML . What I want to say is I think StarUML2.0 can be a little bit unfamiliar for users who have been using StarUML1 for long time . But If you want to show your diagram in your presentation I recommend you to use StarUML2.0 . + Now staruml 2.0 is charged . Personal license is 70 . If you are a student you need to pay only 49 . The original starUML 5.0 is still for free .", "Question : I m trying to open an .uml file I received from someone else but StarUML just won t open it . On the Internet says that I must open it from the explorer but what if my file is not in the explorer I ve tried in different ways and I just can t . .. . Answer : I was googling the internet trying to do the exact same thing when I think I solved it for myself at least . Go to File Import StarUML 1 File .uml .. . .. . .. . And then select your file . It will appear at the bottom in Diagram thumbnails and then if you double click it then it should open in model explorer . Hope this helps", "Question : null .. . Answer : I am having problems modeling matrixes of a not defined number of places in StarUML.. . I ve read in a previous question that to add an array as an attribute you have to write : .. . .. . After seeing that I tried : .. . .. . But none worked . They all sent a wrong syntax-error popup . Does anyone know what the correct syntax would be Comment : Have you looked into this stackoverflow.com questions 7949622 http : stackoverflow.com questions 7949622 staruml-class-diagram-add-attribute-of-the-type-guid", "Question : does anybody know how to create an abstract method in staruml 5.0 The UML standard says that such a method should be italic but it seems that is not possible in staruml 5.0 for a single method please help me : D .. . Answer : As depicted in the attached you just have to select your method on the model explorer and then set it as IsAbstract on the properties tab . I just would to know why you use this modeler which have not been release since 2005 Regards EBR .. . .. . abstract method http : i.stack.imgur.com NnuWE.png Comment : Ah thank you very much . I used this modeler because I looked for many modeler and the most of them seems to be ... . StarUML isn t the best tool for that stuff I think but it s not so complicated like other programs I had tested . Rather I want to use Visual Paradigm Community Edition but I do not really know if this edition because of the license is allowed to use for education purposes like an exam . Comment : I personally do not like dead software because if you get stuck it is generally permanent I like living software : - . stackoverflow.com questions 2757282 http : stackoverflow.com questions 2757282 staruml-combined-fragment-layout rq 1 My personal modeler choice is Modelio modelio.org http : www.modelio.org .. .", "Question : null .. . Answer : I have a StarUml ER diagram and I am looking for an extension or a way to generate all the tables from the diagram to a PostgreSQL script . I looked at the documentation but nothing.. . I am using StarUml 2.6.0", "Question : null .. . Answer : Is there a way using StarUML for reverse-engineering Python code to a class diagramm In the StarUML docs they say there are modules for language support but I couldn t find any further information about where and how to install and use . Other UML tools I found didn t match my idea of how a diagramm should look like . I know it is a bit problematic generating class diagramms for python because it s compiled to runtime and will probably change then . But I m using Python to build my bachelor thesis and my Prof . loves UML . He really takes care of doing this correctly . Can anybody help me pls Comment : You then should change you title and question to ask how to create uml diagrams from python code . StarUML is too distracting . Also you should not provide an answer staruml but a problem uml class-diagram from python code . That will help people answer . It is good that you stated what you did .", "Question : I drew a sequence-diagram in argo uml and saved it in .uml extension . It failed to generate a collaboration diagram from sequence-diagram . So I started to draw in staruml . But I m finding it difficult to import sequence-diagram from argouml to staruml . Please help me . Comment : It d help if you can include the error message you get when you try to generate a collaboration diagram . .. . Answer : Back when these tools were built there was no standard for interchange of the diagrams -- only the metadata . If StarUML supports UML 1.4 1.5 you should be able to export an XMI file from ArgoUML to at least get the basics over but the diagrams will have to be redrawn ." ] }
[ "yes-answer-long", "yes-answer-short" ]
uml
UNK_RELATION
mustache.php@implementation@66
mustache.php -- a mustache logic-less templating system for html @placeholder in php .
{ "confidence": [ 46.41863250732422, 41.76545715332031, 41.558326721191406, 41.00676727294922, 39.44251251220703, 36.9712028503418, 35.91943359375, 34.925148010253906, 34.196868896484375, 33.50909423828125, 33.393089294433594, 33.097137451171875, 32.31387710571289, 31.612533569335938, 31.019819259643555, 30.7548885345459, 30.628219604492188, 30.435400009155273, 29.991065979003906, 29.856075286865234, 29.69487190246582, 29.60693359375, 29.517227172851562, 29.31380844116211, 29.31380844116211, 29.31380844116211, 29.249671936035156, 29.080554962158203, 28.722219467163086, 28.2941951751709, 28.235368728637695, 28.176494598388672, 28.16943359375, 28.078224182128906, 28.058656692504883, 28.007036209106445, 27.765775680541992, 27.5122127532959, 27.091445922851562, 27.031923294067383, 26.997217178344727, 26.973615646362305, 26.905832290649414, 26.797868728637695, 26.463512420654297, 26.427474975585938, 26.282033920288086, 26.266693115234375, 26.21108627319336, 25.818134307861328, 25.757057189941406, 25.60706329345703, 25.499452590942383, 25.248613357543945, 25.248613357543945, 25.248613357543945, 25.248613357543945, 25.228656768798828, 25.18700408935547, 25.011625289916992, 24.510080337524414, 24.486083984375, 24.486083984375, 24.486083984375, 24.486083984375, 24.33673095703125, 24.104238510131836, 24.032054901123047, 23.799827575683594, 23.799827575683594, 23.799827575683594, 23.799827575683594, 23.766094207763672, 23.63240623474121, 23.582109451293945, 23.582109451293945, 23.46200180053711, 23.46200180053711, 23.46200180053711, 23.46200180053711, 23.46200180053711, 23.43499183654785, 23.43499183654785, 23.258174896240234, 23.066062927246094, 23.02037811279297, 23.02037811279297, 23.02037811279297, 22.630075454711914, 22.519676208496094, 22.35155487060547, 22.35155487060547, 22.317626953125, 22.317626953125, 22.240585327148438, 22.074825286865234, 22.074825286865234, 22.074825286865234, 22.074825286865234, 22.074825286865234 ], "content": [ "I m assuming you re using the bobthecow PHP implementation Mustache templating in PHP .", "Handlebars is designed as a logic-less templating system .", "See Mustache Tags https : github.com bobthecow mustache.php wiki Mustache-Tags in the bobthecow mustache.php documentation : .. . .. . All variables are HTML escaped by default .", "I m using the Mustache PHP https : github.com bobthecow mustache.php template-engine to render a table with details from a wordpress WP User Query .", "Trying to call a mustache partial using mustache.php .", "Currently its php jumbled with html and calls up mustache templates .", "I m using the PHP version of mustache and also patternLab - which I think also uses the PHP version of mustache .", "I ve got Mustache as the templating-engine .", "My question is about this sort of logic : .. . .. . I want to convert entirely to the mustache template where the php only feeds the mustache template variables .", "No logic possible in mustache .", "I am using PHP version of mustache .", "Mustache itself is just a templating-engine it is not concerned with what URLs you have or how many PHP files you have or anything other than changing a template into HTML .", "I am currently using PHP and Mustache templates to generate the about page HTML on the server-side and that works fine .", "possible duplicate of PHP Mustache 2.1 partial loading NOT based on the filename http : stackoverflow.com questions 14878970 php-mustache-2-1-partial-loading-not-based-on-the-filename", "If I have the following array .. . .. . and I want to output it using a Mustache https : github.com bobthecow mustache.php template so that the final html looks like this : .. . .. . Though if the array is empty then it shouldn t output anything .", "Could anyone tell me if this behavior is correct or is a bug in the mustache https : github.com bobthecow mustache.php 2.10 version", "By default Mustache implementations escape HTML .", "I m using mustache.php https : github.com bobthecow mustache.php Is it possible to do this", "The popular engine that I love it s template format was Mustache.php https : github.com bobthecow mustache.php wiki but what I understood from it s documentation data for this engine is PHP classes that is not very pretty format .", "I ve found out you can convert JSON file to PHP arrays and objects and use that output as a data for Mustache.php template-engine like this example : .. . .. . PHP Script : .. . .. . JSON data : .. . .. . Mustache template : .. . .. . But PHP throws this error : .. . .. . And this is where PHP points that error came from Inside Engine.php file in above error : .. . .. . I just know somehing is wrong in data conversation but I m not familiar to PHP debugging and this is for experimental use I appreciate if you could tell me what is wrong .", "PHP", "https : stackoverflow.com questions 12158715 how-to-use-switch-case-in-mustache-template .. . .. . Goal flow : php sets variables then calls up mustache template .", "I m using mustache.php https : github.com bobthecow mustache.php .", "As of last time I checked Mustache PHP it didn t support data driven partials .", "PHP : .. . .. . Mustache : .. . .. . As I understand it the partials array should load my partial correctly .", "I m starting to work with Mustache on PHP and I don t manage to make wrapper functions to work as debt .", "I have found the answer in the wiki of the project https : github.com bobthecow mustache.php wiki Mustache-Tags lambdas .. . .. . The text passed is the literal block unrendered .", "I m using the Mustache alias loader from this post http : stackoverflow.com questions 14878970 php-mustache-2-1-partial-loading-not-based-on-the-filename 14900573 14900573 to dynamically load partials based on URL variables into my default template .", "See this answer for one answer http : stackoverflow.com questions 14878970 php-mustache-2-1-partial-loading-not-based-on-the-filename 14900573 14900573 .", "Is it possible to accomplish this by separating the HTML and PHP files", "See here for inspiration to integrate htmlspecialchars decode with Mustache : stackoverflow.com questions 17195443 http : stackoverflow.com questions 17195443 how-to-use-function-wrapper-in-mustache-php", "Also you may wanna take a look into this proposal to change some features of mustache http : writing.jan.io mustache-2.0.html", "I am confused as to how those variables will be reset during looping if they are only set once in the php that calls this mustache template .", "Something similar to how php dynamic variables are created .", "Here is a list of some of the ones Mustache.php plays nice with https : github.com bobthecow mustache.php wiki Framework-integration .", "So I m assuming you meant to ask I d like to render only some tags in a Mustache template for example in Mustache.php on the server so that I can render ther rest later for example in Mustache.js in the browser .", "Something like : .. . .. . count 1 .. . .. . my text count .. . .. . is this possible with Mustache", "In Mustache.php hinfo.artist name no spaces is correct syntax .", "If you want to return unescaped HTML use the triple mustache : name .", "Are you trying to output the PHP as text or execute the PHP inside a PHP variable", "In Handlebars you can make conditionals like : .. . .. . http : handlebarsjs.com block helpers.html .. . .. . I ve been trying for a while to do something like this in the PHP Mustache .", "I love mustache .", "This is not what I want .. . .. . Maybe I m going about this in the entirely wrong way but I would like to have PHP in my mustache files so that code can be used later on in my process when I require these mustache files in a PHP project .", "Then you can now do this .. . .. . I have not tried mustache but this works for my php template .", "I m trying to use the PHP implementation of Mustache to embed some html content in a template like this : .. . .. . My html content is in a html file and when I try rendering it I have an error : .. . .. . Here s the error : .. . .. . Fatal error : Maximum function nesting level of 100 reached aborting", "in C : wamp www resume application mustache src Mustache Engine.php on line 257 .. . .. . How can I insert it as html content", "It d be easier to give you an answer if you provided some code and or data examples but the gist of it is that you need an implicit iterator https : github.com bobthecow mustache.php wiki Mustache-Tags implicit-iterator :", "Is it built into Mustache", "each time Mustache is not able to iterate .", "You can use the Cascading Loader https : github.com bobthecow mustache.php wiki Template-Loading cascading-loader to load both alias and regular partials .", "It is not possible to iterate over an associative-array in Mustache because Mustache sees it as a hash rather than an iterable list .", "I m new to php", "Sorry - it s php .length probably won t work .", "Mustache is simply rendering it as text .", "It s not ugly it s Mustache .", "It worked without Mustache .", "And consuming in mustache template as", "I want to build a simple Website front-end like this Example with Mustache : http : detector.dmolsen.com demo mustache .. . .. . If I have a Website with just one Page - everything is fine : I create my Mustache Object .. . and so on .. . .. . .. . use .html instead of .mustache for default template extension .. . options array extension .html .. . .. . Template and Partial - Filesystem Loader .. . mustache new Mustache Engine array .. . loader new Mustache Loader FilesystemLoader DIR .", "How can I partially render a Mustache template", "According to mustache.php wiki https : github.com bobthecow mustache.php wiki Template-Loading I could load a template like so : .. . .. . But how about my menu items in the html example above", "So try changing the array from .. . .. . to .. . .. . This is a my example a little bit different from your code : .. . .. . And this is the mustache template :", "There must be a way to handle this in Mustache right", "How can i do this with mustache .", "Is it possible to do have an each as in mustache", "How can I do this mustache", "Mustache.php supports all tag names with or without spaces at the start and end .", "they using mustache template .", "It s a headache because you re fighting against the fundamentals of Mustache : .. . .. . This is a bit backwards from the Mustache way .", "Basically I would need to add the mustache templates in the object parsed by the template .", "Some Mustache implementations answer to this frequent question with support for dynamic partials .", "I m using Mustache 2.7.0 and trying to play with Blocks pragma for the first time .", "In order for Mustache to have a containing variable it needs to be assigned as a parameter in the render function .", "I have the RoyalSlider http : dimsemenov.com plugins royal-slider plugin working with Mustache https : github.com bobthecow mustache.php on a Wordpress installation that uses the WP gallery images from the post .", "example 1 : PHP version of mustache I ve also tried using the escape option to no avail Using triple doesn t work either .. . .. . this will render : .. . .. . example patternlab : .. . .. . JSON file .. . .. . mustache file .. . .. . outputs : .. . .. . Both times the code is commented out and not actually rendered .", "That s the idea of logicless templating .", "Templating rendering part .. . .. . .. . .. . 3 .", "What exactly are you passing into the mustache render function", "You should avoid this with mustache and try to use iterations .", "Would you share both mustache template and content.html", "It s an extension to the mustache spec adopted by several implementations .", "By default Mustache uses a string loader for the main loader .", "What I don t understand is what it would look like in HTML JS JQuery and PHP .", "How would my PHP code detect the page localhost intro.html Adam and know to generate HTML for it", "I am developing an application for fun and I am purposefully NOT using any frameworks aside from mustache for PHP and JS etc on either the client or server-side of the modest application .", "I currently use a template for multiple pages basic.mustache and everything work great but I want to add different boxes box1.mustache box2.mustache in a sidebar depending of the page .", "I have created a template with mustache.php and am wanting to dynamically create my navigation based on files within a single folder .", "My if else statements using the for false or not used to work in both Handlebars 1.3.0 and Mustache.php .", "You can use the FILTERS pragma https : github.com bobthecow mustache.php wiki FILTERS-pragma to do just that :", "All I can find is strictly PHP tutorials .", "Your best bet is probably to use Set Delimiter tags http : mustache.github.io mustache.5.html Set-Delimiter to render your template with two explicit sets of tags .", "I want to load the partial into a string in PHP with the contents of the partials included in the string .", "This works in PHP but then I had to repeat my increment functions in the js layer .", "i found woorank using mustache js socket.io .", "JSON data .. . .. . Mustache template .. . .. . Expecting .. . .. . But it is not showing anything .", "Mustache https : mustache.github.io is logic-less template-engine so if you are using Model-view-controller architecture https : en.wikipedia.org wiki Model E2 80 93view E2 80 93controller it would be better to solve your problem in your controller .", "On creation of the mustache object Filesystem Loader instance is set up and pointing to the default directory .", "Instead of having to define the data in the data to the initial Mustache rendering .", "Say i have an fruits object i m passing to a mustache template .", "I have a Mustache template which includes some partials .", "Mustache is about to guess which template is to be included by it s name ." ] }
{ "confidence": [ 57.647159576416016, 55.91996383666992, 55.14448928833008, 49.19135284423828, 48.490234375, 46.77729415893555, 46.56735610961914, 46.4887580871582, 46.3819465637207, 45.96163558959961, 45.562137603759766, 45.064544677734375, 44.76371765136719, 44.230224609375, 44.063411712646484, 43.257537841796875, 42.312686920166016, 42.00634765625, 41.75046157836914, 41.04938888549805 ], "content": [ "Question : I m sorry for this stupid question but i don t get it I want to build a simple Website front-end like this Example with Mustache : http : detector.dmolsen.com demo mustache .. . .. . If I have a Website with just one Page - everything is fine : I create my Mustache Object .. . and so on .. . .. . .. . use .html instead of .mustache for default template extension .. . options array extension .html .. . .. . Template and Partial - Filesystem Loader .. . mustache new Mustache Engine array .. . loader new Mustache Loader FilesystemLoader DIR . views options .. . partials loader new Mustache Loader FilesystemLoader DIR . views partials . GLOBALS comparedDeviceInformation Device Class options .. . .. . .. . after this i render my index template : .. . .. . .. . render index.html template .. . echo mustache- render index data .. . .. . This works perfectly fine And now in this index.html template file I wan t to link-to another template e.g . home.html .. . .. . .. . a href home a .. . .. . And how do i handle URLs i can t use the name of the templates so how do i get a consistent URL sturcture for my Website .. . .. . Thank you very much .. . Answer : Mustache itself is just a templating-engine it is not concerned with what URLs you have or how many PHP files you have or anything other than changing a template into HTML . For all the other things you have several options . The most straightforward is to have a single PHP file for every URL you want to handle . As you said this isn t ideal : .. . .. . I would suggest checking out a lightweight PHP framework . They handle routing mapping URLs to rendered pages and provide a lot more structure to your backend . Here is a list of some of the ones Mustache.php plays nice with https : github.com bobthecow mustache.php wiki Framework-integration . For your purposes Silex or Slim would probably be a good fit . Comment : Thank you very much : Comment : Not a problem :", "Question : I m trying to set values from a mysql query to a template in Mustache . I m using mustache.php https : github.com bobthecow mustache.php Is it possible to do this I can t find any documentation on templating queries . Does anyone have a better solution Comment : There s so much wrong with this code that I don t know where to start . This is not a valid way to create an array row is never assigned . Comment : @MarkusM ller I ve encluded the rest of my code . Can you tell me where I m going wrong I m new to php .. . Answer : Try it like this", "Question : I have this mustache template : .. . .. . Now there are more than 50 pages but I want to be able to show only 10 pages . How to do that in mustache eg limiting the iterations to specific number something like : .. . .. . I searched the documentation but could not find the solution . Thanks for the help Comment : No logic possible in mustache . You ll have to limit the number of pages before you pass them to the template . .. . Answer : Handlebars is designed as a logic-less templating system . They don t want you to do this in the template . That said you should restructure your data in js php whatever before it gets to the template . e.g.. . .. . .. . var firstPage pages.slice 0 10", "Question : I ve found out you can convert JSON file to PHP arrays and objects and use that output as a data for Mustache.php template-engine like this example : .. . .. . PHP Script : .. . .. . JSON data : .. . .. . Mustache template : .. . .. . But PHP throws this error : .. . .. . And this is where PHP points that error came from Inside Engine.php file in above error : .. . .. . I just know somehing is wrong in data conversation but I m not familiar to PHP debugging and this is for experimental use I appreciate if you could tell me what is wrong . .. . Answer : The template argument of Mustache Engine : : render must be a string however Mustache Engine : : loadTemplate returns an instance of the Mustache Template class which Mustache subsequently tries to treat as a string which fails . You should be able to invoke the render .. . method on the template object instead untested though : .. . .. . I m not that familiar with Mustache but according to the documentation https : github.com bobthecow mustache.php wiki Template-Loading by default loadTemplate needs to be invoked with the template string and not a template file name . Consider also configuring a FileSystemLoader for loading your templates : Comment : About the error you were right . Mustache template loader didn t work at all I tried to use file-get-contents on template too then template rendered correctly but the confusing part is data only shows up if I change person to person . Shouldn t I escape HTML On another more complex template it was exactly opposit result Comment : Your answer is right . About further problem it was unwanted comma in JSON file . Thanks", "Question : I m using the Mustache alias loader from this post http : stackoverflow.com questions 14878970 php-mustache-2-1-partial-loading-not-based-on-the-filename 14900573 14900573 to dynamically load partials based on URL variables into my default template . This works like a charm however in some cases I would also like to load regular partials . Is there a way to combine both the dynamic alias loader and the regular partial loading .. . Answer : Yep You can use the Cascading Loader https : github.com bobthecow mustache.php wiki Template-Loading cascading-loader to load both alias and regular partials . Something like this should do the trick : Comment : Cheers Works like a charm : -", "Question : I ve found out you can convert JSON file to PHP arrays and objects and use that output as a data for Mustache.php template-engine like this example : .. . .. . PHP Script : .. . .. . JSON data : .. . .. . Mustache template : .. . .. . But PHP throws this error : .. . .. . And this is where PHP points that error came from Inside Engine.php file in above error : .. . .. . I just know somehing is wrong in data conversation but I m not familiar to PHP debugging and this is for experimental use I appreciate if you could tell me what is wrong . .. . Answer : I think mistake is here : .. . .. . Try : Comment : Not sure about correct use of these tags but in testing it didn t change the result .", "Question : I have created a template with mustache.php and am wanting to dynamically create my navigation based on files within a single folder . I am using codeigniter for this project . I have a function that fetches the files and turns them into links this function is called create front navigation .. . .. . That function is called from my function that gathers and creates my partials or mustache translations called create partials . All that information is then called from the function that actually turns the mustache tags into actual words . This function is simply called render . My issue is this Instead of rendering the navigation as an actual unordered list . Mustache is simply rendering it as text . So in my browser I am seeing this : .. . .. . Instead of the expected result : .. . .. . about .. . home .. . .. . What am I doing wrong here Does Mustache provide a better way of doing something like this I am very very new to Mustache and have taken several tutorials just to get this far . Thank you for your help in advance .. . Answer : By default Mustache implementations escape HTML . They do this to protect you against malicious user-submitted content . You must use a separate variable syntax to unescape a string containing HTML . See Mustache Tags https : github.com bobthecow mustache.php wiki Mustache-Tags in the bobthecow mustache.php documentation : .. . .. . All variables are HTML escaped by default . If you want to return unescaped HTML use the triple mustache : name . .. . You can also use to unescape a variable : name . This may be useful when changing delimiters . You haven t posted the template you re using but you need to modify the variable that contains the HTML e.g . navigation should be navigation .", "Question : I have this template code : .. . .. . which renders : .. . .. . Instead if I write : .. . .. . it succesfully shows : .. . .. . In the javascript version https : github.com janl mustache.js of the same library this behaviour with blank spaces is not happening . I added a function helper in the php constructor : .. . .. . but is not being executed in this example . Could anyone tell me if this behavior is correct or is a bug in the mustache https : github.com bobthecow mustache.php 2.10 version .. . Answer : Mustache.php supports all tag names with or without spaces at the start and end . For example this does exactly what you d expect : .. . .. . The output of the two templates is identical . If this isn t what you re seeing please provide a full test case and we might be able to track it down :", "Question : null .. . Answer : I m using the Mustache PHP https : github.com bobthecow mustache.php template-engine to render a table with details from a wordpress WP User Query . My SQL function is this .. . .. . which return this data structure .. . .. . which I m able to render this with a Mustache template .. . .. . The user.data.display name field renders correctly but i can t seem to reference the details in the meta from the mustache template . Can anybody suggest which syntax might work for this situation Comment : What exactly are you passing into the mustache render function Comment : @bobthecow I updated the question a little my issue is referencing an embedded array . Could you advise Comment : Use dots just like you do for objects : meta.nickname Comment : @bobthecow cheers", "Question : I have an array like : .. . .. . With mustache I am able to iterate overall of them using : .. . .. . But what if I only want to show specific value for example only second element of the array one with Title 2 I tried like : .. . .. . and : .. . .. . But none worked . Does anyone know how to get specific item from array PS . I am using PHP version of mustache . Thanks .. . Answer : You can use this : .. . .. . Read more at : .. . .. . https : github.com bobthecow mustache.php wiki Variable-Resolution", "Question : I currently use a template for multiple pages basic.mustache and everything work great but I want to add different boxes box1.mustache box2.mustache in a sidebar depending of the page . Basically I would need to add the mustache templates in the object parsed by the template . but how can I do something equivalent to this in the main template basic.mustache .. . Answer : No it s not possible to do like that . But it s still possible to accomplish what you re looking for . See this answer for one answer http : stackoverflow.com questions 14878970 php-mustache-2-1-partial-loading-not-based-on-the-filename 14900573 14900573 . Looking at your example though I think what you re looking for is better addressed by template inheritance the BLOCKS pragma https : github.com bobthecow mustache.php wiki BLOCKS-pragma . So you d have layout.mustache as your parent template : .. . .. . And my page.mustache as your page template : .. . .. . Notice how my page loads box1 and box2 partials into the sidebar block . You could even have default sidebar partials by adding them to the sidebar block in the main layout just like there s a default title . Note that BLOCKS is a pragma and as such is not enabled by default in Mustache.php . To use it you either have to add BLOCKS to the first line of any template with blocks in it or pass pragmas Mustache Engine : : PRAGMA BLOCKS to the Mustache Engine constructor to enable them globally . Comment : I tried to use the block as you suggested but something is not working yet stackoverflow.com questions 27446987 http : stackoverflow.com questions 27446987 rendering-mustache-block-with-external-templates Comment : How can you use partial in the page template partials loader seems incompatible with pragmas Comment : Ok I realized I must keep the partials in the same folder as layout.mustache . Thanks", "Question : If I have the following array .. . .. . and I want to output it using a Mustache https : github.com bobthecow mustache.php template so that the final html looks like this : .. . .. . Though if the array is empty then it shouldn t output anything . This is my current template .. . .. . which outputs .. . .. . I understand why it doesn t output what I want but I don t know how to solve it . .. . Answer : The reason you were getting Names : written twice was because everything inside people and people is treated as a loop . Comment : Yes becuase then if there are no people the Names : label will still be there . Comment : Add a hasNames key to your array or use the hacky people.0 to check whether it s empty : stackoverflow.com questions 19572096 http : stackoverflow.com questions 19572096 mustache-how-can-i-do-something-once-for-an-iterable 19577717 19577717 Comment : Or you can use people.length updated the answer Comment : Sorry - it s php .length probably won t work . I ll refer you back to the comment that @bobthecow made . Comment : No I can t get .length to work but people.0 works great thanks", "Question : null .. . Answer : So . I did see this question : How to use switch case in Mustache template https : stackoverflow.com questions 12158715 how-to-use-switch-case-in-mustache-template .. . .. . Goal flow : php sets variables then calls up mustache template . Currently its php jumbled with html and calls up mustache templates . My question is about this sort of logic : .. . .. . I want to convert entirely to the mustache template where the php only feeds the mustache template variables . I got this far.. . I am sorta confused about how access things while mustache does the looping . If I do something like this and make constant1 2 3 variables.. . I am confused as to how those variables will be reset during looping if they are only set once in the php that calls this mustache template .", "Question : I want to have a Mustache template reference a partial where the partial adds data to the context as well . Instead of having to define the data in the data to the initial Mustache rendering . I have a mockup in https : gist.github.com lode ecc27fe1ededc9b4a219 .. . .. . It boils down to : .. . .. . This gives an error like Cannot use object of type members collection as array . Is there a way to make this work Or is using toString not the right way And would using a partials loader or invoke help I got it working with neither but might miss something . .. . Answer : I m assuming you re using the bobthecow PHP implementation Mustache templating in PHP . As of last time I checked Mustache PHP it didn t support data driven partials . You want sort of a controller backed a partial.. . however currently partials just simple include-this-file style partials . You re gonna have to build this yourself . Good luck", "Question : I have this template code : .. . .. . which renders : .. . .. . Instead if I write : .. . .. . it succesfully shows : .. . .. . In the javascript version https : github.com janl mustache.js of the same library this behaviour with blank spaces is not happening . I added a function helper in the php constructor : .. . .. . but is not being executed in this example . Could anyone tell me if this behavior is correct or is a bug in the mustache https : github.com bobthecow mustache.php 2.10 version .. . Answer : Everything appears to be working as expect . I m not sure exactly what your issue is . In Mustache.php hinfo.artist name no spaces is correct syntax . In Mustache.js hinfo.artist name with spaces is correct syntax . Comment : The issue is that it seems to be a non documented incompatibility if it s as you say . Thankfully the notation in js hinfo.name is working as well which removes the kaos of duplicating the templates just for a space issue in case your project use the templates both from client and server-side logic .", "Question : I m starting to work with Mustache on PHP and I don t manage to make wrapper functions to work as debt . I have this template .. . .. . And I have this data .. . .. . I render m.render tenplate data and I would like to obtain something like : .. . .. . But it doesn t work . I get .. . .. . Because Mustache is passing skill level to my function instead of value 3 . Furthermore if I change the template a put backspaces in the mustache labels : .. . .. . Then skill level is processed but it isn t sent to starts the render obtained is .. . .. . So does anybody know what I m doing wrong How should I wrote the template to make it works Any advice or experience are welcome . Thanks . .. . Answer : I have found the answer in the wiki of the project https : github.com bobthecow mustache.php wiki Mustache-Tags lambdas .. . .. . The text passed is the literal block unrendered . But it provides a Mustache LambdaHelper that can be used to render the text passed . So I have to add this to my lambda function : .. . .. . And that s all it s needed to make it works . Thanks to all readers Comment : Yep . That s what it takes : Comment : I d prolly code your lambda something like this : gist.github.com bobthecow 19f09ebf4395ee9f87d9 https : gist.github.com bobthecow 19f09ebf4395ee9f87d9 Comment : Thank you Always learning in this community . Comment : No problem at all", "Question : I need a Template engine written in PHP that use JSON file as it s data . The popular engine that I love it s template format was Mustache.php https : github.com bobthecow mustache.php wiki but what I understood from it s documentation data for this engine is PHP classes that is not very pretty format . What I need is something like this : .. . .. . Data in JSON + A Pretty Template that use curly-braces for objects A clean HTML .. . .. . And of course I want this engine to do the compiling on the server . Your comments are appreciated . .. . Answer : Use json decode function to decode JSON data into PHP Objects like :", "Question : Below is how i am using with Mustache.If source is there i am showing flag sour data if destination is there i am showing flag dest data . if flag sour and flag dest are both there i want to show only one message this is not a direct flight . How can i do this with mustache . Comment : @unixarmy gave the correct answer it is not possible . I guess the easiest way would to achieve the desired functionality would be to create new flag direct value in the data thus not computed by Mustache .. . Answer : Mustache https : mustache.github.io is logic-less template-engine so if you are using Model-view-controller architecture https : en.wikipedia.org wiki Model E2 80 93view E2 80 93controller it would be better to solve your problem in your controller . That s the idea of logicless templating . Comment : but my coding building logic is going in jquery", "Question : I have a double array that I m passing into my Mustache file and the first two levels are indexed by number . The variable name is groups so I can iterate through the outer part with groups groups but within each group is an array of questions . I want to be able to iterate through each question and create some html for each . How can I do this if the references are numerical .. . Answer : It d be easier to give you an answer if you provided some code and or data examples but the gist of it is that you need an implicit iterator https : github.com bobthecow mustache.php wiki Mustache-Tags implicit-iterator :", "Question : I m using mustache.php https : github.com bobthecow mustache.php . Suppose I have an HTML structure like the following just an example to let you understand my problem in my mustache template : .. . .. . My problem here is that my data that the template should use comes from two different sources object1 and object2 . According to mustache.php wiki https : github.com bobthecow mustache.php wiki Template-Loading I could load a template like so : .. . .. . But how about my menu items in the html example above they need to be sourced from another object which I can t have in the same object1 . I haven t understood how to deal with one template and partials and data from multiple sources . Should I split the HTML above in different partials Even so how do I pass the json data to nested partials anyway .. . Answer : oh just figured it out .. . .. . I can pass my objects as an array here .. . .. . and it will work - wasn t too clear in mustache.php docs .. . .. . not sure if it s the best practice but looks good also for use in partials" ] }
[ "yes-answer-long", "yes-answer-short" ]
implementation
UNK_RELATION
transliteration@character-encoding@96
transliteration -- transliteration refers to the process of mapping letters or glyphs from one @placeholder to another .
{ "confidence": [ 41.98346710205078, 41.83633804321289, 40.40107727050781, 40.40107727050781, 40.40107727050781, 40.06541442871094, 39.553550720214844, 39.553550720214844, 35.944969177246094, 35.475318908691406, 34.465415954589844, 32.839927673339844, 32.66114807128906, 30.18404769897461, 30.18404769897461, 29.27630043029785, 27.298194885253906, 24.495338439941406, 24.495338439941406, 22.745288848876953, 21.394641876220703, 21.120460510253906, 20.639938354492188, 20.345748901367188, 20.345748901367188, 20.345748901367188, 20.168350219726562, 19.994035720825195, 19.86475372314453, 19.790924072265625, 18.035619735717773, 18.035619735717773, 17.777122497558594, 17.28649139404297, 17.28649139404297, 17.099712371826172, 17.089622497558594, 16.51158905029297, 15.542352676391602, 15.542352676391602, 15.162470817565918, 15.162470817565918, 14.696371078491211, 14.650773048400879, 14.650773048400879, 14.650773048400879, 14.337602615356445, 14.286203384399414, 14.080087661743164, 14.080087661743164, 14.080087661743164, 14.080087661743164, 14.080087661743164, 14.080087661743164, 14.080087661743164, 14.080087661743164, 14.080087661743164, 14.080087661743164, 14.080087661743164, 13.98684024810791, 13.927653312683105, 13.606019020080566, 13.239753723144531, 12.448441505432129, 12.348552703857422, 12.348552703857422, 12.24749755859375, 12.219270706176758, 12.219270706176758, 12.219270706176758, 12.219270706176758, 12.219270706176758, 12.219270706176758, 12.219270706176758, 12.219270706176758, 12.219270706176758, 12.219270706176758, 12.219270706176758, 12.219270706176758, 12.219270706176758, 12.219270706176758, 12.219270706176758, 12.219270706176758, 12.219270706176758, 12.219270706176758, 12.219270706176758, 12.219270706176758, 12.219270706176758, 12.219270706176758, 12.219270706176758, 12.219270706176758, 12.219270706176758, 12.219270706176758, 12.219270706176758, 12.219270706176758, 12.219270706176758, 12.219270706176758, 12.219270706176758, 12.219270706176758, 12.219270706176758 ], "content": [ "i made a Jquery script for transliteration from russian chars to english .", "the transliteration works perfectly .", "This just removes accents and does not do actual transliteration .", "There is a .NET library for transliteration on codeplex - unidecode http : unidecode.codeplex.com .", "Do you even understand what transliteration is", "It s referred to as transliteration I think .", "I m not sure what you mean by actual transliteration but it sure does not drop the non-accented letters .", "In your example it only removed accents and the rest of the letters are already latin so no transliteration takes place .", "I am using Google transliteration ctrl + G in my website .", "When I m trying to transliterate a Cyrillic utf-8 string with .. . .. . see questions 1726404 transliteration-in-ruby http : stackoverflow.com questions 1726404 transliteration-in-ruby .. . .. . I m getting everything but those symbols that have to be transliterated .", "Is there any good solution out there that does this transliteration in a good manner", "The problem is my site is running on EC2 and I would like to add transliteration to users search inputs .", "Is there any module or a tool that would help me convert the ASCII characters to Unicode of the mentioned language or should one code it considering the transliteration rules of the language", "if you mean that you should say it in the question itself and also specify which of the zillions of transliteration schemes you would wish to apply .", "Instead of relaying onto third-party libraries with unclear workings I d define a transliteration sequence for each Cyrillic symbol and did the translation myself .", "and no similar API option was given as a replacement .. . .. . Google s Input Tools https : www.google.com inputtools try do an excellent job of transliteration of English to Arabic however I want to use it as-if it were an API even a CLI based one .", "It will loose all non-accented letters in the process .", "on certain hosting servers produces wrong result : .. . .. . So is there any other way of doing this right or the only proper thing to do is to do preg-replace or str-replace and define transliteration tables yourself", "I need to do a fuzzy-search with transliteration of the characters for example : .. . .. . I have an ASP.NET application database which has a table with a list of Spanish words 200 000 entries I also have a page with an input field .", "After Secure connection SSL Google transliteration API shows the below error Blocked loading mixed active content http : www.google.com inputtools request text ...... . .. . .. . even me entered https : www.google.com jsapi .. . .. . Can someone help me", "@NicholasTolleyCottrell - That will leave the diacritics intact accents on Latin letters .", "Probably better to pull mapping data into separate file in source if possible .", "conversion to string : .. . .. . conversion to bytes : .. . .. . @Thomas Levesque http : stackoverflow.com questions 2173825 slugify-and-character-transliteration-in-c 2173883 217388 is right will get encoded by the output stream.. . .. . .. . to remove the diacritics accent marks you can use the String.Normalize function as detailed here : .. . .. . http : www.siao2.com 2007 05 14 2629747.aspx .. . .. . that should take care of most of the cases where the glyph is really a character plus an accent mark .", "Which is what I said it drops non-accented non-latin letters .", "When I copy that url these letters turn to . . something crap .", "The point of the NFD transform is to separate accents and letters into two consecutive code points .", "That way I avoid manual mapping and coding .", "I need to compare strings and match names to one another even if they are not spelled the same way .", "Another way is to create custom translit by tr and gsub methods of String without using iconv .", "UPDATE .. . .. . Can t answer myself already but found this question that was very helpful : Converting Symbols Accent Letters to English Alphabet http : stackoverflow.com questions 1008802 converting-symbols-accent-letters-to-english-alphabet", "It depends on what environment you re programming in though you ll probably have to maintain some sort of mapping table manually .", "Accidentally sent previous There is room though for mapping diacritics to their phonetic equivalents to improve phonetic searching .", "Another perhaps cleaner take would be to use Any-Latin Lower Latin-ASCII instead of NFD with manual filtering that converts to ASCII-only as much as possible explicitly .", "The easiest way to me would be to simply maintain a sparse mapping array which simply changes your Unicode code points into displayable strings .", "For that I would have rather a hardcoded mapping where you can define the replacement rule individually for each special character group .", "Please beware that some letters like en.wikipedia.org wiki C3 91 http : en.wikipedia.org wiki C3 91 should not be stripped its diacritics for searching purposes .", "for an even more aggressive char matching to take care of cases like the Scandinavian slashed o http : en.wikipedia.org wiki C3 98 digraphs and other exotic glyphs there s the table approach : .. . .. . http : www.codeproject.com KB cs UnicodeNormalization.aspx .. . .. . this includes around 1 000 symbol mappings in addition to the normalization .", "well maping works...but still can t find protection from stupid users who like press hold a key .", "What language word viljandimaa comes from", "The immutableMap is just a simple class from google-collections .", "It generally does the trick using Unidecode tables ported from python .", "Then you can just remove the diatricts from the string and you re basically done .", "I know that one can convert the Unicode characters to ASCII characters using the unidecode module in Python https : github.com iki unidecode .", "The Collator class relieves you from having to track all of these rules and keep them up to-date .", "sounds interesting but can you search your collation key in the database with select from person where collated name like bjo", "In case of German it s not wanted to remove diacritics from Umlauts .", "They sound different from all other characters they sort different and they make words change meaning m tt and matt are two different words .", "Then one collation key can be tested to see if it is prefix of other collation keys in exactly the same way that a string is tested to check whether it s a prefix of other strings .", "but there re two problems I can t solve .", "Herewith the code : .. . .. . .. . .. . Problem 1 - when user press hold a key - script doesn t work Problem 2 - code is to long in my opinion .", "Maybe there is an shorter way", "Could someone help with this", "Not sure what the problem with holding down the key is don t know what is the expected behaviour but it can be made shorter something like this.. .", "DEMO : http : jsfiddle.net avtt8pkk", "In this case script doesn t work - only first letter is changed the remaining is still not transliterated", "1 Use keypress instead of keyup .", "2 Store those characters into arrays and use a for-loop : .. . .. . 2 You can use a map :", "seems i found solution .", "Shall be something like this .. . .. . http : jsfiddle.net terveg v812L53n", "instead of converting to ascii use p InCombiningDiacriticalMarks regexp as in answer stackoverflow.com questions 1453171 http : stackoverflow.com questions 1453171 n-nto-n-or-remove-diacritical-marks-from 1453284 1453284", "I m trying to translate the following slugify method from PHP to C : http : snipplr.com view 22741 slugify-a-string-in-php .. . .. . Edit : For the sake of convenience here the code from above : .. . .. . I got no probleming coding the rest except I can not find the C equivalent of the following line of PHP code : .. . .. . Edit : Purpose of this is to translate non-ASCII characters such as Reform ci Genfi Eml km ve El tt into reformacio-genfi-emlekmuve-elott", "You could use the Normalizer class http : docs.oracle.com javase 6 docs api java text Normalizer.html from java.text : .. . .. . But there is still some work to do since Java makes strange things with unconvertable Unicode characters it does not ignore them and it does not throw an exception .", "If you just want to remove accents from accented letters then you could try decomposing your string using normalization form NFKD this converts the accented letter to a plain letter a followed by U+0301 COMBINING ACUTE ACCENT and then discarding the accents which belong to the Unicode character-class http : www.unicode.org Public 5.1.0 ucd UCD.html Canonical Combining Class Values Mn Mark nonspacing .", "You can fork it from github here https : github.com LukeMadhanga transliterator .", "I ve tried using iconv but is very annoying and it does not behave as one might expect .", "Nice one +1 pypi.python.org pypi Unidecode 0.04.1 http : pypi.python.org pypi Unidecode 0.04.1", "well now ita clear why it worked from the console as well because the locale was imported from the current users shell settings it actually just needs any locale set up .", "Do you mind posting the finished solution so I could have a look", "I would also like to add that the TRANSLIT removes the apostrophes and that @jxac solution doesn t address that .", "I m not sure why but by first encoding it to Cyrillic and then to ASCII you get a similar behavior as TRANSLIT .", "Thanks so much for this solution", "I have been looking for a way to replace non-US-ASCII characters with an ASCII equivalent for an old mainframe system that can t handle these characters .", "Scary", "But it works .", "Reform ci Genfi Eml km ve El tt Reformacio Genfi Emlekmuve Elott", "however becomes just an empty string .", "It s now also on NuGet : nuget.org packages UnidecodeSharpFork https : www.nuget.org packages UnidecodeSharpFork", "note all punctuation is removed by the regex replace in your example", "The sample input and expected output is as follows : .. . .. . input : bre .. . .. . output :", "Any Ascii character is a Unicode character so the question lacks a clear problem statement in addition to asking for a favorite tool which is classified as off-topic .", "@JukkaK.Korpela : What I mean to say is that I want to reverse transliterate a romanized text ASCII of a language to the native script Unicode of the native language as mentioned in the example .", "But even then it would be asking for a favorite tool .", "You ll have to rely on a separate module .", "Unicode doesn t touch on this sort of functionality at all .", "The transliterate module https : pypi.python.org pypi transliterate seems current and has reasonable documentation .", "I m trying to get Cyrillic words to be in latin so I can have them in urls .", "I use icu4j http : site.icu-project.org transliterator but it still gives weird characters like this : Vil ndimaa .", "It should be more like viljandimaa .", "Does anybody know how to get Cyrillic to a-z with icu4j", "Modify your identifier http : icu-project.org apiref icu4j com ibm icu text Transliterator.html getInstance 28java.lang.String 29 to do what you want .", "You can strip unwanted characters using a regular expression with the Remove transform .", "For example consider the string E : .. . .. . The identifier Any-Latin NFD p Alnum Remove will transliterate to Latin which may still include accents decompose accented characters into the letter and diacritics and remove anything that isn t an alphanumeric .", "The resultant string is Eematematika .", "You can read more on the identifiers under General Transforms http : userguide.icu-project.org transforms general on the ICU website .", ".. . .. . Example : .. . .. . Tested against ICU4J 49.1 .", "Thanks McDowell - could you give a really quick example", "@Nicholas Tolley Cottrell - Example added .", "Thanks again McDowell - I ended up using Any-Latin NFD since I wanted to preserve spaces .", "If you want to preserve spaces modify the regular expression in the Remove transformation .", "Have no idea about icu4j but in the Unicode table Cyrillic takes http : en.wikipedia.org wiki Cyrillic 28Unicode block 29 only a small range ." ] }
{ "confidence": [ 50.294036865234375, 48.53963851928711, 46.525177001953125, 43.44301986694336, 42.30713653564453, 42.05683898925781, 41.108821868896484, 40.36339569091797, 40.2918586730957, 40.10332489013672, 40.10332489013672, 39.7965087890625, 35.119014739990234, 32.13847351074219, 32.13847351074219, 32.13847351074219, 30.459747314453125, 28.706382751464844, 28.706382751464844, 28.55825424194336 ], "content": [ "Question : I m trying to translate the following slugify method from PHP to C : http : snipplr.com view 22741 slugify-a-string-in-php .. . .. . Edit : For the sake of convenience here the code from above : .. . .. . I got no probleming coding the rest except I can not find the C equivalent of the following line of PHP code : .. . .. . Edit : Purpose of this is to translate non-ASCII characters such as Reform ci Genfi Eml km ve El tt into reformacio-genfi-emlekmuve-elott Comment : Do you mind posting the finished solution so I could have a look .. . Answer : I would also like to add that the TRANSLIT removes the apostrophes and that @jxac solution doesn t address that . I m not sure why but by first encoding it to Cyrillic and then to ASCII you get a similar behavior as TRANSLIT . Comment : Thanks so much for this solution I have been looking for a way to replace non-US-ASCII characters with an ASCII equivalent for an old mainframe system that can t handle these characters . Comment : Scary But it works . Comment : This just removes accents and does not do actual transliteration . It will loose all non-accented letters in the process . Comment : I m not sure what you mean by actual transliteration but it sure does not drop the non-accented letters . Reform ci Genfi Eml km ve El tt Reformacio Genfi Emlekmuve Elott Comment : however becomes just an empty string . Which is what I said it drops non-accented non-latin letters . In your example it only removed accents and the rest of the letters are already latin so no transliteration takes place .", "Question : When I m trying to transliterate a Cyrillic utf-8 string with .. . .. . see questions 1726404 transliteration-in-ruby http : stackoverflow.com questions 1726404 transliteration-in-ruby .. . .. . I m getting everything but those symbols that have to be transliterated . For example : r- r- and G vry Gvry . What s wrong Ruby 1.8.7 Rails 2.3.5 WSeven .. . Answer : Another way is to create custom translit by tr and gsub methods of String without using iconv .", "Question : null .. . Answer : Google s Transliterate API https : developers.google.com transliterate v1 getting started was unfortunately deprecated with their 2011 Spring Cleaning and no similar API option was given as a replacement .. . .. . Google s Input Tools https : www.google.com inputtools try do an excellent job of transliteration of English to Arabic however I want to use it as-if it were an API even a CLI based one . The problem is my site is running on EC2 and I would like to add transliteration to users search inputs . Anyone have experience in hacking the Input Tools to be called even at CLI level Comment : Why the down vote Do you even understand what transliteration is", "Question : When I m trying to transliterate a Cyrillic utf-8 string with .. . .. . see questions 1726404 transliteration-in-ruby http : stackoverflow.com questions 1726404 transliteration-in-ruby .. . .. . I m getting everything but those symbols that have to be transliterated . For example : r- r- and G vry Gvry . What s wrong Ruby 1.8.7 Rails 2.3.5 WSeven .. . Answer : For Cyrillic the translit https : www.ruby-toolbox.com gems translit gem might work .", "Question : When I m trying to transliterate a Cyrillic utf-8 string with .. . .. . see questions 1726404 transliteration-in-ruby http : stackoverflow.com questions 1726404 transliteration-in-ruby .. . .. . I m getting everything but those symbols that have to be transliterated . For example : r- r- and G vry Gvry . What s wrong Ruby 1.8.7 Rails 2.3.5 WSeven .. . Answer : It seems the solution http : groups.google.com group ruby-talk-google browse thread thread 96c75d3587012556 pli 1 is too tricky for me . Problem solved using stringex http : rubygems.org gems stringex gem .", "Question : i made a Jquery script for transliteration from russian chars to english . but there re two problems I can t solve . Herewith the code : .. . .. . .. . .. . Problem 1 - when user press hold a key - script doesn t work Problem 2 - code is to long in my opinion . Maybe there is an shorter way Could someone help with this .. . Answer : Not sure what the problem with holding down the key is don t know what is the expected behaviour but it can be made shorter something like this.. . Probably better to pull mapping data into separate file in source if possible . DEMO : http : jsfiddle.net avtt8pkk Comment : well maping works...but still can t find protection from stupid users who like press hold a key . In this case script doesn t work - only first letter is changed the remaining is still not transliterated", "Question : I am using Google transliteration ctrl + G in my website . It Works fine . After Secure connection SSL Google transliteration API shows the below error Blocked loading mixed active content http : www.google.com inputtools request text ...... . .. . .. . even me entered https : www.google.com jsapi .. . .. . Can someone help me Thanks in advance . .. . Answer : Comment : Thank you but in this page developers.google.com transliterate v1 getting started hl en https : developers.google.com transliterate v1 getting started hl en The Hello World of Google Transliterate not working in my ssl website. . Any idea on it", "Question : I m trying to get Cyrillic words to be in latin so I can have them in urls . I use icu4j http : site.icu-project.org transliterator but it still gives weird characters like this : Vil ndimaa . It should be more like viljandimaa . When I copy that url these letters turn to . . something crap . Does anybody know how to get Cyrillic to a-z with icu4j UPDATE .. . .. . Can t answer myself already but found this question that was very helpful : Converting Symbols Accent Letters to English Alphabet http : stackoverflow.com questions 1008802 converting-symbols-accent-letters-to-english-alphabet .. . Answer : Have no idea about icu4j but in the Unicode table Cyrillic takes http : en.wikipedia.org wiki Cyrillic 28Unicode block 29 only a small range . Instead of relaying onto third-party libraries with unclear workings I d define a transliteration sequence for each Cyrillic symbol and did the translation myself . P.S . What language word viljandimaa comes from Doesn t sound like Cyrillic to me.. . Comment : Thanks for answering . Its estonian locations is russian .", "Question : I m trying to translate the following slugify method from PHP to C : http : snipplr.com view 22741 slugify-a-string-in-php .. . .. . Edit : For the sake of convenience here the code from above : .. . .. . I got no probleming coding the rest except I can not find the C equivalent of the following line of PHP code : .. . .. . Edit : Purpose of this is to translate non-ASCII characters such as Reform ci Genfi Eml km ve El tt into reformacio-genfi-emlekmuve-elott Comment : Do you mind posting the finished solution so I could have a look .. . Answer : conversion to string : .. . .. . conversion to bytes : .. . .. . @Thomas Levesque http : stackoverflow.com questions 2173825 slugify-and-character-transliteration-in-c 2173883 217388 is right will get encoded by the output stream.. . .. . .. . to remove the diacritics accent marks you can use the String.Normalize function as detailed here : .. . .. . http : www.siao2.com 2007 05 14 2629747.aspx .. . .. . that should take care of most of the cases where the glyph is really a character plus an accent mark . for an even more aggressive char matching to take care of cases like the Scandinavian slashed o http : en.wikipedia.org wiki C3 98 digraphs and other exotic glyphs there s the table approach : .. . .. . http : www.codeproject.com KB cs UnicodeNormalization.aspx .. . .. . this includes around 1 000 symbol mappings in addition to the normalization . note all punctuation is removed by the regex replace in your example", "Question : i made a Jquery script for transliteration from russian chars to english . but there re two problems I can t solve . Herewith the code : .. . .. . .. . .. . Problem 1 - when user press hold a key - script doesn t work Problem 2 - code is to long in my opinion . Maybe there is an shorter way Could someone help with this .. . Answer : 1 Use keypress instead of keyup . 2 Store those characters into arrays and use a for-loop : .. . .. . 2 You can use a map :", "Question : i made a Jquery script for transliteration from russian chars to english . but there re two problems I can t solve . Herewith the code : .. . .. . .. . .. . Problem 1 - when user press hold a key - script doesn t work Problem 2 - code is to long in my opinion . Maybe there is an shorter way Could someone help with this .. . Answer : seems i found solution . Shall be something like this .. . .. . http : jsfiddle.net terveg v812L53n", "Question : I know that one can convert the Unicode characters to ASCII characters using the unidecode module in Python https : github.com iki unidecode . Is there any module or a tool that would help me convert the ASCII characters to Unicode of the mentioned language or should one code it considering the transliteration rules of the language The sample input and expected output is as follows : .. . .. . input : bre .. . .. . output : Comment : Any Ascii character is a Unicode character so the question lacks a clear problem statement in addition to asking for a favorite tool which is classified as off-topic . Comment : @JukkaK.Korpela : What I mean to say is that I want to reverse transliterate a romanized text ASCII of a language to the native script Unicode of the native language as mentioned in the example . Comment : if you mean that you should say it in the question itself and also specify which of the zillions of transliteration schemes you would wish to apply . But even then it would be asking for a favorite tool . .. . Answer : You ll have to rely on a separate module . Unicode doesn t touch on this sort of functionality at all . The transliterate module https : pypi.python.org pypi transliterate seems current and has reasonable documentation .", "Question : I m trying to translate the following slugify method from PHP to C : http : snipplr.com view 22741 slugify-a-string-in-php .. . .. . Edit : For the sake of convenience here the code from above : .. . .. . I got no probleming coding the rest except I can not find the C equivalent of the following line of PHP code : .. . .. . Edit : Purpose of this is to translate non-ASCII characters such as Reform ci Genfi Eml km ve El tt into reformacio-genfi-emlekmuve-elott Comment : Do you mind posting the finished solution so I could have a look .. . Answer : There is a .NET library for transliteration on codeplex - unidecode http : unidecode.codeplex.com . It generally does the trick using Unidecode tables ported from python . Comment : It s now also on NuGet : nuget.org packages UnidecodeSharpFork https : www.nuget.org packages UnidecodeSharpFork", "Question : null .. . Answer : I have the issue while trying to transliterate the name of the csv file that shall be uploded from the user . Here is the code : .. . .. . Once i run the code error appers : Warning : transliterator transliterate : String conversion of string to UTF-16 failed .. . .. . var-dump returns obviously boolean false . Checking the raw file coding gives me that it is UTF-8 . The interesting thing is when I assignt to raw file plain sting here encoding is UTF-8 as well f.e . the transliteration works perfectly . Pls help to solve this . Tnks . Comment : A couple of guesses not tested but worth trying . raw file string raw file raw file strval raw file Comment : Unfortunately does not work But thanks any way", "Question : I need to do a fuzzy-search with transliteration of the characters for example : .. . .. . I have an ASP.NET application database which has a table with a list of Spanish words 200 000 entries I also have a page with an input field . The point is that I do not know Spanish and I do not know how to spell a search word in Spanish but I know how it sounds . Therefore in the text box I enter the search word such as beautiful but in the recording err - prekieso and I need to get from the database got the correct version : precioso . How can this be implemented In other words I need something similar to Google suggestions.. . .. . Answer : The stored procedure function the algorithm calculates the distance Levenshtein : .. . .. . invoking : .. . .. . or :", "Question : Hello I retrieve text based utf8 data from a foreign source which contains special chars such as u while I want to normalize them to English such as - iouc . What would be the best way to achieve this Comment : Search and replace maybe you ll have to have a full array of special to normal characters though . .. . Answer : http : docs.python.org library unicodedata.html Comment : I am abit confused : I have tried print unicodedata.normalize NFKD u and the output is again : Comment : Try the other valid values NFC NFKC NFD and NFKD . Comment : I m fairly certain this is a different operation than what the asker is looking for . But yes this is unicode normalization . What he is asking is not usually referred as such . Comment : Right . It s referred to as transliteration I think .", "Question : I need to do a fuzzy-search with transliteration of the characters for example : .. . .. . I have an ASP.NET application database which has a table with a list of Spanish words 200 000 entries I also have a page with an input field . The point is that I do not know Spanish and I do not know how to spell a search word in Spanish but I know how it sounds . Therefore in the text box I enter the search word such as beautiful but in the recording err - prekieso and I need to get from the database got the correct version : precioso . How can this be implemented In other words I need something similar to Google suggestions.. . .. . Answer : I think what you need here is a spell-checking functionality like this one : http : www.codeproject.com KB string netspell.aspx .. . .. . A google like functionality it s much more advanced though and will not be easy to implement : How does the Google Did you mean Algorithm work http : stackoverflow.com questions 307291 how-does-the-google-did-you-mean-algorithm-work .. . .. . hope this help .", "Question : Is there any good solution out there that does this transliteration in a good manner I ve tried using iconv but is very annoying and it does not behave as one might expect . Using TRANSLIT will try to replace what it can leaving everything nonconvertible as Using IGNORE will not leave in text but will also not transliterate and will also raise E NOTICE when nonconvertible char is found so you have to use iconv with @ error suppressor .. . Using IGNORE TRANSLIT as some people suggested in PHP forum is actually same as IGNORE tried it myself on php versions 5.3.2 and 5.3.13 .. . Also using TRANSLIT IGNORE is same as TRANSLIT .. . .. . It also uses current locale settings to transliterate . WARNING - a lot of text and code is following .. . .. . Here are some examples : .. . .. . Ok that did convert and but why not and Lets try with IGNORE : .. . .. . Using solution of this guy http : stackoverflow.com a 6857767 555097 also does not work as wanted : Regular ascii text + YYYYY + aous + eYYYeY + aoY + + + @ .. . .. . Even using PECL intl Normalizer http : www.php.net manual en class.normalizer.php class which is not awailable always even if you have PHP 5.3.0 since ICU package intl uses may not be available to PHP i.e . on certain hosting servers produces wrong result : .. . .. . So is there any other way of doing this right or the only proper thing to do is to do preg-replace or str-replace and define transliteration tables yourself appendix : I have found on ZF wiki debate from 2008 about proposal for Zend Filter Transliterate http : framework.zend.com wiki display ZFPROP Zend Filter Transliteration+-+Martin+Hujer but project was dropped since in some languages it is not possible to convert i.e . chinese but still for any latin- and cyrilic-based language IMO this option should exist . Comment : Why would you convert utf8 to ascii uft8 is the greatest thing ever.. . Comment : @OptimusCrime : convert to url to html id attribute value matching similar words Comment : Well for urls you could simply use a regex replacing eveything except space a-z A-Z and numbers . Special characters are not a good thing for that usage . Same goes for html attributes . Comment : @OptimusCrime ... . are not special-characters and it makes a great difference of converting them to ascii then simply removing them from url string Comment : I do not really understand what you want . If I say something like this is UTF-8 but not convertible to ASCII . What are you calling ASCII Are you speaking about a specific encoding or are you speaking about bytes-per-bytes chars -- no ok seen your comment above you re looking for something to convert accentued chars to standard chars . .. . Answer : From this website http : myshadowself.com coding php-function-to-convert-accented-characters-to-their-non-accented-equivalant I found something that might help you : .. . .. . Usage example : .. . .. . Displays : .. . .. . You ll need to improve it but you get the idea.. . If there is a direct way to do such a work I don t know it . Comment : yes I already suggested this solution as a last-solution but it is not what I am hoping for . +1 for trying though Comment : This works perfect iconv s TRANSLIT is missing many characters . Comment : I came up with a similar solution but with strtr instead of str-replace which is slightly faster in some cases eg longer strings .", "Question : Is there any good solution out there that does this transliteration in a good manner I ve tried using iconv but is very annoying and it does not behave as one might expect . Using TRANSLIT will try to replace what it can leaving everything nonconvertible as Using IGNORE will not leave in text but will also not transliterate and will also raise E NOTICE when nonconvertible char is found so you have to use iconv with @ error suppressor .. . Using IGNORE TRANSLIT as some people suggested in PHP forum is actually same as IGNORE tried it myself on php versions 5.3.2 and 5.3.13 .. . Also using TRANSLIT IGNORE is same as TRANSLIT .. . .. . It also uses current locale settings to transliterate . WARNING - a lot of text and code is following .. . .. . Here are some examples : .. . .. . Ok that did convert and but why not and Lets try with IGNORE : .. . .. . Using solution of this guy http : stackoverflow.com a 6857767 555097 also does not work as wanted : Regular ascii text + YYYYY + aous + eYYYeY + aoY + + + @ .. . .. . Even using PECL intl Normalizer http : www.php.net manual en class.normalizer.php class which is not awailable always even if you have PHP 5.3.0 since ICU package intl uses may not be available to PHP i.e . on certain hosting servers produces wrong result : .. . .. . So is there any other way of doing this right or the only proper thing to do is to do preg-replace or str-replace and define transliteration tables yourself appendix : I have found on ZF wiki debate from 2008 about proposal for Zend Filter Transliterate http : framework.zend.com wiki display ZFPROP Zend Filter Transliteration+-+Martin+Hujer but project was dropped since in some languages it is not possible to convert i.e . chinese but still for any latin- and cyrilic-based language IMO this option should exist . Comment : Why would you convert utf8 to ascii uft8 is the greatest thing ever.. . Comment : @OptimusCrime : convert to url to html id attribute value matching similar words Comment : Well for urls you could simply use a regex replacing eveything except space a-z A-Z and numbers . Special characters are not a good thing for that usage . Same goes for html attributes . Comment : @OptimusCrime ... . are not special-characters and it makes a great difference of converting them to ascii then simply removing them from url string Comment : I do not really understand what you want . If I say something like this is UTF-8 but not convertible to ASCII . What are you calling ASCII Are you speaking about a specific encoding or are you speaking about bytes-per-bytes chars -- no ok seen your comment above you re looking for something to convert accentued chars to standard chars . .. . Answer : If I have understood you correctly I may have an answer for you : I ve written a basic PHP class that allows you to convert most characters into their ASCII equivalents . Below is a screenshot of its output converting various composer names with accents in their name . You can fork it from github here https : github.com LukeMadhanga transliterator . NB : It is as of yet undocumented but it should be p easy to get to grips with . Example http : i.stack.imgur.com DbGkg.png", "Question : Is there any good solution out there that does this transliteration in a good manner I ve tried using iconv but is very annoying and it does not behave as one might expect . Using TRANSLIT will try to replace what it can leaving everything nonconvertible as Using IGNORE will not leave in text but will also not transliterate and will also raise E NOTICE when nonconvertible char is found so you have to use iconv with @ error suppressor .. . Using IGNORE TRANSLIT as some people suggested in PHP forum is actually same as IGNORE tried it myself on php versions 5.3.2 and 5.3.13 .. . Also using TRANSLIT IGNORE is same as TRANSLIT .. . .. . It also uses current locale settings to transliterate . WARNING - a lot of text and code is following .. . .. . Here are some examples : .. . .. . Ok that did convert and but why not and Lets try with IGNORE : .. . .. . Using solution of this guy http : stackoverflow.com a 6857767 555097 also does not work as wanted : Regular ascii text + YYYYY + aous + eYYYeY + aoY + + + @ .. . .. . Even using PECL intl Normalizer http : www.php.net manual en class.normalizer.php class which is not awailable always even if you have PHP 5.3.0 since ICU package intl uses may not be available to PHP i.e . on certain hosting servers produces wrong result : .. . .. . So is there any other way of doing this right or the only proper thing to do is to do preg-replace or str-replace and define transliteration tables yourself appendix : I have found on ZF wiki debate from 2008 about proposal for Zend Filter Transliterate http : framework.zend.com wiki display ZFPROP Zend Filter Transliteration+-+Martin+Hujer but project was dropped since in some languages it is not possible to convert i.e . chinese but still for any latin- and cyrilic-based language IMO this option should exist . Comment : Why would you convert utf8 to ascii uft8 is the greatest thing ever.. . Comment : @OptimusCrime : convert to url to html id attribute value matching similar words Comment : Well for urls you could simply use a regex replacing eveything except space a-z A-Z and numbers . Special characters are not a good thing for that usage . Same goes for html attributes . Comment : @OptimusCrime ... . are not special-characters and it makes a great difference of converting them to ascii then simply removing them from url string Comment : I do not really understand what you want . If I say something like this is UTF-8 but not convertible to ASCII . What are you calling ASCII Are you speaking about a specific encoding or are you speaking about bytes-per-bytes chars -- no ok seen your comment above you re looking for something to convert accentued chars to standard chars . .. . Answer : The toAscii function of Patchwork Utf8 does exactly this see : .. . .. . https : github.com nicolas-grekas Patchwork-UTF8 blob master src Patchwork Utf8.php .. . .. . It leverages iconv and intl s Normalizer to remove accents split ligatures and do many other generic transliterations . Comment : Done some initial testing and it seems ok . Nice job there Comment : This lib is the work of genuine genius . Comment : How to use this class Comment : @bornie see the documentation on his github repo at github.com nicolas-grekas Patchwork-UTF8 https : github.com nicolas-grekas Patchwork-UTF8 . IMHO this lib should be built right into PHP if it hasn t already been The fact it has over 2.7 million installs should tell you for crying out loud . Comment : Broken link . Could someone fix" ] }
[ "yes-answer-long", "yes-answer-short" ]
character-encoding
UNK_RELATION
persona@mozilla@132
persona -- mozilla persona is a decentralized authentication system for the web based on the open browserid protocol prototyped by @placeholder .
{ "confidence": [ 59.55567169189453, 58.670684814453125, 58.670684814453125, 54.657127380371094, 50.583736419677734, 47.22855758666992, 46.44002151489258, 45.6015739440918, 45.257530212402344, 44.131282806396484, 42.78657913208008, 42.36243438720703, 41.82146072387695, 40.83097839355469, 40.82414245605469, 39.502559661865234, 39.248748779296875, 39.121498107910156, 39.07945251464844, 37.115230560302734, 36.79148483276367, 36.65400695800781, 36.38540267944336, 36.38540267944336, 36.38540267944336, 34.94694900512695, 34.73116683959961, 32.17292404174805, 32.17292404174805, 32.17292404174805, 32.17292404174805, 32.17292404174805, 32.17292404174805, 32.17292404174805, 32.17292404174805, 32.17292404174805, 30.566753387451172, 30.120174407958984, 30.01198959350586, 29.72516632080078, 29.59479522705078, 29.59479522705078, 29.47296142578125, 26.894834518432617, 26.894834518432617, 26.707199096679688, 26.707199096679688, 25.168245315551758, 24.855209350585938, 24.253047943115234, 24.00723648071289, 23.23711395263672, 23.23711395263672, 23.01858901977539, 22.65610122680664, 21.11305046081543, 21.11305046081543, 20.872180938720703, 19.94161605834961, 19.145591735839844, 18.541540145874023, 17.829803466796875, 16.838096618652344, 16.785614013671875, 16.774499893188477, 16.774499893188477, 16.774499893188477, 16.774499893188477, 16.774499893188477, 16.774499893188477, 16.774499893188477, 16.774499893188477, 16.774499893188477, 16.774499893188477, 16.774499893188477, 16.774499893188477, 16.774499893188477, 16.774499893188477, 16.774499893188477, 16.774499893188477, 16.774499893188477, 16.307510375976562, 16.307510375976562, 14.299720764160156, 13.072839736938477, 12.976553916931152, 12.754639625549316, 12.473944664001465, 12.155938148498535, 12.155938148498535, 12.155938148498535, 12.155938148498535, 12.155938148498535, 12.155938148498535, 12.155938148498535, 12.155938148498535, 12.155938148498535, 12.155938148498535, 12.155938148498535, 12.155938148498535 ], "content": [ "I m implementing Mozilla s persona authentication ie browserid .", "I m interested in using mozilla persona browserid in my site .", "possible duplicate of Is it possible to use Mozilla Persona BrowserID with mobile apps", "Persona BrowserID is not a general-puropse signature scheme .", "http : stackoverflow.com questions 11451190 is-it-possible-to-use-mozilla-persona-browserid-with-mobile-apps", "I found only this Mozilla s Persona BrowserID : Domain + Subdomain login http : stackoverflow.com questions 16703346 mozillas-persona-browserid-domain-subdomain-login but it s not relative .", "but afterwards you can authenticate with Persona .", "Logging in with bad credentials will continually refresh the page which appears to query Persona each time the Persona error : Persona says no .", "Is it possible to use Mozilla Persona to sign data string token .. .", "User clicks on the Persona login link .. . 2 .", "persona does not even connect to my server : Maybe persona fetched .well-known browserid once and now caches it but how can I clear personas cache", "I am trying to write an FirefoxOS app for my portal which uses Mozilla Persona for authentication .", "I have Persona Login on each .", "I d like a minimal user model with verification using Mozilla Persona .", "I am using a custom authentication backend the one given in the book which uses Mozilla Persona as described in the book the chapter in the link .", "We are developing an application using Yesod and MongoDB and we are having users authenticate using Mozilla Persona .", "My server never gets a request at mycustomdomain.com .well-known browserid so persona never tries to really log me in using my server .", "Login with Persona to my site it works .", "I am trying to get a simple site https : github.com mozilla 123done using Mozilla Persona installed locally on ubuntu-12.04 .", "Rest of the issues I have solved using example from developer.mozilla.org ro docs Persona Quick Setup https : developer.mozilla.org ro docs Persona Quick Setup with posting Persona assertion to my own site and it works perfectly .", "Ultimately the UI posts the assertion from the Persona verifier back to my site ie auth login .. . 3 .", "I ve been looking at Mozilla Persona https : login.persona.org but I can t figure out how you would get a user to make an account on my site without having to fill out a normal Sign Up form .", "checkmyipd.org does request my server while persona itself does not .", "However can something similar be done with Persona via code to login programmatically", "I tried to implement persona in my site but i don t get it to work .", "You can find out more in the official documentation https : developer.mozilla.org en-US docs Mozilla Persona Implementing a Persona IdP and in these https : lukasa.co.uk 2013 04 Writing A Persona Identity Provider two http : rfk.id.au blog entry persona-identity-provider blog posts from people who have successfully written their own IdPs .", "For example the Haskell persona library treats the public-key argument opaquely it will certify any arbitrary JSON Value see source https : github.com frasertweedale hs-persona blob v0.1.0.0 src Crypto Persona.hs L163 .", "This leads me to the question : Is persona even able to log people in using thirdparty IDPs or is mozilla s the only one that works at the moment", "So either there s a problem with nodes https implementation or persona does not accept StartSSL certificates. .", "anybody know is possible to use Persona for SSO purposes for cross site login where each site is it s own domain", "If the fingerprint of the keypair used in the connection could be verified by the assertion Persona would be great in combination with webrtc .", "I thought persona will make email and domain bases session and store it on it s own service .", "I do not know if Persona is queried each time or if the message is kept after each page refresh .", "The persona pop-up appears and goes through the steps before closing and reloading the page .", "I do know that Persona says to use the ip over localhost but it doesn t seem to make a difference .", "When I try to log in an external window opens up and persona asks me to sign into backpack as myemail@example.com .", "You will also need to install pyramid whoauth https : github.com mozilla-services pyramid whoauth to get BrowserID support .", "I am doing a front-end heavy web app which does Facebook login already with pure Javascript . .. . .. . Now I wan to include Mozilla Persona I tried to use this URL as verifier : .. . .. . https : verifier.login.persona.org verify .. . .. . But browser is complaining that there is No Access-Control-Allow-Origin header is present on the requested resource .", "Using Persona happens without a hitch until the SSL certificate fails when tossing the authentication success or failure back to the Django app .", "The navigator.id.request API https : developer.mozilla.org en-US docs Web API IdentityManager request does not provide a way to pass arbitrary data into the provisioning workflow so the standard Persona JavaScript would not be able to accomplish this .", "But if I visit 123done.org and try to login with me@mycustomdomain.com it says me that persona does not know this email and offers me to create an idendity .", "I want to make pyramid auth in my app with persona or browser id the problem is that using both of us i see an error .", "The way around this problem is to run your persona code in an invisible iframe hosted on your server .", "I am trying to implement it using regular tutorial : https : developer.mozilla.org en Persona Quick Setup .. . .. . But with this code : .. . .. . I am getting only following error :", "Right now I have to sync signing up to mobile with singing app in the portal - I can login to my site with Persona and to my app .", "In conclusion : if you host customised JavaScript to pass arbitrary data to the IdP rather than a public-key and if the IdP s software treats the public-key as an opaque value then you can sign arbitrary data with Persona .", "The response had HTTP status code 404 . .. . .. . I understand that if I make my verifier and make it CORS-enabled then this will be fixed but my question is can we use the URL above for doing pure Javascript Persona verification", "Even if this can be hacked it might be worth noting in either the django browserid docs or the Persona documentation if someone knows how to remedy this annoying bug .", "The console drops me this when i use persona : .. . .. . and when I use browser ID drops me no modul named browserid .. . .. . This is my code : .. . .. . MY VIEW FILE .. . .. . MY INIT FILE .. . .. . Please tell me what I am doing wrong I m sure that it didn t like how to I import config.include pyramid persona .. . .. . Thanks", "I have implemented a very basic http server using node.js express that handles .well-known browserid requests to provide the public-key and the paths to the provisioning authentication page .", "I have found this post with info that its integrated already : http : identity.mozilla.com post 47114516102 persona-on-firefox-os-phones but I can t find any real examples .", "Question for you : Is your IdP exposing the .well-known browserid support document over HTTPS", "The initial login page now has a red bar which says Could not verify with browserID", "I found it in the Mozilla support forum .", "This can get a bit complicated stitching all the parts together so I recommend having a read of this great writeup http : www.rfk.id.au blog entry painless-auth-pyramid-browserid by Ryan Kelly who works at Mozilla that shows how everything plugs together .", "Looking at your example app and it s sole dependency it seems your trouble is coming from this line https : github.com mozilla django-browserid blob 66641335751b869562ba7a554e61ca56bc880257 django browserid base.py L197 in django browserid .", "I m not familiar with your app or django browserid but if you can pass verify False to https : github.com mozilla django-browserid blob 66641335751b869562ba7a554e61ca56bc880257 django browserid base.py L167 this should solve your problems .", "How I should proceed if I want to achieve : .. . .. . Allow users of my app to signup to my portal using Persona .. . Allow users of my app to login to my portal within the FirefoxOS app and perform some actions with the API .. . Depends if users is logged or not - giving access to different actions .", "I am trying out django-browserid 0.9 with django-1.6 and after configuring the app as per the docs for 0.9 and signing the user in I get : .. . .. . The stacktrace seems to lead to : .. . .. . I have the following setup browserid related : .. . .. . I would greatly appreciate if anyone could point me in the right direction to solve this issue or maybe I am doing something stupid here .", ".. . .. . Update : I was able to get the minimal example to pass using sigmavirus24 s answer by adding the following to my virtualenv s src django browserid base.py .. . .. . This is great and it gets the minimal example to pass and assures me that this isn t really a django browserid or Persona error .", "I want to try and scrape data from the Mozilla Marketplace so that I can have a daily email of downloads and installs that are reported there .", "This behaviour is persistent through restarting the server and the web browser .", "For that you might want to look at JSON Web Signature http : datatracker.ietf.org doc draft-ietf-jose-json-web-signature JWS for which there is library support in many languages .", "Give a holler on mozilla IRC in the identity channel if you run into any speed bumps .", "This is how I understand the process : .. . .. . 1 .", "My site verifies the assertion .. . 4 .", "My site notices there is no user for the asserted email-address .. . 5 .", "What do I do next", "This is where I m a bit confused .", "I think my site would need to make a minimal account and then ask the user to fill out a more comprehensive set of data : name age favorite color.. . .. . .. . Can anyone give examples of how this is done", ".. . .. . I was looking at a few sites : .. . .. . 1 .", "http : 123done.org seems the the account is really just the email-address .", "Once you sign in the site can make the local user just with the verified assertion .", "2 .", "https : ting.com Seems to do it wrong .", "You need to sign up with Ting directly give a username password", "You ve got the right idea .", "If you notice that the email you get doesn t map to an existing account then you show a sign up form to the user where they need to enter their name and anything else that your site needs .", "Or you do like I did in Zookeepr https : github.com zookeepr zookeepr : .. . .. . all profile fields are optional in the DB except for email .. . I immediately create a new account and log the user in when I get a new email .. . whenever someone logs in and some of their profile fields are missing they are shown a please enter this missing info screen before they can do anything else .. . .. . There are of course lots of other ways to do the same thing .", "If you have any other questions feel free to jump on our mailing list https : www.mozilla.org about forums dev-identity .", "There are lots of people on there that could tell you how they implemented it on their site .", "I have two different instances running on one domain thought a NGINX proxy and acting like one web app .", "If I stop the server and close the browser and reopen both entering in the web address again the page is already logged in .", "So if I understand correctly - I should expose authentication process to my webpage thus run these javascripts on my webpage not directly on the device", "But the first step is just to get watch and request working properly in a web page you visit from FirefoxOS or any other browser .", "You should open a different question with your new question .", "I m trying to build a simple web app using Django .", "In the case where you don t have a privileged app I was suggesting that the code to run watch and request could live in an iframe served from your web page .", "Logging in with it already works pretty well .", "But I also want to act as an indentity provider for users that want to create an email adress with my domain .", "Third-party identity providers do work today .", "Are you using SNI https : en.wikipedia.org wiki Server Name Indication", "Yes everything is available over https .", "And since I host multiple-domains on the same server I also use SNI .", "The whole server runs on node.js .", "well I checked it .", "Try running your IdP through checkmyidp.org https : checkmyidp.org", "And if you are still running into problems feel free to ask for help on our mailing list https : www.mozilla.org about forums dev-identity or on identity irc.mozilla.org .", "Thanks for the link .", "It currently does not work but at least I can check it through checkmyidp.org at the moment :" ] }
{ "confidence": [ 75.60308074951172, 74.07057189941406, 68.35200500488281, 58.63921356201172, 58.14286422729492, 56.514305114746094, 54.956146240234375, 53.78199768066406, 52.0556526184082, 46.80837631225586, 46.13737106323242, 38.65174102783203, 38.65174102783203, 38.65174102783203, 36.5450325012207, 36.5450325012207, 35.82810974121094, 33.577735900878906, 28.888797760009766, 12.218213081359863 ], "content": [ "Question : Is it possible to use Mozilla Persona to sign data string token .. . I would like to pass a string of data with the navigator.id.request then transfer the assertion on an un-trusted medium and retrieve the data upon verifying . Comment : possible duplicate of Is it possible to use Mozilla Persona BrowserID with mobile apps http : stackoverflow.com questions 11451190 is-it-possible-to-use-mozilla-persona-browserid-with-mobile-apps .. . Answer : Persona BrowserID is not a general-puropse signature scheme . For that you might want to look at JSON Web Signature http : datatracker.ietf.org doc draft-ietf-jose-json-web-signature JWS for which there is library support in many languages . The navigator.id.request API https : developer.mozilla.org en-US docs Web API IdentityManager request does not provide a way to pass arbitrary data into the provisioning workflow so the standard Persona JavaScript would not be able to accomplish this . You would have to use customised JavaScript that provides the provisioning callback with custom data rather than a public-key object . If you get this far whether you can get the identity provider to sign arbitrary data will depend on how the IdP software treats the public-key argument . For example the Haskell persona library treats the public-key argument opaquely it will certify any arbitrary JSON Value see source https : github.com frasertweedale hs-persona blob v0.1.0.0 src Crypto Persona.hs L163 . On the other hand if the IdP software expects to parse a valid key object in the format generated by the JavaScript mediator code then you will not be able to sign arbitrary data . In conclusion : if you host customised JavaScript to pass arbitrary data to the IdP rather than a public-key and if the IdP s software treats the public-key as an opaque value then you can sign arbitrary data with Persona . Comment : Thank you for the confirmation . I m looking into webrtc identity problem . If the fingerprint of the keypair used in the connection could be verified by the assertion Persona would be great in combination with webrtc .", "Question : I m interested in using mozilla persona browserid in my site . Logging in with it already works pretty well . But I also want to act as an indentity provider for users that want to create an email adress with my domain . I have implemented a very basic http server using node.js express that handles .well-known browserid requests to provide the public-key and the paths to the provisioning authentication page . But if I visit 123done.org and try to login with me@mycustomdomain.com it says me that persona does not know this email and offers me to create an idendity . My server never gets a request at mycustomdomain.com .well-known browserid so persona never tries to really log me in using my server . This leads me to the question : Is persona even able to log people in using thirdparty IDPs or is mozilla s the only one that works at the moment .. . Answer : Third-party identity providers do work today . You can find out more in the official documentation https : developer.mozilla.org en-US docs Mozilla Persona Implementing a Persona IdP and in these https : lukasa.co.uk 2013 04 Writing A Persona Identity Provider two http : rfk.id.au blog entry persona-identity-provider blog posts from people who have successfully written their own IdPs . Question for you : Is your IdP exposing the .well-known browserid support document over HTTPS Are you using SNI https : en.wikipedia.org wiki Server Name Indication Comment : Yes everything is available over https . And since I host multiple-domains on the same server I also use SNI . The whole server runs on node.js . So either there s a problem with nodes https implementation or persona does not accept StartSSL certificates. . Comment : well I checked it . persona does not even connect to my server : Maybe persona fetched .well-known browserid once and now caches it but how can I clear personas cache Comment : Try running your IdP through checkmyidp.org https : checkmyidp.org Comment : And if you are still running into problems feel free to ask for help on our mailing list https : www.mozilla.org about forums dev-identity or on identity irc.mozilla.org . Comment : Thanks for the link . checkmyipd.org does request my server while persona itself does not . It currently does not work but at least I can check it through checkmyidp.org at the moment :", "Question : null .. . Answer : I have two different instances running on one domain thought a NGINX proxy and acting like one web app . I have Persona Login on each . I thought persona will make email and domain bases session and store it on it s own service . This way i ll have one login for both instances . But it worked differently and now i have two different logins . Is it possible to sync this sessions And what dereliction i should lookup I found only this Mozilla s Persona BrowserID : Domain + Subdomain login http : stackoverflow.com questions 16703346 mozillas-persona-browserid-domain-subdomain-login but it s not relative .", "Question : I want to make pyramid auth in my app with persona or browser id the problem is that using both of us i see an error . The console drops me this when i use persona : .. . .. . and when I use browser ID drops me no modul named browserid .. . .. . This is my code : .. . .. . MY VIEW FILE .. . .. . MY INIT FILE .. . .. . Please tell me what I am doing wrong I m sure that it didn t like how to I import config.include pyramid persona .. . .. . Thanks .. . Answer : From this error : .. . .. . You can tell Python cannot find the pyramid persona module . Perhaps because its not installed . You should install it with pip install pyramid persona . You will also need to install pyramid whoauth https : github.com mozilla-services pyramid whoauth to get BrowserID support . This can get a bit complicated stitching all the parts together so I recommend having a read of this great writeup http : www.rfk.id.au blog entry painless-auth-pyramid-browserid by Ryan Kelly who works at Mozilla that shows how everything plugs together . Comment : Hi Burhan tanks for answer me I have installed but now I have a lot of errors making my buildout kind of errors like : KeyError : repoze.lru : package not found WTF is repoze.lru Comment : Do you have a setup.py Looks like you are missing a lot of packages . repose.lru https : pypi.python.org pypi repoze.lru E2 80 8E is Least Recently Used cache API . I think you need to make sure everything is okay with your setup .", "Question : I created a backpack account a few days ago . When I try to log in an external window opens up and persona asks me to sign into backpack as myemail@example.com . I press sign in and I get a message that says verified The external window then closes . The initial login page now has a red bar which says Could not verify with browserID Please see screen shot image . Error Message http : i.stack.imgur.com q4rgG.png .. . .. . How can I fix this issue .. . Answer : This solution worked . I found it in the Mozilla support forum . Credit goes entirely to the user cor-el .", "Question : I m trying to build a simple web app using Django . I d like a minimal user model with verification using Mozilla Persona . Using Persona happens without a hitch until the SSL certificate fails when tossing the authentication success or failure back to the Django app . I know there is a lot on Stack Overflow already about SSL errors but I haven t turned up anything that works in this case . For example trying to use verify False when using the requests package still produces the error . I was able to replicate the error in a minimal example app using the default settings for a new Django project and following the boilerplate installation for django browserid . Even if this can be hacked it might be worth noting in either the django browserid docs or the Persona documentation if someone knows how to remedy this annoying bug . I ve put this minimal example with instructions on GitHub.com at : .. . .. . https : github.com pedmiston ssl error .. . .. . The actual error is with blob substituted in-place of the assertion . I m on OSX Mavericks . .. . .. . Update : I was able to get the minimal example to pass using sigmavirus24 s answer by adding the following to my virtualenv s src django browserid base.py .. . .. . This is great and it gets the minimal example to pass and assures me that this isn t really a django browserid or Persona error . However it does just kind of by-pass the merits of the verification procedure . Now that the error has been localized any suggestions for how to fix it I ve been reading that there were some changes in OS X when Mavericks came around in a switch from open ssl to Apple s own Secure Transport engine . If this is the cause of the problem I m having then it might be worth knowing for others who run into a similar problem when using Mavericks . .. . Answer : Looking at your example app and it s sole dependency it seems your trouble is coming from this line https : github.com mozilla django-browserid blob 66641335751b869562ba7a554e61ca56bc880257 django browserid base.py L197 in django browserid . I m not familiar with your app or django browserid but if you can pass verify False to https : github.com mozilla django-browserid blob 66641335751b869562ba7a554e61ca56bc880257 django browserid base.py L167 this should solve your problems . In other words if you specify which Verifier you use then it should do something like .. . .. . Of course you didn t show any code where you were doing that so that could be what you meant when you said : .. . .. . For example trying to use verify False when using the requests package still produces the error . But I can t tell that from the code you have posted . Comment : Thanks sigmavirus24 . I updated my answer to reflect that you were right on in assuming that I wasn t passing the verify False parameter correctly . However I ve moved the goalposts a bit : Any chance you can help me get logged in without bypassing the verification procedure Comment : @pedmiston moving the goal posts is not allowed . You should open a different question with your new question . Further my advice was not to modify the library s source but to change your usage of it as it would seem possible to do . Comment : As per your request : stackoverflow.com questions 25835554 http : stackoverflow.com questions 25835554 ssl-certificate-verification-failure-in-python-on-mavericks", "Question : I am trying to write an FirefoxOS app for my portal which uses Mozilla Persona for authentication . How I should proceed if I want to achieve : .. . .. . Allow users of my app to signup to my portal using Persona .. . Allow users of my app to login to my portal within the FirefoxOS app and perform some actions with the API .. . Depends if users is logged or not - giving access to different actions . I have found this post with info that its integrated already : http : identity.mozilla.com post 47114516102 persona-on-firefox-os-phones but I can t find any real examples . What type of application I need to create webapp or privileged I am trying to implement it using regular tutorial : https : developer.mozilla.org en Persona Quick Setup .. . .. . But with this code : .. . .. . I am getting only following error : .. . Answer : One thing is to make sure you re calling watch to setup callbacks before you call request . For example something like this in your page : .. . .. . Here s an example that shows this in action : .. . .. . https : people.mozilla.org jparsons persona example.html .. . .. . However on FirefoxOS you should be aware that installed apps not packaged or certified but generic installed apps are given a unique origin of the form app : uuid with a different uuid for each device . This is unfortunately useless for sign-in purposes because there s no way for your server to know whether an app requesting sign-in is friend or foe . The way around this problem is to run your persona code in an invisible iframe hosted on your server . Thus the iframe will have the correct origin and your server will know it s your app . The iframe and the app can communicate via postMessage . In the case of a packaged app sometimes called a privileged app your origin will be the origin declared in your webapp manifest . E.g . app : yourapp.yoursite.org . This gives you better assurance that the app is really yours but the truly paranoid may still wish to deploy the iframe trick . Hope this helps j Comment : So if I understand correctly - I should expose authentication process to my webpage thus run these javascripts on my webpage not directly on the device Comment : You would always run watch and request on the device . In the case where you don t have a privileged app I was suggesting that the code to run watch and request could live in an iframe served from your web page . But the first step is just to get watch and request working properly in a web page you visit from FirefoxOS or any other browser . Is that working Comment : Login with Persona to my site it works . Right now I managed to make it working - from mobile . Right now I have to sync signing up to mobile with singing app in the portal - I can login to my site with Persona and to my app . Have to figureout best way how to pass info that user got signed in . Thanks Comment : Great Glad it s working . Give a holler on mozilla IRC in the identity channel if you run into any speed bumps . Cheers j Comment : Rest of the issues I have solved using example from developer.mozilla.org ro docs Persona Quick Setup https : developer.mozilla.org ro docs Persona Quick Setup with posting Persona assertion to my own site and it works perfectly . Thanks", "Question : null .. . Answer : I am doing a front-end heavy web app which does Facebook login already with pure Javascript . .. . .. . Now I wan to include Mozilla Persona I tried to use this URL as verifier : .. . .. . https : verifier.login.persona.org verify .. . .. . But browser is complaining that there is No Access-Control-Allow-Origin header is present on the requested resource . Origin http : localhost : 8080 is therefore not allowed access . The response had HTTP status code 404 . .. . .. . I understand that if I make my verifier and make it CORS-enabled then this will be fixed but my question is can we use the URL above for doing pure Javascript Persona verification", "Question : I ve been looking at Mozilla Persona https : login.persona.org but I can t figure out how you would get a user to make an account on my site without having to fill out a normal Sign Up form . This is how I understand the process : .. . .. . 1 . User clicks on the Persona login link .. . 2 . Ultimately the UI posts the assertion from the Persona verifier back to my site ie auth login .. . 3 . My site verifies the assertion .. . 4 . My site notices there is no user for the asserted email-address .. . 5 . What do I do next This is where I m a bit confused . I think my site would need to make a minimal account and then ask the user to fill out a more comprehensive set of data : name age favorite color.. . .. . .. . Can anyone give examples of how this is done .. . .. . I was looking at a few sites : .. . .. . 1 . http : 123done.org seems the the account is really just the email-address . Once you sign in the site can make the local user just with the verified assertion . 2 . https : ting.com Seems to do it wrong . You need to sign up with Ting directly give a username password but afterwards you can authenticate with Persona . .. . Answer : You ve got the right idea . If you notice that the email you get doesn t map to an existing account then you show a sign up form to the user where they need to enter their name and anything else that your site needs . Or you do like I did in Zookeepr https : github.com zookeepr zookeepr : .. . .. . all profile fields are optional in the DB except for email .. . I immediately create a new account and log the user in when I get a new email .. . whenever someone logs in and some of their profile fields are missing they are shown a please enter this missing info screen before they can do anything else .. . .. . There are of course lots of other ways to do the same thing . If you have any other questions feel free to jump on our mailing list https : www.mozilla.org about forums dev-identity . There are lots of people on there that could tell you how they implemented it on their site .", "Question : Django v1.7 .. . .. . I ve been working through this book http : chimera.labs.oreilly.com books 1234000000754 ch16.html which is fantastic btw and I thought I had everything working . All of the tests functional and unit but for some reason every time I hit the logout button I am immediately logged back in . I am using a custom authentication backend the one given in the book which uses Mozilla Persona as described in the book the chapter in the link . I have seen a few similar posts but none of the solutions helped . Behaviour : .. . .. . 1 . Logging in with bad credentials will continually refresh the page which appears to query Persona each time the Persona error : Persona says no . Json was : status : failure reason : audience mismatch : domain mismatch --I accidentally discovered this by visiting 127.0.0.1 : 8000 instead of localhost : 8000 . I do not know if Persona is queried each time or if the message is kept after each page refresh . 2 . The initial login appears to work correctly . The persona pop-up appears and goes through the steps before closing and reloading the page . 3 . After logging out the page will refresh sending post information and logging back in : 06 Nov 2015 21 : 25 : 20 GET accounts logout HTTP 1.1 302 0 06 Nov 2015 21 : 25 : 20 GET HTTP 1.1 200 795 06 Nov 2015 21 : 25 : 21 POST accounts login HTTP 1.1 200 2 The logout is redirected back to the root page . 4 . This behaviour is persistent through restarting the server and the web browser . If I stop the server and close the browser and reopen both entering in the web address again the page is already logged in . 5 . This behaviour also persists through different git branches . I am not sure when it started because the tests still pass but I know it worked previously . Every branch I checked has the same issue which makes me think it s something to do with the cache or installation . 6 . The behaviour also persists through removing all pycache migrations and the database itself . 7 . The behaviour persists through clearing the cache . EDIT UPDATE : I m still writing this so it s not technically an update...I had previously emptied the cache only for Today Firefox which had no effect however I just cleared everything and it seems to have solved the problem . I need to do more testing I ll update once I m sure . I do know that Persona says to use the ip over localhost but it doesn t seem to make a difference . Here s a minimal working example : .. . .. . placeholder.html NOTE : I put the scripts in the body . accounts views.py NOTE : I was using Django native auth.logout which you will see in urls.py .. . .. . urls.py .. . .. . accounts urls.py NOTE : I was using the native logout--neither method works .. . .. . authentication.py NOTE : This is directly from the book .. . .. . EDIT UPDATE Again while I was writing this . It would appear that this problem has already been solved here https : github.com hjwp book-example commit b56ff8126e5d7225a59e43c1cec95ac035629cd8 . I have a physical copy of the book but going back through and verifying everything using the online copy I just found the link pointing to this code . I ll leave this up just in case someone else is having this problem...or I ll remove it if I can find the same problem pointing to the same solution . Comment : I just want to say that I hit the same bug thank you so much for the solution .. . Answer : From above : .. . .. . It would appear that this problem has already been solved here https : github.com hjwp book-example commit b56ff8126e5d7225a59e43c1cec95ac035629cd8 . I have a physical copy of the book but going back through and verifying everything using the online copy I just found the link pointing to this code . I ll leave this up just in case someone else is having this problem...or I ll remove it if I can find the same problem pointing to the same solution .", "Question : I want to try and scrape data from the Mozilla Marketplace so that I can have a daily email of downloads and installs that are reported there . This is all fine and I have done this is many other place simulating HTTP Post for a normal login form . However can something similar be done with Persona via code to login programmatically .. . Answer : A few of the tools and work-arounds are mentioned in this thread : https : groups.google.com d topic mozilla.dev.identity BkvU9FJQ5Uw discussion .. . .. . Feel free to ask for more information there .", "Question : I m implementing Mozilla s persona authentication ie browserid . So I have the following onLogin : .. . .. . Where there s the alert do reload I normally have a window.location.reload call . The problem is that nonetheless all my efforts to clear and not use the browser-cache Firefox my webservice.php page doesn t get called at all . The ajax call immediately executes the success function which keeps my window reloading in a dramatic loop if I leave the reload call in the code . I need the PHP session id in my webservice.php call so I pass the PHPSESSIONID cookie to the page . I cleared my firefox cache . I closed my browser I added the sFoolCache variable to the url and not the post but it didn t work either . I m lost . Comment : My guess is that your webservice.php is not located in the top level directory . What response do you get if you enter http : your host webservice.php in your browser Comment : Also success error and such properties are depracated as of jQuery 1.8 . Use .ajax .done function data .. . instead . Check here http : api.jquery.com jquery.ajax for more info . Comment : I knew my webservice.php url was good should have told you that in my question thanks Andy . @Michal : Pheew blabla.done . And that did it . Awsome Thanks : - Comment : Glad it helped : .. . Answer : Looks like there s problem with passing URL Try passing Full URL :", "Question : I m implementing Mozilla s persona authentication ie browserid . So I have the following onLogin : .. . .. . Where there s the alert do reload I normally have a window.location.reload call . The problem is that nonetheless all my efforts to clear and not use the browser-cache Firefox my webservice.php page doesn t get called at all . The ajax call immediately executes the success function which keeps my window reloading in a dramatic loop if I leave the reload call in the code . I need the PHP session id in my webservice.php call so I pass the PHPSESSIONID cookie to the page . I cleared my firefox cache . I closed my browser I added the sFoolCache variable to the url and not the post but it didn t work either . I m lost . Comment : My guess is that your webservice.php is not located in the top level directory . What response do you get if you enter http : your host webservice.php in your browser Comment : Also success error and such properties are depracated as of jQuery 1.8 . Use .ajax .done function data .. . instead . Check here http : api.jquery.com jquery.ajax for more info . Comment : I knew my webservice.php url was good should have told you that in my question thanks Andy . @Michal : Pheew blabla.done . And that did it . Awsome Thanks : - Comment : Glad it helped : .. . Answer : As it appeared to help in this case I m undeleting this answer .. . .. . Check here : http : api.jquery.com jquery.ajax .. . .. . Deprecation Notice : The jqXHR.success jqXHR.error and jqXHR.complete callbacks are deprecated as of jQuery 1.8 . To prepare your code for their eventual removal use jqXHR.done jqXHR.fail and jqXHR.always instead . Use this instead : Comment : That s it . Here s how I rewrote it to make it work : See next post sorry", "Question : I m implementing Mozilla s persona authentication ie browserid . So I have the following onLogin : .. . .. . Where there s the alert do reload I normally have a window.location.reload call . The problem is that nonetheless all my efforts to clear and not use the browser-cache Firefox my webservice.php page doesn t get called at all . The ajax call immediately executes the success function which keeps my window reloading in a dramatic loop if I leave the reload call in the code . I need the PHP session id in my webservice.php call so I pass the PHPSESSIONID cookie to the page . I cleared my firefox cache . I closed my browser I added the sFoolCache variable to the url and not the post but it didn t work either . I m lost . Comment : My guess is that your webservice.php is not located in the top level directory . What response do you get if you enter http : your host webservice.php in your browser Comment : Also success error and such properties are depracated as of jQuery 1.8 . Use .ajax .done function data .. . instead . Check here http : api.jquery.com jquery.ajax for more info . Comment : I knew my webservice.php url was good should have told you that in my question thanks Andy . @Michal : Pheew blabla.done . And that did it . Awsome Thanks : - Comment : Glad it helped : .. . Answer : So Thanks to @Michal here s how I rewrote it to make it work btw I had to answer myself as my comment was otherwise too long : .. . .. . Please vote for Michal s answer up here not this one - Thanks guys .", "Question : anybody know is possible to use Persona for SSO purposes for cross site login where each site is it s own domain Very similar to 37signals and how they set up basecamp Highrise and campfire . Would like to have user create something similar to a 37-signals ID . thanks . .. . Answer : If all of your sites share a common domain e.g . foo.example.com and bar.example.com then you could have a login server say login.example.com that sets an example.com -wide cookie that each subdomain can use . For cross-domain sites there has been a realm proposal https : groups.google.com d topic mozilla.dev.identity z3d wj6Jjq0 discussion but it s not currently being worked on .", "Question : I tried to implement persona in my site but i don t get it to work . Here is a fiddle : http : jsfiddle.net cMeUp but i don t even get a popup . Do you guys know anything thats wrong with it Greetings .. . Answer : in your code your using login as a class not as an id .. . .. . your code : .. . .. . try : .. . .. . as you are using login as a selector . here s a working JSFiddle http : jsfiddle.net cMeUp 1 Comment : thanks Your right that was the problem Comment : if it helps vote up or mark as correct : Comment : that was right but stackoverflow say that i had to waith 2 minutes", "Question : I am trying to get a simple site https : github.com mozilla 123done using Mozilla Persona installed locally on ubuntu-12.04 . However I ran into problems getting it to install and run . I get an error message about node-waf not found if I am using the latest version of nodejs 0.10.24 installed from source . Looking into the issue I found http : stackoverflow.com a 16486055 3188582 that the node-waf function was removed in version 0.9.1 . So I uninstalled 0.10.24 and installed 0.9.0 . Now I can npm-install without error but run into the follow error when I npm start : .. . .. . The contents of npm-debug.log are : .. . .. . I m fairly new with node so I haven t the slightest idea what problem this error indicates . Anyone have suggestions for getting npm start to work correctly Comment : node 0.9 is a development branch of 0.10 I would avoid using that . On my local machine Ubuntu 12.04 I can npm-install 123done just fine using node 0.10.24 . Comment : @FrancoisMarier Thanks After completely removing node and installing 0.10.24 I deleted the 123done repo and cloned again . Now I am able to npm-install and npm start without any issue . .. . Answer : After completely removing node and installing 0.10.24 I deleted the 123done repo and cloned again . Now I am able to npm-install and npm start without any issue", "Question : null .. . Answer : We are developing an application using Yesod and MongoDB and we are having users authenticate using Mozilla Persona . However we have a development database that we use across development machines and also on our staging machine . Anytime development or testing data is added or removed from staging we synchronize it with the development machines using Docker . Here is the problem : even though our databases are exactly the same thanks to Docker we are encountering a situation in which we are able to log into the application on staging but not on the development machines . Basically Yesod refuses to log the application . Any ideas as to why is this happening Thank you in advance . Comment : Your say Yesod refuses to log the application . What does Yesold do need in order to log the application Access to an account a Tcpip Ip port listening What does docker logs xxx show Comment : Welcome to StackOverflow In order to get help with this question you need to provide more details on your configuration and what you ve tried so far in order to troubleshoot the problem . For example have you looked at your Yesod MongoDB logs Have you compared the databases to confirm they are actually the same at least as far as required collections data for Yesod If your configuration works on staging but not on development perhaps there is a hard-coded value referring to the staging environment . There must be a more specific error than refuses to log in .", "Question : I am trying out django-browserid 0.9 with django-1.6 and after configuring the app as per the docs for 0.9 and signing the user in I get : .. . .. . The stacktrace seems to lead to : .. . .. . I have the following setup browserid related : .. . .. . I would greatly appreciate if anyone could point me in the right direction to solve this issue or maybe I am doing something stupid here . Many thanks . .. . Answer : I found the fix - I think I was pretty stupid on this - the error message was self explanatory : .. . .. . problem solved . apologies to whoever read the problem Comment : In case it is not clear to readers what John is saying is that you cannot mix and match localhost and 127.0.0.1 - use one or the other in both your settings and to visit your site in the browser . I only disagree that this is stupid - this is the kind of thing that is easy to miss when I m thinking too hard about something.. .", "Question : null .. . Answer : We re trying to migrate to an 8x SSD RAID on Linux software raid on Linux 3.0.3 . Our previous server config was 96GB of memory which was rather expensive per month . Our goal is to migrate to SSDs which are about 1 2 to 1 3rd the price . The problem we re having is that it s not keeping up with our replication load and is falling behind . After a bunch of tuning we noticed the following IO load : .. . .. . IO load http : i.imgur.com OPNjJc7.png .. . .. . You can see that we re writing at a pretty solid rate.. . about 180MB s at the peaks . But I m trying to figure out why we re falling of so significantly . As soon as reads come into the equation performance completely falls . The server isn t doing much reading it s just that it completely destroys our write throughput . I ve made a number of reasonable SSD performance changes . We re on XFS with noatime and nobarrier . The drives we re using are Micron p300s at 100GB each . We have 8x of them on an Adaptec RAID controller on a 16 core 2.8Ghz X5570 . It s a RAID 0 setup . The RAID stripe size is 256k . I played with smaller stripe sizes and this seemed like the best value . The IO scheduler is now noop . We tried deadline as well and performance was about the same . Here s a raw pastebin of our MySQL config . http : pastebin.com raw.php i Bn13Hhj9 .. . .. . The important changes we made are : .. . .. . our buffer pool size is about 42GB .. . the box has 48GB . One obvious change I d like to make is to use 4k pages . However that s a days at LEAST worth of work because I have to do a full mysqldump of the entire database and re-import . But honestly that might just resolve the situations because in theory I would be writing reading 1 4 of the data . But it still confuses me that the reads are causing such a massive write falloff . Any feedback would be appreciated . It might also help me resolve the problem by triggering an idea ." ] }
[ "yes-answer-long", "yes-answer-short" ]
mozilla
UNK_RELATION
sdl@3d@148
sdl -- sdl - simple directmedia layer is a cross-platform multimedia library designed to provide low-level access to audio keyboard mouse joystick @placeholder hardware via opengl and 2d video framebuffer .
{ "confidence": [ 103.6024398803711, 63.10662078857422, 54.990943908691406, 47.15523147583008, 42.231319427490234, 42.005523681640625, 41.79804611206055, 41.461830139160156, 41.39414596557617, 41.274864196777344, 41.259769439697266, 41.16849136352539, 40.89469909667969, 40.765995025634766, 40.73695373535156, 40.22791290283203, 40.10686492919922, 40.02804183959961, 39.95905685424805, 39.894142150878906, 39.737342834472656, 39.67008972167969, 39.64716339111328, 39.5989990234375, 39.447410583496094, 39.417938232421875, 39.39409637451172, 39.39409637451172, 39.39409637451172, 39.39409637451172, 39.041160583496094, 38.66769027709961, 38.05302429199219, 38.05302429199219, 37.89063262939453, 37.6920051574707, 37.568214416503906, 37.540748596191406, 37.37667465209961, 37.23259735107422, 37.22251892089844, 36.97683334350586, 36.914947509765625, 36.61229705810547, 36.61229705810547, 36.36602783203125, 36.24162673950195, 36.227142333984375, 36.227142333984375, 36.123043060302734, 36.07243347167969, 36.072059631347656, 35.91058349609375, 35.91058349609375, 35.89447784423828, 35.83523941040039, 35.83523941040039, 35.830467224121094, 35.830467224121094, 35.830467224121094, 35.830467224121094, 35.830467224121094, 35.830467224121094, 35.814308166503906, 35.814308166503906, 35.68208312988281, 35.66889953613281, 35.65963363647461, 35.606571197509766, 35.5965690612793, 35.508392333984375, 35.403865814208984, 35.3774299621582, 35.36833953857422, 35.23828125, 35.226646423339844, 35.21255874633789, 35.21255874633789, 35.14349365234375, 35.11953353881836, 35.11067199707031, 35.0989875793457, 34.99996566772461, 34.948360443115234, 34.93885803222656, 34.8916015625, 34.87133026123047, 34.85478210449219, 34.830875396728516, 34.830875396728516, 34.830875396728516, 34.830875396728516, 34.830875396728516, 34.813411712646484, 34.496788024902344, 34.43550109863281, 34.43550109863281, 34.37911605834961, 34.37911605834961, 34.237422943115234 ], "content": [ "SDL http : en.wikipedia.org wiki Simple DirectMedia Layer .. . .. . SDL Simple DirectMedia Layer is a cross-platform development library designed to provide low-level access to audio keyboard mouse joystick and graphics hardware via OpenGL .", "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 .", "Of note to others is that SDL is the Simple DirectMedia Layer : http : www.libsdl.org", "SDL is quite low-level and that needs to be done manually .", "then i need to draw it in SDL OpenGL surface .", "I m writing a 2D game using SDL and OpenGL in the D programming language .", "I have been learning about SDL 2D programming for a while and now I wanted to create a program using SDL and OpenGL combined .", "In the first SDL it was in the src video windx5", "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", "There is an SDL 1.2 game that creates an OpenGL context via SDL SetVideoMode with SDL OPENGLBLIT flag .", "Should be a simple question for SDL experts .", "By default SDL will not explictely request a framebuffer with an alpha channel .", "SDL is designed to work with concurrency it has a thread library in it but there are of course some rules .", "Sdl is a C library", "I m developing a simple sprite-based 2D game in C++ that uses OpenGL for hardware-accelerated rendering and SDL for window management and user input handling .", "Cross-posted from gamedev.stackexchange.com http : gamedev.stackexchange.com questions 41954 sdl-displayformat-works-but-not-sdl-displayformatalpha", "If SDL isn t an option can anyone reccomend an alternative framework to look at that will bridge the gap between SDL and the native libraries like OpenGL ES and Core Audio", "http : www.sdltutorials.com sdl-tip-sdl-surface-to-opengl-texture .. . .. . Both the rendering process and the opengl texture are the same as the tutorials .", "OpenGL http : en.wikipedia.org wiki OpenGL .. . .. . OpenGL Open Graphics Library is cross-platform API for rendering 2D and 3D graphics .", "Remember that SDL is a C library and not a C++ library .", "i want to move SDL window .. . with keyboard", "SDL 1.2.15 from the SDL site .", "SDL 2 may provide better error messages .", "Can I still use a cross-platform windowing library such as SDL or GLFW with this configuration", "Is it possible at all for SDL to ask OpenGL to perform the color correction when writing on the FrameBuffer 0", "GLUT SDL is a library for handling various things like window keyboard and mouse control as well as listening .", "I am in the process of learning openGL and SDL .", "Qt s widgets do not play nicely with OpenGL SDL .", "...comes to this results : .. . .. . Results : OpenGL-object in SDL-window : .. . .. .", "Or maybe resize the SDL-window to the OpenGL object .", "This seems to be a deficit in the SDL library bindings then .", "I m using OpenGL and SDL to create window in my program .", "The hardest part for me was porting my SDL code to SDL-1.3 and porting my OpenGL code to OpenGLES .", "I am creating an SDL-OpenGL application in D . I am using the Derelict SDL binding to accomplish this .", "In the DrawText function you are blitting the surface using SDL and rendering with OpenGL .", "I have a project that uses SDL 1.2 and want to migrate it to SDL 2.0 .", "Any other way to force SDL to use OpenGL", "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", "They didn t with sdl image1 .", "I am doing my code for a simple game using SDL library .", "I m trying to do multisampling with SDL opengl but SDL won t accept setting SDL MULTISAMPLEBUFFERS and SDL MULTISAMPLESAMPLES .", "SDL uses OS standard drivers to abstract out hardware-acceleration etc for video cards which DOS does not have .", "When I removed the SDL in every line that said SDL blah.h", "Is it possible to use JPEG2000 in SDL", "Is there a way to do this on sdl-1.2", "For hardware that supports double-buffering regular SDL distinguishes between SDL Flip and SDL UpdateRect .", "Does any one have a working example of PBO s Pixel Buffer Objects + SDL2.0 Simple DirectMedia Layer + OpenGL", "Because I ve experienced that if I create a SDL renderer the OpenGL scene will disappear and be overdrawn by the SDL renderer .", "If you must use SDL you ll need a method to copy an OpenGL texture to an SDL surface texture .", "I m using SDl-Mixer for audio and Reactive-Banana for the game in general .", "This might not be your problem but when I had a similar issue it was that the Garbage Collector could not tell that I was still using the SDL audio chunk because only SDL was using it and free d the RAM out from under SDL .", "I wrote a simple SDL program : .. . .. . using Code : Blocks .", "Also is there any reason you are using SDL 1.2 instead of SDL 2.0", "this function is defined in SDL 2.0 but i am using SDL 1.2 .", "update .. . .. . The program is a video game utilizing SDL .", "In SDL 1.2 there is SDL HasMMXExt .", "In SDL 2 that function is missing .", "So how would I do this within SDL or openGL", "I have a sdl opengl game I am working on for fun .", "I m using SDL to handle window management and events and OpenGL for the 3D rendering .", "C++ SDL OpenGl : : : .. . 1 . on main thread : SDL CreateWindow .. . 2 .", "It s a C++ OpenGL and SDL game on Visual Studio 2010 .", "I m setting up an OpenGL c++ program with SDL as the wrapper .", "I m trying to draw a 2D HUD over a 3D Scene and therefor I m useing the opengl rendering set up on SDL .", "So the question is : Is it possible to Draw 2D things with SDL over the 3D scene or do I need to draw them with opengl", "SDL .. . .. . 2D graphics API .. . Audio API .. . Threads Timers Shared Object API .. . .. . GLFW .. . .. . No extra API .. . .. . So reasons to use SDL include if you want to use their extra APIs .", "it is most likely that the memory leak is in the SDL library .", "Put something like this : SDL -L path to installed SDL libraries -lSDL -lSDL mixer .. . .. . Note that in : g++ SDL -c the variable SDL is irrelevant once your are not linking into your program but just generating the objects .", "Via this SDL mailing list post http : lists.libsdl.org pipermail sdl-libsdl.org 2008-June 065521.html it seems that the sdl development tools ship with a sdl-config script that you can use with the --static-libs flag to determine what linker flags you need to use .", "This could be something you re doing in SDL or a platform-related issue .", "I am currently making a simple game with SDL in C++ .", "I am trying to build a video-player using both FFmpeg and SDL .", "The SDL updates the position of the mouse internally in SDL PrivateSendMouseMotion http : hg.libsdl.org SDL file 54c06b0f65d9 src events SDL mouse.c l191 which is called by various mouse related functions in the same file .", "Probably that mp3 file was somehow corrupted or it was an error in the SDL library .", "Have a read through this to see if it helps at all - barbieri-playground.googlecode.com svn sdl sdl-mplayer.c http : barbieri-playground.googlecode.com svn sdl sdl-mplayer.c", "@Sec those are requirements pulled in because the SDL static library uses them .", "I was using include SDL SDL.h .", "What about the one included with SDL", "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 .", "I am making an Sdl game it s 2d shooter .", "There is no simple solutions when it comes to threading and here you would have SDL Qt and OpenGL mainloop interacting .", "Thus if you do not move the mouse no event is dispatched and the SDL does not know where the mouse is .", "I m working on an application which uses SDL 1.2.15 with OpenGL .", "I m writing a very simple game with C++ and SDL SDL mixer .", "SDL doesn t require OpenGL and isn t directly an OpenGL utility library mainly but it can be used with OpenGL but also with other things as well .", "SDL uses OpenGL or in some cases Direct3D and OpenGL has internal state which affects the GL calls in your program .", "SDL initialization code : .. . .. . OpenGL initialization code : .. . .. . Texture loading code : .. . .. . Rendering code : .. . .. . My program uses Derelict2 a library that provides SDL and OpenGL bindings for D . .. . .. . Any ideas on exactly what is going awry here", "It is finding SDL 1.2 instead of your SDL 2.X and failing to bind to that .", "Is rendering through SDL a requirement", "I ve used SDL 2.0.4 .", "This is the recommended way to use SDL .", "Not related to SDL though .", "I am a SDL beginner .", "This is SDL thing .", "The code from SDL is stored in a library or a framework depending on how you installed SDL .", "Sorry i forgot the SDL Version .", "I initialized SDL with SDL INIT EVERYTHING flag .", "Unless you have a bunch of existing SDL 1.2 code I recommend using SDL 2 instead of 1.2 .", "Here s a tutorial on alpha blending : lazyfoo.net tutorials SDL 13 alpha blending index.php http : lazyfoo.net tutorials SDL 13 alpha blending index.php .", "On my system Ubuntu I have to use the following flags : .. . .. . That links SDL SDL image and many of their dependencies as static ." ] }
{ "confidence": [ 113.32671356201172, 82.67919158935547, 72.67723846435547, 72.67699432373047, 65.50572204589844, 60.57156753540039, 59.40166091918945, 56.91038131713867, 56.18223571777344, 55.67831802368164, 55.674537658691406, 55.05893325805664, 54.66014862060547, 54.21429443359375, 54.05149841308594, 53.18479919433594, 52.94788360595703, 52.58837127685547, 52.16935729980469, 51.8520393371582 ], "content": [ "Question : So I realize that there are various posts that cover pairs of these but I am having trouble understanding how they all fit together . Explain what each of the following are used for and how they relate to each other : .. . glu .. . glew .. . glut .. . sdl .. . qt .. . openGL .. . webGL .. . Comment : +1 cause you r question produced such a good answer below : - .. . Answer : OpenGL http : en.wikipedia.org wiki OpenGL .. . .. . OpenGL Open Graphics Library is cross-platform API for rendering 2D and 3D graphics . The API mainly tries to focus on using the GPU to achieve hardware-accelerated http : en.wikipedia.org wiki Hardware acceleration rendering . OpenGL-ES http : en.wikipedia.org wiki OpenGL ES .. . .. . OpenGL-ES OpenGL for Embedded Systems is a subset of OpenGL designed for use on embedded systems like smartphones tablets game consoles etc . WebGL http : en.wikipedia.org wiki WebGL .. . .. . WebGL Web Graphics Library is a JavaScript API for rendering 2D and 3D graphics . WebGL also uses the GPU as much as it is possible through the browser . WebGL is based on OpenGL-ES http : en.wikipedia.org wiki OpenGL ES . Take in mind that they might have the same functions though WebGL isn t OpenGL or OpenGL-ES . WebGL is only based on OpenGL-ES . GLU http : en.wikipedia.org wiki OpenGL Utility Library .. . .. . GLU OpenGL Utility Library is a graphics library for OpenGL consisting of utility functions which can be used with OpenGL . The functions mainly focus on primitive rendering and mapping between screen- and world-coordinates etc . GLEW http : en.wikipedia.org wiki OpenGL Extension Wrangler Library .. . .. . GLEW OpenGL Extension Wrangler Library is a cross-platform library helps in querying and loading OpenGL Extensions . GLUT http : en.wikipedia.org wiki OpenGL Utility Toolkit .. . .. . GLUT OpenGL Utility Toolkit is a library of utilities for OpenGL which primarily focuses on window definition window control and monitoring of keyboard and mouse input . SDL http : en.wikipedia.org wiki Simple DirectMedia Layer .. . .. . SDL Simple DirectMedia Layer is a cross-platform development library designed to provide low-level access to audio keyboard mouse joystick and graphics hardware via OpenGL . SDL can also be used for other graphics API s such as DirectX etc . QT http : en.wikipedia.org wiki Qt 28framework 29 .. . .. . QT is a cross-platform application development framework widely used for the development of GUI programs in which case it is known as a widget toolkit and also used for developing non-GUI programs such as console tools and servers . Conclusion .. . .. . OpenGL is an API for rendering 2D and 3D graphics . OpenGL-ES is a subset of OpenGL targeting embedded systems . WebGL is a JavaScript API for rendering 2D and 3D graphics based on OpenGL-ES . GLU is a utility library for OpenGL which mainly contains mapping functions . GLEW is a utility library for OpenGL which can handle loading of OpenGL Extensions . GLUT SDL is a library for handling various things like window keyboard and mouse control as well as listening . QT is a framework mainly for creating GUI . Thereby GLU GLEW GLUT is simply utility libraries for OpenGL which requires OpenGL if not they aren t for much good . SDL doesn t require OpenGL and isn t directly an OpenGL utility library mainly but it can be used with OpenGL but also with other things as well . Comment : Upvoted for mostly correct answer but SDL doesn t really require GL . It may use many different graphics backends . Comment : @keltar thanks for the response I fixed that part of my answer . Comment : You should mention that Qt has functions for using OpenGl . As of Qt 5.1 Qt Quick 2 only uses OpenGl and so now QOpenGL classes are a core part of Qt in QtGui module . Also QtCanvas implements WebGL for non web-applications and Qt3D is a new module for games and other applications that involve pairing 3D content with other functionality .", "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 : For a while I ve been thinking of trying to do a port of one of my favorite classic PC games The Ur-Quan Masters http : sc2.sourceforge.net aka Star Control 2 http : en.wikipedia.org wiki Star 5Fcontrol 5F2 to the iPhone . UQM uses SDL for all its graphics sound input and other gamey stuff and there does seem to be a port of SDL to iPhone but it doesn t look very mature at this point . Has anyone put the iPhone SDL port through its paces How well does it work What kinds of issues can I expect taking this project which is already cross-platform code to iPhone If SDL isn t an option can anyone reccomend an alternative framework to look at that will bridge the gap between SDL and the native libraries like OpenGL ES and Core Audio Or is coding to those frameworks the best option Edit to add : Here s a link-to a forum thread http : forum.uqm.stack.nl index.php topic 4254.0 on the UQM forum about doing an iPhone port . Comment : I was just thinking the same thing that there should be an iPhone version of Starcon -- but got hung up on trying to figure out how the melee controls could possibly work . Anyway in your shoes I d just code straight to OpenGL but I ve not enough iPhone experience to answer with authority . Comment : Take a look at the forum thread I linked to there s some discussion on there about possible control schemes . Comment : Of note to others is that SDL is the Simple DirectMedia Layer : http : www.libsdl.org .. . Answer : The iPhone port works as expected and it does have a bit of an unfinshed feel to it . As delivered it s not that easy to integrate with the SDK that may be OK for some games but I think most users expect more out of games today like social network connections . Fortunately with a little effort you can use most of the iPhone SDK with SDL . See my tutorial here Bridging the Gap http : web.me.com cannonwc Site 4 Blog Archive.html . .. . .. . and blogs on the Simple DirectMedia Layer Forums http : forums.libsdl.org . .. . .. . SDL tends to mess up touch-events in tableviews but you can fix that by run in with a separate cfrunloop . Performance is close to working with just plain vanilla OpenGL http : en.wikipedia.org wiki OpenGL .", "Question : For a while I ve been thinking of trying to do a port of one of my favorite classic PC games The Ur-Quan Masters http : sc2.sourceforge.net aka Star Control 2 http : en.wikipedia.org wiki Star 5Fcontrol 5F2 to the iPhone . UQM uses SDL for all its graphics sound input and other gamey stuff and there does seem to be a port of SDL to iPhone but it doesn t look very mature at this point . Has anyone put the iPhone SDL port through its paces How well does it work What kinds of issues can I expect taking this project which is already cross-platform code to iPhone If SDL isn t an option can anyone reccomend an alternative framework to look at that will bridge the gap between SDL and the native libraries like OpenGL ES and Core Audio Or is coding to those frameworks the best option Edit to add : Here s a link-to a forum thread http : forum.uqm.stack.nl index.php topic 4254.0 on the UQM forum about doing an iPhone port . Comment : I was just thinking the same thing that there should be an iPhone version of Starcon -- but got hung up on trying to figure out how the melee controls could possibly work . Anyway in your shoes I d just code straight to OpenGL but I ve not enough iPhone experience to answer with authority . Comment : Take a look at the forum thread I linked to there s some discussion on there about possible control schemes . Comment : Of note to others is that SDL is the Simple DirectMedia Layer : http : www.libsdl.org .. . Answer : UPDATE .. . This answer is really out of date so you can stop up voting it I no longer use SDL for iPhone development because it doesn t fit the iPhone model . e.g . SDL insists on owning main the audio subsystem doesn t know about AudioSessions it s hard to pick up on view orientation-changes etc . It was nice to see a familiar face but in the end SDL introduced more problems than it solved . 2009 answer .. . The svn version s working well for me . I had one problem and that was a crash in atexit SDL Quit . So I disabled cleanup . Plus the library names are not sensible but you can change that . The hardest part for me was porting my SDL code to SDL-1.3 and porting my OpenGL code to OpenGLES . OpenGLES works as you d expect the accelerometer shows up as a 3 axis joystick and sound is solid . I give iPhone SDL 4.5 out of a possible 5 stars . Comment : Great news thanks Comment : I ve read elsewhere that the SDL port doesn t handle the newer SDKs well . What OS version are you using Comment : Update : I was using 2.2 at the time and in the end had to replace SDL because it didn t handle the older audio SDKs well it doesn t really fit the iPhone model . It s still a nice on-ramp for iPhone beginners . I should update my answer . Comment : What are you using now instead Comment : Graphics : UIKit EAGLContext UIViewControllers Audio : CoreAudio Audio Units AudioQueues etc", "Question : null .. . Answer : I define my SDL2 window as follows : .. . .. . Then with the following struct I create an array of pixels and use that array as the buffer that is passed to SDL : .. . .. . The thing that bothers me is though the code sometimes change one and only one pixel in the while-loop I still keep passing the whole array with width height to the SDL via glDrawPixels in each iteration . And my question : Is this a must and only way to pass the whole array to SDL or is it possible to inform the SDL just the pixel s that had been altered from the previous state in the name of accelerating the graphics process . Comment : If you want just pixel-based drawing why bother with OpenGL which is best at 3d-drawing There are many good 2d libraries which can help you even ones using SDL for the lower layers which OpenGL doesn t do . Comment : @JoachimPileborg : Unfortunately my C graphics google-search mostly came with OpenGL results . That s why I used OpenGL . I ll be pleased to hear alternative suggestions for 2D drawing in C just lines pixels etc Comment : Possible duplicate of How to render draw buffer object to framebuffer without glDrawPixels http : stackoverflow.com questions 11164276 how-to-render-draw-buffer-object-to-framebuffer-without-gldrawpixels", "Question : The documentation of SDL does not seem to mention much about color spaces . I don t see any SRGB flag parameter for SDL SetVideoMode http : sdl.beuc.net sdl.wiki SDL SetVideoMode or SDL GL SetAttribute http : sdl.beuc.net sdl.wiki SDL GLattr . Is it possible at all for SDL to ask OpenGL to perform the color correction when writing on the FrameBuffer 0 GLUT seems to be able to provide that functionality http : www.arcsynthesis.org gltut Texturing Tut16 20Free 20Gamma 20Correction.html . If SDL cannot do it what is the usual workaround I am considering rendering to a sRGB texture with GL FRAMEBUFFER SRGB enabled and then rendering that into the FrameBuffer 0 with FRAMEBUFFER SRGB disabled . Any better idea .. . Answer : Sorry to revive an old question here but I wanted to note that SDL 2.0.1 will explicitly let you request an sRGB context : .. . .. . This works on Windows and X11 Mac OS X etc doesn t offer this functionality at the moment . It s worth noting that before SDL 2.0.1 offered this most GL contexts on modern hardware are already sRGB capable by default . But there you go . Comment : Nice Looking at my packages it s SDL 1.2.14 that s installed on my system . I didn t know about sRGB available by default I thought I had to request it . I m using glfw 3 now and I am quite happy with it so far but it s good to know SDL remains an option .", "Question : What are the pros and cons to each It seems they serve the same purpose . I have a few demos with each and they seem about the same . Performance or cross-platform wise is one better than the other The only thing I notice is that SDL seems to have more helper libraries fonts images mixer built-in sound support etc . On its site GLFW claims to be more OpenGL focused but still have to use a GLEW to get any newer OpenGL features same with SDL . I guess I m leaning towards using SDL now more mature more features more community . Are there any reasons I ve missed why GLFW stands out and I should use it instead of SDL Comment : Some discussion here : stackoverflow.com questions 5731698 http : stackoverflow.com questions 5731698 portable-toolkit-library-for-creating-opengl-applications Also there is no need for GLEW . You can write your own code to enable the advanced features of the newer OpenGL versions . Comment : Why not use SFML sfml-dev.org http : www.sfml-dev.org Comment : What is wrong with using GLEW Doing it yourself is incredibly shortsighted and slow . Comment : @TheBuzzSaw Doing what myself Comment : +1 I learned something about GLFW and it looks like it might be nice .. . Answer : I used both for some programs now . And I can tell you that I really prefer SDL over GLFW . I like the simplicity of GLFW but GLFW took out image loading entirely which I think is a real bummer . You do not want to write you own texture loader and looking for something that works and integrates well takes time . I also prefer having SDL events over callbacks because of the following reason . When I poll for events I can test them in a switch case block and from there I can modify local-variables . With callback functions this is not simply possible often global-variables are necessary which is dirty . GLFW simply misses the void on callback functions to pass the closure . The 2D rendering API of SDL can get pretty handy if you want to do simple operations on textures before putting them in video memory like putting all together into one big texture atlas . SDL supports : .. . .. . multiple mice .. . File Abstraction .. . Shared Object DLL loading .. . SDL ttf font rendering .. . SDL net network abstraction .. . .. . and still the library is small and modular . You can load just what you need .", "Question : I want to create an application where I draw on an window either windowed or fullscreen where I have the mouse grabbed but without intercepting any WM keyboard-shortcuts like Alt+Tab and I also need to be notified whenever the user enter leaves focus . Common applications like Google Chrome Firefox or gnome-terminal can handle this just fine going fullscreen with F11 but still having Alt+Tab but they do not grab the mouse . SDL has a notorious poor handling of this use-case : SDL WM GrabInput grabs the mouse but also intercepts WM shortcuts and SDL FULLSCREEN seems to have some sort of automatic grab by itself don t ask me why . A solution could be to write code for Alt+Tab myself but this sucks and doesn t help for other WM shortcuts like changing to another workspace . Another solution is to not call SDL WM GrabInput but instead fake a grab : just hide the mouse pointer with SDL ShowCursor and move it back to the center whenever the user moves . Which is ugly but in practice works - except of course for SDL FULLSCREEN because it grabs automatically unlike sane implementations . A fullscreen-capable SDL solution is this but that s still not what I want . I don t want to have hacks to enable and disable grab I want to grab the mouse but not grab the keyboard . So I am mad with SDL and want to see alternatives . I would like to use SDL but this is not necessary . This question http : stackoverflow.com questions 10916997 alt-tab-from-fullscreen-sdl seems to point out that what SDL actually does is to use XGrabKeyboard . By reading the man page it s not immediately clear to me whether you can grab the mouse without grabbing the keyboard I never used Xlib myself . I know how to make fake fullscreen with GTK that is of the Alt+Tab friendly gnome-terminal variety . I imagine that doing this coupled with mouse hiding and moving it back to the center fake grabbing could do the trick but this feels like too much duct tape . There must be a simpler way . Also I don t want to add GTK as a dependency but I m also not sure if making raw Xlib calls is a good idea . What s a good solution for this I need a Linux X11 solution but it would be nice for it to be cross-platform - I know this can be solved smoothly on Windows so perhaps there is a library that does exactly this . also I render with OpenGL but this is irrelevant .. . .. . PS : Perhaps I am having a bad understanding of this issue and I m not asking the right question so feel free to point out approaches I haven t considered . Comment : The question I cited http : stackoverflow.com questions 10916997 alt-tab-from-fullscreen-sdl in my opinion isn t really a duplicate since I m not looking specifically for a SDL solution . SDL is merely the library I m using right now . Comment : I just saw at Xlib API the XGrabPointer http : tronche.com gui x xlib input XGrabPointer.html function . So apparently Xlib has enough functionality for grabbing only the mouse without having to grab the keyboard . .. . Answer : I have been using Gtk and GtkGLExt for gaming on Linux these days e.g . my Ludum Dare entries . Here gtk.c Gist https : gist.github.com depp 4942294 is my code I have released it under the FreeBSD license . You can see the code I ve commented out for debugging window state changes . I should mention that this is part of a much larger framework which I use for things like Ludum Dare and I prefer it to SDL precisely for the same reasons that you mention : the resulting applications conform more closely to users expectations for native applications on their platforms Linux OS X Windows . Needless to say going this route is a lot of work . Raw X11 programming however is a real mess . I estimate that it would take me a couple weeks of solid programming and reading docs to convert my Gtk code to X11 code it s just not worth it for me but you may decide differently . Many hours just to eliminate a dependency that everyone has installed anyway The Gtk dependency is not actually that outrageous it s probably already loaded into memory anyway and the ABI for 2.x is very stable so it won t hurt binary compatibility . A big problem with X11 programming for games is that event-handling is a total mess . You can t easily poll for events . The Xlib interface is blocking so you have to use an arcane sequence of function-calls to read data check that there are events pending and then only read events from the queue if they exist otherwise your application will block until events appear . The xcb library is alternative to Xlib which is much better all around and supports a non-blocking interface but it doesn t play well with OpenGL . So you could try to mix the two or you could just use Gtk . Let me give you a snippet of the Gtk code for fullscreen : .. . .. . Just imagine how much work this would be with the X11 interface : figure out the size of the screen there might be more than one resize the window change the ordering so that it s on top of everything else change the decoration and then respond intelligently when the user switches virtual desktops . Blah Actually this describes how my code works on OS X but the APIs are much nicer . More than that if you re using X11 you ll have to learn how to react to the user in the expected way . X11 is from the 1980s . Gtk by comparison gives your application a swath of appropriate defaults from Gtk s UI designers . UI design is work . And remember : you can mix X11 with Gtk just fine . The summary : X11 programming is for programmers with lots of spare time . Notes : The GtkGLExt adds an annoying linker flag -Wl --export-dynamic . My build scripts remove the flag from pkg-config s output . X11 experiences : I think I spent about a week trying to get the whole thing working in X11 and I ended up following lots of dead ends in the process . Learn from my failures . Comment : Hey a big thank you I will take a look at your code . I agree that the benefits of simplifying programming quickly outweighs the drawbacks of adding a fat dependency like GTK . I would prefer a small library that does the same thing however . or to be honest I would prefer that SDL did this. . Comment : @darque : I also wish that SDL did this but I think the unfortunate reality is that SDL 1.2 s design is a relic from an earlier era . Maybe SDL 1.3 is better . And SDL is good enough for most people . There s definitely room for a modern replacement to SDL but since it s 2013 it would have to work well on Android and iOS which makes the undertaking so much more complicated . Comment : SDL 1.3 Hmm I heard that SDL 2.0 was going to improve this but I can t find it at Google except this roadmap http : wiki.libsdl.org moin.cgi Roadmap Mouse Input that cites improvements on mouse grab without elaborating . Comment : Anyway there is also the issue on whether you can do any of those WM tricks if you are setting to a different resolution and color depth . I can t say whether you code is setting video mode like SDL SetVideoMode does . F11-aware programs like Chromium does the WM trick of borderless-and-fill-whole-screen but doesn t set video mode . but it should work anyway like I could set mode by calling xrandr without affecting whether alt+tab works Comment : I think for a modern game it is usually inappropriate to change the video resolution . This is something you did in 2000 because the CPU couldn t push enough pixels but it s mostly irrelevant in 2013 when everyone has tragically underutilized graphics cards and LCD screens that look ugly when not run at full resolution . My advice is that if you have players with low-end systems from 2005 tell them to change the resolution themselves rather than do it in-game . SDL 1.3 and 2.0 are basically the same thing but 1.3 will have a compatibility layer for 1.2 .", "Question : I ve been working on a game that uses multiple audio tracks whose volumes are adjusted in realtime based on mouse motion . I m using SDl-Mixer for audio and Reactive-Banana for the game in general . The problem is that the tracks which have all been started at the beginning stop playing when the input-loop starts . The cause may be something else but I wonder if there s some strange interaction between SDL and Reactive-Banana that I don t understand . I ve been trying to puzzle this out for a while but it might just be something simple that I ve overlooked . Thanks in advance . Here s the code for a simple test : .. . .. . Edit : The problem doesn t seem to lie in Reactive Banana necessarily . Any sort of forever loop causes the audio to stop . Comment : Add imports also . Comment : What happens when you remove reactive-banana from the picture by replacing the last line with forever getMouseState print Comment : Same result . I m pretty sure reactive-banana isn t the problem at this point . .. . Answer : This might not be related to either SDL or reactive-banana . Issues like that are often fixed by compiling with the -threaded compiler flag . If this is a Cabal project add .. . .. . to your Executable section . Comment : Tried it didn t seem to help . In fact the audio didn t start at all . Does this have to do with the fact that the FFI spawns its own thread I m wondering if I need to explicitly fork a thread for SDL . I m really inexperienced with FFI in haskell so I might have the wrong idea . Comment : Do I understand correctly that if you use -threaded then the audio will not start at all but if you don t use -threaded then it will at least start If so then this is an indication that SDL doesn t work well with concurrency . Which is probably unsurprising . Comment : SDL is designed to work with concurrency it has a thread library in it but there are of course some rules . Most SDL calls can only be made from the thread where SDL.init was initially called but having other threads around certainly won t cause an issue : Comment : @Apfelmus : I m actually not using any concurrency at this point not to my knowledge but yeah that s what happened .", "Question : The documentation of SDL does not seem to mention much about color spaces . I don t see any SRGB flag parameter for SDL SetVideoMode http : sdl.beuc.net sdl.wiki SDL SetVideoMode or SDL GL SetAttribute http : sdl.beuc.net sdl.wiki SDL GLattr . Is it possible at all for SDL to ask OpenGL to perform the color correction when writing on the FrameBuffer 0 GLUT seems to be able to provide that functionality http : www.arcsynthesis.org gltut Texturing Tut16 20Free 20Gamma 20Correction.html . If SDL cannot do it what is the usual workaround I am considering rendering to a sRGB texture with GL FRAMEBUFFER SRGB enabled and then rendering that into the FrameBuffer 0 with FRAMEBUFFER SRGB disabled . Any better idea .. . Answer : To be slightly more precise : You just need to call glEnable GL FRAMEBUFFER SRGB to make Framebuffer 0 into an SRGB framebuffer . If you are on SDL2 you should request the capability by calling SDL GL SetAttribute SDL GL FRAMEBUFFER SRGB CAPABLE 1 during init but if you are on an earlier version of SDL it seems that right now graphics drivers do not care if you request it beforehand .", "Question : What are the pros and cons to each It seems they serve the same purpose . I have a few demos with each and they seem about the same . Performance or cross-platform wise is one better than the other The only thing I notice is that SDL seems to have more helper libraries fonts images mixer built-in sound support etc . On its site GLFW claims to be more OpenGL focused but still have to use a GLEW to get any newer OpenGL features same with SDL . I guess I m leaning towards using SDL now more mature more features more community . Are there any reasons I ve missed why GLFW stands out and I should use it instead of SDL Comment : Some discussion here : stackoverflow.com questions 5731698 http : stackoverflow.com questions 5731698 portable-toolkit-library-for-creating-opengl-applications Also there is no need for GLEW . You can write your own code to enable the advanced features of the newer OpenGL versions . Comment : Why not use SFML sfml-dev.org http : www.sfml-dev.org Comment : What is wrong with using GLEW Doing it yourself is incredibly shortsighted and slow . Comment : @TheBuzzSaw Doing what myself Comment : +1 I learned something about GLFW and it looks like it might be nice .. . Answer : SDL .. . .. . 2D graphics API .. . Audio API .. . Threads Timers Shared Object API .. . .. . GLFW .. . .. . No extra API .. . .. . So reasons to use SDL include if you want to use their extra APIs . Reasons to use GLFW include if SDL is too bloated for your use-case . Snippet from GLFW s FAQ http : www.glfw.org faq.html why-yet-another-opengl-library : .. . .. . ...SDL is too large for some people and has never had OpenGL as its main focus . .. . We therefore believe that there is room for a lightweight modern library for managing OpenGL contexts windows and input . See Related Toolkits and APIs https : www.opengl.org wiki Related toolkits and APIs .. . .. . Bugs .. . .. . Here are a couple of bugs that currently exist in both GLFW and SDL : .. . .. . home button doesn t work on some keyboards https : github.com andrewrk genesis issues 1 .. . keyboard-shortcuts ignore keyboard layout https : github.com andrewrk genesis issues 2 .. . .. . Neither of them have fixed it yet but the maintainer of GLFW has participated in the issues and planned to fix them while I have seen no response from SDL . By the way do not use GLEW .. . .. . Instead use libepoxy https : github.com anholt libepoxy snippet from libepoxy s README : .. . .. . GLEW has several issues : .. . .. . Doesn t know about aliases of functions There are 5 providers of glPointParameterfv for example and you don t want to have to choose which one to call when they re all the same . Doesn t support GL 3.2+ core contexts .. . Doesn t support GLES . Doesn t support EGL . Has a hard-to-maintain parser of extension specification text instead of using the old .spec file or the new .xml . Has significant startup time overhead when glewInit autodetects the world . User-visible multithreading support choice for win32 . .. . The motivation for this project came out of previous use of libGLEW in piglit . Other GL dispatch code generation projects had similar failures . Ideally piglit wants to be able to build a single binary for a test that can run on whatever context or window system it chooses not based on link time choices . .. . We had to solve some of GLEW s problems for piglit and solving them meant replacing every single piece of GLEW so we built piglit-dispatch from scratch . And since we wanted to reuse it in other GL-related projects this is the result . Comment : @andrewrk Are you really sure about Glew OpengGL version support the Sourceforge news list http : glew.sourceforge.net seems to tell that OpenGL 4.5- contexts are supported since version 1.11.0 . Comment : -1 Doesn t support GL 3.2+ core contexts is a blatant lie . I use GLEW all the time on Mac OpenGL programs and Macs atleast the newer ones and I have a pretty new one supports GL 4.1 use ONLY core contexts .", "Question : I m trying to draw a 2D HUD over a 3D Scene and therefor I m useing the opengl rendering set up on SDL . So the question is : Is it possible to Draw 2D things with SDL over the 3D scene or do I need to draw them with opengl Because I ve experienced that if I create a SDL renderer the OpenGL scene will disappear and be overdrawn by the SDL renderer . Comment : I would just do it in OpenGL using an orthographic projection pretty straight forward . .. . Answer : IIRC OpenGL has functions for drawing 2D elements . You could render the 3D to a texture and then render 2D over it . If you must use SDL you ll need a method to copy an OpenGL texture to an SDL surface texture . Comment : Thanks for that idea but I decided to do it like Zammalad said . I m drawing the stuff with OpenGL", "Question : What are the pros and cons to each It seems they serve the same purpose . I have a few demos with each and they seem about the same . Performance or cross-platform wise is one better than the other The only thing I notice is that SDL seems to have more helper libraries fonts images mixer built-in sound support etc . On its site GLFW claims to be more OpenGL focused but still have to use a GLEW to get any newer OpenGL features same with SDL . I guess I m leaning towards using SDL now more mature more features more community . Are there any reasons I ve missed why GLFW stands out and I should use it instead of SDL Comment : Some discussion here : stackoverflow.com questions 5731698 http : stackoverflow.com questions 5731698 portable-toolkit-library-for-creating-opengl-applications Also there is no need for GLEW . You can write your own code to enable the advanced features of the newer OpenGL versions . Comment : Why not use SFML sfml-dev.org http : www.sfml-dev.org Comment : What is wrong with using GLEW Doing it yourself is incredibly shortsighted and slow . Comment : @TheBuzzSaw Doing what myself Comment : +1 I learned something about GLFW and it looks like it might be nice .. . Answer : i liked glfw the most . I used SDL too but i think it has a bunch of functionallity that is not used and the one that is needed it comes on a different installation about jpeg loading audio net etc - of course glfw doesn t have them either .", "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 : What are the pros and cons to each It seems they serve the same purpose . I have a few demos with each and they seem about the same . Performance or cross-platform wise is one better than the other The only thing I notice is that SDL seems to have more helper libraries fonts images mixer built-in sound support etc . On its site GLFW claims to be more OpenGL focused but still have to use a GLEW to get any newer OpenGL features same with SDL . I guess I m leaning towards using SDL now more mature more features more community . Are there any reasons I ve missed why GLFW stands out and I should use it instead of SDL Comment : Some discussion here : stackoverflow.com questions 5731698 http : stackoverflow.com questions 5731698 portable-toolkit-library-for-creating-opengl-applications Also there is no need for GLEW . You can write your own code to enable the advanced features of the newer OpenGL versions . Comment : Why not use SFML sfml-dev.org http : www.sfml-dev.org Comment : What is wrong with using GLEW Doing it yourself is incredibly shortsighted and slow . Comment : @TheBuzzSaw Doing what myself Comment : +1 I learned something about GLFW and it looks like it might be nice .. . Answer : I m not familiar with GLFW but I never liked SDL because it tries to take over too much responsibility from your program and force you to write an SDL application rather than an application that uses SDL . On the other hand if you re a beginner or if your program benefits from not having to think outside the SDL box that might be a plus . Comment : I have to agree with this . GLFW is simple and robust and does only the necessary stuff to help programmer to build the application as he wants . SDL is not so straighforward and simplistic but it certainly has useful features too . Comment : Exactly what about SDL takes over too much responsibility from your program I use SDL rather extensively I have never had this feeling . Comment : I can t say for sure whether it still does this but originally on Windows it used define main .. . to rename your main and run its own code prior to main . This of course broke properly factored programs where the translation-unit containing main had no knowledge of using SDL . Comment : Hmm I don t think I stated that very clearly - what I meant to say is that the define main hack completely failed if the file containing main did not include SDL.h and in fact a program that s just using SDL as a component rather than being an SDL app probably would not have include SDL.h in the file with main .", "Question : Is there a good library to use for gathering user input in Linux from the mouse keyboard joystick that doesn t force you to create a visible window to do so SDL lets you get user input in a reasonable way but seems to force you to create a window which is troublesome if you have abstracted control so the control machine doesn t have to be the same as the render machine . However if the control and render machines are the same this results in an ugly little SDL window on top of your display . Edit To Clarify : .. . The renderer has an output window in its normal use-case that window is full screen except when they are both running on the same computer just so it is possible to give the controller focus . There can actually be multiple renderers displaying a different view of the same data on different computers all controlled by the same controller hence the total decoupling of the input from the output Making taking advantage of the built-in X11 client-server stuff for display less useable Also multiple controller applications for one renderer is also possible . Communication between the controllers and renderers is via sockets . Comment : I deleted the answer that led to the clarification above.. . I think the clarification needs to stay but it covers enough that my pseudo-answer which could ve been a comment can be deleted entirely . .. . Answer : For the mouse you can use GPM http : www.linuxjournal.com article 4600 . I m not sure off the top of my head for keyboard or joystick . It probably wouldn t be too bad to read directly off there dev files if need be . Hope it helps", "Question : I am using SDL 1.2 with FFmpeg on MAC . I am trying to build a video-player using both FFmpeg and SDL . I am viewing my video on SDL Surface . My player is working fine . Now my problem is i want to move SDL window without dragging it from title bar . Is there any function method in SDL 1.2 framework for moving SDL Surface . Comment : i want to move SDL window .. . with keyboard Programatically randomly Comment : programatically..do u have any idea. . Comment : when my sdl window pops up i want to make it centralized according to my desktop screen . do u have any idea. . Comment : Show us your code : Comment : i am doing this : SDL BlitSurface Bmpsrc NULL screen rect SDL Flip screen where Bmpsrc and screen are SDL Surfaces .. . Answer : SDL 1.2 does not have an API for moving windows . SDL 2.0 has better support for multiple windows and window management in general . See http : wiki.libsdl.org SDL SetWindowPosition .. . .. . To do this with SDL 1.2 you ll need to use platform-specific calls using the window handle . You can get that with SDL GetWMInfo . If you just need to set the initial position of the window so it is centered then try this before SDL SetVideoMode :", "Question : I am newbie to SDL and developed a small SDL 2.0 project trying to run setup under dosbox but it crash . Comment : Back in the DOS days there were no OS standards for device drivers - they gave you access to the underlying hardware and that was it not putting M code between your code and an 8MHz 8086 was seen as a good thing . That meant for example writing handlers in your code for every printer you supported SDL uses OS standard drivers to abstract out hardware-acceleration etc for video cards which DOS does not have . Since it s open-source you could in theory write a DOS version of SDL but without hardware-acceleration in an emulator it might be really slow .. . Answer : No you cannot do that . If you want to run your app with SDL forget about DOS : DOS is not on the list of supported platforms http : wiki.libsdl.org Installation Supported platforms .", "Question : Is there a way to get initial position of mouse in SDL 2.0 I try to get mouse coordinates by SDL GetMouseState mouse x mouse y however I get the result I expected only after using the function SDL PollEvent and also I can t see a value other than 0 0 if the mouse has not been moved at least once since begining of the program.Although I don t check SDL MOUSEMOTION and connect SDL GetMouseState to it I get mouse coordinates only when mouse is moved.So what s wrong Or is SDL GetMouseState suitable to do so Edit : Why Why is there no any answer Comment : Which OS are you using SDL2 on Comment : I run via Windows 7 . .. . Answer : The SDL updates the position of the mouse internally in SDL PrivateSendMouseMotion http : hg.libsdl.org SDL file 54c06b0f65d9 src events SDL mouse.c l191 which is called by various mouse related functions in the same file . These functions are called in the event-loop processing function WIN WindowProc http : hg.libsdl.org SDL file 54c06b0f65d9 src video windows SDL windowsevents.c l287 in response to the mouse events dispatched by Windows . Thus if you do not move the mouse no event is dispatched and the SDL does not know where the mouse is . The solution is to wait for a mouse event before requesting the position and to find a workaround until this event .", "Question : I have been learning about SDL 2D programming for a while and now I wanted to create a program using SDL and OpenGL combined . I set it up like this : .. . .. . The program is for now just a black window with a white line displayed using OpenGl . Here is the code for the rendering : .. . .. . So the thing is I would like to render textures additionally using pure SDL and a SDL Renderer object as I did before without OpenGL . I tried that out but it didn t work . Is it even possible to do that and how What I did is creating a SDL Renderer and then after drawing OpenGL stuff doing this : .. . .. . But this does not work . The rectangle is not shown although for some milliseconds it appears slightly . I feel like the OpenGL rendering is overwriting it . Comment : Don t mix-n-match SDL Renderer stuff and OpenGL down that path lies pain and madness . At least at this point in time https : bugzilla.libsdl.org show bug.cgi id 1138 . Comment : Ok so it s not possible . Too bad . .. . Answer : You can render to an SDL Surface with SDL and then convert it to a texture upload it to the GPU using OpenGL ." ] }
[ "yes-answer-long", "yes-answer-short" ]
3d
UNK_RELATION
aws-elasticsearchservice@elasticsearch@64
aws-elasticsearchservice -- denotes questions about the amazon @placeholder service .
{ "confidence": [ 40.48563766479492, 38.100372314453125, 38.02708435058594, 36.663909912109375, 35.098716735839844, 34.05955505371094, 32.784454345703125, 30.985904693603516, 29.250133514404297, 28.00366973876953, 28.00366973876953, 26.599506378173828, 26.599506378173828, 26.59465980529785, 26.388023376464844, 26.197528839111328, 26.18885040283203, 25.781696319580078, 25.53636932373047, 25.326984405517578, 25.18292999267578, 24.58248519897461, 24.420265197753906, 24.390151977539062, 24.390151977539062, 24.390151977539062, 24.18297576904297, 23.43716812133789, 23.387189865112305, 23.387189865112305, 23.387189865112305, 23.387189865112305, 23.387189865112305, 23.064565658569336, 22.16901397705078, 22.16901397705078, 21.99564552307129, 21.99564552307129, 21.818588256835938, 21.531105041503906, 21.39128875732422, 21.14398956298828, 21.14398956298828, 20.190105438232422, 20.190105438232422, 20.190105438232422, 20.0318660736084, 19.77564239501953, 19.77564239501953, 19.77564239501953, 19.77564239501953, 19.77564239501953, 19.77564239501953, 19.77564239501953, 19.77564239501953, 19.77564239501953, 19.77564239501953, 19.77564239501953, 19.77564239501953, 19.77564239501953, 19.77564239501953, 19.77564239501953, 19.77564239501953, 19.77564239501953, 19.77564239501953, 19.77564239501953, 19.77564239501953, 19.77564239501953, 19.77564239501953, 19.77564239501953, 19.77564239501953, 19.77564239501953, 19.77564239501953, 19.77564239501953, 19.77564239501953, 19.77564239501953, 19.77564239501953, 19.77564239501953, 19.77564239501953, 19.77564239501953, 19.77564239501953, 19.77564239501953, 19.77564239501953, 19.77564239501953, 19.77564239501953, 19.36014747619629, 19.36014747619629, 19.186779022216797, 19.154476165771484, 18.335124969482422, 18.335124969482422, 18.335124969482422, 17.777769088745117, 17.777769088745117, 17.777769088745117, 17.777769088745117, 17.777769088745117, 17.777769088745117, 17.777769088745117, 17.777769088745117 ], "content": [ "I am using the ElasticsearchService from Amazon .", "I read online about scripting in aws elacticsearch service .", "I ve never used aws-elasticsearchservice but I think that s a good starting point .", "How to install elasticsearch-river-mongodb plugin to Amazon Elasticsearch Service", "From Amazon ES limits http : docs.aws.amazon.com elasticsearch-service latest developerguide aes-limits.html .. . .. . Custom plugins The service does not support custom plugins .", "Ah and i m using the aws elasticsearch service - not a manually configured ec2 instance", "We are using the AWS managed elasticsearch service you can stream your log group to elastic search service by adding a subscription to your aws elasticsearch domain that you created", "Dynamic scripting is not available in the Amazon managed ES service whether inline or via script files .", "I m trying to use elasticdump to copy indexes from AWS Elasticsearch Service : .. . .. . The relevant part of the policy : .. . .. . After 100 objects I get : .. . .. . Why does AWS prevent me from scrolling", "AWS Elasticsearch service supports an older version of elasticsearch to the one I was using 1.5.2 compared to 2.1 .", "I m using the AWS ElasticSearch service 1.5.2 and is receiving more than 100 requests sec without problems .", "That would allow client libraries like titan-es to use AWS Elasticsearch https : aws.amazon.com elasticsearch-service as an indexing backend which only provides a HTTP S interface .", "As far as my experience goes the AWS managed service is good enough for storing logs or for some very simple ES usage but if you need some advanced ES features you re better off rolling our own .", "However the service does support several standard plugins including Kibana ICU and Kuromoji .", "I m using the elasticsearch javascript API 1.5 as currently 1.5 is the latest version of ElasticSearch which AWS elasticsearch supports .", "I m following this tutorial https : aws.amazon.com fr blogs compute indexing-amazon-dynamodb-content-with-amazon-elasticsearch-service-using-aws-lambda to automatically index all my dynamodb streams into the Amazon elastic search services cluster that i created .", "I am using AWS Elasticservice and this query has to be queried on AWS .", "AWS has changed how it implements Elasticsearch node discovery .", "If my logs are in a key-value format is there a way to make a filter pattern by keyword in AWS elasticsearch so far I just don t see a way .", "Looks like you may need to configure an access policy : docs.aws.amazon.com elasticsearch-service latest developerguide http : docs.aws.amazon.com elasticsearch-service latest developerguide es-gsg.html", "Is port 9300 open on that AWS instance", "This describes two ways of storing templates on the cluster first storing them in the config scripts directory which I don t have access to on AWS elasticsearch and secondly passing in the templates as a string to an index called .scripts .", "AWS doesnot allow the usage of scripts for security reasons .", "In EC2 I have configured logstash as belows .. . .. . but logstash can t make index in AWS elasticsearch and send log data .", ": That is MTU issue of AWS I have decrease the MTU value then it s working well .", "I m using presigned URL with the generated aws signature and I can able to get default search responses like search .", "More infor in the following links - .. . .. . https : docs.aws.amazon.com aws-sdk-php v3 guide service es-data-plane.html .. . .. . http : docs.aws.amazon.com general latest gr signing aws api requests.html .. . .. . http : docs.aws.amazon.com general latest gr signature-version-4.html", "This is more to document my solution for the following requirements : .. . .. . AWS Elasticsearch Service as backend .. . Have AWS ES restricted to the public .. . Use JestClient to query ES .. . .. . The solution below does : .. . .. . Collect the ES end point from the AWS ES domain-name .. . Creates a JestClient for each query using AWS Sign V4 .. . Validates the Elasticsearch index and type .. . Closes client connection after the search is returned", "Please note that i am using AWS cloudwatch logs subscription to kibana .", "see this http : kirankoduru.github.io elasticsearch moving-from-aws-elasticsearch-service.html", "so you mean to say there is no way of adding scripts to aws search queries", "Is this https : github.com DavidMuller aws-requests-auth the module you mean", "The solution turns out to be sending signed requests as an authorised AWS user .", "I m trying to allow beanstalk applications to access our elasticsearch service but every method I find in your documentation fails to grant access to these apps .", "Should we switch to log stash to create custom names for indices and stream that to the amazon elastic search", "How can one download an entire ES index or cluster from Amazon ES", "It seems to be AWS deploys a Lambda Function called LogsToElasticsearch YOUR-ES-CLUSTER-NAME into your account .", "The native transport protocol is not support using AWS Managed ElasticSearch and is only available over the REST endpoint .", "Are you sure about your host name port configuration", "I m trying to connect to AWS elasticsearch but i always get the following error : .. . .. . My code is following : .. . .. . Output from aws elasticsearch : .. . .. . I tried to curl https : search-zencubes-search-xxxxxxxx.eu-west-1.es.amazonaws.com and it works - but not on port 9300 .", "The SDK is useful only in order to manage the service like spin up new nodes and similar -- not to access it .", "It said that AWS ES doesn t support dynamic scripting so I am writing aggregations using scripts stored in my disk .", "What I have tried - Creating a policy from the Allow or deny access to one or more accounts.. . to the root of our AWS account .", "its not open - but i think i have searched everything through and i didn t find a setting to change that - i don t know if aws uses a different default port .", "So i have used scripting module and it works but as it is hosted on aws server and scripting module disable by default is there any way of calculating similar thing without scripting module elasticsearch", "There are libraries that will do this signing for you for example this one https : github.com DavidMuller aws-requests-auth extends the popular Python requests library to sign ElasticSearch requests via SigV4 .", "I have an AWS Kinesis Firehose Stream set up to feed data into an AWS ElasticSearch cluster and I can successfully insert documents by sending them to the Firehose Stream which loads them into ElasticSearch .", "The function https : www.elastic.co guide en elasticsearch client javascript-api current api-reference-1-5.html api-puttemplate-1-5 in javascript which I am suppose to use works given the following template .. . .. . The current filter works but doesn t allow an array of series or isbns to be passed into the filter .", "I can t use the following filter object .. . .. . because if series or isbn is not passed in no book matches an empty string even if I passed in a default-value it would have to match every book which would mean it would have to contain all series and all isbns .", "Ideally I would just write a normal mustache file and use pre-registered templates the way described here https : www.elastic.co guide en elasticsearch reference 1.5 search-template.html pre-registered-templates .", "For the second option i m unaware of how to do this using the elasticsearch.js api so I would have to do it another way and I can t find an example of this online .", "Does elastic search store indexed logs and for how long", "Would it be reliable if say elastic search went down the logs keep running and elastic search cluster comes back up will it automatically catch up or only process what is currently streaming", "Log : timestamp 2016-03-02 17 : 02 : 46 129 level INFO transaction id 352841324125 category org.apache.catalina.core.ContainerBase msg Calling endpoint xyz", "I am trying to store hotel room availability in elasticsearch .", "And then I need to search rooms those are available from a date till another date .", "I have come up with two ways to store data for availability and they are as follows : .. . .. . Here availability dictionary store all dates and value of each date key is true of false representing its available on that day or not .", "Here availability array only stores those dates when room is available .. . .. . I want to search all rooms those are available from from date till to-date and that should look into availability dictionary or array.And my date-range may span up to 365 days .. . .. . How to store these availability data so that I can perform the above search easily", "And I could not find any way to search through range of dates so any suggestion", "Please note items in availability may not be kept sorted .", "And I may have more than 100 million records to search through .", "One way to model this would be with parent-child documents .", "Room documents would be parent documents and availability documents would be their child documents .", "For each room there would be one availability document per date the room is available .", "Then at query time we can query for parent rooms which have one availability child document for each date in the searched interval even disjoint ones .", "Note that you ll need to make sure that as soon as a room is booked you remove the corresponding child documents for each booked date .", "Let s try this out .", "First create the index : .. . .. . Then add some data .. . .. . Finally we can start querying .", "First let s say we want to find a room that is available on 2016-07-01 : .. . .. . Then let s try searching for a room available from 2016-07-01 to 2016-07-03 .. . .. . However searching for a room available from 2016-07-01 to 2016-07-02 does yield room 233 .. . .. . We can also search for disjoint intervals say from 2016-07-01 to 2016-07-02 + from 2016-07-04 to 2016-07-05 .. . .. . And so on.. .", "The key point is to add one has child query per date you need to check availability for and set minimum should match to the number of dates you re checking .", "UPDATE .. . .. . Another option would be to use a script filter https : www.elastic.co guide en elasticsearch reference current query-dsl-script-query.html but with 100 million documents I m not certain it would scale that well .", "In this scenario you can keep your original design preferably the second one because with the first one you ll create too many unnecessary fields in your mapping and the query would look like this :", "Thanks @Val .", "So according to your solution if I have to check a range from 2016-01-01 till 2016-12-01 that means in search query I will have almost 330 has child dates for every dates .", "Do you think that s a good idea", "Do you think you ll often have someone booking a room for 330 days", "-", "Yes there are some hotels they provide extended stay .", "For example commuters who rent rooms for a year", "I also read that parent-child relationship has limitation elastic.co guide en elasticsearch guide current https : www.elastic.co guide en elasticsearch guide current parent-child.html parent-child the parent document and all of its children must live on the same shard .", "question-1 So if I have many shards then will it scale", "Question-2 Also my original question if my search is for a range of 3 months that is quite common for my app then it would be 90 has child .", "So do you see it is still an elegant solution", "1 Parent and child documents live on the same shard for technical and practical reasons it won t really be a problem .", "2 I would have liked to see this requirement in your original question if it s a common requirement for your app - With your initial design either the first or the second the only option that I know of would be by using scripting but if you have 100 million documents this would not be really performant in my opinion .", "Amazon support has confirmed that they have received multiple requests for this and that they are currently working on a solution .", "For that the only solution that Amazon offers is an HTTP endpoint using the common REST api offered by Elastic Search .", "Anyway I am looking for an example of using the ESService using their AWS Java SDK .", "I also asked this on the Titan mailing list https : groups.google.com forum topic aureliusgraphs 70 AAPASlzo and Elasticsearch forum https : discuss.elastic.co t how-to-create-a-new-elasticsearchhttpclient-class-implementing-org-elasticache-client-client-to-enable-es-applications-to-run-against-aws-elasticsearch 39348 u ingo jaeckel .", "I m successfully using the AWS PHP SDK to send data to Firehose I just can t figure out if there s a way to manually set a document s id .", "I have compiled a scala library to do that for every request which is available here : https : github.com ticofab aws-request-signer .", "My logstash configuration file : .. . .. . My aws elasticsearch cluster s access policy is open to all right now without any restrictions .", "However curl and wget commands are working well .", "I can make index using curl command .. . .. . Error logs are .. . .. . Attempted to send a bulk request to Elasticsearch configured at http : search- .es.amazonaws.com but an error occurred and it failed", "Are you sure you can reach elasticsearch from this machine using the configuration provided", ": error message search .es.amazonaws.com : 80 failed to respond : error class Manticore : : ClientProtocolException : backtrace opt logstash vendor bundle jruby 1.9 gems manticore-0.6.0-java lib manticore response.rb : 37 : in initialize org jruby RubyProc.java : 281 : in call opt logstash vendor bundle jruby 1.9 gems manticore-0.6.0-java lib manticore response.rb : 79 : in call opt logstash vendor bundle jruby 1.9 gems manticore-0.6.0-java lib manticore response.rb : 256 : in call once opt logstash vendor bundle jruby 1.9 gems manticore-0.6.0-java lib manticore response.rb : 153 : in code opt logstash vendor bundle jruby 1.9 gems elasticsearch-transport-1.0.17 lib elasticsearch transport transport http manticore.rb : 84 : in perform request org jruby RubyProc.java : 281 : in call opt logstash vendor bundle jruby 1.9 gems elasticsearch-transport-1.0.17 lib elasticsearch transport transport base.rb : 257 : in perform request opt logstash vendor bundle jruby 1.9 gems elasticsearch-transport-1.0.17 lib elasticsearch transport transport http manticore.rb : 67 : in perform request opt logstash vendor bundle jruby 1.9 gems elasticsearch-transport-1.0.17 lib elasticsearch transport client.rb : 128 : in perform request opt logstash vendor bundle jruby 1.9 gems elasticsearch-api-1.0.17 lib elasticsearch-api actions bulk.rb : 88 : in bulk opt logstash vendor bundle jruby 1.9 gems logstash-output-elasticsearch-2.7.0-java lib logstash outputs elasticsearch http client.rb : 53 : in non threadsafe bulk opt logstash vendor bundle jruby 1.9 gems logstash-output-elasticsearch-2.7.0-java lib logstash outputs elasticsearch http client.rb : 38 : in bulk org jruby ext thread Mutex.java : 149 : in synchronize opt logstash vendor bundle jruby 1.9 gems logstash-output-elasticsearch-2.7.0-java lib logstash outputs elasticsearch http client.rb : 38 : in bulk opt logstash vendor bundle jruby 1.9 gems logstash-output-elasticsearch-2.7.0-java lib logstash outputs elasticsearch common.rb : 172 : in safe bulk opt logstash vendor bundle jruby 1.9 gems logstash-output-elasticsearch-2.7.0-java lib logstash outputs elasticsearch common.rb : 101 : in submit opt logstash vendor bundle jruby 1.9 gems logstash-output-elasticsearch-2.7.0-java lib logstash outputs elasticsearch common.rb : 86 : in retrying submit opt logstash vendor bundle jruby 1.9 gems logstash-output-elasticsearch-2.7.0-java lib logstash outputs elasticsearch common.rb : 29 : in multi receive org jruby RubyArray.java : 1653 : in each slice opt logstash vendor bundle jruby 1.9 gems logstash-output-elasticsearch-2.7.0-java lib logstash outputs elasticsearch common.rb : 28 : in multi receive opt logstash vendor bundle jruby 1.9 gems logstash-core-2.3.3-java lib logstash output delegator.rb : 130 : in worker multi receive opt logstash vendor bundle jruby 1.9 gems logstash-core-2.3.3-java lib logstash output delegator.rb : 114 : in multi receive opt logstash vendor bundle jruby 1.9 gems logstash-core-2.3.3-java lib logstash pipeline.rb : 301 : in output batch org jruby RubyHash.java : 1342 : in each opt logstash vendor bundle jruby 1.9 gems logstash-core-2.3.3-java lib logstash pipeline.rb : 301 : in output batch opt logstash vendor bundle jruby 1.9 gems logstash-core-2.3.3-java lib logstash pipeline.rb : 232 : in worker loop opt logstash vendor bundle jruby 1.9 gems logstash-core-2.3.3-java lib logstash pipeline.rb : 201 : in start workers : client config : hosts http : search .es.amazonaws.com : ssl nil : transport options : socket timeout 0 : request timeout 0 : proxy nil : ssl : transport class Elasticsearch : : Transport : : Transport : : HTTP : : Manticore : logger nil : tracer nil : reload connections false : retry on failure false : reload on failure false : randomize hosts false : http : scheme http : user nil : password nil : port 80 : level : error .. . .. . What is the check point for debug", "Thanks .", "You ll also have to check the security group and port configuration .", "Solved issue .", "Perhaps you could answer your own question so that people having the same problem can find a solution ." ] }
{ "confidence": [ 49.89265441894531, 39.351993560791016, 38.60032272338867, 38.542823791503906, 33.81321334838867, 33.455528259277344, 32.84492111206055, 31.142833709716797, 30.710798263549805, 28.460824966430664, 28.225988388061523, 27.855709075927734, 27.77445411682129, 26.48054313659668, 24.376876831054688, 24.176128387451172, 24.16107177734375, 23.812129974365234, 23.618879318237305, 22.788049697875977 ], "content": [ "Question : I am using the ElasticsearchService from Amazon . I am a little overwhelmed by their documentation . I find it vast but ever so difficult to navigate . Anyway I am looking for an example of using the ESService using their AWS Java SDK . Do you have a link - or some code to insert a document I am actually using it from Scala and what I ve got so far is : .. . .. . Where should I specify my own instance ARN The uri that looks like .. . .. . Also when using their SDK I guess I don t need to specify anywhere the endpoint they provide The one that goes by .. . .. . Or maybe this is what I should specify instead of the .. . .. . Thank you for your help and sorry if all these questions sound obvious . .. . Answer : So I got the whole thing wrong from the beginning . The SDK is useful only in order to manage the service like spin up new nodes and similar -- not to access it . For that the only solution that Amazon offers is an HTTP endpoint using the common REST api offered by Elastic Search . The problem that came next was to authenticate the requests . I have compiled a scala library to do that for every request which is available here : https : github.com ticofab aws-request-signer .", "Question : null .. . Answer : I read online about scripting in aws elacticsearch service . It said that AWS ES doesn t support dynamic scripting so I am writing aggregations using scripts stored in my disk . I wrote the following query .. . .. . But I keep getting this error . I have searched a lot online but couldn t find a good solution . Full Error - .. . .. . Here are my scripts init.groovy .. . .. . map.groovy .. . .. . comb.groovy .. . .. . red.groovy .. . .. . I have been following this tutorial from the ElacticSearch website https : www.elastic.co guide en elasticsearch reference current search-aggregations-metrics-scripted-metric-aggregation.html Comment : Dynamic scripting is not available in the Amazon managed ES service whether inline or via script files . see this http : kirankoduru.github.io elasticsearch moving-from-aws-elasticsearch-service.html Comment : so you mean to say there is no way of adding scripts to aws search queries Comment : That s correct . As far as my experience goes the AWS managed service is good enough for storing logs or for some very simple ES usage but if you need some advanced ES features you re better off rolling our own . Comment : In that case can you help me . I have a field CallDirection that contains either INBOUND or OUTBOUND . I need to return the number of records that have callDirection INBOUND and number of records where callDirection OUTBOUND can you help me create a query for this result Comment : Why not simply using a terms aggregation on the callDirection field", "Question : We are looking to use one Kibana dashboard i.e . one elastic search domain for all our micro services right now the only thing I see preventing that is when subscribing cloud watch logs to elastic search it always creates indices of the same format cwl- .. . .. . How can we create custom names for indices when we stream cloud watch logs to elastic search Should we switch to log stash to create custom names for indices and stream that to the amazon elastic search Comment : How are you pushing cloudwatch logs to elasticsearch directly Comment : We are using the AWS managed elasticsearch service you can stream your log group to elastic search service by adding a subscription to your aws elasticsearch domain that you created .. . Answer : It seems to be AWS deploys a Lambda Function called LogsToElasticsearch YOUR-ES-CLUSTER-NAME into your account . Maybe you can change this Function because of the code is simple inline Javascript . Comment : Yup that is exactly it :", "Question : How to install elasticsearch-river-mongodb plugin to Amazon Elasticsearch Service .. . Answer : From Amazon ES limits http : docs.aws.amazon.com elasticsearch-service latest developerguide aes-limits.html .. . .. . Custom plugins The service does not support custom plugins . However the service does support several standard plugins including Kibana ICU and Kuromoji . There are few necessary plugins that are installed by deafult but you cannot install your own", "Question : I m trying to connect to AWS elasticsearch but i always get the following error : .. . .. . My code is following : .. . .. . Output from aws elasticsearch : .. . .. . I tried to curl https : search-zencubes-search-xxxxxxxx.eu-west-1.es.amazonaws.com and it works - but not on port 9300 . What am i doing wrong here Comment : Is port 9300 open on that AWS instance Comment : its not open - but i think i have searched everything through and i didn t find a setting to change that - i don t know if aws uses a different default port . Ah and i m using the aws elasticsearch service - not a manually configured ec2 instance Comment : Looks like you may need to configure an access policy : docs.aws.amazon.com elasticsearch-service latest developerguide http : docs.aws.amazon.com elasticsearch-service latest developerguide es-gsg.html Comment : Might be something : Do you have an example of a complete open access policy since this is just a test Comment : IAM policy generator : awspolicygen.s3.amazonaws.com policygen.html http : awspolicygen.s3.amazonaws.com policygen.html .. . Answer : The native transport protocol is not support using AWS Managed ElasticSearch and is only available over the REST endpoint . Consider switching your client to consume the REST endpoint such as https : github.com searchbox-io Jest . Source : https : forums.aws.amazon.com thread.jspa messageID 681938 Comment : Thanks a lot - i will have a look at it later this day and come back to you : Comment : Yes - this works Thank you", "Question : null .. . Answer : I m following this tutorial https : aws.amazon.com fr blogs compute indexing-amazon-dynamodb-content-with-amazon-elasticsearch-service-using-aws-lambda to automatically index all my dynamodb streams into the Amazon elastic search services cluster that i created . I followed it step by step and i created all permissions policies . However when i am testing nothing is indexed in my Amazon ES cluster . When i am checking cloudwatch i got this in my log : .. . .. . I don t understand the issue . All i know is my Lambda function successfully trigger each dynamodb streams and can send logs to cloudwatch but cannot index these data in amazon ES . Someone please can help me to solve this issue Thank you . Comment : well the error is self explanatory your r dict does not have context key", "Question : I m trying to allow beanstalk applications to access our elasticsearch service but every method I find in your documentation fails to grant access to these apps . So far the only methods that worked for me in enabling access was to open the cluster to the entire world and enabling specific IPs which is clearly not an option given the dynamic nature of Elastic beanstalk . What I have tried - Creating a policy from the Allow or deny access to one or more accounts.. . to the root of our AWS account . Creating a policy from the Allow or deny access to one or more accounts.. . to the IAM role assigned to beanstalk EC2 servers Attaching a policy to the beanstalk IAM role allowing him ES : privileges on the elasticsearch domain . Why are all of these methods failing The documentation seems to indicate each of those methods should work so what am I missing here .. . Answer : The solution turns out to be sending signed requests as an authorised AWS user . More infor in the following links - .. . .. . https : docs.aws.amazon.com aws-sdk-php v3 guide service es-data-plane.html .. . .. . http : docs.aws.amazon.com general latest gr signing aws api requests.html .. . .. . http : docs.aws.amazon.com general latest gr signature-version-4.html", "Question : I m trying to use elasticdump to copy indexes from AWS Elasticsearch Service : .. . .. . The relevant part of the policy : .. . .. . After 100 objects I get : .. . .. . Why does AWS prevent me from scrolling .. . Answer : You might need add the IP for the machine which will access the ES to make the dump I had similar issue and adding the IP fixed my problem My policy is something like this : .. . .. . and maybe you need set the port in your command-line Comment : This does not provide an answer to the question . Once you have sufficient reputation http : stackoverflow.com help whats-reputation you will be able to comment on any post http : stackoverflow.com help privileges comment instead provide answers that don t require clarification from the asker http : meta.stackexchange.com questions 214173 why-do-i-need-50-reputation-to-comment-what-can-i-do-instead . - From Review review low-quality-posts 12706458", "Question : null .. . Answer : This is more to document my solution for the following requirements : .. . .. . AWS Elasticsearch Service as backend .. . Have AWS ES restricted to the public .. . Use JestClient to query ES .. . .. . The solution below does : .. . .. . Collect the ES end point from the AWS ES domain-name .. . Creates a JestClient for each query using AWS Sign V4 .. . Validates the Elasticsearch index and type .. . Closes client connection after the search is returned Comment : This is not a question and does not fit the SO format - but if you reworded it as a question and posted your own answer it could be . Please edit the question to describe what you re trying to do basically the first set of bullets and move the rest of it into an answer .", "Question : I have an AWS Kinesis Firehose Stream set up to feed data into an AWS ElasticSearch cluster and I can successfully insert documents by sending them to the Firehose Stream which loads them into ElasticSearch . But I would like to be able to manually specify set a document s id value when sending it off to the Firehose Stream . I m successfully using the AWS PHP SDK to send data to Firehose I just can t figure out if there s a way to manually set a document s id . I ve tried setting id id and esDocumentId values in the JSON data all to no avail . Anyone have any ideas .. . Answer : We have the exact same problem and I m sorry to say that there is no good solution at the moment . Amazon support has confirmed that they have received multiple requests for this and that they are currently working on a solution .", "Question : I am getting the following error when I try and use a template search on an AWS elasticsearch cluster using the query .. . .. . match : title : copyright .. . .. . The query is failing during the search phase whilst trying to parse the query . Why is the Parse failing My query works fine for a localhost elasticsearch instance . Here is my mapping for the index type : Comment : Please mention the query you are running . .. . Answer : AWS Elasticsearch service supports an older version of elasticsearch to the one I was using 1.5.2 compared to 2.1 . This older version supports a different syntax for template searches where the template attribute is used instead of the inline attribute to supply your template show here https : www.elastic.co guide en elasticsearch reference 1.5 search-template.html", "Question : In EC2 I have configured logstash as belows .. . .. . but logstash can t make index in AWS elasticsearch and send log data . However curl and wget commands are working well . I can make index using curl command .. . .. . Error logs are .. . .. . Attempted to send a bulk request to Elasticsearch configured at http : search- .es.amazonaws.com but an error occurred and it failed Are you sure you can reach elasticsearch from this machine using the configuration provided : error message search .es.amazonaws.com : 80 failed to respond : error class Manticore : : ClientProtocolException : backtrace opt logstash vendor bundle jruby 1.9 gems manticore-0.6.0-java lib manticore response.rb : 37 : in initialize org jruby RubyProc.java : 281 : in call opt logstash vendor bundle jruby 1.9 gems manticore-0.6.0-java lib manticore response.rb : 79 : in call opt logstash vendor bundle jruby 1.9 gems manticore-0.6.0-java lib manticore response.rb : 256 : in call once opt logstash vendor bundle jruby 1.9 gems manticore-0.6.0-java lib manticore response.rb : 153 : in code opt logstash vendor bundle jruby 1.9 gems elasticsearch-transport-1.0.17 lib elasticsearch transport transport http manticore.rb : 84 : in perform request org jruby RubyProc.java : 281 : in call opt logstash vendor bundle jruby 1.9 gems elasticsearch-transport-1.0.17 lib elasticsearch transport transport base.rb : 257 : in perform request opt logstash vendor bundle jruby 1.9 gems elasticsearch-transport-1.0.17 lib elasticsearch transport transport http manticore.rb : 67 : in perform request opt logstash vendor bundle jruby 1.9 gems elasticsearch-transport-1.0.17 lib elasticsearch transport client.rb : 128 : in perform request opt logstash vendor bundle jruby 1.9 gems elasticsearch-api-1.0.17 lib elasticsearch-api actions bulk.rb : 88 : in bulk opt logstash vendor bundle jruby 1.9 gems logstash-output-elasticsearch-2.7.0-java lib logstash outputs elasticsearch http client.rb : 53 : in non threadsafe bulk opt logstash vendor bundle jruby 1.9 gems logstash-output-elasticsearch-2.7.0-java lib logstash outputs elasticsearch http client.rb : 38 : in bulk org jruby ext thread Mutex.java : 149 : in synchronize opt logstash vendor bundle jruby 1.9 gems logstash-output-elasticsearch-2.7.0-java lib logstash outputs elasticsearch http client.rb : 38 : in bulk opt logstash vendor bundle jruby 1.9 gems logstash-output-elasticsearch-2.7.0-java lib logstash outputs elasticsearch common.rb : 172 : in safe bulk opt logstash vendor bundle jruby 1.9 gems logstash-output-elasticsearch-2.7.0-java lib logstash outputs elasticsearch common.rb : 101 : in submit opt logstash vendor bundle jruby 1.9 gems logstash-output-elasticsearch-2.7.0-java lib logstash outputs elasticsearch common.rb : 86 : in retrying submit opt logstash vendor bundle jruby 1.9 gems logstash-output-elasticsearch-2.7.0-java lib logstash outputs elasticsearch common.rb : 29 : in multi receive org jruby RubyArray.java : 1653 : in each slice opt logstash vendor bundle jruby 1.9 gems logstash-output-elasticsearch-2.7.0-java lib logstash outputs elasticsearch common.rb : 28 : in multi receive opt logstash vendor bundle jruby 1.9 gems logstash-core-2.3.3-java lib logstash output delegator.rb : 130 : in worker multi receive opt logstash vendor bundle jruby 1.9 gems logstash-core-2.3.3-java lib logstash output delegator.rb : 114 : in multi receive opt logstash vendor bundle jruby 1.9 gems logstash-core-2.3.3-java lib logstash pipeline.rb : 301 : in output batch org jruby RubyHash.java : 1342 : in each opt logstash vendor bundle jruby 1.9 gems logstash-core-2.3.3-java lib logstash pipeline.rb : 301 : in output batch opt logstash vendor bundle jruby 1.9 gems logstash-core-2.3.3-java lib logstash pipeline.rb : 232 : in worker loop opt logstash vendor bundle jruby 1.9 gems logstash-core-2.3.3-java lib logstash pipeline.rb : 201 : in start workers : client config : hosts http : search .es.amazonaws.com : ssl nil : transport options : socket timeout 0 : request timeout 0 : proxy nil : ssl : transport class Elasticsearch : : Transport : : Transport : : HTTP : : Manticore : logger nil : tracer nil : reload connections false : retry on failure false : reload on failure false : randomize hosts false : http : scheme http : user nil : password nil : port 80 : level : error .. . .. . What is the check point for debug Thanks . Comment : Are you sure about your host name port configuration You ll also have to check the security group and port configuration . I ve never used aws-elasticsearchservice but I think that s a good starting point . Comment : Solved issue . : That is MTU issue of AWS I have decrease the MTU value then it s working well . Comment : Perhaps you could answer your own question so that people having the same problem can find a solution . cf stackoverflow.com help self-answer http : stackoverflow.com help self-answer Comment : Ok . Mr Baudsp . Thanks for your comment : .. . Answer : I found this when trying to fix a similar issue . AWS has changed how it implements Elasticsearch node discovery . It will work fine until logstash tries to discover more hosts at which point it breaks . Restarting logstash temporarily but inconsistently fixes the issue . curl and wget work fine too . ElasticSearch would work for a bit but then stop ingesting data . Old config which failed .. . .. . Logstash tries to get a list of hosts from Elasticsearch but AWS s implementation has changed the format of the data returned . For more details on the specifics . https : forums.aws.amazon.com thread.jspa threadID 222600 https : discuss.elastic.co t elasitcsearch-ruby-raises-cannot-get-new-connection-from-pool-error 36252 11 .. . .. . The working config . tomwj http : tomwj.com", "Question : null .. . Answer : If my logs are in a key-value format is there a way to make a filter pattern by keyword in AWS elasticsearch so far I just don t see a way . Log : timestamp 2016-03-02 17 : 02 : 46 129 level INFO transaction id 352841324125 category org.apache.catalina.core.ContainerBase msg Calling endpoint xyz", "Question : null .. . Answer : I m using the elasticsearch javascript API 1.5 as currently 1.5 is the latest version of ElasticSearch which AWS elasticsearch supports . The function https : www.elastic.co guide en elasticsearch client javascript-api current api-reference-1-5.html api-puttemplate-1-5 in javascript which I am suppose to use works given the following template .. . .. . The current filter works but doesn t allow an array of series or isbns to be passed into the filter . I can t use the following filter object .. . .. . because if series or isbn is not passed in no book matches an empty string even if I passed in a default-value it would have to match every book which would mean it would have to contain all series and all isbns . Ideally I would just write a normal mustache file and use pre-registered templates the way described here https : www.elastic.co guide en elasticsearch reference 1.5 search-template.html pre-registered-templates . This describes two ways of storing templates on the cluster first storing them in the config scripts directory which I don t have access to on AWS elasticsearch and secondly passing in the templates as a string to an index called .scripts . For the second option i m unaware of how to do this using the elasticsearch.js api so I would have to do it another way and I can t find an example of this online .", "Question : I am trying to add Elasticsearch HTTP access to the Titan ES client https : github.com thinkaurelius titan blob titan10 titan-es src main java com thinkaurelius titan diskstorage es ElasticSearchIndex.java L334 using JEST https : github.com searchbox-io Jest . titan-es only supports ES local and transport TCP mode . But I would like to support communication over ES HTTP interface . That would allow client libraries like titan-es to use AWS Elasticsearch https : aws.amazon.com elasticsearch-service as an indexing backend which only provides a HTTP S interface . See this post https : groups.google.com forum topic aureliusgraphs tVSw7UiyEyg for more information . I am looking for some feedback on the approach I am considering so far : .. . .. . 1 . Create a new class ElasticsearchHttpClient that implements the org.elasticache.client.Client interface . The new class will use the JestClient as it s internal client . This way it will communicate with ES over HTTP . The new class will likely extend ES AbstractClient to reduce the methods that have to be implemented to : admin settings execute threadPool and close . 2 . Add a new enum HTTP CLIENT to ElasticSearchSetup .. . 3 . Ensure that the connect method on HTTP CLIENT returns an instance of Connection which contains proper values for node and client . The client member would be an instance of the new ElasticsearchHttpClient class . 4 . Ensure that ElasticSearchIndex.interfaceConfiguration method retrieves the correct instance of Connection containing the new ElasticsearchHttpClient if the INTERFACE is configured as HTTP CLIENT . From that point on the rest of the code should continue to work over the new protocol . Does that sound like it should work The 1st step is my biggest concern - I am not confident that I can implement all Client methods using the JestClient . I also asked this on the Titan mailing list https : groups.google.com forum topic aureliusgraphs 70 AAPASlzo and Elasticsearch forum https : discuss.elastic.co t how-to-create-a-new-elasticsearchhttpclient-class-implementing-org-elasticache-client-client-to-enable-es-applications-to-run-against-aws-elasticsearch 39348 u ingo jaeckel . .. . Answer : I ve posted an answer in the Titan mailing list https : groups.google.com d msg aureliusgraphs 70 AAPASlzo nd60lM3WAAAJ . What you d need to do from a Titan perspective is implement the IndexProvider interface . My guess is that it isn t feasible to make Jest look like a full Elasticsearch client . .. . I think you would use JestHttpClient -- you don t need to implement the Jest interface . IndexProvider has methods to create drop mutate query an index which you should be able to do over HTTP . Check the Elasticsearch HTTP documentation to see if you can do all the required methods on IndexProvider with JestHttpClient . .. . There s already an ElasticSearchIndex implementation of IndexProvider which does NODE and TRANSPORT . You re trying to add an HTTP or JEST option . So you might consider shoehorning your changes into ElasticSearchIndex but I m not sure how well that will work out since the 2 existing impls are both full Elasticsearch clients . Perhaps consider creating a separate ElasticSearchHttpIndex implements IndexProvider if it s cleaner .", "Question : null .. . Answer : I m using presigned URL with the generated aws signature and I can able to get default search responses like search . But I m unable to query it . Below is my presigned URL : - .. . .. . https : domain-endpoint index search X-Amz-Algorithm AWS4-HMAC-SHA256 X-Amz-Credential AKID 2Fus-east-1 2Fes 2Faws4 request X-Amz-Date 20151229T101818Z X-Amz-Expires 90 X-Amz-SignedHeaders host X-Amz-Signature signature https : domain-endpoint index search X-Amz-Algorithm AWS4-HMAC-SHA256 X-Amz-Credential AKID 2Fus-east-1 2Fes 2Faws4 request X-Amz-Date 20151229T101818Z X-Amz-Expires 90 X-Amz-SignedHeaders host X-Amz-Signature signature .. . .. . Please help me where I need to specify my query . i.e name : a", "Question : null .. . Answer : I am trying to do a longest prefix query in elastic search . My requirement is that suppose I have the numbers .. . .. . in elastic search and I query 1234567 It should return the number with the longest sequence of common characters . In this case it is 12345 . I search online for some solution but they all require scripts is elastic search . I am using AWS Elasticservice and this query has to be queried on AWS . AWS doesnot allow the usage of scripts for security reasons . Is there any way to achieve this query without the use of script Comment : Ngrams https : www.elastic.co guide en elasticsearch guide current ngrams for partial matching.html see also ngram tokenizer https : www.elastic.co guide en elasticsearch reference current analysis-ngram-tokenizer.html should get pretty close to the mark here . Comment : I saw that but I can only create ngrams of the data in elastic search and then search a string against the ngrams . I want something inverse of this . I have a long string and I need to check if any of the strings in ES is a substring of the given query-string . Comment : Then make it your search analyzer https : www.elastic.co guide en elasticsearch reference current search-analyzer.html .", "Question : null .. . Answer : How can one download an entire ES index or cluster from Amazon ES elasticdump seems to fail on scroll", "Question : I m using the AWS ElasticSearch service 1.5.2 and is receiving more than 100 requests sec without problems . Almost every query have geo filters full text filters integer filters.. . But I have a problem adding one simple filter more a boolean term filter . Once the boolean filter is added CPU in all nodes of ElasticSearch increases from 10 to 30 and during 10-15 minutes the average latency increases from 20 to 400ms after a while latencies go back to normal numbers but CPU doesn t . That boolean field is mapped properly and is searchable.. . has anyone a hint about this issue Query is formed with terms instead of term due to the official Java library that I m using . thanks Comment : Can you try the same query but swap positions between the terms boolean filter and the range one in the must clause Comment : Thanks for answering I tried that and also I tried to put the boolean out of the boolean section at same level of the geo location filter.. . And result was more or less the same . Comment : Any memory heap pressure during these high latency periods Increased number and or duration for the old GCs .. . Answer : Finally I couldn t solve the issue performing the query like I described here.. . I solved this creating 2 different document-types according to the TRUE FALSE value of the related field . With this approach no CPU increase no latency problems.. . And since ElasticSearch can search in multiple document-types at a time this separation wasn t cause major problems to my application code .. . .. . So now I perform the same query in both cases but changing only the document type target :", "Question : null .. . Answer : Want to sort listing based custom score which will dynamic calculation of distance + multiple field value distance is based on lat long passed and lat long of the listing . So i have used scripting module and it works but as it is hosted on aws server and scripting module disable by default is there any way of calculating similar thing without scripting module elasticsearch Comment : Can you show the query you have now" ] }
[ "yes-answer-long", "yes-answer-short" ]
elasticsearch
UNK_RELATION
cl-who@cl-who@40
cl-who -- common-lisp with html output @placeholder is a lisp mark-up language .
{ "confidence": [ 51.18207931518555, 49.6313591003418, 45.98511505126953, 40.58757400512695, 40.109580993652344, 39.975242614746094, 37.2327880859375, 37.2327880859375, 37.2327880859375, 37.2327880859375, 36.895362854003906, 35.83080291748047, 34.48638153076172, 34.48638153076172, 34.34556579589844, 34.09682846069336, 34.04201889038086, 32.72801971435547, 32.72801971435547, 32.12763977050781, 31.43715476989746, 31.02004623413086, 31.02004623413086, 30.57430648803711, 30.156227111816406, 29.918296813964844, 29.698362350463867, 29.698362350463867, 29.698362350463867, 29.698362350463867, 29.698362350463867, 29.698362350463867, 29.698362350463867, 29.472881317138672, 29.353771209716797, 28.634185791015625, 28.634185791015625, 28.13282012939453, 27.44226837158203, 27.100040435791016, 27.06390380859375, 27.06390380859375, 26.764671325683594, 26.420534133911133, 26.420534133911133, 25.55392074584961, 25.55392074584961, 25.023534774780273, 24.42948341369629, 23.844900131225586, 23.844900131225586, 23.844900131225586, 21.43592071533203, 21.43592071533203, 21.43592071533203, 21.43592071533203, 21.43592071533203, 21.43592071533203, 21.43592071533203, 21.43592071533203, 21.43592071533203, 21.43592071533203, 21.43592071533203, 21.43592071533203, 21.43592071533203, 21.43592071533203, 21.43592071533203, 21.43592071533203, 21.43592071533203, 21.43592071533203, 21.43592071533203, 21.43592071533203, 21.43592071533203, 21.43592071533203, 21.43592071533203, 21.43592071533203, 21.43592071533203, 21.43592071533203, 21.43592071533203, 21.43592071533203, 21.43592071533203, 21.43592071533203, 18.548696517944336, 18.548696517944336, 18.548696517944336, 18.548696517944336, 18.548696517944336, 18.548696517944336, 18.548696517944336, 18.548696517944336 ], "content": [ "I m studying Common Lisp and want to play with lisp and web development .", "Passing around partial html trees as lisp forms is not the expected way in cl-who but you could use some cl-who internals apply tree-to-commands to write a litte wrapper .", "Run this in the shell : .. . .. . Run this in the Lisp : .. . .. . Output :", "Use cl-who : str check the examples at http : weitz.de cl-who example .", "there s a special construct for that : str - see weitz.de cl-who example http : weitz.de cl-who example", "I m working my way through Lisp For The Web by Adam Tornhill and I m stuck at generating a html page with an li element in it .", "I was unable to add the tag cl-who doesn t exist not enough rep .", "The problem could be related to the cl-who package I m using .", "I m not familiar with cl-who but this seemed to work in my quick test :", "For me I ll now stick to cl-who and use more functions .", "Your problem is that in CL-WHO non-constant strings should be placed inside str like this :", "I know the topic of macros in Lisp can be quite exhausting for a beginner like me .", "All the examples I ve seen so far for cl-who work like this : .. . .. . Which works fine .", "This is derived from the Syntax and Semantics http : weitz.de cl-who syntax section of the cl-who manual .", "Does it mean that I can t use format in cl-who", "This should make my start more easy : I tried to understand the cl-who documentation before but it seems I need more practice with cl and the docs coming with it .", "I m trying to generate the following html code using cl-who : .. . .. . And here s the code that I thought would work : .. . .. . But instead I get the following output : .. . .. . Seems like : id does not work with function-calls .", "Then the macrolet is expanded to produce an inner with-html-output .. . form .", "The inner with-html-output is expanded and processes : script .. . .", "The htm macrolet takes no argument except a body and expands into a with-html-output form which has the same parameters has the lexically enclosing with-html-output macro .", "It doesn t seem like there s an implementation for with-html-output-to-string as a function .", "I found out that using cl-who : str suits my needs .", "Thanks it made my knowledge of how cl works a bit deeper .", "I expected it output : .. . .. . But it output : .. . .. . Anyone could tell me why", "However I wanted to use with-html-output-to-string with a variable instead of a hardcoded html-tree if p has : HTML : HEAD : TITLE hello : BODY : DIV world and I do this .. . .. . I get as a result .", "Could someone provide me a simple expample of a clisp script that uses .. . .. . CGI .. . usr local bin clisp .. . CL-WHO or equivalent", "I guess that as with-html-output-to-string is a macro it s last argument is never evaluated .", "The only thing I can think of is eval with-html-output-to-string s p .", "I m using with-html-output-to-string but I can t seem to figure out how to get the functionality to work .", "Since js-source-file hasn t been expanded yet with-html-output-to-string doesn t process it .", "I however hoped to get around the with-html-output helper function in every function .", "In addition to the other good answer http : stackoverflow.com a 35103460 124319 I ll cover the particular case of with-html-output .", "with-html-output gets expanded into a tree which contains js-source-file .. . .. . 2 .", "This piece of codes does not output what I want .", "For testing it seemed to be the right choice but as I see it can be done using cl alone with little extra work", "I ll have to test it later but the problem is probably that with-html-output-to-string is a macro which turns the : script .. . forms inside it into some other code .", "First note that if you macroexpand the call yourself you can see that with-html-output establishes macrolet bindings such as str htm ftm esc .. .", "By the way if you want to write directly in the stream use CL-WHO : FMT .", "To simply get the result as string you can use with-html-output-to-string : .. . .. . On the other hand to suppress the result string and only see the document as written out you can do something like this :", "I m trying to generate an html file to a file .", "If you do : .. . .. . you ll get the expected output .", "It indeed seems to be related to the internals of with-output-to-string .", "When I compile it the following output is printed to the REPL .. . .. . The string at the end of the output usually is not added and a site including this does not render in hunchentoot .", "Thanks for the explanation about the forms result vs the output stream .", "For example : .. . .. . The output will be .. . .. . foobar never sees the expansion of do-twice .", "What you see first is what the form prints to standard-output when evaluated .", "As your Hunchentoot handler is only interested in what goes to the output stream the result does not matter .", "So I have this page function : .. . .. . This will produce the desired output .. . .. . Now my I ve created a macro which produces : script tags .", "Also the page function produces this error when executed : .. . .. . Why does the embedded macro js-source-file works as expected in that it produces the desired output but fails when is called within another function", "I m using SBCL .", "A good first start is probably to do macroexpand-1 rawpage : div str+ hello name and see what it actually expands to .", "Secondly it MAY be better to replace your str+ macro with defun str+ rest strs format nil a strs never use a macro where a function would do the trick .", "Is there any way I can get around this", "@VsevolodDyomkin that worked for me if you want to put that in an answer I ll be glad to accept it .", "Thanks anyway .", "Adding : ol around : li does not help and I wanted to keep the example minimal .", "The code from the book as reference :", "The string seen after that is the form s result printed by the REPL .", "Today when I tried it again it worked for some reason .", "I m not sure if I should use a file stream with-open-file and how to get the syntax to work .", "I ve been messing with this for a day but the code just doesnt run .", "Show your code .", "My current problem comes from a simple idea to iterate over all javascript files i want to include .", "I use SBCL and Quicklisp for fast startup .", "So I ve declared my package and started like this : .. . .. . To keep it simple I reduced my problem function .", "This works as expected : .. . .. . However if I include this into my page function : .. . .. . ...it will give me a style warning undefined function : : SCRIPT when defining the new page function .", ".. . .. . P.S .", "But currently I can t wrap my head around the fact that this should work but doesn t", "The problem is that macros are expanded a bit counter intuitively in order from outmost to inmost .", "You could avoid the problem by calling macroexpand yourself in foobar : .. . .. . Since you re using a third party macro that probably isn t a good solution .", "I think the best option is to generate the markup yourself in js-source-file .", "Your suggested solution works fine .", "You are also right that third pary macro is not a good solution .", "In order to fix your code you can modify your macro as follows : .. . .. . Then : .. . .. . 1 .", "You macro is expanded and produces an htm : script .. . form .", "3 .", "4 .", "You have to choose if you prefer to use macros or functions here .", "Functions are generally not inlined and can easily be redefined at runtime .", "Macros can in theory be expanded at runtime too but in most implementations and default configurations you have to recompile whichever function depends on a macro .", "You could also let the macro call an auxiliary function .", "Thanks for the detailed explanation", "My installation is consisting of apache2 clisp and quicklisp .", "Thanks in advance", "Quicklisp is a good choice .", "Then it doesn t matter if you use clisp sbcl or ccl as an implementation .", "What should I use instead", "That s because you don t want to write directly in the stream .", "FMT works in the content section in the syntax not the attribute value section .", "@Xach : By work I suppose that you mean it does what you expect because it works just like the op s FORMAT write into the current stream ." ] }
{ "confidence": [ 61.680328369140625, 61.078739166259766, 60.59590530395508, 51.88835144042969, 48.47562026977539, 41.947242736816406, 40.69384765625, 40.5737419128418, 28.603452682495117 ], "content": [ "Question : All the examples I ve seen so far for cl-who work like this : .. . .. . Which works fine . However I wanted to use with-html-output-to-string with a variable instead of a hardcoded html-tree if p has : HTML : HEAD : TITLE hello : BODY : DIV world and I do this .. . .. . I get as a result . I guess that as with-html-output-to-string is a macro it s last argument is never evaluated . Is there any way I can get around this Comment : I was unable to add the tag cl-who doesn t exist not enough rep . Comment : The only thing I can think of is eval with-html-output-to-string s p . It doesn t seem like there s an implementation for with-html-output-to-string as a function . Comment : there s a special construct for that : str - see weitz.de cl-who example http : weitz.de cl-who example Comment : @VsevolodDyomkin that worked for me if you want to put that in an answer I ll be glad to accept it . .. . Answer : Passing around partial html trees as lisp forms is not the expected way in cl-who but you could use some cl-who internals apply tree-to-commands to write a litte wrapper . Comment : I found out that using cl-who : str suits my needs . Thanks anyway .", "Question : I m studying Common Lisp and want to play with lisp and web development . My current problem comes from a simple idea to iterate over all javascript files i want to include . I use SBCL and Quicklisp for fast startup . The problem could be related to the cl-who package I m using . So I ve declared my package and started like this : .. . .. . To keep it simple I reduced my problem function . So I have this page function : .. . .. . This will produce the desired output .. . .. . Now my I ve created a macro which produces : script tags . This works as expected : .. . .. . However if I include this into my page function : .. . .. . ...it will give me a style warning undefined function : : SCRIPT when defining the new page function . Also the page function produces this error when executed : .. . .. . Why does the embedded macro js-source-file works as expected in that it produces the desired output but fails when is called within another function .. . .. . P.S . I know the topic of macros in Lisp can be quite exhausting for a beginner like me . But currently I can t wrap my head around the fact that this should work but doesn t Comment : I ll have to test it later but the problem is probably that with-html-output-to-string is a macro which turns the : script .. . forms inside it into some other code . Since js-source-file hasn t been expanded yet with-html-output-to-string doesn t process it . .. . Answer : The problem is that macros are expanded a bit counter intuitively in order from outmost to inmost . For example : .. . .. . The output will be .. . .. . foobar never sees the expansion of do-twice . You could avoid the problem by calling macroexpand yourself in foobar : .. . .. . Since you re using a third party macro that probably isn t a good solution . I think the best option is to generate the markup yourself in js-source-file . I m not familiar with cl-who but this seemed to work in my quick test : Comment : It indeed seems to be related to the internals of with-output-to-string . Your suggested solution works fine . I however hoped to get around the with-html-output helper function in every function . You are also right that third pary macro is not a good solution . For testing it seemed to be the right choice but as I see it can be done using cl alone with little extra work Thanks it made my knowledge of how cl works a bit deeper .", "Question : I m studying Common Lisp and want to play with lisp and web development . My current problem comes from a simple idea to iterate over all javascript files i want to include . I use SBCL and Quicklisp for fast startup . The problem could be related to the cl-who package I m using . So I ve declared my package and started like this : .. . .. . To keep it simple I reduced my problem function . So I have this page function : .. . .. . This will produce the desired output .. . .. . Now my I ve created a macro which produces : script tags . This works as expected : .. . .. . However if I include this into my page function : .. . .. . ...it will give me a style warning undefined function : : SCRIPT when defining the new page function . Also the page function produces this error when executed : .. . .. . Why does the embedded macro js-source-file works as expected in that it produces the desired output but fails when is called within another function .. . .. . P.S . I know the topic of macros in Lisp can be quite exhausting for a beginner like me . But currently I can t wrap my head around the fact that this should work but doesn t Comment : I ll have to test it later but the problem is probably that with-html-output-to-string is a macro which turns the : script .. . forms inside it into some other code . Since js-source-file hasn t been expanded yet with-html-output-to-string doesn t process it . .. . Answer : In addition to the other good answer http : stackoverflow.com a 35103460 124319 I ll cover the particular case of with-html-output . This is derived from the Syntax and Semantics http : weitz.de cl-who syntax section of the cl-who manual . First note that if you macroexpand the call yourself you can see that with-html-output establishes macrolet bindings such as str htm ftm esc .. . The htm macrolet takes no argument except a body and expands into a with-html-output form which has the same parameters has the lexically enclosing with-html-output macro . In order to fix your code you can modify your macro as follows : .. . .. . Then : .. . .. . 1 . with-html-output gets expanded into a tree which contains js-source-file .. . .. . 2 . You macro is expanded and produces an htm : script .. . form . 3 . Then the macrolet is expanded to produce an inner with-html-output .. . form . 4 . The inner with-html-output is expanded and processes : script .. . . You have to choose if you prefer to use macros or functions here . Functions are generally not inlined and can easily be redefined at runtime . Macros can in theory be expanded at runtime too but in most implementations and default configurations you have to recompile whichever function depends on a macro . You could also let the macro call an auxiliary function . Comment : Thanks for the detailed explanation For me I ll now stick to cl-who and use more functions . This should make my start more easy : I tried to understand the cl-who documentation before but it seems I need more practice with cl and the docs coming with it .", "Question : Could someone provide me a simple expample of a clisp script that uses .. . .. . CGI .. . usr local bin clisp .. . CL-WHO or equivalent My installation is consisting of apache2 clisp and quicklisp . Thanks in advance .. . Answer : Quicklisp is a good choice . Then it doesn t matter if you use clisp sbcl or ccl as an implementation . Run this in the shell : .. . .. . Run this in the Lisp : .. . .. . Output :", "Question : All the examples I ve seen so far for cl-who work like this : .. . .. . Which works fine . However I wanted to use with-html-output-to-string with a variable instead of a hardcoded html-tree if p has : HTML : HEAD : TITLE hello : BODY : DIV world and I do this .. . .. . I get as a result . I guess that as with-html-output-to-string is a macro it s last argument is never evaluated . Is there any way I can get around this Comment : I was unable to add the tag cl-who doesn t exist not enough rep . Comment : The only thing I can think of is eval with-html-output-to-string s p . It doesn t seem like there s an implementation for with-html-output-to-string as a function . Comment : there s a special construct for that : str - see weitz.de cl-who example http : weitz.de cl-who example Comment : @VsevolodDyomkin that worked for me if you want to put that in an answer I ll be glad to accept it . .. . Answer : Use cl-who : str check the examples at http : weitz.de cl-who example . If you do : .. . .. . you ll get the expected output .", "Question : I m working my way through Lisp For The Web by Adam Tornhill and I m stuck at generating a html page with an li element in it . When I compile it the following output is printed to the REPL .. . .. . The string at the end of the output usually is not added and a site including this does not render in hunchentoot . Adding : ol around : li does not help and I wanted to keep the example minimal . The code from the book as reference : .. . Answer : What you see first is what the form prints to standard-output when evaluated . The string seen after that is the form s result printed by the REPL . As your Hunchentoot handler is only interested in what goes to the output stream the result does not matter . To simply get the result as string you can use with-html-output-to-string : .. . .. . On the other hand to suppress the result string and only see the document as written out you can do something like this : Comment : Today when I tried it again it worked for some reason . Thanks for the explanation about the forms result vs the output stream .", "Question : This piece of codes does not output what I want . I expected it output : .. . .. . But it output : .. . .. . Anyone could tell me why I m using SBCL . Comment : A good first start is probably to do macroexpand-1 rawpage : div str+ hello name and see what it actually expands to . Secondly it MAY be better to replace your str+ macro with defun str+ rest strs format nil a strs never use a macro where a function would do the trick . .. . Answer : Your problem is that in CL-WHO non-constant strings should be placed inside str like this :", "Question : I m trying to generate the following html code using cl-who : .. . .. . And here s the code that I thought would work : .. . .. . But instead I get the following output : .. . .. . Seems like : id does not work with function-calls . Does it mean that I can t use format in cl-who What should I use instead .. . Answer : That s because you don t want to write directly in the stream . By the way if you want to write directly in the stream use CL-WHO : FMT . Comment : FMT works in the content section in the syntax not the attribute value section . Comment : @Xach : By work I suppose that you mean it does what you expect because it works just like the op s FORMAT write into the current stream .", "Question : null .. . Answer : I m trying to generate an html file to a file . I m using with-html-output-to-string but I can t seem to figure out how to get the functionality to work . I m not sure if I should use a file stream with-open-file and how to get the syntax to work . I ve been messing with this for a day but the code just doesnt run . Comment : Show your code ." ] }
[ "yes-answer-long", "yes-answer-short" ]
cl-who
UNK_RELATION
dbunit@database@110
dbunit -- dbunit is a junit extension targeted at database-driven projects that among other things puts your @placeholder into a known state between test runs .
{ "confidence": [ 68.42349243164062, 55.76348876953125, 47.913917541503906, 47.469276428222656, 47.41325378417969, 47.355857849121094, 46.546142578125, 45.4255485534668, 44.44225311279297, 44.25029373168945, 43.88481140136719, 43.095829010009766, 43.062774658203125, 42.504554748535156, 42.30134582519531, 41.90782928466797, 41.63007736206055, 41.63007736206055, 41.495811462402344, 41.485595703125, 41.485595703125, 41.39997100830078, 41.23733139038086, 41.23224639892578, 41.219993591308594, 41.152099609375, 41.03412628173828, 41.03412628173828, 40.876564025878906, 40.876564025878906, 40.876564025878906, 40.77839660644531, 40.61905288696289, 40.51131820678711, 40.363800048828125, 40.31241989135742, 40.24052429199219, 40.24052429199219, 40.22572326660156, 40.037315368652344, 39.96653747558594, 39.943904876708984, 39.869422912597656, 39.778072357177734, 39.35183334350586, 39.31658935546875, 38.99107360839844, 38.97315979003906, 38.97315979003906, 38.97315979003906, 38.95309829711914, 38.88806915283203, 38.84261703491211, 38.73841857910156, 38.406105041503906, 38.35502624511719, 38.35502624511719, 38.35502624511719, 38.08757781982422, 38.08757781982422, 38.08757781982422, 37.97785186767578, 37.76272964477539, 37.73679733276367, 37.73679733276367, 37.65117263793945, 37.65117263793945, 37.471195220947266, 37.471195220947266, 37.451602935791016, 37.432315826416016, 37.35468292236328, 37.16032409667969, 37.16032409667969, 37.16032409667969, 37.07035446166992, 37.07035446166992, 36.98784637451172, 36.83501434326172, 36.83501434326172, 36.83501434326172, 36.7751579284668, 36.739990234375, 36.739990234375, 36.739990234375, 36.739990234375, 36.739990234375, 36.739990234375, 36.569435119628906, 36.569435119628906, 36.569435119628906, 36.474388122558594, 36.474388122558594, 36.474388122558594, 36.3785514831543, 36.3785514831543, 36.148170471191406 ], "content": [ "dbUnit is a JUnit test extension .", "junit - dbunit is the recommended way to set up your database to a known state before running a given integration test .", "We want to use spring-test-dbunit and dbunit to setup and teardown test data on a Postgresql 9.4.2 database with an empty schema .", "I am using DBUnit with HSQLDB for JUnit test cases .", "Minimal dbUnit data for each test .", "The way DbUnit works is by putting your database in a known state before running the particular test .", "If you are using the spring-test-dbunit http : springtestdbunit.github.io spring-test-dbunit then you need to create an IDatabaseConnection with a specific DBUnit configuration .", "The assertion needs to be dbunit Assertion.assertEquals not junit Assert.AssertEquals", "For testing we also use DbUnit and Spring-test-dbunit .", "For this I use a dedicated test database Postgresql same as the production database and dbUnit .", "Populate the database with the DbUnit XML .. . 2 .", "I have to test a database-driven app and read about the DbUnit extension which I was planning to research and implement over the coming weeks .", "Extract the contents of your database in-place in your DbUnit XML and optionally also the DTD See DbUnit Home Page - DbUnit FAQ - How to extract a flat XML dataset from my database", "I m using DBUnit for testing my database .", "I am trying to using spring-test-dbunit .", "I m making use of DbUnit which sets up an in-memory database based on extending a base DbUnit class using JUnit Annotation @Before .", "The problem can be solved when I use DBunit without spring-test-dbunit as follow : .. . .. . I don t know how to solve this problem in spring-test-dbunit .", "https : springtestdbunit.github.io spring-test-dbunit .. . .. . As I am using spring 4.1.x I decided to use version 1.2.1 for spring-test-dbunit and 2.5.2 for core dbunit .", "I try to fill a Database Table with DBUnit within a Spring Transactional Test .", "4 . dbUnit configured with DatabaseOperation.CLEAN INSERT 0 .", "DBUnit uses SLF4J to handle logging .", "The problem is that when configuring DBUnit I pointed it to the SAME mysql database .", "I am using in-memory-database HQLDB with DBUnit .", "After fighting with DBUnit Spring-Test-DBUnit for most of my day I decided to scrap that library and roll my own for the mere fact that DBUnit seems to be nothing but pain .", "Take a look at this https : github.com springtestdbunit spring-test-dbunit pull 30 .", "So I m getting this error : .. . .. . when trying to populate a H2 DB using DbUnit in the context of a Spring JUnit test .", "Spring Test and DbUnit is two excellent frameworks .", "We use DBUnit in conjunction with Spring Test extensively .", "The reason is that DBUnit by default cleans the tables and after that inserts the test records .", "Can anything else be covered in DBUnit Framework Test cases", "Can anything else be covered in DBUnit Framework Test cases", "I have a problem in DBUnit because DBUnit PHPUnit Extensions Database TestCase Src https : github.com sebastianbergmann dbunit blob master PHPUnit Extensions Database TestCase.php class does not seem to be truncating the existing data on the test db .", "How does the DBUnit work", "DbUnit 2.5.1 .", "I try to use Integration testing my class with JUNit DBUnit and Hibernate .", "I m trying to include dbunit and spring dbunit to my project for testing .", "At what point does DBUnit actually truncate the database", "Use DbUnit to get actual table from database .", "DBUnit test cases scope would be to verify Database Table Structure and Master Table Data .", "I need it for my DBUnit integration test .", "Quoting their website : .. . .. . Spring DBUnit provides integration between the Spring testing framework and the popular DBUnit project .", "How to ignore foreign key constraints with spring-test-dbunit .", "I m trying to test my code using Spring and DBunit http : springtestdbunit.github.io .. . .. . Once inside the unit test : .. . .. . will return the list of entities inserted by DBUnit so it did insert records in teh database MYSQL .", "Since you re using DbUnit you may also be interested in the third-party DbUnitTestExecutionListener https : springtestdbunit.github.io spring-test-dbunit .", "Are there any facilities provided by the DBUnit for this", "So the logging for DBUnit is controlled but the underlined logger .", "I m not going to answer your points as your question is not really related to DbUnit but to DbUnit alternatives .", "I m looking forward to integrate dbUnit to a project .", "I am looking for scope of DBUnit TestCase .", "Not sure why you think of dbUnit this way .", "Question now is how to make DBUnit commit the transaction I suppose.. . .. . .. . At the beginning of the test after DBUnit initialization I run : .. . .. . And it returns false .", "I m doing the test with junit 4.10 dbunit 2.4.8 unitils 3.3 hsqldb 2.2.8 .", "I have a small DBUnit Test : .. . .. . Nothing more .", "Then I decided to try spring-test-dbunit and I got several problems .", "The dbUnit error is table does not exist and dbUnit does not create tables .", "DBUnit - SQL error in syntax .", "I absolutely hate dbunit .", "Can I do it with dbUnit", "1 DBUnit connect to the actual database delete everything insert records specified in @DatabaseSetup test the cases and then roll back .", "Are JPA annotations required by Spring test DBUnit library in order to setup my database before tests", "I am using Spring-test-DbUnit library with Spring Data JPA TestNG and Postgres database .", "I am trying to make integration tests that access the database using Arquillian Persistence Extension DBunit .", "If you use the Spring Framework or don t mind using it at least for testing then Spring DBUnit https : github.com springtestdbunit spring-test-dbunit is currently the best maintained alternative to plain DBUnit that I know and use .", "dbUnit just leaves them out .", "dbUnit does not generate those files .", "Secondly I needed DBUnit to be case sensitive about the database-table names .", "dbunit won t do it for you because it doesn t know the intended database structure .", "But we do not use the DBUnit functionality to delete data at the end of the test .", "Now to test my functionality I make use of DbUnit .", "But when some assertions of DBUnit failed .", "There s a separate schema which gets populated by Spring-test-DbUnit and the first test runs without any problems .", "Use dbUnit to test all DAO CRUD operations : .. . .. . C : dbUnit verifies correct table contents from the insert s having correct field contents and cleans table s afterwards .. . .. . R : dbUnit seeds the data for the query test and cleans table s afterwards .. . .. . U : dbUnit seeds the data for the update test verifies correct table contents for the update s having correct updated field values and cleans table s afterwards .. . .. . D : dbUnit seeds the data for the delete test verifies correct table contents from the delete s rows no longer exist and cleans table s afterwards", "And consequently the DBUnit is not cleaning DB .", "What are the benefits of using DbUnit", "Note no use of DbUnit :", "Hi all i m working using dbunit .", "datatypeFactory org.dbunit.ext.mssql.MsSqlDataTypeFactory .. . compare src C : export.xml dbunit", "I am facing a problem which is independent of dbunit jar versions as I have tried with dbunit-2.0.jar dbunit-2.2.1.jar dbunit-2.4.9.jar dbunit-2.2.3.jar and dbunit-2.3.0.jar and independent of Oracle Database version as I tried on oracle11g and oracle12c.That the data which I try to insert through xml file into a column of datatype NCLOB for a table it inserts junk characters which are of no use into the system for further processing .", "So this actually have nothing to do with DBunit sort of.. .", "DBUnit does exactly what you ask it to do .", "Originally I used plain dbunit and it worked fine .", "sourceforge.net p dbunit bugs 393 https : sourceforge.net p dbunit bugs 393", "I read that DBUnit is a solution for such a situation .", "So it seems that it s a problem with DbUnit", "Problem : MASSIVE build with legacy dbUnit.. .", "To do so I use dbunit .", "That s inherent to databases and JDBC not DbUnit .", "The situation of DBUnit is indeed sometimes frustrating .", "So when DBUnit is executed it takes the specified dataset.xml and overrides the information from my original database .", "The question is am I supposed to create a new database only for tests so my DBUnit can point to it", "am I supposed to create a new database only for tests so my DBUnit can point to it", "Then I gave a try to spring-test-dbunit and this lib run smoothly .", "But Now I have to test it s methods using DBUnit .", "This test passes well : in DB table is generated from dbunit dataset .", "I am trying to use dbunit to automate some ETL testing .", "Thanks to John Hurst from the DBUnit group for helping me out with this .", "I tried to use dbunit to setup the database but when I run the sources there is no OK ouputed and Junit seems alwaying running without stopping ." ] }
{ "confidence": [ 67.80835723876953, 58.48845672607422, 56.99259948730469, 55.23038101196289, 54.57271194458008, 54.233428955078125, 54.14369583129883, 53.8886833190918, 53.72633361816406, 53.428436279296875, 53.39728546142578, 53.22124481201172, 53.153778076171875, 52.87873077392578, 52.84136199951172, 52.560733795166016, 52.482688903808594, 52.29203414916992, 52.16556930541992, 51.264488220214844 ], "content": [ "Question : I am looking for scope of DBUnit TestCase . Can Spring DAO Layer methods be tested using using DBUnit My perception is that JUnit should be used for Spring DAO Layer test cases . DBUnit test cases scope would be to verify Database Table Structure and Master Table Data . Can anything else be covered in DBUnit Framework Test cases .. . Answer : Can Spring DAO Layer methods be tested using using DBUnit Yes .. . .. . My perception is that JUnit should be used for Spring DAO Layer test cases . DBUnit test cases scope would be to verify Database Table Structure and Master Table Data . dbUnit is a JUnit test extension . Not sure why you think of dbUnit this way . It can verify tables contain data but that s to verify a CRUD operation . Can anything else be covered in DBUnit Framework Test cases Yes lots . Use dbUnit to test all DAO CRUD operations : .. . .. . C : dbUnit verifies correct table contents from the insert s having correct field contents and cleans table s afterwards .. . .. . R : dbUnit seeds the data for the query test and cleans table s afterwards .. . .. . U : dbUnit seeds the data for the update test verifies correct table contents for the update s having correct updated field values and cleans table s afterwards .. . .. . D : dbUnit seeds the data for the delete test verifies correct table contents from the delete s rows no longer exist and cleans table s afterwards", "Question : null .. . Answer : I have a JUnit test where I am using Spring Test DBUnit http : springtestdbunit.github.io spring-test-dbunit and Spring declarative transaction management http : docs.spring.io spring docs current spring-framework-reference html transaction.html tx-decl-explained . If I tag a test method with @Transactional which will utilize the @BeforeTransactional to verify database state and also with @DatabaseSetup to set the database state to what I want which will have precedence Will the database first be set up and then @BeforeTransactional will check it or will the check happen after setup Here s some code :", "Question : I m getting started with DbUnit lately and I m trying to write a very simple integration test just to populate a table with 3 rows . Reading the DbUnit Getting Started Guide http : dbunit.sourceforge.net howto.html extendDbUnit it tells me to create a dataset file . My dataset xml file looks exactly like this : .. . .. . Then I have to create a test class which extends DBTestCase and implement my test methods annotated with @Test like any other JUnit test case . The class I created is as follows : .. . .. . After that I tried to run the test case but got the following error : .. . .. . If I tried to remove the extend DBTestCase JUnit recognize the test case and runs normally but with the extend it didn t . I tried to clean and re-compile but it didn t work . I also tried to run the test outside the IDE I use Intellij Idea but again I had no sucess . Has anyone been through this same problem Thank you very much in advance . Any help will be appreciated . .. . Answer : There are JUnit 3 vs 4 runner differences that may be the cause you don t mention JUnit and dbUnit versions nor how dependency managing them . And different tooling has different running default requirements e.g . Maven defaults to only running classes as tests with class name suffix of Test . Note that it is not required to extend a dbUnit class I don t and not doing so should eliminate the encountered problem . Just further down that page you mentioned are two sections describing how : .. . .. . Using your own parent class or a dbUnit IDatabaseTester instance : http : dbunit.sourceforge.net howto.html Database setup with your own TestCase subclass .. . Using no parent class : http : dbunit.sourceforge.net howto.html Database setup with no parent class .. . .. . And combining both is what I ve done for years - have my own parent test class for common stuff and then DI or instantiate the desired DBTestCase usually PrepAndExpectedTestCase . Comment : Thanks It worked using a IDatabaseTester . :", "Question : Spring Test helpfully rolls back any changes made to the database within a test method . This means that it is not necessary to take the time to delete reload the test data before each test method . But if you use the @BeforeClass Junit annotation then that forces the data loader to be static . A question that is explored here : http : stackoverflow.com questions 1052577 why-must-junits-fixturesetup-be-static .. . .. . If the data initialization method is static so must the data connection methods and the data source..and on and on...forcing everything to be static...which won t work . At which point I ask - what good is Spring Test s ability to rollback changes when you have to delete reload the test data anyway for every test .. . Answer : We use DBUnit in conjunction with Spring Test extensively . But we do not use the DBUnit functionality to delete data at the end of the test . We put a bunch of DBUnit inserts for our test data in the @Before method to initialise the test . Then when the test is complete we let the spring rollback functionality bring the database back to its original state . The biggest problem we have with this is that the DBUnit data has to be loaded before each test which can be a major performance hit . Most of our tests using DBUnit are read only testing the behaviour of the application based on certain predefined behaviour . So we have a habit of creating master tests that then run all the fine grain tests in a batch within the same transaction . Comment : Well that s bad practice . What do you think of the checked solution", "Question : For example after I setup a datasource to the actual database and use @DatabaseSetup to set it to a state which of the following happens 1 DBUnit connect to the actual database delete everything insert records specified in @DatabaseSetup test the cases and then roll back . 2 DBUnit somehow create an in-memory database based on the datasource setup the in-memory database . Nothing is changed in the actual database . 3 Magic . How does the DBUnit work Thanks . .. . Answer : DBUnit does exactly what you ask it to do . If you connect it to the real database then yes it will be acting on the real database . If you tell it to act on an in-memory database then that s what it will do . If you get it to do a CLEAN INSERT then it will wipe all of the data in all tables specified in the dataset you re asking it to load it ll then load the dataset then it will remove the loaded dataset . The data it wiped at the start will not be put back in-place . If you re using DBUnit for testing you generally would not point it at the real i.e . production database . Instead you d create a copy of some sort and point it at that . That copy could be a real instance of your DB something in-memory it could be populated with dummy-data or a copy of the real data .", "Question : I m wondering if there is any way to specify for example tomorrow as date in the DBUnit XML dataset . Sometimes code logic is different for dates in future and dates in the past and I want to test both cases . For sure I can specify something like the 5th of November 2239 and be sure that test will work till this date but are there more elegant way . I haven t yet faced such situation during my Java development but once I had experience when code logic was different for one day before dates two days before dates and more than two days before dates . In this case the only possible solution to write database driven test is to insert relative dates during data-import . Are there any facilities provided by the DBUnit for this .. . Answer : You can use add of Calendar http : java.sun.com j2se 1.5.0 docs api java util Calendar.html add 28int 20int 29 to define dates in the future and using this in relationship with datasource for JUnit . I doubt that this would work with DBUnit s XML format . May be you create your own TestCase which extends from DBTestCase and implement getDataSet method . Comment : Yes I know how to calculate relative day in Java . It looks like I really need to parse dataset and calculate dates manually .", "Question : I have a simple spring project and try to use spring-dbunit https : springtestdbunit.github.io spring-test-dbunit to do some services tests . I use jdbcTemplate http : docs.spring.io spring docs current javadoc-api org springframework jdbc core JdbcTemplate.html for DB access . Beans configuration : .. . .. . Test class looks like : .. . .. . Cars.xml is a simply data set : .. . .. . I have to errors in configuration but when call carService.sizeInGarage I see message : .. . .. . org.springframework.jdbc.BadSqlGrammarException : StatementCallback bad SQL grammar SELECT count FROM car nested exception is java.sql.SQLException : Table not found in statement SELECT count FROM car .. . .. . Should I init DB before run test or problem is with @DatabaseSetup https : github.com springtestdbunit spring-test-dbunit blob master spring-test-dbunit src main java com github springtestdbunit annotation DatabaseSetup.java and cannnot find xml file How check that hsqldb started and working correct .. . Answer : You need to provide a way to create your schema before running your unit tests . The way DbUnit works is by putting your database in a known state before running the particular test . If you have a RDBMS installed you should have already the database created but if you are using an in-memory database more likely for this matters you must provide a SQL script or some other way to be able to create the schema for you when the in-memory database is started . Have a look here https : bitbucket.org vadimvera spring-jdbc this may helps . Comment : Yes you have right . I had to init DB schema first . In sswai-test.xml I added : n jdbc : initialize-database data-source dataSource jdbc : script location init-datasource.sql jdbc : initialize-database where init-datasource.sql just creats table car .", "Question : I have an application pointing to a mysql database . I have been trying to use DBUnit to set up my tests environments which works fine . The problem is that when configuring DBUnit I pointed it to the SAME mysql database . So when DBUnit is executed it takes the specified dataset.xml and overrides the information from my original database . which makes sense because there is where I am pointing it to . The question is am I supposed to create a new database only for tests so my DBUnit can point to it If so how would I manage the structure synchronization between my original database and the one for tests Thanks in advance . .. . Answer : am I supposed to create a new database only for tests so my DBUnit can point to it It is a better approach to do so as it eliminates multiple problems . how would I manage the structure synchronization between my original database and the one for tests You don t mention tech in your persistence stack such as Hibernate Spring Spring Boot Spring Data Flyway LiquiBase etc . to suggest more of how to implement this . In general run DDL in the schema at tests run startup either from managed DDL from something like Flyway or auto-generation from Hibernate . Additionally my preferred and typical testing approach is with : .. . .. . 1 . An in-memory embedded database for its speed such as Apache Derby automatically started just before launching tests . 2 . Create tables in schema using Hibernate DDL gen from annotated entities . 3 . No existing rows in any tables happens automatically with an embedded database and a clean build when storing any of its files in a subdirectory of the build output dir . 4 . dbUnit configured with DatabaseOperation.CLEAN INSERT 0 . 5 . Minimal dbUnit data for each test . Comment : Great answer thanks Yes I am using hibernate-entitymanager and let s say I am using liquibase to manage mysql database . So the question that comes to my mind is. . Is it safe to use Hibernate DDL gen to create the schema and its tables for the in-memory database or should I find the way to use the same liquibase for both databases Comment : If the team correctly manages the entities then it s probably very safe to use the Hibernate DDL gen . However if the entities don t have all the needed annotations then your best choice is the LiquiBase configuration . Since the team has made the effort to write the LiquiBase files and LiquiBase has the master definition and used for production I would use it instead of the Hibernate DDL gen . This way tests use the same configuration as dev test prod environments . This is very helpful and important . Comment : Jeff I have another doubt . My DAO s are using a connection which is specified in my persistence.xml to mysql .. . and my dbunit is using the connetion I specified in PropertiesBasedJdbcDatabaseTester to hsql .. . So when I run the tests the the DAO s do not point to my in-memory database. . could you help me to solve this matter Comment : Just before I saw this comment I saw your other question on this and that it was answered well .", "Question : So I have a Spring project which uses Hibernate as ORM and is unfortunately bound to JUnit 3.8 to support the old JSFUnit framework . As part of unit-testing I wish to access database logic while keeping my test database intact at the end of the run . I figured DbUnit would be useful and I m searching for a working example integrating all these technologies whereby test data gets refreshed for each JUnit method . I really appreciate any help on this especially since I have already spent much time looking at examples running on JUnit 4 and not 3.8 . Thanks Edit : I believe using class AbstractJUnit38SpringContextTests by Spring is the way to go since it is the latest class made for JUnit 3.8 to help us in such cases . Comment : Afaik if you use @Transactional and the Spring JUnit Runner Spring should automatically recognize that it s in test mode and rollback the transactions.. . Comment : Yes but as I understood the Spring JUnit Runner is for JUnit 4 and I m depending on JUnit 3.8 instead . Comment : Ah yeah my bad . Never needed the abstract-class for spring there but as far as the documentation says it seems to be the way to go.. . .. . Answer : We dropped support for JUnit 3.8 in Spring Framework 4.0 . However if you are still using Spring 3.2.x you can extend from the AbstractTransactionalJUnit38SpringContextTests http : docs.spring.io spring-framework docs 3.2.15.RELEASE javadoc-api org springframework test context junit38 AbstractTransactionalJUnit38SpringContextTests.html base-class . Since you re using DbUnit you may also be interested in the third-party DbUnitTestExecutionListener https : springtestdbunit.github.io spring-test-dbunit . Regards .. . .. . Sam author of the Spring TestContext Framework Comment : Thanks . I just need a way to change the Spring Context file location now . Unfortunately my test case already extends class ServletTestCase of Apache Cactus which works with JSFUnit to run my test case on the Tomcat running in eclipse . So I cannot extend a second class such as AbstractTransactionalDataSourceSpringContextTests maybe which allows me to change the context through overriding a method named getConfigLocations . Glad I got your attention :", "Question : I am new to automated testing and dbUnit . So I would appreciate your advice . I am going to create a test suite that will run the following way : .. . .. . create an in-memory H2 database .. . run DDL scripts to create tables .. . run dbUnit to insert initial data let s call it STATE0 that will be used by all tests . run tests .. . .. . Till there it looks nice for me but what I don t understand is how do I revert the database to the STATE0 after a test run and changed the data Can I do it with dbUnit Or with something else Should I recreate the database before each test Simple not commiting transactions in tests is not appropriate for me because the tests will eventually run more than one transaction over may be more than one database-connection . .. . Answer : DBUnit can do the work four you automatically if you write your @BeforeClass @Before and @After methods properly . E.g . in our project using Derby one such test case looks like .. . .. . This code puts back a subset of the DB schema to the state defined by MyDataSet.xml after each test . Note that as @Pascal commented the reset may not always be full - if a test modifies a table which is not in the dataset it won t be affected by the @Before @After methods . Comment : Does this really reset the DB I mean if my test insert some data in the table FOO and if MyDataSet.xml doesn t include FOO FOO won t be reseted right Comment : @Pascal you are probably right . Being human it is always advisable to double-check that if I am running tests which involve table FOO that table is actually included in the dataset . Comment : ter I agree with that . It s just that the nitpicker in me was not fully convinced by the phrasing of the last sentence : +1 anyway . Comment : @Pascal in our profession it is almost always better to nitpick in advance than to be sorry afterwards : - So thanks for your comment I updated my answer to make it hopefully clearer . Comment : I find it very clear and fully accurate now .", "Question : In a nutshell .. . .. . My command-line Java application copies data from one datasource to another without using XA . I have configured two separate datasources and would like a JUnit test that can rollback data on both datasources . I use DBUnit to load data into the source database but I cannot get this to rollback . I can get the target datasource to rollback . My Code .. . .. . Given this config.. . .. . .. . and this code.. . The problem as I see it is that @TransactionConfiguration only states the target datasource for enabling a rollback . DBUnit is being passed dataSourceA explicitly and is picking up the default transaction manager named transactionManager I m not sure how which has not been told to rollback . Question .. . .. . How can I tell both transaction managers to rollback Can I use a single transaction manager when my datasources do not support XA transactions Note : The application does not require a transaction manager on dataSourceA when running in production as it will only be read-only . This issue is for my tests classes only . .. . Answer : A possible workaround would be to introduce a helper bean annotated as @Transactional transactionManagerTarget and leave your test annotated as @Transactional transactionManager configuring both with defaultRollback true . Your test would then have to call the helper bean which in turn would call your service bean under test . This should cause the transaction around your service to roll back then the transaction around DBUnit . It s a bit messy though . Other possible approaches : .. . .. . Using an in-memory database such as H2 instead of your production database- you could configure this to drop all of its data when required . Allow DBUnit to commit and have a compensating transaction in your tear-down method to clear the data out . Comment : I tried factoring out a helper bean but this does not help the siutation . Somewhere under the hood DBUnit will not rollback when there are multiple transactionManagers . I m going to accept your answer for using HSQL as the way forward however in my case I m still stuck because I use Sybase to create a temporary table on this datasource and the syntax is not compatible with HSQL .", "Question : null .. . Answer : I am trying to using spring-test-dbunit . https : springtestdbunit.github.io spring-test-dbunit .. . .. . As I am using spring 4.1.x I decided to use version 1.2.1 for spring-test-dbunit and 2.5.2 for core dbunit . Originally I used plain dbunit and it worked fine . Then I decided to try spring-test-dbunit and I got several problems . Here is my test class .. . .. . My dataset file looks like this .. . .. . Database connection bean looks like this .. . .. . where dataSource bean is .. . .. . But when I try to run test I get this error .. . .. . What is the problem Also when I used plain dbunit I had to set autoCommit in order to make it work .. . .. . though I thought that autoCommit supposed to be true by default", "Question : I have wrote a test class for Dao using DbUnit and dataset .. . .. . Here is my class : .. . .. . and data set is : .. . .. . When i am running my test case i am getting org.dbunit.dataset.NoSuchTableException : mso temp .. . .. . My problem is i don t need any entity as i am connecting to other database and saving the data from there to the temp table in our application database using PreparedStatement.If i create entity class the test case runs fine . Is there any way through which DBUnit will consider the table for which entity class is not there . .. . Answer : dbUnit does not use entity classes it directly uses JDBC . The dbUnit error is table does not exist and dbUnit does not create tables . Your application test setup creates the tables from the entity classes so without the entity the table does not exist . For needed tables without entities test setup must create these tables . For ease you may want to just put the entity in the test classes folder . Another option is to run DDL that creates the table s before running all tests . Comment : Jeff thanks for the response so it means if i will create the entity class in test folder it will not cause any problem .", "Question : Spring Test helpfully rolls back any changes made to the database within a test method . This means that it is not necessary to take the time to delete reload the test data before each test method . But if you use the @BeforeClass Junit annotation then that forces the data loader to be static . A question that is explored here : http : stackoverflow.com questions 1052577 why-must-junits-fixturesetup-be-static .. . .. . If the data initialization method is static so must the data connection methods and the data source..and on and on...forcing everything to be static...which won t work . At which point I ask - what good is Spring Test s ability to rollback changes when you have to delete reload the test data anyway for every test .. . Answer : Spring Test and DbUnit is two excellent frameworks . But it doesn t make sense to combine them . Since Spring Test execute a rollback on the connection it cleans up afterwards while DbUnit cleans up and insert test data in the @Before method . Use Spring if you re not dependent on any dynamic data and dbUnit otherwise . Comment : I find DBUnit s ability to load a database-table from XML to be convenient . Does Spring Test have a capability like this Comment : Yeah I think Mats is wrong here . Loading test data from an XML file is a nice benefit to db testing with Spring .", "Question : I am using DBUnit with HSQLDB for JUnit test cases . I am not able to create tables using @DatabaseSetup. . How to create-table when a test case starts using DBUnit + HSQL without ORM provider .. . Answer : What do you mean I am not able to crate tables Do you mean you dont have permissions or you just can t use the @DatabaseSetup annotation . You will have to programatically create the tables using the SQL CREATE TABLE command : .. . .. . example tutorial http : www.w3schools.com sql sql create table.asp .. . .. . If you can t use @DatabaseSetup you can always create the database and populate it with whatever records you need in a @Before annotated setup method . Just remember to also clean up your db by dropping tables etc in a corresponding @After method", "Question : I am using spring-test-dbunit and I get a warning in my Unit tests with this message : .. . .. . Code : .. . .. . Warning : .. . .. . 1093 main WARN org.dbunit.dataset.AbstractTableMetaData - Potential problem found : The configured data type factory class org.dbunit.dataset.datatype.DefaultDataTypeFactory might cause problems with the current database MySQL e.g . some datatypes may not be supported properly . In rare cases you might see this message because the list of supported database products is incomplete list derby . If so please request a java-class update via the forums.If you are using your own IDataTypeFactory extending DefaultDataTypeFactory ensure that you override getValidDbProducts to specify the supported database products . The problem can be solved when I use DBunit without spring-test-dbunit as follow : .. . .. . I don t know how to solve this problem in spring-test-dbunit . Please help . .. . Answer : Thanks to Lynn Ni o . The answer helped me to correct the configuration for my H2 Database :", "Question : I ve read many posts and threads about integration-testing with Spring but nothing is neither satisfying nor helpful . We re using Spring 3.2.3 with Hibernate Spring Data and an Oracle database . For testing we also use DbUnit and Spring-test-dbunit . In production code the transaction is started by a controller the service itself does not know anything about a transaction . So here is my test : .. . .. . What I found out is that if I annotate the NewsService with @Transactional propagation Propagation.REQUIRES NEW the test works fine however it is not the same as in production mode . @Transactional propagation Propagation.REQUIRED is not sufficient as the DbUnit-Spring-test opens a transaction by itself and the latter assert fails as the transaction is not committed yet . How can I achieve that a transaction is committed BEFORE the last assert is executed .. . Answer : As mentioned in the documentation .. . .. . http : springtestdbunit.github.io spring-test-dbunit .. . .. . If you have configured DBUnit tests to run using the are DbUnitTestExecutionListener and are also using the TransactionalTestExecutionListener you may experience problems with transactions not being started before your data is setup or being rolled back before expected results can be verified . In order to support @Transactional tests with DBUnit you should use the TransactionDbUnitTestExecutionListener class . .. . .. . And to initiate transaction you have to annotate your test method or class with @Transactional annotation like this . Comment : Thanks for your reply but it s not about the @ Transactional . It s about commiting a transaction manually AND DIRECTLY AFTERWARDS assert that the database is an an expected state . The @ Transactional is not necessary as the database is resetted before each test . Comment : OK may be you need to handle manually commit by flushing the session as you are already inside a global test transaction of dbunit SessionFactory.getCurrentSession.flush Comment : Or moviing the saving part into a new testSave method by wrapping the method by a Transactional requires new may be it will commit after leaving the method Comment : No success so far . Kept googling : maybe @PersistenceContext type PersistenceContextType.EXTENDED private EntityManager entityManager is be expedient", "Question : I am using spring-test-dbunit and I get a warning in my Unit tests with this message : .. . .. . Code : .. . .. . Warning : .. . .. . 1093 main WARN org.dbunit.dataset.AbstractTableMetaData - Potential problem found : The configured data type factory class org.dbunit.dataset.datatype.DefaultDataTypeFactory might cause problems with the current database MySQL e.g . some datatypes may not be supported properly . In rare cases you might see this message because the list of supported database products is incomplete list derby . If so please request a java-class update via the forums.If you are using your own IDataTypeFactory extending DefaultDataTypeFactory ensure that you override getValidDbProducts to specify the supported database products . The problem can be solved when I use DBunit without spring-test-dbunit as follow : .. . .. . I don t know how to solve this problem in spring-test-dbunit . Please help . .. . Answer : Problem solved . I add the following configuration to applicationContext.xml context.xml .", "Question : According to the DBUnit docs link http : www.dbunit.org faq.html tableseq it should support using a CLEAN INSERT when using a DatabaseSequenceFilter . I get the following exception when attempting this .. . .. . My tables look like this : .. . .. . And my DBUnit dataset looks like this : .. . .. . So within my test class where I have this code I get the error if data already exists in the database and it cannot be removed because of the foreign key constraints .. . .. . Interestingly a work around is to use REFRESH instead of CLEAN INSERT but this is less than ideal because junk data could reside in the database causing side effects : .. . .. . Has anyone been able to get this CLEAN INSERT to work with Sybase and foreign-keys From reading other posts similar issues exist for MySQL so maybe there is a common issue here or me not understanding something .. . .. . EDIT .. . .. . I have now added my own workaround answer after running into the same problem again . I am using Sybase ASE 15 + DBUnit 2.4.8 .. . Answer : I have come to the conclusion that this is indeed a problem with Sybase + DBUnit after hitting the same issues on another project although I am using the same JAR file versions and database server . The workaround I finally settled on was the following .. . .. . The caveat is that the TRUNCATE will obviously blow away all data in the database tables when the test runs but this is something I can live with . At least I know for certain what data is in the database and my tests are less likely to fail due to erroneous records being inserted by other developers running in between test executions . Probably a good reason why you want a dedicated database for unit + integration tests .", "Question : null .. . Answer : I m writing some Unit tests for a database component . For this I use a dedicated test database Postgresql same as the production database and dbUnit . Now i would like to create an XML dump of my entire test database . I currently use the code from the FAQ page of dbUnit http : dbunit.sourceforge.net faq.html extract .. . .. . This all works great except for columns of the type Array http : www.postgresql.org docs 9.1 static arrays.html . dbUnit just leaves them out . I hoped it would be fixed by adding the PostgresqlDataTypeFactory http : dbunit.sourceforge.net apidocs org dbunit ext postgresql PostgresqlDataTypeFactory.html but this doesn t change a thing . Does someone know how I can add support for postgresql arrays in dbUnit" ] }
[ "yes-answer-long", "yes-answer-short" ]
database
UNK_RELATION
dexmaker@android@46
dexmaker -- programmatic code generation for @placeholder .
{ "confidence": [ 31.117395401000977, 30.040424346923828, 29.86186981201172, 29.089248657226562, 28.996261596679688, 28.996261596679688, 28.464052200317383, 27.918479919433594, 27.750553131103516, 26.94301986694336, 26.94301986694336, 26.886735916137695, 26.48141098022461, 26.014301300048828, 26.014301300048828, 25.773876190185547, 25.67388153076172, 25.095890045166016, 24.745162963867188, 24.745162963867188, 24.745162963867188, 24.745162963867188, 24.745162963867188, 24.745162963867188, 23.82674789428711, 23.675582885742188, 23.675582885742188, 23.675582885742188, 23.675582885742188, 23.498729705810547, 23.407672882080078, 23.224063873291016, 23.224063873291016, 22.89484405517578, 22.406442642211914, 22.406442642211914, 22.406442642211914, 22.406442642211914, 22.406442642211914, 22.406442642211914, 22.406442642211914, 21.62570571899414, 21.522136688232422, 20.97509765625, 20.97509765625, 20.885343551635742, 20.64107894897461, 20.64107894897461, 20.370561599731445, 19.453998565673828, 19.453998565673828, 19.371936798095703, 19.101421356201172, 17.631391525268555, 15.544347763061523, 15.544347763061523, 15.544347763061523, 15.544347763061523, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297 ], "content": [ "You can inject code using Dexmaker .", "This is an issue for dexmaker 1.2 we should upgrade to dexmaker 1.4 dexmaker-mockito 1.4 and include dexmaker-dx-1.4 .", "If Dexmaker is required which versions of Mockito and Dexmaker are compatible and is only the dexmaker-mockito artifact required", "It looks like the dexmaker project has moved from Google Code https : code.google.com p dexmaker to GitHub https : github.com crittercism dexmaker .", "On the other hand I found Dexmaker to generate code on runtime .", "My question is : Is it possible to somehow inject code in Android by Dexmaker or anything else", "The dexmaker page notes that you need 1.9.5+ http : code.google.com p dexmaker for this and apparently RC1 doesn t cut it .", "So the problem is with Dexmaker not being able to find the cache path on Android 4.3 as other people mentioned and as described in this dexmaker issue http : code.google.com p dexmaker issues detail id 2 .", "Seems to be a bug in Dalvik which is not being avoided by DexMaker .", "Tracking here : code.google.com p dexmaker issues detail id 9 https : code.google.com p dexmaker issues detail id 9", "I think this issue might be related code.google.com p dexmaker issues detail id 29 https : code.google.com p dexmaker issues detail id 29", "While the jars dexmaker-1.1 and dexmaker-mockito-1.1 are not currently hosted on the Google Code site the site has links at the bottom to download them from the Maven repository .", "MockMaker is a glue module that integrates dexmaker with Mockito .", "Looks like they included the fix in DexMaker 1.1 which was released this March .", "https : code.google.com p dexmaker issues detail id 9", "Then change version in app build.gradle : androidTestCompile com.google.dexmaker : dexmaker : 1.3-SNAPSHOT .. . Or pom.xml if using maven to build or overwrite your libs dexmaker.jar with .m2 repository com google dexmaker dexmaker 1.3-SNAPSHOT dexmaker-1.3-SNAPSHOT.jar if you are using eclipse ant .. . .. . Also FYI the original issue report https : code.google.com p dexmaker issues detail id 2 for the same issue on Google Code as well .", "I m trying to run unit test on Android Library project and using mockito 1.9.5 with dexmaker 1.0 dexmaker -mockito-1.0 jar files .", "You can also call the following as given here - code.google.com p dexmaker issues detail id 2 http : code.google.com p dexmaker issues detail id 2 .. . getInstrumentation .getTargetContext .getCacheDir", "Agreed dexmaker doesn t seem to be used or seen at all in the runtime .", "In that case add the two dexmaker jars to your libs directory and build classpath .", "So does that mean you need dexmaker both jars for mockito to work", "I got errors when I included both Mockito and DexMaker .", "no CGLIB shouldn t appear if dexmaker is found on the classpath then CGLIB is never used .", "And the most important question : Is it possible to get Powermock to work nicely with Dexmaker", "If so given I have mockito-1.9.5-all and both the dexmaker and dexmaker-mockito in my libs does anyone know how I can force it to use these dex libs .", "For making it run on the DVM I put dexmaker.jar and the dexmaker-mockito.jar v 0.9 in the classpath of the test-project .", "http : code.google.com p dexmaker and http : code.google.com p mockito wiki ReleaseNotes do not provide any helpful information .", "Here is the error I get .. . .. . I ve tried changing VMs Mockito versions Dexmaker versions but nothing seems to work .", "I am not 100 if that did it or something else we changed in the meantime but with Dexmaker 1.2 this seems to be fixed .", "http : corner.squareup.com 2012 10 mockito-android.html .. . .. . The key piece of information is : .. . .. . To use Mockito on a device or emulator you ll need to add three .jar files to your test project s libs directory : mockito-all-1.9.5.jar https : mockito.googlecode.com files mockito-all-1.9.5.jar dexmaker-1.0.jar http : dexmaker.googlecode.com files dexmaker-1.0.jar and dexmaker-mockito-1.0.jar http : dexmaker.googlecode.com files dexmaker-mockito-1.0.jar .", "You may find the performance of runtime code generation to be unsatisfying however .", ".. . .. . http : code.google.com p dexmaker issues detail id 43", "I try to upgrage to dexmaker-1.4 instead then it can not find com.android.dx.rop.type.Type", "These are the libraries I have in my build.gradle .. . .. . The tests run just as expected on android version 4.4 although I needed to add some hints to tell Dexmaker where to put its cache : .. . .. . Here is the logcat output from the device : .. . .. . Are there any hints on running Mockito Dexmaker on older android-versions", "Precisely this problem http : code.google.com p dexmaker issues detail id 16 in fact .", "The error described here also occurs if you re trying to use Mockito on Android without dexmaker .", "I was experiencing a java.lang.VerifyError when attempting to mock a class even after including the dexmaker jars .", "The documentation of the Mockito and Dexmaker projects does not seem to clearly state the relationship between the two they only make mention of each other .", "Mockito offer a way to have a different bytecode engine that dexmaker-mockito provide if it s on the same classpath .", "Indeed the wiki is a bit outdated there http : code.google.com p dexmaker wiki Mockito but it states you need both jars .", "It s possible that Powermock will work with Dexmaker but it s unlikely advanced Powermock features will work .", "The part that I would like assistance on is .. . .. . I have been informed that this simply doesn t quite work yet since the stack-trace implies that the DexMaker jar is not being used - reference this response http : code.google.com p dexmaker issues detail id 16 c3 .", "Projects like Dagger http : square.github.com dagger have had better success metaprogramming with code generation .", "The project was created via the Android Wizard and shares no special features other than the inclusion of the Mockito and DexMaker jars mentioned above under the libs directory .", "I don t know how to find the actual classpath used vs the .classpath file content which correctly includes the dexmaker...thanks", "May be a issue between mockito 1.10 and dexmaker 1.2 Can you try forcing mockito 1.9.5 and see if that fixes it", "I have found very nice tutorial that deals with it : http : www.paulbutcher.com 2012 05 mockito-on-android-step-by-step .. . .. . Basically it uses new version of Mockito + Dexmaker and everything works as expected .", "I cloned the GitHub repository last commit March 12th 2015 - ca74669 https : github.com crittercism dexmaker commit ca74669 and ran locally and the problem has been fixed there are also commits in the history that back this up .", "Anyone else wanting to run a local copy of 1.3-SNAPSHOT here s how I did that on a Mac but other platforms should work too you ll need mvn adb and dx on PATH : .. . .. . 1 . git-clone https : github.com crittercism dexmaker.git .. . 2 . cd dexmaker .. . 3 . mvn install -Dmaven.test.skip true .. . 4 . cp -R .m2 repository com google dexmaker ANDROID HOME extras android m2repository com google .. . 5 .", "Mockito and DexMaker are working ok but not in this case since good part of the Bluetooth API is consisted of final classes which Mockito can t mock nor spy .", "That lead me to PowerMock+Mockito combo which should work with private final static but AFAIK and saw it s not Android friendly not using DexMaker .", "As hinted at here http : code.google.com p dexmaker issues detail id 8 the dexmaker-android combo only works 100 when the instrumented tests are run against a real device .", "Everything seemed fan-flapping-tastic and I got underway incorporating the mocking solution into my Android Test Project.. . .. . .. . The error .. . .. . However on setting up my application s test project to leverage the mockito-all-1.9.5 dexmaker-1.0 and dexmaker-mockito-1.0 jars I encountered a problem with my very first test case .", "I am trying to incorporate Powermock https : code.google.com p powermock as a dependency for my Android tests using the following build.gradle configuration : .. . .. . However the compiler is complaining that .. . .. . Looking into the jar structure I noticed that both Dexmaker and Powermock declare a MockMaker in mockito-extensions .. . .. .", "My first idea is to inject code for each get and set .", "Unfortunately I found a lot of posts saying there is no way to inject code in Android .", "How else I could do this than not by code-injection", "Also what is it about your design that requires you to use code-injection", "I am trying to use Mockito in my Android project .", "However when I try to mock some Android specific object i.e : .. . .. . I receive this exception : .. . .. . Any idea how to fix it", "From @rjath s comment of @MrChaz s answer this works better for me : .. . .. . I put it in my setUp method .", "This is the better answer .", "I ve managed to piece together a fix that seems to be working for me .", "To the manifest I added read and write external storage .", "To the test I added System.setProperty dexmaker.dexcache sdcard to the test .", "To the emulator image I added an SD card .", "I believe this works because by default mockito tries to use the apps cache directory but I never run an activity so I suspect the directory is never created by the OS", "I went with implementing the workaround in a custom instrumented test runner instead of in every test or their superclass setUp because it feels a bit less hacky it really is in only one place - and not inherited in every subclass and more flexible .", "For the sake of documentation these are the necessary changes to do this : .. . .. . And set up your project or test project to use this class as the instrumented test runner in its AndroidManifest.xml when building with ant : .. . .. . or its build.gradle when building with gradle : .. . .. . If you have other instrumentation entries you can switch between them either on the command-line https : developer.android.com reference android test InstrumentationTestRunner.html or select one in your IDE running configuration .", "Awesome cleanest solution at the moment .", "I had this issue for an Android Library project but NOT for the application project", "Setting the System property dexmaker.dexcache as mentioned above worked around the issue .", "I m running Android 4.3 Nexus 4 device building with 19.0.3 tools target api 19 my dependencies :", "I just realized I have experienced the same thing you mentioned problems in library but not application I just didn t know why it was happening at the time .", "In the maven-central repository https : search.maven.org search 7Cgav 7C1 7Cg 3A 22com.google.dexmaker 22 20AND 20a 3A 22dexmaker 22 there are versions 1.1 and 1.2 published in March 2014 and December 2014 .", "I ve verified this dexcache null issue still exists through version 1.2 - but only on certain devices .", "For example a Galaxy S5 with Android 5.0 has the problem and a Galaxy S4 with Android 4.4.2 does not .", "So once there is a 1.3 release hopefully this problem is gone for good", "I am trying to get Mockito 1.9.5 rc1 working in my Android tests using Robotium .", "When run following test as an Android JUnit test in Eclipse : .. . .. . I get the following stack-trace : .. . .. . Any suggestions", "A similar problem seems to be reported here : http : www.paulbutcher.com 2012 05 mockito-on-android-step-by-step comment-65955 .. . .. . UPDATE : with the .jar files from https : github.com paulbutcher mockito-on-android tree master WarehouseManagerTest libs all works smoothly though he uses an outdated snapshot of Mockito based on 1.9.1", "I have the same issue happening I m using Maven include the dependencies but I have the exact same error being raised that it can t find the com.google.dexmaker.mockito.DexmakerMockMaker class .", "Also I ve looked into it being removed by ProGuard but I have tried explicitly keeping the DexmakerMockMaker class .", "I encountered the same problem attempting to use mockito 1.9.5-rc1 .", "Mockito 1.9.5 appears to have just been released days ago http : code.google.com p mockito wiki ReleaseNotes so it should show up shortly in Maven Central .", "In the meantime you can download the 1.9.5 zip from Mockito s site http : code.google.com p mockito downloads list .", "If you re using Maven you could manually install those jars to your local repo with mvn install : install-file .", "I also got this to work by checking out the latest Mockito source unreleased 1.9.8 building and installing to my local Maven repo .", "Trying to do a partial mock of an activity using Mockito.spy after its instrumented on the Android VM Emulator 4.1 .", "Any ideas", "Can you look in your log for any messages coming from Dalvik especially at install or app-startup time", "You will generally get a bunch of spew that indicates perhaps cryptically a bit more detail about the problem .", "I ve recently switched from instrumentation tests to junit in pair with robolectric library .", "About spying - my observation it s usually issue with design .", "See this bug report and vote for it if you want .", "I want to write an ORM for Android as my final project .", "If not how to do it", "I also thought about reflections but I am afraid that it will be to slow .", "Thanks in advance .", "Edit .. . .. . Simon : Yes by ORM I ment object relational mapping ." ] }
{ "confidence": [ 38.15705108642578, 33.983619689941406, 33.04113006591797, 32.566978454589844, 32.21857452392578, 32.217830657958984, 30.929752349853516, 30.915340423583984, 30.885448455810547, 30.571941375732422, 30.571941375732422, 29.975086212158203, 29.733251571655273, 29.639511108398438, 29.618125915527344, 29.348251342773438, 28.102313995361328, 28.007051467895508, 27.62387466430664, 26.11357879638672 ], "content": [ "Question : I want to write an ORM for Android as my final project . My first idea is to inject code for each get and set . Unfortunately I found a lot of posts saying there is no way to inject code in Android . On the other hand I found Dexmaker to generate code on runtime . My question is : Is it possible to somehow inject code in Android by Dexmaker or anything else If not how to do it I also thought about reflections but I am afraid that it will be to slow . Thanks in advance . Edit .. . .. . Simon : Yes by ORM I ment object relational mapping . I want to create a general framework . How else I could do this than not by code-injection Comment : Do you mean object relational mapping Or something else Also what is it about your design that requires you to use code-injection Comment : Relflection under Android is dog slow . That s a non-starter . .. . Answer : You can inject code using Dexmaker . The project site has a HelloWorldMaker example that generates a class and then loads it . You may find the performance of runtime code generation to be unsatisfying however . Projects like Dagger http : square.github.com dagger have had better success metaprogramming with code generation .", "Question : Trying to do a partial mock of an activity using Mockito.spy after its instrumented on the Android VM Emulator 4.1 . Here is the error I get .. . .. . I ve tried changing VMs Mockito versions Dexmaker versions but nothing seems to work . Any ideas Comment : Can you look in your log for any messages coming from Dalvik especially at install or app-startup time You will generally get a bunch of spew that indicates perhaps cryptically a bit more detail about the problem . Comment : I ve recently switched from instrumentation tests to junit in pair with robolectric library . About spying - my observation it s usually issue with design . Comment : Tracking here : code.google.com p dexmaker issues detail id 9 https : code.google.com p dexmaker issues detail id 9 Comment : Looks like they included the fix in DexMaker 1.1 which was released this March . While the jars dexmaker-1.1 and dexmaker-mockito-1.1 are not currently hosted on the Google Code site the site has links at the bottom to download them from the Maven repository . .. . Answer : Seems to be a bug in Dalvik which is not being avoided by DexMaker . See this bug report and vote for it if you want . https : code.google.com p dexmaker issues detail id 9", "Question : I am trying to use Mockito in my Android project . I have found very nice tutorial that deals with it : http : www.paulbutcher.com 2012 05 mockito-on-android-step-by-step .. . .. . Basically it uses new version of Mockito + Dexmaker and everything works as expected . However when I try to mock some Android specific object i.e : .. . .. . I receive this exception : .. . .. . Any idea how to fix it .. . Answer : It looks like the dexmaker project has moved from Google Code https : code.google.com p dexmaker to GitHub https : github.com crittercism dexmaker . In the maven-central repository https : search.maven.org search 7Cgav 7C1 7Cg 3A 22com.google.dexmaker 22 20AND 20a 3A 22dexmaker 22 there are versions 1.1 and 1.2 published in March 2014 and December 2014 . I ve verified this dexcache null issue still exists through version 1.2 - but only on certain devices . For example a Galaxy S5 with Android 5.0 has the problem and a Galaxy S4 with Android 4.4.2 does not . I cloned the GitHub repository last commit March 12th 2015 - ca74669 https : github.com crittercism dexmaker commit ca74669 and ran locally and the problem has been fixed there are also commits in the history that back this up . So once there is a 1.3 release hopefully this problem is gone for good Anyone else wanting to run a local copy of 1.3-SNAPSHOT here s how I did that on a Mac but other platforms should work too you ll need mvn adb and dx on PATH : .. . .. . 1 . git-clone https : github.com crittercism dexmaker.git .. . 2 . cd dexmaker .. . 3 . mvn install -Dmaven.test.skip true .. . 4 . cp -R .m2 repository com google dexmaker ANDROID HOME extras android m2repository com google .. . 5 . Then change version in app build.gradle : androidTestCompile com.google.dexmaker : dexmaker : 1.3-SNAPSHOT .. . Or pom.xml if using maven to build or overwrite your libs dexmaker.jar with .m2 repository com google dexmaker dexmaker 1.3-SNAPSHOT dexmaker-1.3-SNAPSHOT.jar if you are using eclipse ant .. . .. . Also FYI the original issue report https : code.google.com p dexmaker issues detail id 2 for the same issue on Google Code as well .", "Question : I have some android-tests that crash hard when run on android versions under 4.4 Kitkat . These are the libraries I have in my build.gradle .. . .. . The tests run just as expected on android version 4.4 although I needed to add some hints to tell Dexmaker where to put its cache : .. . .. . Here is the logcat output from the device : .. . .. . Are there any hints on running Mockito Dexmaker on older android-versions Comment : Have you found any solution for this I am facing the same kind of issue in my case device is also getting reboot . Comment : No success thus far I think this issue might be related code.google.com p dexmaker issues detail id 29 https : code.google.com p dexmaker issues detail id 29 .. . Answer : I am not 100 if that did it or something else we changed in the meantime but with Dexmaker 1.2 this seems to be fixed .", "Question : The documentation of the Mockito and Dexmaker projects does not seem to clearly state the relationship between the two they only make mention of each other . If Dexmaker is required which versions of Mockito and Dexmaker are compatible and is only the dexmaker-mockito artifact required .. . Answer : You need the latest version of mockito at the moment 1.9.5 as seen in the main documentation http : docs.mockito.googlecode.com hg latest org mockito Mockito.html 28 http : docs.mockito.googlecode.com hg latest org mockito Mockito.html 28 . Mockito offer a way to have a different bytecode engine that dexmaker-mockito provide if it s on the same classpath . Indeed the wiki is a bit outdated there http : code.google.com p dexmaker wiki Mockito but it states you need both jars . Hope that helps . Comment : So does that mean you need dexmaker both jars for mockito to work Comment : @Ryan yes that is what I meant .", "Question : The documentation of the Mockito and Dexmaker projects does not seem to clearly state the relationship between the two they only make mention of each other . If Dexmaker is required which versions of Mockito and Dexmaker are compatible and is only the dexmaker-mockito artifact required .. . Answer : I got errors when I included both Mockito and DexMaker . In the end this is what I added to gradle :", "Question : Like many others I was excited to hear that Mockito now works with Android http : corner.squareup.com 2012 10 mockito-android.html and followed this tutorial http : www.paulbutcher.com 2012 05 mockito-on-android-step-by-step to see it with my own eyes . Everything seemed fan-flapping-tastic and I got underway incorporating the mocking solution into my Android Test Project.. . .. . .. . The error .. . .. . However on setting up my application s test project to leverage the mockito-all-1.9.5 dexmaker-1.0 and dexmaker-mockito-1.0 jars I encountered a problem with my very first test case . Precisely this problem http : code.google.com p dexmaker issues detail id 16 in fact . The part that I would like assistance on is .. . .. . I have been informed that this simply doesn t quite work yet since the stack-trace implies that the DexMaker jar is not being used - reference this response http : code.google.com p dexmaker issues detail id 16 c3 . However I am suspicious that I am doing something wrong with respect to my project set-up so I m looking to draw from the collective knowledge base here to see if indeed this is user error or a beta-bug . My Android Test Project set-up .. . .. . Please find below a screenshot of my test project s configuration . The project was created via the Android Wizard and shares no special features other than the inclusion of the Mockito and DexMaker jars mentioned above under the libs directory . Test Project Configuration http : i.stack.imgur.com O6VqW.png .. . .. . The Test .. . .. . Never mind the content of the test the test fails before the unit test is executed the set-up is as described below .. . .. . If anyone out there has an idea what is wrong then please sound-off here . Comment : Agreed dexmaker doesn t seem to be used or seen at all in the runtime . I m not an Android dev but this is definitely the case here . Comment : Thanks @Brice - any help on this is great and gives me something to go back to the developers with . I ll point them at this question and your comment and see how we get on.. . Comment : Just a note to help searchers.. . The error described here also occurs if you re trying to use Mockito on Android without dexmaker . In that case add the two dexmaker jars to your libs directory and build classpath . Comment : Did you solve this I have the same problem stackoverflow.com questions 24967050 http : stackoverflow.com questions 24967050 cant-run-android-test-with-mockito-powermockito .. . Answer : As hinted at here http : code.google.com p dexmaker issues detail id 8 the dexmaker-android combo only works 100 when the instrumented tests are run against a real device . Running the tests against a real device do not exhibit this failure . Comment : Does for me and at least one commenter above .", "Question : Like many others I was excited to hear that Mockito now works with Android http : corner.squareup.com 2012 10 mockito-android.html and followed this tutorial http : www.paulbutcher.com 2012 05 mockito-on-android-step-by-step to see it with my own eyes . Everything seemed fan-flapping-tastic and I got underway incorporating the mocking solution into my Android Test Project.. . .. . .. . The error .. . .. . However on setting up my application s test project to leverage the mockito-all-1.9.5 dexmaker-1.0 and dexmaker-mockito-1.0 jars I encountered a problem with my very first test case . Precisely this problem http : code.google.com p dexmaker issues detail id 16 in fact . The part that I would like assistance on is .. . .. . I have been informed that this simply doesn t quite work yet since the stack-trace implies that the DexMaker jar is not being used - reference this response http : code.google.com p dexmaker issues detail id 16 c3 . However I am suspicious that I am doing something wrong with respect to my project set-up so I m looking to draw from the collective knowledge base here to see if indeed this is user error or a beta-bug . My Android Test Project set-up .. . .. . Please find below a screenshot of my test project s configuration . The project was created via the Android Wizard and shares no special features other than the inclusion of the Mockito and DexMaker jars mentioned above under the libs directory . Test Project Configuration http : i.stack.imgur.com O6VqW.png .. . .. . The Test .. . .. . Never mind the content of the test the test fails before the unit test is executed the set-up is as described below .. . .. . If anyone out there has an idea what is wrong then please sound-off here . Comment : Agreed dexmaker doesn t seem to be used or seen at all in the runtime . I m not an Android dev but this is definitely the case here . Comment : Thanks @Brice - any help on this is great and gives me something to go back to the developers with . I ll point them at this question and your comment and see how we get on.. . Comment : Just a note to help searchers.. . The error described here also occurs if you re trying to use Mockito on Android without dexmaker . In that case add the two dexmaker jars to your libs directory and build classpath . Comment : Did you solve this I have the same problem stackoverflow.com questions 24967050 http : stackoverflow.com questions 24967050 cant-run-android-test-with-mockito-powermockito .. . Answer : Hi I had the same problem and I found this article really usefull http : corner.squareup.com 2012 10 mockito-android.html .. . .. . The key piece of information is : .. . .. . To use Mockito on a device or emulator you ll need to add three .jar files to your test project s libs directory : mockito-all-1.9.5.jar https : mockito.googlecode.com files mockito-all-1.9.5.jar dexmaker-1.0.jar http : dexmaker.googlecode.com files dexmaker-1.0.jar and dexmaker-mockito-1.0.jar http : dexmaker.googlecode.com files dexmaker-mockito-1.0.jar . Comment : How is this an answer The OP writes in the question that hes using these three jars .", "Question : I am trying to use Mockito in my Android project . I have found very nice tutorial that deals with it : http : www.paulbutcher.com 2012 05 mockito-on-android-step-by-step .. . .. . Basically it uses new version of Mockito + Dexmaker and everything works as expected . However when I try to mock some Android specific object i.e : .. . .. . I receive this exception : .. . .. . Any idea how to fix it .. . Answer : So the problem is with Dexmaker not being able to find the cache path on Android 4.3 as other people mentioned and as described in this dexmaker issue http : code.google.com p dexmaker issues detail id 2 . I went with implementing the workaround in a custom instrumented test runner instead of in every test or their superclass setUp because it feels a bit less hacky it really is in only one place - and not inherited in every subclass and more flexible . For the sake of documentation these are the necessary changes to do this : .. . .. . And set up your project or test project to use this class as the instrumented test runner in its AndroidManifest.xml when building with ant : .. . .. . or its build.gradle when building with gradle : .. . .. . If you have other instrumentation entries you can switch between them either on the command-line https : developer.android.com reference android test InstrumentationTestRunner.html or select one in your IDE running configuration . Comment : Awesome cleanest solution at the moment .", "Question : Like many others I was excited to hear that Mockito now works with Android http : corner.squareup.com 2012 10 mockito-android.html and followed this tutorial http : www.paulbutcher.com 2012 05 mockito-on-android-step-by-step to see it with my own eyes . Everything seemed fan-flapping-tastic and I got underway incorporating the mocking solution into my Android Test Project.. . .. . .. . The error .. . .. . However on setting up my application s test project to leverage the mockito-all-1.9.5 dexmaker-1.0 and dexmaker-mockito-1.0 jars I encountered a problem with my very first test case . Precisely this problem http : code.google.com p dexmaker issues detail id 16 in fact . The part that I would like assistance on is .. . .. . I have been informed that this simply doesn t quite work yet since the stack-trace implies that the DexMaker jar is not being used - reference this response http : code.google.com p dexmaker issues detail id 16 c3 . However I am suspicious that I am doing something wrong with respect to my project set-up so I m looking to draw from the collective knowledge base here to see if indeed this is user error or a beta-bug . My Android Test Project set-up .. . .. . Please find below a screenshot of my test project s configuration . The project was created via the Android Wizard and shares no special features other than the inclusion of the Mockito and DexMaker jars mentioned above under the libs directory . Test Project Configuration http : i.stack.imgur.com O6VqW.png .. . .. . The Test .. . .. . Never mind the content of the test the test fails before the unit test is executed the set-up is as described below .. . .. . If anyone out there has an idea what is wrong then please sound-off here . Comment : Agreed dexmaker doesn t seem to be used or seen at all in the runtime . I m not an Android dev but this is definitely the case here . Comment : Thanks @Brice - any help on this is great and gives me something to go back to the developers with . I ll point them at this question and your comment and see how we get on.. . Comment : Just a note to help searchers.. . The error described here also occurs if you re trying to use Mockito on Android without dexmaker . In that case add the two dexmaker jars to your libs directory and build classpath . Comment : Did you solve this I have the same problem stackoverflow.com questions 24967050 http : stackoverflow.com questions 24967050 cant-run-android-test-with-mockito-powermockito .. . Answer : Just add this in your gradle : Comment : Anyone else getting java.lang.IllegalArgumentException : dexcache null when attempting this", "Question : Like many others I was excited to hear that Mockito now works with Android http : corner.squareup.com 2012 10 mockito-android.html and followed this tutorial http : www.paulbutcher.com 2012 05 mockito-on-android-step-by-step to see it with my own eyes . Everything seemed fan-flapping-tastic and I got underway incorporating the mocking solution into my Android Test Project.. . .. . .. . The error .. . .. . However on setting up my application s test project to leverage the mockito-all-1.9.5 dexmaker-1.0 and dexmaker-mockito-1.0 jars I encountered a problem with my very first test case . Precisely this problem http : code.google.com p dexmaker issues detail id 16 in fact . The part that I would like assistance on is .. . .. . I have been informed that this simply doesn t quite work yet since the stack-trace implies that the DexMaker jar is not being used - reference this response http : code.google.com p dexmaker issues detail id 16 c3 . However I am suspicious that I am doing something wrong with respect to my project set-up so I m looking to draw from the collective knowledge base here to see if indeed this is user error or a beta-bug . My Android Test Project set-up .. . .. . Please find below a screenshot of my test project s configuration . The project was created via the Android Wizard and shares no special features other than the inclusion of the Mockito and DexMaker jars mentioned above under the libs directory . Test Project Configuration http : i.stack.imgur.com O6VqW.png .. . .. . The Test .. . .. . Never mind the content of the test the test fails before the unit test is executed the set-up is as described below .. . .. . If anyone out there has an idea what is wrong then please sound-off here . Comment : Agreed dexmaker doesn t seem to be used or seen at all in the runtime . I m not an Android dev but this is definitely the case here . Comment : Thanks @Brice - any help on this is great and gives me something to go back to the developers with . I ll point them at this question and your comment and see how we get on.. . Comment : Just a note to help searchers.. . The error described here also occurs if you re trying to use Mockito on Android without dexmaker . In that case add the two dexmaker jars to your libs directory and build classpath . Comment : Did you solve this I have the same problem stackoverflow.com questions 24967050 http : stackoverflow.com questions 24967050 cant-run-android-test-with-mockito-powermockito .. . Answer : For everybody who still have this error check if you didn t exclude a class in the dependecies . We exluded by accident the MockMaker.class so this was then the cause for the exception .", "Question : Like many others I was excited to hear that Mockito now works with Android http : corner.squareup.com 2012 10 mockito-android.html and followed this tutorial http : www.paulbutcher.com 2012 05 mockito-on-android-step-by-step to see it with my own eyes . Everything seemed fan-flapping-tastic and I got underway incorporating the mocking solution into my Android Test Project.. . .. . .. . The error .. . .. . However on setting up my application s test project to leverage the mockito-all-1.9.5 dexmaker-1.0 and dexmaker-mockito-1.0 jars I encountered a problem with my very first test case . Precisely this problem http : code.google.com p dexmaker issues detail id 16 in fact . The part that I would like assistance on is .. . .. . I have been informed that this simply doesn t quite work yet since the stack-trace implies that the DexMaker jar is not being used - reference this response http : code.google.com p dexmaker issues detail id 16 c3 . However I am suspicious that I am doing something wrong with respect to my project set-up so I m looking to draw from the collective knowledge base here to see if indeed this is user error or a beta-bug . My Android Test Project set-up .. . .. . Please find below a screenshot of my test project s configuration . The project was created via the Android Wizard and shares no special features other than the inclusion of the Mockito and DexMaker jars mentioned above under the libs directory . Test Project Configuration http : i.stack.imgur.com O6VqW.png .. . .. . The Test .. . .. . Never mind the content of the test the test fails before the unit test is executed the set-up is as described below .. . .. . If anyone out there has an idea what is wrong then please sound-off here . Comment : Agreed dexmaker doesn t seem to be used or seen at all in the runtime . I m not an Android dev but this is definitely the case here . Comment : Thanks @Brice - any help on this is great and gives me something to go back to the developers with . I ll point them at this question and your comment and see how we get on.. . Comment : Just a note to help searchers.. . The error described here also occurs if you re trying to use Mockito on Android without dexmaker . In that case add the two dexmaker jars to your libs directory and build classpath . Comment : Did you solve this I have the same problem stackoverflow.com questions 24967050 http : stackoverflow.com questions 24967050 cant-run-android-test-with-mockito-powermockito .. . Answer : We just had the same problem in a project but our tests also failed on a real device . The cause was tracked to how Mockito uses the class loader and resulted in the following error in LogCat : .. . .. . The fix was to explicitly set the class loader before calling mock a test eg . The problematic file in Mockito is this one : org.mockito.internal.configuration.ClassPathLoader line 121 in 1.9.5 Comment : Thanks for pointing that out I was experiencing a java.lang.VerifyError when attempting to mock a class even after including the dexmaker jars . This was done using Mockito 1.9.5 . Adding that to the setUp method got rid of the error .", "Question : I want to spy the Linkedlist in android . However the exception occured . The dependencies of libs are .. . .. . Even I update mockito-core-1.10.19.jar to mockito-core-2.0.31-beta.jar .. . .. . the problem still exists . But Mockito.mock Linkedlist.class is ok I have no ideas about this problem . Thank you . .. . Answer : I just found another way to solve the problem . This is an issue for dexmaker 1.2 we should upgrade to dexmaker 1.4 dexmaker-mockito 1.4 and include dexmaker-dx-1.4 . So the dependencies are Comment : I used gradle com.crittercism.dexmaker : dexmaker : 1.4 and so on .", "Question : I am trying to incorporate Powermock https : code.google.com p powermock as a dependency for my Android tests using the following build.gradle configuration : .. . .. . However the compiler is complaining that .. . .. . Looking into the jar structure I noticed that both Dexmaker and Powermock declare a MockMaker in mockito-extensions .. . .. . img http : i.imgur.com JOPn7zk.png 1 .. . .. . What is a MockMaker How do they differ And the most important question : Is it possible to get Powermock to work nicely with Dexmaker Thanks in advance . Any help would be greatly appreciated . .. . Answer : MockMaker is a glue module that integrates dexmaker with Mockito . It does what s necessary for Mockito to generate concrete classes with Dalvik .dex files instead of JVM .class files . It s possible that Powermock will work with Dexmaker but it s unlikely advanced Powermock features will work . In particular Powermock advertises this https : code.google.com p powermock : .. . .. . PowerMock uses a custom classloader and bytecode-manipulation to enable mocking of static-methods constructors final classes and methods private methods removal of static initializers and more . .. . .. . That custom class loader is unlikely to work on dalvikvm . Comment : From the author himself Thanks Jesse", "Question : I am trying to use Mockito in my Android project . I have found very nice tutorial that deals with it : http : www.paulbutcher.com 2012 05 mockito-on-android-step-by-step .. . .. . Basically it uses new version of Mockito + Dexmaker and everything works as expected . However when I try to mock some Android specific object i.e : .. . .. . I receive this exception : .. . .. . Any idea how to fix it .. . Answer : I ve managed to piece together a fix that seems to be working for me . To the manifest I added read and write external storage . To the test I added System.setProperty dexmaker.dexcache sdcard to the test . To the emulator image I added an SD card . I believe this works because by default mockito tries to use the apps cache directory but I never run an activity so I suspect the directory is never created by the OS Comment : You can also call the following as given here - code.google.com p dexmaker issues detail id 2 http : code.google.com p dexmaker issues detail id 2 .. . getInstrumentation .getTargetContext .getCacheDir", "Question : I am trying to get Mockito 1.9.5 rc1 working in my Android tests using Robotium . For making it run on the DVM I put dexmaker.jar and the dexmaker-mockito.jar v 0.9 in the classpath of the test-project . When run following test as an Android JUnit test in Eclipse : .. . .. . I get the following stack-trace : .. . .. . Any suggestions http : code.google.com p dexmaker and http : code.google.com p mockito wiki ReleaseNotes do not provide any helpful information . A similar problem seems to be reported here : http : www.paulbutcher.com 2012 05 mockito-on-android-step-by-step comment-65955 .. . .. . UPDATE : with the .jar files from https : github.com paulbutcher mockito-on-android tree master WarehouseManagerTest libs all works smoothly though he uses an outdated snapshot of Mockito based on 1.9.1 Comment : I have the same issue happening I m using Maven include the dependencies but I have the exact same error being raised that it can t find the com.google.dexmaker.mockito.DexmakerMockMaker class . Comment : Also I ve looked into it being removed by ProGuard but I have tried explicitly keeping the DexmakerMockMaker class . .. . Answer : I encountered the same problem attempting to use mockito 1.9.5-rc1 . The dexmaker page notes that you need 1.9.5+ http : code.google.com p dexmaker for this and apparently RC1 doesn t cut it . Mockito 1.9.5 appears to have just been released days ago http : code.google.com p mockito wiki ReleaseNotes so it should show up shortly in Maven Central . In the meantime you can download the 1.9.5 zip from Mockito s site http : code.google.com p mockito downloads list . If you re using Maven you could manually install those jars to your local repo with mvn install : install-file . I also got this to work by checking out the latest Mockito source unreleased 1.9.8 building and installing to my local Maven repo .", "Question : null .. . Answer : just wanted to clarify my understanding of the error I get is correct please.. . .. . .. . As you can see this is littered with cglib references and not a mention of dexedlibs . Is it safe to assume that the dexing isn t happening and Mockito is trying to use CGLib to construct the Reflection bootstrapping . If so given I have mockito-1.9.5-all and both the dexmaker and dexmaker-mockito in my libs does anyone know how I can force it to use these dex libs . Stackoverflow and Googlecode is littered with this issue but nothing works for me yet . TDD on Android seems all but impossible at the moment . Many thanks .. . .. . Mike Comment : Also just compiled Mockito 1.9.8 to see if different but is same error . Comment : Hum this should work you definitely should check the classpath when the test is run on Dalvik Comment : Thanks Brice . No luck . Do you know whether I should be seeing cglib in the stacktrace at all or is this normal - I don t know what I m looking for in terms of clues as to the dexedLibs being loaded They are in my bin folder I can see them and my .classpath lists them Comment : no CGLIB shouldn t appear if dexmaker is found on the classpath then CGLIB is never used . I m repeating myself but in my opinion you should definitely double check the actual classpath . Comment : Apologies you are repeating yourself Brice . I don t know how to find the actual classpath used vs the .classpath file content which correctly includes the dexmaker...thanks", "Question : I want to spy the Linkedlist in android . However the exception occured . The dependencies of libs are .. . .. . Even I update mockito-core-1.10.19.jar to mockito-core-2.0.31-beta.jar .. . .. . the problem still exists . But Mockito.mock Linkedlist.class is ok I have no ideas about this problem . Thank you . .. . Answer : May be a issue between mockito 1.10 and dexmaker 1.2 Can you try forcing mockito 1.9.5 and see if that fixes it .. . .. . http : code.google.com p dexmaker issues detail id 43 Comment : I got this problem after downgrade to mockito 1.9.5 stackoverflow.com questions 28022219 http : stackoverflow.com questions 28022219 java-lang-noclassdeffounderror-org-objenesis-objenesisstd-with-mockito Comment : I try to upgrage to dexmaker-1.4 instead then it can not find com.android.dx.rop.type.Type Comment : Ok I find another way to solve the problem see the self-answer .", "Question : I m trying to run unit test on Android Library project and using mockito 1.9.5 with dexmaker 1.0 dexmaker -mockito-1.0 jar files . I am using Android Studio 0.2.6 and whenever I run a test case I end up getting .. . .. . I have mentioned the dependencies in build.gradle file as below .. . .. . Has anyone encountered this problem before on Android Studio If you did please share your solutions fixes . Thanks Comment : extract the jar and check if class is present or not Comment : thanks for the reply.the class is present but still it complains no luck yet but will post an update if i solve it . .. . Answer : Cleaning the project from a terminal gradlew clean fixed it for me .", "Question : I am trying to use Mockito in my Android project . I have found very nice tutorial that deals with it : http : www.paulbutcher.com 2012 05 mockito-on-android-step-by-step .. . .. . Basically it uses new version of Mockito + Dexmaker and everything works as expected . However when I try to mock some Android specific object i.e : .. . .. . I receive this exception : .. . .. . Any idea how to fix it .. . Answer : From @rjath s comment of @MrChaz s answer this works better for me : .. . .. . I put it in my setUp method . Comment : This is the better answer ." ] }
[ "yes-answer-long", "yes-answer-short" ]
android
UNK_RELATION
meson-build@c++@96
meson-build -- meson is a build configuration system used to build c c++ java rust objective-c @placeholder and fortran projects .
{ "confidence": [ 67.291748046875, 61.5511589050293, 61.5511589050293, 61.5511589050293, 59.2908821105957, 58.01808166503906, 56.289703369140625, 52.998931884765625, 52.15607452392578, 51.48387908935547, 51.47835159301758, 50.98963165283203, 49.93468475341797, 46.17828369140625, 46.17828369140625, 46.17828369140625, 44.191280364990234, 41.11842727661133, 41.11842727661133, 41.11842727661133, 41.11842727661133, 38.32902908325195, 38.021690368652344, 38.021690368652344, 38.021690368652344, 37.259090423583984, 35.73094177246094, 35.23114013671875, 34.55323028564453, 33.50908279418945, 32.13209915161133, 31.674686431884766, 29.940732955932617, 27.703903198242188, 27.060163497924805, 26.406383514404297, 25.83946990966797, 25.404071807861328, 24.76106071472168, 24.094335556030273, 22.896081924438477, 22.24303436279297, 22.01827621459961, 21.925159454345703, 21.886213302612305, 21.886213302612305, 21.886213302612305, 21.886213302612305, 21.886213302612305, 21.886213302612305, 21.886213302612305, 21.886213302612305, 21.886213302612305, 21.886213302612305, 21.886213302612305, 21.886213302612305, 21.886213302612305, 21.886213302612305, 21.886213302612305, 21.886213302612305, 21.886213302612305, 21.884017944335938, 21.884017944335938, 21.26461410522461, 20.596250534057617, 20.570858001708984, 20.514360427856445, 19.969093322753906, 19.96129035949707, 19.96129035949707, 19.584186553955078, 18.974504470825195, 18.96478271484375, 18.96478271484375, 18.271026611328125, 18.271026611328125, 18.271026611328125, 17.73733901977539, 17.73733901977539, 17.07486343383789, 17.07486343383789, 17.07486343383789, 17.07486343383789, 17.07486343383789, 17.07486343383789, 17.07486343383789, 17.07486343383789, 17.07486343383789, 17.07486343383789, 17.07486343383789, 17.07486343383789, 17.07486343383789, 17.07486343383789, 17.07486343383789, 17.07486343383789, 17.07486343383789, 17.07486343383789, 17.07486343383789, 16.20207405090332 ], "content": [ "Is it possible to glob source code files in a meson-build", "What is your recommended way of handling conditional cflags in a meson-build", "In a meson-build is it possible to set the working directory before executing unit tests", "Using meson-build is it possible to test for the existence of a directory in my project", "Is it possible to execute unit tests as a post-build-event in solutions generated with meson-build", "In meson-build system can I get the compiler version in addition to the compiler name from the compiler properties", "When A is in the Same Meson Project as B .. . .. . When A and B are in the same meson project it s a little uglier .", "When running Meson I get the error : .. . .. . According to http : www.mariocampos.io blog meson -first-impressions I can fix this by getting a newer version of Ninja .", "Its this kind of problem that might cause people to switch to build systems to meson-build assuming it doesn t have similar problems or something similar .", "However I prefer to keep to the software in the package repos so my question is : .. . .. . Can I tell Meson to generate a Ninja build file that doesn t require such a high version or does Meson use Ninja features only available in 1.5.1", "The project root directory is obtained with the following meson syntax : .. . .. . The current source directory can be obtained with the following meson syntax :", "Anyways I m still not sure how to make meson do it .", "In meson is it possible to define dependency relationships between them", "I m new to meson just looking through the documentation at this point .", "I solved this using a directory hierarchy and meson calls to get compiler version .", "For example if the dependency graph looks like this : .. . .. . How could I express this with meson", "I found an example https : github.com mesonbuild meson blob master test 20cases common 55 20file 20grabber meson.build in the meson unit tests showing how to glob source but in the comments it says this is not recommended .", "Then meson compilers meson.build looks like : .. . .. . The last line directs meson to include the subdirectory with the same name as the compiler .", "It appears to be trivial to define unit test executables in meson and to execute them with ninja test .", "@mickb I imagine I could call a python script in run command and since meson is python3 that s already a dependency .", "Is there a way to add additional include and library paths for meson to check when declaring dependencies", "When defining a target in meson you can declare dependencies on external projects using the following syntax : .. . .. . This checks the standard include locations which works well on Linux but not so well on other platforms .", "Looking through the reference manual https : github.com mesonbuild meson wiki Reference 20manual I don t see any direct support for this .", "It prints directory exists when you run the the meson command and I didn t have any trouble running subdir within the if condition either .", "I found this test case https : github.com mesonbuild meson tree master test 20cases common 85 20internal 20dependency on github.com to demonstrate how to do it .", "When A is a Separate Code Base .. . .. . What you do is build and install project A .", "currently I have 60s+ .. . .. . Bonus points if you want to discuss why cmake itself should or shouldn t be able to run in parallel imagine a cmake -j .. . .. . .. . .. . I ve added the meson-build tag as a modest bounty alone hasn t yet attracted enough attention to warrant an answer .", "The effect is the same - regenerate the whole build-system not just the current subtree .", "Caveat : I don t have meson running on windows yet so I can t be sure the version string has 3 parts like it does for clang and gcc .", "If possible it would be helpful to make the subdir conditional on the existence of the directory so the build doesn t break when building with a different specific build of the compiler .", "There is no difference in behaviour between an in source and and out of source build .", "If edit a single CMakeLists.txt file in a subdirectory then run make -n it runs : .. . .. . --check-build-system is another undocumented option .", "Say I m building targets A B and C in one project .", "For example you can get the C++ compiler name like so : .. . .. . This returns strings like clang gcc msvc etc .", "I then went the whole hog and tried generating the build-system on on the ramdisk .. . .. . I was very surprised to find this makes no difference at all to the wall clock time : .. . .. . Similarly with ramfs : .. . .. . What could be happening here", "And yes the CMake generated cmake check build-system rule does almost the same as the rebuild cache rule and yes the used -B -H and --check-build-system options are CMake internal command-line options and therefor undocumented even if often referred to on StackOverflow e.g .", "In my case telling the antivirus software to not check the toolchain and build directories each time I read-write to those was really speeding up things .", "in one of my answers here http : stackoverflow.com questions 33917454 cmake-how-to-specify-the-version-of-visual-c-to-work-with .", "Going for 64bit and - as I ve already done for my build environment paths in the past but had not measured the influence so far - selectively disabling my antivirus software had a significant speed-up effect 85 less for the initial configuration step .", "Using mingw-w64 and GNU 5.3.0 I rebuild CMake 3.2.2 with .. . .. . cmake -DCMAKE BUILD TYPE Release -DCMAKE CXX FLAGS -march native -m64 -Ofast -flto -G MSYS Makefiles . . .. . .. . .. . and got .. . .. . time -p c temp cmake-3.2.2 MSYS64 bin cmake.exe -G MSYS Makefiles . . .. . .. . .. . real 25.59 .. . user 0.00 .. . sys 0.04 .. . .. . .. . and the same with my antivirus software turned off .. . .. . time -p c temp cmake-3.2.2 MSYS64 bin cmake.exe -G MSYS Makefiles . . .. . .. . .. . real 6.95 .. . user 0.00 .. . sys 0.03 .. . .. . .. . To summarize I see two main influences : .. . .. . 1st : The configuration step can be speed-up by going for a 64bit version and optimize for your processor platform you would certainly have to find a common base -march .. . or -mtune .. . https : gcc.gnu.org onlinedocs gcc-4.9.2 gcc i386-and-x86-64-Options.html for all your project s build PCs .", "This meson.build is where configuration information for all versions of that compiler would go .", "Using mingw32 and GNU 4.8.1 I rebuild CMake 3.2.2 with .. . .. . cmake -DCMAKE BUILD TYPE Release -DCMAKE CXX FLAGS -O3 -G MSYS Makefiles . . .. . .. . .. . and got .. . .. . time -p c temp cmake-3.2.2 MSYS32 bin cmake.exe -G MSYS Makefiles . . .. . .. . .. . real 41.37 .. . user 0.01 .. . sys 0.04 .. . .. . .. . and the same with my antivirus software turned off .. . .. . time -p c temp cmake-3.2.2 MSYS32 bin cmake.exe -G MSYS Makefiles . . .. . .. . .. . real 20.98 .. . user 0.00 .. . sys 0.04 .. . .. . .. . 3 .", "So what does CMake do considering the I have touched one CMakeLists.txt file in a subdirectory case discussed here : .. . .. . If a CMakeLists.txt file is changed it goes through the complete hirarchy of CMakeLists.txt files again and rebuilds the build environment again in memory .", "For a given component the CMakeLists.txt contains something like : .. . .. . I can build just the contents of that directory using : .. . .. . If I modify the CMakeLists.txt in the sub-directory which I ve been doing a lot as part of a migration from pure Makefiles to cmake then run make it correctly re-runs cmake to update the configuration as-if I d run make rebuild cache .", "I have a static library from the project A let s call it liba.so and I want to compile a shared library in my project B let s call it libb.so and embed liba.so in it .", "Also I have a binary in that project B which also depends on liba.so so I want to embed it in the binary .", "Is that possible", "How", "Are you sure project A creates a static library", "liba.so is the name of a shared library which you cannot embed into another shared library - liba.a would be a proper name for a static library .", "However see also stackoverflow.com questions 2763988 http : stackoverflow.com questions 2763988 how-to-include-all-objects-of-an-archive-in-a-shared-object", "@nos Indeed you re right .", "It s liba.a .", "So I should compile libb.a .", "Then create a dependency on project A in project B s definition .", "That looks like this : .. . .. . The version section in dependency is optional .", "You have to declare a dependency anchor in A .", "That looks like this : .. . .. . Then project B becomes :", "I m running Elementary OS which is based on Ubuntu 14.04LTS .", "Ninja is at version 1.3.4 .", "That s fine I can do that .", "In my project root directory I have a subdirectory for configuration stuff called meson .", "I didn t think run command will work because the commands are not actually run while generating the configuration they are run by ninja after the fact .", "The meson meson.build calls subdir compilers to pull in configuration about compilers - the extra layer is in case I have platform specific configurations to add later .", "In particular they share the same configuration and are strongly coupled as in your answer .", "This file might look like : .. . .. . The subdirectories under the compiler name would contain configuration information for specific compiler versions should they need some flags config not all versions of the compiler support .", "Which host system do you use", "Another alternative would be to divide a big project into sub-projects using ExternalProject Add see e.g .", "For a full cache rebuild I run : .. . .. . under the hood this runs : .. . .. . I presume -B is a synonym for --build neither option is described correctly in the documentation @todo report bug -H is the root of the source directory not the same as --help as the docs would have you believe .. . .. . Its fast to get to the output of Configuring done but slow from there : E.g .", "Now it temporarily recreates all the necessary build make files and checks if they defer from the existing ones see cmGeneratedFileStreamBase : : Close https : github.com Kitware CMake blob master Source cmGeneratedFileStream.cxx L162 .. . If a file has changed it replaces the existing one with the new one .. . .. . This behavior is necessary because any makefile can change even when only a subdirectories CMakeLists.txt file has changed and it was optimized to prevent unnecessary rebuilds during the actual make step from touched makefiles .", "Simply because the configuration step duration mainly depends on what you do in your CMakeLists.txt files .", "your host system your toolchain and which CMake version distribution you are using .", "my answer here http : stackoverflow.com questions 33443164 cmake-share-library-with-multiple-executables 33448011 33448011 but this would increase the initial configuration step duration .", "Because I think this being more a configuration step issue then having a problem with the generation step just writing the files is normally pretty fast .", "I had a similar problem and rebuilding CMake itself with a lot more optimization options then the normal distributions did reduce my configuration time from about 20s to less then 1s .", "Turning my comments into an answer .. . .. . Answering this isn t easy because there are so many aspects that define CMake s configuration and generation steps duration besides what you actually do in your CMakeLists.txt files it s e.g .", "What helped me to speed-up the configuration generation was to rebuild CMake itself with a lot more optimization options than the normal distributions and using a 64bit toolchain instead of the 32bit versions currently still distributed .", "Remark : I confirmed @BruceAdams test results that the compilers auto-vectorization https : gcc.gnu.org projects tree-ssa vectorization.html default for -O3 or -Ofast is not able to do much about CMake source code s ability to run in multiple processes on multiple cores .", "And yes having had similar concerns http : stackoverflow.com questions 31512485 cmake-how-to-setup-source-library-and-cmakelists-txt-dependencies regarding large CMake projects this is seen as a good modern cmake practice see also references below .", "Say for Visual Studio I want to use DNOMINMAX and a suppress a bunch of warnings only VS produces like wd4626 wd4640 etc .", "How would you suggest doing this", "The root meson.build calls subdir meson to include the configurations .", "So when compiling with gcc this would evaluate to subdir gcc .", "It uses ninja by default to run the tests so perhaps there s an option you can pass to ninja to set the directory", "Why I m asking is sometimes unit tests need access to config data files I usually try to avoid this but sometimes it s just not possible and they need to know the relative-path in order to load them .", "It appears the appropriate syntax for this is to append workdir to arguments passed to the test method .", "Is the directory return by meson.source root the project root directory with the root level meson.build file or is it the path of the current meson.build file being processed", "I m wondering if there s a way to get the version information as well .", "Yes it turns out this is possible even though it wasn t documented on the wiki .", "For example I typically put acceptance tests next to my unit tests in a folder structure like this : .. . .. . I don t always have acceptance tests and I d like to avoid having to have a meson.build file there if it isn t necessary .", "I d much rather have a conditional subdir acceptance test if the directory acceptance test exists .", "You can use run command doing something like .. . .. . but of course that has the disadvantage of not working across platforms .", "I just tried it .", "@mickb My comment was based on what the wiki unit test cases said I appreciate you taking the time to try it out .", "Yes it is possible to define intra-project dependencies .", "Say I have a meson.build file defining two targets .", "proj builds a library that src will depend on .", "Then proj meson.build will look something like this : .. . .. . .. . .. . And src meson.build would look something like :", "http : stackoverflow.com questions 31512485 cmake-how-to-setup-source-library-and-cmakelists-txt-dependencies .. . Making cmake library accessible by other cmake packages automatically http : stackoverflow.com questions 33462209 making-cmake-library-accessible-by-other-cmake-packages-automatically .. . Use CMake-enabled libraries in your CMake project https : coderwall.com p qk2eog use-cmake-enabled-libraries-in-your-cmake-project-ii .. . .. . What I used to reproduce your problem" ] }
{ "confidence": [ 77.31059265136719, 74.9766845703125, 74.25337219238281, 74.14669799804688, 71.94560241699219, 70.33406829833984, 69.06871795654297, 67.350830078125, 64.68647003173828, 60.77619552612305, 59.55978012084961, 47.645198822021484 ], "content": [ "Question : null .. . Answer : I m running Elementary OS which is based on Ubuntu 14.04LTS . Ninja is at version 1.3.4 . When running Meson I get the error : .. . .. . According to http : www.mariocampos.io blog meson -first-impressions I can fix this by getting a newer version of Ninja . That s fine I can do that . However I prefer to keep to the software in the package repos so my question is : .. . .. . Can I tell Meson to generate a Ninja build file that doesn t require such a high version or does Meson use Ninja features only available in 1.5.1", "Question : null .. . Answer : It appears to be trivial to define unit test executables in meson and to execute them with ninja test . Is it possible to execute unit tests as a post-build-event in solutions generated with meson-build", "Question : Is it possible to glob source code files in a meson-build .. . Answer : I found an example https : github.com mesonbuild meson blob master test 20cases common 55 20file 20grabber meson.build in the meson unit tests showing how to glob source but in the comments it says this is not recommended .", "Question : I m new to meson just looking through the documentation at this point . What is your recommended way of handling conditional cflags in a meson-build Say for Visual Studio I want to use DNOMINMAX and a suppress a bunch of warnings only VS produces like wd4626 wd4640 etc . How would you suggest doing this .. . Answer : I solved this using a directory hierarchy and meson calls to get compiler version . In my project root directory I have a subdirectory for configuration stuff called meson . The root meson.build calls subdir meson to include the configurations . The meson meson.build calls subdir compilers to pull in configuration about compilers - the extra layer is in case I have platform specific configurations to add later . Then meson compilers meson.build looks like : .. . .. . The last line directs meson to include the subdirectory with the same name as the compiler . So when compiling with gcc this would evaluate to subdir gcc . This meson.build is where configuration information for all versions of that compiler would go . This file might look like : .. . .. . The subdirectories under the compiler name would contain configuration information for specific compiler versions should they need some flags config not all versions of the compiler support . If possible it would be helpful to make the subdir conditional on the existence of the directory so the build doesn t break when building with a different specific build of the compiler . Caveat : I don t have meson running on windows yet so I can t be sure the version string has 3 parts like it does for clang and gcc .", "Question : In meson-build system can I get the compiler version in addition to the compiler name from the compiler properties For example you can get the C++ compiler name like so : .. . .. . This returns strings like clang gcc msvc etc . I m wondering if there s a way to get the version information as well . .. . Answer : Yes it turns out this is possible even though it wasn t documented on the wiki .", "Question : Using meson-build is it possible to test for the existence of a directory in my project For example I typically put acceptance tests next to my unit tests in a folder structure like this : .. . .. . I don t always have acceptance tests and I d like to avoid having to have a meson.build file there if it isn t necessary . I d much rather have a conditional subdir acceptance test if the directory acceptance test exists . .. . Answer : Looking through the reference manual https : github.com mesonbuild meson wiki Reference 20manual I don t see any direct support for this . You can use run command doing something like .. . .. . but of course that has the disadvantage of not working across platforms . Comment : I didn t think run command will work because the commands are not actually run while generating the configuration they are run by ninja after the fact . Comment : I just tried it . It prints directory exists when you run the the meson command and I didn t have any trouble running subdir within the if condition either . Comment : @mickb My comment was based on what the wiki unit test cases said I appreciate you taking the time to try it out . Comment : @mickb I imagine I could call a python script in run command and since meson is python3 that s already a dependency .", "Question : I have a static library from the project A let s call it liba.so and I want to compile a shared library in my project B let s call it libb.so and embed liba.so in it . Also I have a binary in that project B which also depends on liba.so so I want to embed it in the binary . Is that possible How Comment : Are you sure project A creates a static library liba.so is the name of a shared library which you cannot embed into another shared library - liba.a would be a proper name for a static library . However see also stackoverflow.com questions 2763988 http : stackoverflow.com questions 2763988 how-to-include-all-objects-of-an-archive-in-a-shared-object Comment : @nos Indeed you re right . It s liba.a . So I should compile libb.a . Anyways I m still not sure how to make meson do it . .. . Answer : When A is a Separate Code Base .. . .. . What you do is build and install project A . Then create a dependency on project A in project B s definition . That looks like this : .. . .. . The version section in dependency is optional . When A is in the Same Meson Project as B .. . .. . When A and B are in the same meson project it s a little uglier . You have to declare a dependency anchor in A . That looks like this : .. . .. . Then project B becomes :", "Question : Say I m building targets A B and C in one project . In meson is it possible to define dependency relationships between them For example if the dependency graph looks like this : .. . .. . How could I express this with meson .. . Answer : Yes it is possible to define intra-project dependencies . I found this test case https : github.com mesonbuild meson tree master test 20cases common 85 20internal 20dependency on github.com to demonstrate how to do it . Say I have a meson.build file defining two targets . proj builds a library that src will depend on . Then proj meson.build will look something like this : .. . .. . .. . .. . And src meson.build would look something like :", "Question : null .. . Answer : When defining a target in meson you can declare dependencies on external projects using the following syntax : .. . .. . This checks the standard include locations which works well on Linux but not so well on other platforms . Is there a way to add additional include and library paths for meson to check when declaring dependencies", "Question : In a meson-build is it possible to set the working directory before executing unit tests It uses ninja by default to run the tests so perhaps there s an option you can pass to ninja to set the directory Why I m asking is sometimes unit tests need access to config data files I usually try to avoid this but sometimes it s just not possible and they need to know the relative-path in order to load them . .. . Answer : It appears the appropriate syntax for this is to append workdir to arguments passed to the test method .", "Question : Is the directory return by meson.source root the project root directory with the root level meson.build file or is it the path of the current meson.build file being processed .. . Answer : The project root directory is obtained with the following meson syntax : .. . .. . The current source directory can be obtained with the following meson syntax :", "Question : I have an issue with the generation of makefiles stage of cmake being slow which is similar to this unanswered question : .. . .. . CMake is slow to generate makefiles http : stackoverflow.com questions 26701628 cmake-is-slow-to-generate-makefiles .. . .. . My project is made up of a top level CMakeLists.txt which uses add subdirectory to add various subprojects for individual library and executable components . For a given component the CMakeLists.txt contains something like : .. . .. . I can build just the contents of that directory using : .. . .. . If I modify the CMakeLists.txt in the sub-directory which I ve been doing a lot as part of a migration from pure Makefiles to cmake then run make it correctly re-runs cmake to update the configuration as-if I d run make rebuild cache . However I notice that it in fact reconfigures the entire project . What I really want is for cmake to be clever enough to know it only needs to regenerate the Makefile in the current directory and sub-directories . Is there a better way to structure a cmake project to achieving this I see some people use project for each CMakeLists.txt in each sub-project . In general is this a good idea Alternatively Additionally is there some way to speed up the generation step of cmake currently I have 60s+ .. . .. . Bonus points if you want to discuss why cmake itself should or shouldn t be able to run in parallel imagine a cmake -j .. . .. . .. . .. . I ve added the meson-build tag as a modest bounty alone hasn t yet attracted enough attention to warrant an answer . Its this kind of problem that might cause people to switch to build systems to meson-build assuming it doesn t have similar problems or something similar . It is possible that the correct answer is it can t be done without modifying the source to cmake . To earn the bounty though I require an explanation in terms of how cmake works and or where it is flawed . .. . .. . Clarification : It is the generation step that is slow in my case . The configure itself is quick enough but cmake hangs for a quite a while between outputting -- Configuring done and -- Generating done . For a full cache rebuild I run : .. . .. . under the hood this runs : .. . .. . I presume -B is a synonym for --build neither option is described correctly in the documentation @todo report bug -H is the root of the source directory not the same as --help as the docs would have you believe .. . .. . Its fast to get to the output of Configuring done but slow from there : E.g . If edit a single CMakeLists.txt file in a subdirectory then run make -n it runs : .. . .. . --check-build-system is another undocumented option . The effect is the same - regenerate the whole build-system not just the current subtree . There is no difference in behaviour between an in source and and out of source build . If I run a trace e.g . : .. . .. . The majority of time spent seems to be spent on or between open access unlink calls . The length of each task is quite variable but the huge number of them builds up . I have no idea what the Labels.json and Labels.txt files are about something internal to cmake .. . .. . 1 run : .. . .. . another run of the same command : .. . .. . Note the ninja generator is much faster though still not brilliant E.g . Note that the project is not quite ready for ninja yet as there are errors like : .. . .. . and .. . .. . to be resolved . This question is really about why the Makefile generator is slow . I m not sure if the problems ninja shows are useful hints here or red herrings . .. . .. . Building cmake with more optimisations does not help . Based on my trace output it and the output of time it is unlikely that it would . The user time and therefore time spend within the cmake code itself is quite low . see e.g . What do real user and sys mean in the output of time 1 http : stackoverflow.com questions 556405 what-do-real-user-and-sys-mean-in-the-output-of-time1 Here s what I tried for completeness : .. . .. . Actually using a more optimised cmake does make the configure part faster but in my case it is the generate part that is slow . It would appear from the timing that this step is somehow I O bound . .. . .. . I decided to investigate Florian s idea that using memory insteam of file stream for temporary files might make a difference . I decided to try the easy route and hacked cmake to write .tmp files to a ramdisk instead . I then went the whole hog and tried generating the build-system on on the ramdisk .. . .. . I was very surprised to find this makes no difference at all to the wall clock time : .. . .. . Similarly with ramfs : .. . .. . What could be happening here I was guessing sub-processes but I can t work out which sub-processes are consuming the wall clock time if any of them are . They look to be very short lived . .. . .. . for completeness here is some output from perf cmake built with -fno-omit-frame-pointer : .. . .. . And perf report -g graph -no-children : Comment : project modifies neither parsing flow nor makefile generation flow . It just adds several CMake variable s definition . Comment : I had a similar problem and rebuilding CMake itself with a lot more optimization options then the normal distributions did reduce my configuration time from about 20s to less then 1s . Which host system do you use Another alternative would be to divide a big project into sub-projects using ExternalProject Add see e.g . my answer here http : stackoverflow.com questions 33443164 cmake-share-library-with-multiple-executables 33448011 33448011 but this would increase the initial configuration step duration . Last there is always the possibility of binary delivery pre-compiled libraries . Comment : And did you see CMake Performance Tips https : cmake.org Wiki CMake Performance Tips Because I think this being more a configuration step issue then having a problem with the generation step just writing the files is normally pretty fast . Can you please try the Investigation profiling methods https : cmake.org Wiki CMake Performance Tips Investigation.2Fprofiling methods Simply because the configuration step duration mainly depends on what you do in your CMakeLists.txt files . Comment : I thought about externalProject add but really the subprojects are not external . They are part of the same source tree . In particular they share the same configuration and are strongly coupled as in your answer . Is it considered good modern cmake practice to use ExternalProject Add as a workaround in this case Comment : Note that I have looking at the performance tips and using trace strace . I ve even poked into the source of cmake a little . Nothing obvious leapt out and I haven t had a chance to delve deeper . .. . Answer : Turning my comments into an answer .. . .. . Answering this isn t easy because there are so many aspects that define CMake s configuration and generation steps duration besides what you actually do in your CMakeLists.txt files it s e.g . your host system your toolchain and which CMake version distribution you are using . So I try to concentrate on the specific questions you have . Rebuild Rewrite makefiles for just a subdirectory .. . .. . For the start : Using add subdirectory is good for structuring your CMake code . But you have to keep in mind that you can always change global CMake properties in a subdirectory and that targets inside those subdirectories can have cross-dependencies . So what does CMake do considering the I have touched one CMakeLists.txt file in a subdirectory case discussed here : .. . .. . If a CMakeLists.txt file is changed it goes through the complete hirarchy of CMakeLists.txt files again and rebuilds the build environment again in memory . Now it temporarily recreates all the necessary build make files and checks if they defer from the existing ones see cmGeneratedFileStreamBase : : Close https : github.com Kitware CMake blob master Source cmGeneratedFileStream.cxx L162 .. . If a file has changed it replaces the existing one with the new one .. . .. . This behavior is necessary because any makefile can change even when only a subdirectories CMakeLists.txt file has changed and it was optimized to prevent unnecessary rebuilds during the actual make step from touched makefiles . Is there some way to speed up the generation step of cmake .. . .. . So yes it does temporarily rewrite all makefiles which could be slow and no you can t minimize this while using add subdirectory to only the changed subdirectory . Maybe one possible performance optimization for the future in CMake s own code would be to use memorystreams instead of filestreams for the temporary files . Edit : @BruceAdams tested this by using a RAM disk for the generated makefile environment with no effect . And yes the CMake generated cmake check build-system rule does almost the same as the rebuild cache rule and yes the used -B -H and --check-build-system options are CMake internal command-line options and therefor undocumented even if often referred to on StackOverflow e.g . in one of my answers here http : stackoverflow.com questions 33917454 cmake-how-to-specify-the-version-of-visual-c-to-work-with . What helped me to speed-up the configuration generation was to rebuild CMake itself with a lot more optimization options than the normal distributions and using a 64bit toolchain instead of the 32bit versions currently still distributed . Edit : Here are some test results using the CMake test script found below with 100 subdirectories libraries on my Windows PC always using the same MSYS environment but different CMake compilations of the same CMake source code : .. . .. . 1 . Official CMake 3.2.2 version : .. . .. . time -p cmake -G MSYS Makefiles . . .. . .. . .. . real 43.93 .. . user 0.00 .. . sys 0.03 .. . .. . .. . 2 . Using mingw32 and GNU 4.8.1 I rebuild CMake 3.2.2 with .. . .. . cmake -DCMAKE BUILD TYPE Release -DCMAKE CXX FLAGS -O3 -G MSYS Makefiles . . .. . .. . .. . and got .. . .. . time -p c temp cmake-3.2.2 MSYS32 bin cmake.exe -G MSYS Makefiles . . .. . .. . .. . real 41.37 .. . user 0.01 .. . sys 0.04 .. . .. . .. . and the same with my antivirus software turned off .. . .. . time -p c temp cmake-3.2.2 MSYS32 bin cmake.exe -G MSYS Makefiles . . .. . .. . .. . real 20.98 .. . user 0.00 .. . sys 0.04 .. . .. . .. . 3 . Using mingw-w64 and GNU 5.3.0 I rebuild CMake 3.2.2 with .. . .. . cmake -DCMAKE BUILD TYPE Release -DCMAKE CXX FLAGS -march native -m64 -Ofast -flto -G MSYS Makefiles . . .. . .. . .. . and got .. . .. . time -p c temp cmake-3.2.2 MSYS64 bin cmake.exe -G MSYS Makefiles . . .. . .. . .. . real 25.59 .. . user 0.00 .. . sys 0.04 .. . .. . .. . and the same with my antivirus software turned off .. . .. . time -p c temp cmake-3.2.2 MSYS64 bin cmake.exe -G MSYS Makefiles . . .. . .. . .. . real 6.95 .. . user 0.00 .. . sys 0.03 .. . .. . .. . To summarize I see two main influences : .. . .. . 1st : The configuration step can be speed-up by going for a 64bit version and optimize for your processor platform you would certainly have to find a common base -march .. . or -mtune .. . https : gcc.gnu.org onlinedocs gcc-4.9.2 gcc i386-and-x86-64-Options.html for all your project s build PCs . 2nd : The generation step can mostly be speed-up by searching for possible file I O bottlenecks outside of CMake . In my case telling the antivirus software to not check the toolchain and build directories each time I read-write to those was really speeding up things . Remark : I confirmed @BruceAdams test results that the compilers auto-vectorization https : gcc.gnu.org projects tree-ssa vectorization.html default for -O3 or -Ofast is not able to do much about CMake source code s ability to run in multiple processes on multiple cores . Is there a better way to structure a cmake project to achieving this .. . .. . Yes if you e.g . know that a certain sub-tree of your CMake script code just generates a library and has no dependencies you could put that part in an external project by using ExternalProject Add . And yes having had similar concerns http : stackoverflow.com questions 31512485 cmake-how-to-setup-source-library-and-cmakelists-txt-dependencies regarding large CMake projects this is seen as a good modern cmake practice see also references below . References .. . .. . CMake Performance Tips https : cmake.org Wiki CMake Performance Tips .. . CMake : Parallel generation of make files https : cmake.org pipermail cmake 2014-November 059151.html .. . GCC : how is march different from mtune http : stackoverflow.com questions 10559275 gcc-how-is-march-different-from-mtune .. . CMake : How to setup Source Library and CMakeLists.txt dependencies http : stackoverflow.com questions 31512485 cmake-how-to-setup-source-library-and-cmakelists-txt-dependencies .. . Making cmake library accessible by other cmake packages automatically http : stackoverflow.com questions 33462209 making-cmake-library-accessible-by-other-cmake-packages-automatically .. . Use CMake-enabled libraries in your CMake project https : coderwall.com p qk2eog use-cmake-enabled-libraries-in-your-cmake-project-ii .. . .. . What I used to reproduce your problem .. . .. . Just for completeness and if someone wants to check those numbers against his own here is my test code : .. . .. . And then - after the first cmake . . and make calls - doing : Comment : Thanks for the answer . I m not sure I m fully convinced by arguments to use externalProject Add for internal libraries . I will try it out though and see if the performance justifies the extra complexity . Essentially that means that add subdirectory does not scale and yet this is one of the few places where cmake s language is quite nice . auto vectorisation will not make your code multi-core multi-threading or multi-process automatically . There is hope for that with parallel STL and execution policies but you still have to write you code in suitable fashion . Comment : I don t think you ve actually solved my problem or completely answered the question but rather than let the bounty go to waste I will award it on the basis of effort . I ll try with external project add when I have more time and if that works out I ll accept the answer . Comment : @BruceAdams Thanks . So I will also try to add some results on the CMake recompilation part . And sure the auto-vectorization can only do so much . And I ll give it a try and rewrite my test code to use externalProject Add for the libraries and add the measurement results also . Comment : @BruceAdams I ve added my recompilation test results . Going for 64bit and - as I ve already done for my build environment paths in the past but had not measured the influence so far - selectively disabling my antivirus software had a significant speed-up effect 85 less for the initial configuration step . I ll try to add some numbers for the externalProject Add usage in the coming days ." ] }
[ "yes-answer-long", "yes-answer-short" ]
c++
UNK_RELATION
pdo-odbc@db2@164
pdo-odbc -- pdo-odbc is a driver that implements the php data objects pdo interface to enable access from php to databases through odbc drivers or through the ibm @placeholder call level interface db2 cli library.http : php.net manual en ref.pdo-odbc.php .
{ "confidence": [ 90.43273162841797, 88.58409118652344, 79.38591003417969, 79.28856658935547, 76.84246063232422, 75.72532653808594, 74.90673828125, 71.46349334716797, 69.85773468017578, 68.76724243164062, 61.286746978759766, 57.46409225463867, 54.94700622558594, 54.874053955078125, 54.1924934387207, 53.94028854370117, 53.48459243774414, 52.99435043334961, 51.462337493896484, 51.45368194580078, 51.37112808227539, 51.37112808227539, 51.25897979736328, 50.98991775512695, 49.19525146484375, 48.878631591796875, 47.85187530517578, 47.85187530517578, 47.80059814453125, 47.58555221557617, 46.704551696777344, 46.28337860107422, 46.077022552490234, 45.90528106689453, 45.381473541259766, 45.111244201660156, 44.65480041503906, 43.590675354003906, 43.549251556396484, 43.42488098144531, 43.42488098144531, 43.20162582397461, 43.16836166381836, 43.16836166381836, 43.16836166381836, 43.03428649902344, 42.4604606628418, 42.4604606628418, 42.150394439697266, 41.83111572265625, 41.043174743652344, 40.867156982421875, 40.526939392089844, 39.665435791015625, 39.665435791015625, 38.736671447753906, 38.40513229370117, 38.40513229370117, 38.40513229370117, 38.235416412353516, 38.21998977661133, 37.82030487060547, 37.333709716796875, 36.50467300415039, 36.20581817626953, 36.069801330566406, 35.994415283203125, 35.73617172241211, 35.61855697631836, 35.48993682861328, 35.48993682861328, 34.980430603027344, 34.9022102355957, 34.9022102355957, 33.779937744140625, 33.387123107910156, 33.22068405151367, 31.987010955810547, 31.987010955810547, 31.682924270629883, 30.206363677978516, 28.29674530029297, 28.081348419189453, 27.254013061523438, 27.146034240722656, 27.146034240722656, 26.795215606689453, 26.795215606689453, 26.306838989257812, 25.765636444091797, 25.765636444091797, 25.716781616210938, 25.643068313598633, 25.299915313720703, 25.176942825317383, 24.878585815429688, 24.878585815429688, 24.715187072753906, 24.715187072753906, 24.715187072753906 ], "content": [ "that s odbc itself but not pdo-odbc .", "missing odbc driver http : i.stack.imgur.com D9bC5.png .. . .. . This driver is necessary to be able to access odbc databases via pdo .", "I m trying to connect to Snowflake via their ODBC driver in PHP CentOS 6 and 7 and utilize PDO for easier access .", "How can I connect PHP to this MSSQL database via PDO and ODBC", "ok then did you check if the pdo-odbc driver is installed", "While I did have odbc enabled on the web server I did not have the odbc driver installed for PDO .", "when i select data from ODBC with PDO in PHP some columns are fetched as NULL but in database data exists .", "PHP PDO ODBC doesn t seem to be able to store NVARCHAR characters UTF-16 without some manual encoding .", "Using PDO ODBC the query returns success and an empty result set .", "odbc manager s dsns http : i.stack.imgur.com YMoAY.png .. . .. . I know this particular DSN works because I was able to build another demo file and connect successfully via odbc connect : .. . .. . I ve been digging through the PDO-ODBC http : php.net manual en ref.pdo-odbc.connection.php documentation as well as other resources online but I can t figure out why PHP is unable to find the driver when trying from PDO .", "enter image description here http : i.stack.imgur.com D9bC5.png .. . .. . So here if I had the ODBC driver for pdo installed odbc would be at the end of the list correct", "Per the php.net documentation on installing pdo http : php.net manual en pdo.installation.php for windows the driver was already included in the php build I m using version 5.5 and just needed to be included in the php.ini file .", "Similar problems arise when trying to use PHP with Microsoft Access ODBC if Unicode characters are involved .. . .. . Conclusion : PHP support for ODBC continues to be a bit of a mess at least where Microsoft databases are concerned .", "Environment : .. . .. . Ubuntu 14.04 .. . PHP 5.5.9 .. . unixODBC 2.2.14 .. . Connx 12 .. . .. . I have managed to create a very simple example that shows PDO ODBC apparently not using the parameters .", "I believe that this is a bug in PHP PDO 5.5.9 under Ubuntu 14.04 .", "A dirty solution .. . .. . You can use the following to save and retrieve unicode data in SQL SERVER via PDO ODBC but it s ugly.. . .. . .. . 1 .", "we are trying to create a connection with our SQL database trough ODBC in PHP .", "Explanation http : forums.phpfreaks.com topic 285467-pdo-parse-params-error-in-pdo-odbcso-whenever-php-starts-in-fedora-20 entry1465881", "pdo has its own drivers and doesn t just wrap odbc functions .", "ODBC driver seems to be installed and working properly as the native ODBC functions in PHP work pretty well : .. . .. . returns .. . .. . and that is exactly what I get when I query the DB directly .", "User model screenshot http : i.stack.imgur.com QGPZ5.png .. . .. . .. . .. . FYI .. . .. . I m using laravel-5 on Mac OS X EL Capitan MAMP Server php 5.6.10 pdo-odbc", "Discussed in connect.microsoft.com SQLServer feedback details 737751 http : connect.microsoft.com SQLServer feedback details 737751 cannot-bind-parameters-with-php-pdo-odbc-and-sql-native-client-11-0", "Is it possible this is a bug in PDO", "Those issues are especially puzzling given that the PDO ODBC page http : php.net manual en ref.pdo-odbc.php says : .. . .. . On Windows PDO ODBC .. . is the recommended driver for connecting to Microsoft SQL Server databases .", "php 5.4.15 .. . unixODBC 2.3.0 .. . ODBC Driver 11 for SQL Server .. . sql-server-2012 .. . centos-x64 6.4", "Using PDO : : quote http : php.net manual en pdo.quote.php may help but I d also make sure your data is very thoroughly validated as well .", "When I execute this code : .. . .. . It says I have the odbc driver available .", "As someone has right commented it should be calling the odbc driver .", "I m was using pdo sqlsrv for my SQL server but since the PDO drivers for it aren t yet available for PHP v7.0 I switched to pdo-odbc .", "I managed to install PHP from source with this patch applied and changed from FreeTDS to ODBC Driver 11 for SQL Server now is working .", "Did you manage to make it work with PDO", "if you already have the ODBC defined and have a stored password you can simply connect with .. . .. . where DSN NAME is the actual name of your ODBC datasource be it MySQL SQL Server or DB2 .", "odbc in phpini http : i.stack.imgur.com TtkKW.png .. . .. . It looks like the driver is installed unless this is a different driver .", "@DipuR unfortunately we re still using ODBC .", "In fact your explanation is the best I ve found so far regarding the long-standing issues between PHP and Microsoft ODBC drivers .", "DBTEST class for the PDO instance : .. . .. . Nested Queries :", "So it seems that PDO ODBC doesn t have any notion of NVARCHAR rather than PDO as a whole .", "Update .. . .. . I popped open my phpinfo page to make sure the odbc driver is installed per Marc B s comment : .. . .. .", "Until 64-bit PHP is patched to use 64-bit SQLLEN and SQLULEN sizes it looks like the best Free solution is to use 32-bit PHP and ODBC drivers .", "MS have since started to follow the ODBC spec properly but apparently PHP hasn t .", "same error here : .. . .. . Win7 64bit PHP 5.4.12 SQL Server Express 2012 ODBC 11 for SQL Server", "Build your own PDO wrapper as recommended by @GordonM", "But when I want to use PDO the results are getting weird .", "Any idea if any PDO options would help here", "That s your odbc connect is functioning but has absolutely nothing to do with pdo .", "I m trying to connect to an odbc database via php s PDO class : .. . .. . but when I do I get the error : .. . .. . Fatal error : Uncaught exception PDOException with message could not find driver in C : inetpub wwwroot pdoClass.php : 7 Stack trace : 0 C : inetpub wwwroot pdoClass.php 7 : PDO- construct odbc : CS HDZipCo.. . demo skdemo", "@DuruCanCelasun no I gave up and ended up using ODBC", "I updated the original question with a screen shot showing the phpinfo s odbc section .", "This is probably not what you want to hear but this has all the hallmarks of a bug in PHP s ODBC driver for PDO which is not heavily used as PHP programmers tend to favour open-source databases like MySQL SQLite Postgres over commercial offerings or in the underlying SQL server driver which is poorly supported in Linux for similar reasons though if odbc works then it s probably not the underlying driver .", ".. . .. . In your PHP code you ll create your PDO object like this : .. . .. . Note that your username may need to be in the format : domain username .", "I m trying to do a query to retrieve all users using eloquent ORM laravel5 PDO ODBC connection and when tray to do this .. . .. . I get this error .. . .. . as you see I m using FreeTDS to connect with SQL Server I don t know if this driver needs an aditional configuration or I have to modify laravel core .", "The issue is that pdo-odbc does not work with several types that odbc can .", "NOTE : I have narrowed this problem down to specifically PDO because I am able to successfully prepare and execute statements using the odbc http : php.net manual en book.uodbc.php functions .", ": .. . .. . I concluded that someone ignore port setting on dsn of PDO .", "I suppose it s entirely DBMS issue with little relation to PDO .", "After getting some great help from Marc B in the initial question s comments it turns out the problem was coming from my misunderstanding of enabling odbc on my web server and having the pdo-odbc driver installed .", ".. . .. . Results : .. . .. . If you try this with PDO MySQL you ll get a fatal-error about an incorrect parameter count to native function LENGTH .", "Try this as your connection-string : cnx new PDO odbc : Driver EFR Server localhost Port : 7004 Database EFR LcLfVJFLTKTCEHRO", "pdo var-dump http : i.stack.imgur.com AY6Rs.png .. . .. . Thanks for your help Marc B .", "This is going through unixODBC on an Ubuntu system .. . .. . I would really rather use the PDO functions and take advantage of the OOP implementation more modern fetch options etc .", "By looking at one of those recommended patches : .. . .. . We see the only thing that s changed is SDWORD 16-bit signed integer which is substituted with new ODBC type SQLULEN that is 64 bits in a 64-bit ODBC application and 32 bits in a 32-bit ODBC application http : www.unixodbc.org doc ODBC64.html .", "I have also noticed that native ODBC functions consume 200MB of memory in this case which seems a lot .", "In fact everything that you pass to or retrieve from SQL SERVER via PDO will be by chunk of 8 bits .", "I ve installed the Microsoft ODBC Linux driver for SQL Server version 13.0.0.0 on the machine and tested it manually with the sqlcmd command : .. . .. . It all worked fine .", "Why can t I bind this parameter to the PDO prepared-statement .. . .. . This works : .. . .. . .. . Array col value 0 value .. . .. . .. . Does not work : .. . .. . Web Server is running PHP 5.5.9 on Linux Ubuntu 14.04 with ODBC Driver 13 for SQL Server and connecting to Microsoft SQL Server 2012 on Windows Server 2012 .. . .. . Here s the full error : .. . .. . .. . Fatal error : Uncaught exception PDOException with message SQLSTATE 22001 : .. . String data right truncated : 0 .. . Microsoft ODBC Driver 13 for SQL Server .. . String data right truncation .. . SQLExecute 0 at build buildd php5-5.5.9+dfsg ext pdo-odbc odbc stmt.c : 254 in var www scratch.php : 46 .. . Stack trace : .. . 0 var www scratch.php 46 : PDOStatement- execute Array .. . 1 main thrown in var www scratch.php on line 46 .. . .. . .. . I have also tried setting : .. . .. . And using named parameters : .. . .. . Even with an explicit colon : .. . .. . I also tried just using bindParam http : php.net manual en pdostatement.bindparam.php as demonstrated in this answer http : stackoverflow.com a 31930277 4233593 : .. . .. . As well as with named parameters : .. . .. . If I try to explicitly set the length : .. . .. . I get a bonus error : .. . .. . .. . Fatal error : Uncaught exception PDOException with message .. . SQLSTATE 42000 : Syntax error or access violation : 102 .. . Microsoft ODBC Driver 13 for SQL Server SQL Server .. . Incorrect syntax near OUTPUT .", "However on Windows they also offer PDO SQLSRV http : php.net manual en ref.pdo-sqlsrv.php which actually does appear to work correctly .", "Another Update .. . .. . On further inspection of my phpini per Marc B s additional comment it looks like I don t have the POD ODBC specific driver installed : .. . .. .", "I ve read a bunch of posts on the internet here http : stackoverflow.com questions 22463614 php-artisan-migrate-throwing-pdo-exception-could-not-find-driver-using-larav and here http : stackoverflow.com questions 25329302 laravel-error-pdoexception-could-not-find-driver-in-postgresql .", "I found this patch https : bugs.php.net bug.php id 61777 but works only with ODBC Driver 11 for SQL Server http : www.microsoft.com en-us download details.aspx id 36437 I tried with FreeTDS no luck .", "I d compare line by line the unixODBC traces obtained running the very same query with PDO option 1 and odic option 2 .", "enter image description here http : i.stack.imgur.com EqOqI.png .. . .. . and my test query using PDO on my demo database worked : .. . .. . Dumps out : .. . .. .", "1 main thrown in C : inetpub wwwroot pdoClass.php on line 7 .. . .. . The dsn value is the name of the DSN I created in my ODBC Manager .", "Try to insert the following japanese characters using PDO : It means hello .. . 2 .", "The symptom .. . .. . It seems that PDO doesn t have any notion of NVARCHAR aka characters that are encoded using 16 bits .", "The driver is actually being found by PHP but we think it just can t login .", "Hi I couldn t get it to work with the dblib : .. . DSN string but I was able to do it with an odbc one : odbc : mssql skipping entirely the freetds.conf server definition .", "EDIT : I found another question on Stack Overflow http : stackoverflow.com questions 14628409 im-getting-string-data-right-truncation-errors-from-php-using-odbc-and-conne where the asker seems to have a similar problem .", "Then retrieve it via PDO and print it on the screen you will get : .. . .. . It s not so bad but it s not good either .", "It might take me a couple days to get the time to spin up a test vm to build custom PDO with that patch but I m excited thanks", "The accepted answer is correct up to the actual PHP call .", "I actually had the exact same issue with a different type of database where the id field worked but the others returned null via pdo-odbc and worked 100 with odbc .", "Of course if you want to use OOP style then you ll have to implement your own class that wraps the procedural odbc functions in OO methods so that could potentially be a lot of work .", "I m trying to upgrade from PHP v5.4 to php v7.0 where I ran into this issue of being unable to run the inner nested query .", "PHP works but when you have other applications that are not in PHP that access that information from your database they will get the wrong string : .", "Microsoft s driver used to be built this way which is probably why PHP followed suit .", "Using the MS driver and a patched PHP I was still unable to run prepared statements .", "I ve upgraded to PHP 7 planned to do that anyway and this issue went away .", "Would it help if I posted the strace output when I run php", "I actually found the same problem when using Easysoft s driver and talking through the issues with them discovered that pdo-odbc is the culprit .", "Upgrade to PHP version 5.6 .. . 2 .", "Compile a PHP v5.5.9 with provided patches .", "My PHP is on CentOS linux mediatemple but the MSSQL database is from Microsoft Dynamics Great Plains .", "It it for a different driver but it s the same error so it might be the same solution .. . .. . from your php.ini I see you have a pdo odbc.ini : .. . .. . if you copy that pdo odbc.ini file to your specific php version conf files could be something like etc php5 conf.d it might rule out the problem .", "Once you get the binary in PHP PHP will already have transform it into a hex string.. .", "Next try to save it in SQL via PDO and you will get the following : S0 0k0a0o0 .. . .. . The SQL SERVER binary representation of S0 0k0a0o0 in VARCHAR is 533093306B3061306F30 which is also the binary representation of in NVARCHAR .", "PHP is returning the following error : .. . .. . We hope someone can help us out with this problem .", "Could you elaborate on what specific php version conf files are and where I d find them", "To retrieve it you want to resend it to PHP as a binary .. . .. . 4 .", "CentOS 6.6 .. . PHP 5.5.19 .. . sqlncli-11.0.1790.0 .. . .. . -", "A PHP version 5.5.x does not come with this issue ." ] }
{ "confidence": [ 134.74822998046875, 117.26699829101562, 104.44865417480469, 98.29814147949219, 96.8070068359375, 95.45482635498047, 90.90330505371094, 89.36474609375, 82.32460021972656, 80.65402221679688, 79.09187316894531, 70.38511657714844, 68.1309585571289, 64.95028686523438, 62.72024917602539, 55.11961364746094, 46.40343475341797, 34.06428909301758, 20.411468505859375, 15.98039722442627 ], "content": [ "Question : I m trying to connect to an odbc database via php s PDO class : .. . .. . but when I do I get the error : .. . .. . Fatal error : Uncaught exception PDOException with message could not find driver in C : inetpub wwwroot pdoClass.php : 7 Stack trace : 0 C : inetpub wwwroot pdoClass.php 7 : PDO- construct odbc : CS HDZipCo.. . demo skdemo 1 main thrown in C : inetpub wwwroot pdoClass.php on line 7 .. . .. . The dsn value is the name of the DSN I created in my ODBC Manager . odbc manager s dsns http : i.stack.imgur.com YMoAY.png .. . .. . I know this particular DSN works because I was able to build another demo file and connect successfully via odbc connect : .. . .. . I ve been digging through the PDO-ODBC http : php.net manual en ref.pdo-odbc.connection.php documentation as well as other resources online but I can t figure out why PHP is unable to find the driver when trying from PDO . Any ideas Update .. . .. . I popped open my phpinfo page to make sure the odbc driver is installed per Marc B s comment : .. . .. . odbc in phpini http : i.stack.imgur.com TtkKW.png .. . .. . It looks like the driver is installed unless this is a different driver . Another Update .. . .. . On further inspection of my phpini per Marc B s additional comment it looks like I don t have the POD ODBC specific driver installed : .. . .. . enter image description here http : i.stack.imgur.com D9bC5.png .. . .. . So here if I had the ODBC driver for pdo installed odbc would be at the end of the list correct Comment : did you try odbc connect on your bad dsn Comment : Yes the code block at the bottom was me using the same dsn from the top with odbc connect . Comment : ok then did you check if the pdo-odbc driver is installed pdo has its own drivers and doesn t just wrap odbc functions . Comment : It looks like I do . I updated the original question with a screen shot showing the phpinfo s odbc section . Comment : that s odbc itself but not pdo-odbc . they re two completely separate DB interfaces . That s your odbc connect is functioning but has absolutely nothing to do with pdo . .. . Answer : After getting some great help from Marc B in the initial question s comments it turns out the problem was coming from my misunderstanding of enabling odbc on my web server and having the pdo-odbc driver installed . While I did have odbc enabled on the web server I did not have the odbc driver installed for PDO . missing odbc driver http : i.stack.imgur.com D9bC5.png .. . .. . This driver is necessary to be able to access odbc databases via pdo . Per the php.net documentation on installing pdo http : php.net manual en pdo.installation.php for windows the driver was already included in the php build I m using version 5.5 and just needed to be included in the php.ini file . including php pdo.dll http : i.stack.imgur.com dgawL.png .. . .. . After adding the driver and restarting the server I now had the driver loaded : .. . .. . enter image description here http : i.stack.imgur.com EqOqI.png .. . .. . and my test query using PDO on my demo database worked : .. . .. . Dumps out : .. . .. . pdo var-dump http : i.stack.imgur.com AY6Rs.png .. . .. . Thanks for your help Marc B .", "Question : PHP PDO ODBC doesn t seem to be able to store NVARCHAR characters UTF-16 without some manual encoding . This seems like a pretty commun bug all around the internet and no one seems to have a definitive solution . How to reproduce the bug .. . .. . 1 . Try to insert the following japanese characters using PDO : It means hello .. . 2 . The following will be stored in your database : .. . 3 . Then retrieve it via PDO and print it on the screen you will get : .. . .. . It s not so bad but it s not good either . PHP works but when you have other applications that are not in PHP that access that information from your database they will get the wrong string : . Ideally you would want to have everywhere . The symptom .. . .. . It seems that PDO doesn t have any notion of NVARCHAR aka characters that are encoded using 16 bits . In fact everything that you pass to or retrieve from SQL SERVER via PDO will be by chunk of 8 bits . How to prove it Here it is : .. . .. . 1 . You start with your japanese string . You first have to know that PHP consider string as binary and that if it s set like that it will store them in UTF-8 . So if we look at the binary representation of you will get E38193E38293E381ABE381A1E381AF which is also the binary representation that SQL SERVER will give you for . depends on your collation .. . .. . 2 . Next let s put it into UTF-16 because that s the format of NVARCHAR . utf16 string mb convert encoding UTF-16LE .. . .. . The following will-change the binary representation in PHP of to 533093306B3061306F30 which is exactly the binary representation of in SQL SERVER NVARCHAR . 3 . Next try to save it in SQL via PDO and you will get the following : S0 0k0a0o0 .. . .. . The SQL SERVER binary representation of S0 0k0a0o0 in VARCHAR is 533093306B3061306F30 which is also the binary representation of in NVARCHAR . A dirty solution .. . .. . You can use the following to save and retrieve unicode data in SQL SERVER via PDO ODBC but it s ugly.. . .. . .. . 1 . You want to transform the data into exactly the same binary representation that SQL SERVER NVARCHAR will store it .. . .. . mb convert encoding UTF-16LE .. . .. . 2 . You want to receive it as a binary on SQL SERVER side and then transform it to NVARCHAR . @binary VARBINARY 40 SELECT @string CONVERT NVARCHAR 20 @binary .. . .. . 3 . At this point you have in your database . To retrieve it you want to resend it to PHP as a binary .. . .. . 4 . Once you get the binary in PHP PHP will already have transform it into a hex string.. . So you want to convert the hex string into a binary and then change the encoding from utf-16 to utf-8 .. . .. . result mb convert encoding hex2bin string UTF-8 UTF-16LE .. . .. . And you will be back with your when you echo it to your webpage . Basically that s what the SQL driver should be doing for me instead of me doing it manually . Did I forgot to configure something or I have to do it manually .. . Answer : No I don t think you forgot to configure anything . In fact your explanation is the best I ve found so far regarding the long-standing issues between PHP and Microsoft ODBC drivers . Those issues are especially puzzling given that the PDO ODBC page http : php.net manual en ref.pdo-odbc.php says : .. . .. . On Windows PDO ODBC .. . is the recommended driver for connecting to Microsoft SQL Server databases . However on Windows they also offer PDO SQLSRV http : php.net manual en ref.pdo-sqlsrv.php which actually does appear to work correctly . So it seems that PDO ODBC doesn t have any notion of NVARCHAR rather than PDO as a whole . Similar problems arise when trying to use PHP with Microsoft Access ODBC if Unicode characters are involved .. . .. . Conclusion : PHP support for ODBC continues to be a bit of a mess at least where Microsoft databases are concerned .", "Question : null .. . Answer : I m trying to connect to Snowflake via their ODBC driver in PHP CentOS 6 and 7 and utilize PDO for easier access . ODBC driver seems to be installed and working properly as the native ODBC functions in PHP work pretty well : .. . .. . returns .. . .. . and that is exactly what I get when I query the DB directly . But when I want to use PDO the results are getting weird . returns .. . .. . Note : there is not further output after Rows : 3 . So PDOStatement knows the correct number of rows but the content of SHOW TABLES is incomplete and SELECT FROM TEST is somehow missing completely statement- fetch returns false immediately . Any idea if any PDO options would help here I have also noticed that native ODBC functions consume 200MB of memory in this case which seems a lot . Comment : Hi I am facing same issue did you get any solution for this Comment : @DipuR unfortunately we re still using ODBC . Comment : Same thing here . @Ond ejHlav ek any updates on this Did you manage to make it work with PDO Comment : @DuruCanCelasun no I gave up and ended up using ODBC", "Question : we are trying to create a connection with our SQL database trough ODBC in PHP . This is our current script : .. . .. . The driver is working in Qlikview which also connects to this database . The driver is actually being found by PHP but we think it just can t login . PHP is returning the following error : .. . .. . We hope someone can help us out with this problem . Comment : Try this as your connection-string : cnx new PDO odbc : Driver EFR Server localhost Port : 7004 Database EFR LcLfVJFLTKTCEHRO .. . Answer : if you already have the ODBC defined and have a stored password you can simply connect with .. . .. . where DSN NAME is the actual name of your ODBC datasource be it MySQL SQL Server or DB2 . You can test your connection with the following :", "Question : NOTE : I have narrowed this problem down to specifically PDO because I am able to successfully prepare and execute statements using the odbc http : php.net manual en book.uodbc.php functions . Why can t I bind this parameter to the PDO prepared-statement .. . .. . This works : .. . .. . .. . Array col value 0 value .. . .. . .. . Does not work : .. . .. . Web Server is running PHP 5.5.9 on Linux Ubuntu 14.04 with ODBC Driver 13 for SQL Server and connecting to Microsoft SQL Server 2012 on Windows Server 2012 .. . .. . Here s the full error : .. . .. . .. . Fatal error : Uncaught exception PDOException with message SQLSTATE 22001 : .. . String data right truncated : 0 .. . Microsoft ODBC Driver 13 for SQL Server .. . String data right truncation .. . SQLExecute 0 at build buildd php5-5.5.9+dfsg ext pdo-odbc odbc stmt.c : 254 in var www scratch.php : 46 .. . Stack trace : .. . 0 var www scratch.php 46 : PDOStatement- execute Array .. . 1 main thrown in var www scratch.php on line 46 .. . .. . .. . I have also tried setting : .. . .. . And using named parameters : .. . .. . Even with an explicit colon : .. . .. . I also tried just using bindParam http : php.net manual en pdostatement.bindparam.php as demonstrated in this answer http : stackoverflow.com a 31930277 4233593 : .. . .. . As well as with named parameters : .. . .. . If I try to explicitly set the length : .. . .. . I get a bonus error : .. . .. . .. . Fatal error : Uncaught exception PDOException with message .. . SQLSTATE 42000 : Syntax error or access violation : 102 .. . Microsoft ODBC Driver 13 for SQL Server SQL Server .. . Incorrect syntax near OUTPUT . .. . .. . And yes all this is a trivialized example without tables so that you can easily reproduce it but just to be sure I have actually tried this with a real table . Works : .. . .. . .. . Array id 1 0 1 val hello world 1 hello world .. . .. . .. . Does not work : .. . .. . All paths lead to the same error : .. . .. . String data right truncated Comment : Do you have ATTR EMULATE PREPARES enabled or not Does it make a difference if you change it Does it make a difference if you use a named parameter like SELECT : param as col and bind : param test I would not expect a change.. . Comment : @MichaelBerkowski I just tried both of those to no avail - same error . Comment : What type is a this filed Comment : @zajonc it s a string literal so others can easily reproduce without need for a dataset . My actual use-case involves an NVARCHAR 255 but I can t get it to work for any datatype . Comment : I suppose it s entirely DBMS issue with little relation to PDO . Out of curiosity can you reproduce with all-static query as well I mean this this .. . Answer : This is probably not what you want to hear but this has all the hallmarks of a bug in PHP s ODBC driver for PDO which is not heavily used as PHP programmers tend to favour open-source databases like MySQL SQLite Postgres over commercial offerings or in the underlying SQL server driver which is poorly supported in Linux for similar reasons though if odbc works then it s probably not the underlying driver . If you try to do the exact same tasks except using sqlite : : memory : as the DSN all your examples work . This makes it highly unlikely that you re doing anything wrong unless MS Server has some really weird non-conforming SQL syntax of which I m not aware . Your examples work fine for me with SQLite when ATTR EMULATE PREPARES is both enabled and disabled . All I think you can realistically do is file a bug report https : bugs.php.net report.php and hope somebody picks it up . You may be in for a long wait though . As for practical solutions to your problem your options are either a switch to a DBMS that PHP supports or b resort to SQL string construction instead of prepared statements and be ready to accept the burden of avoiding SQL injection attacks https : xkcd.com 327 yourself . This should be considered a last resort though Using PDO : : quote http : php.net manual en pdo.quote.php may help but I d also make sure your data is very thoroughly validated as well . I know it s not an ideal solution but if you must use MS SQL and can t wait for the PHP team to bugfix it then I don t really see that you have much of a choice . Or there s option c which is use odbc functions instead if they work . Of course if you want to use OOP style then you ll have to implement your own class that wraps the procedural odbc functions in OO methods so that could potentially be a lot of work . EDIT : I found another question on Stack Overflow http : stackoverflow.com questions 14628409 im-getting-string-data-right-truncation-errors-from-php-using-odbc-and-conne where the asker seems to have a similar problem . His solution was to ditch the official MS driver in favour of FreeTDS . This might be something of a shot in the dark but it could be worth a try .", "Question : null .. . Answer : I am attempting to issue an SQL query that includes a parameterized value for a LIKE clause . Using PDO ODBC the query returns success and an empty result set . Using the odbc functions I get the expected result set . Queries without parameters work as expected . This is going through unixODBC on an Ubuntu system .. . .. . I would really rather use the PDO functions and take advantage of the OOP implementation more modern fetch options etc . Environment : .. . .. . Ubuntu 14.04 .. . PHP 5.5.9 .. . unixODBC 2.2.14 .. . Connx 12 .. . .. . I have managed to create a very simple example that shows PDO ODBC apparently not using the parameters . I have replaced my original example with this much shorter example . .. . .. . Results : .. . .. . If you try this with PDO MySQL you ll get a fatal-error about an incorrect parameter count to native function LENGTH . Is it possible this is a bug in PDO Suggestions Thanks . Comment : I d compare line by line the unixODBC traces obtained running the very same query with PDO option 1 and odic option 2 . They cannot be the same.. . Comment : I believe that this is a bug in PHP PDO 5.5.9 under Ubuntu 14.04 . I ve upgraded to PHP 7 planned to do that anyway and this issue went away .", "Question : NOTE : I have narrowed this problem down to specifically PDO because I am able to successfully prepare and execute statements using the odbc http : php.net manual en book.uodbc.php functions . Why can t I bind this parameter to the PDO prepared-statement .. . .. . This works : .. . .. . .. . Array col value 0 value .. . .. . .. . Does not work : .. . .. . Web Server is running PHP 5.5.9 on Linux Ubuntu 14.04 with ODBC Driver 13 for SQL Server and connecting to Microsoft SQL Server 2012 on Windows Server 2012 .. . .. . Here s the full error : .. . .. . .. . Fatal error : Uncaught exception PDOException with message SQLSTATE 22001 : .. . String data right truncated : 0 .. . Microsoft ODBC Driver 13 for SQL Server .. . String data right truncation .. . SQLExecute 0 at build buildd php5-5.5.9+dfsg ext pdo-odbc odbc stmt.c : 254 in var www scratch.php : 46 .. . Stack trace : .. . 0 var www scratch.php 46 : PDOStatement- execute Array .. . 1 main thrown in var www scratch.php on line 46 .. . .. . .. . I have also tried setting : .. . .. . And using named parameters : .. . .. . Even with an explicit colon : .. . .. . I also tried just using bindParam http : php.net manual en pdostatement.bindparam.php as demonstrated in this answer http : stackoverflow.com a 31930277 4233593 : .. . .. . As well as with named parameters : .. . .. . If I try to explicitly set the length : .. . .. . I get a bonus error : .. . .. . .. . Fatal error : Uncaught exception PDOException with message .. . SQLSTATE 42000 : Syntax error or access violation : 102 .. . Microsoft ODBC Driver 13 for SQL Server SQL Server .. . Incorrect syntax near OUTPUT . .. . .. . And yes all this is a trivialized example without tables so that you can easily reproduce it but just to be sure I have actually tried this with a real table . Works : .. . .. . .. . Array id 1 0 1 val hello world 1 hello world .. . .. . .. . Does not work : .. . .. . All paths lead to the same error : .. . .. . String data right truncated Comment : Do you have ATTR EMULATE PREPARES enabled or not Does it make a difference if you change it Does it make a difference if you use a named parameter like SELECT : param as col and bind : param test I would not expect a change.. . Comment : @MichaelBerkowski I just tried both of those to no avail - same error . Comment : What type is a this filed Comment : @zajonc it s a string literal so others can easily reproduce without need for a dataset . My actual use-case involves an NVARCHAR 255 but I can t get it to work for any datatype . Comment : I suppose it s entirely DBMS issue with little relation to PDO . Out of curiosity can you reproduce with all-static query as well I mean this this .. . Answer : Unfortunately .. . .. . It s a PDO ODBC 64-bit incompatibility problem 61777 https : bugs.php.net bug.php id 61777 64824 https : bugs.php.net bug.php id 64828 and without any doubts you are on a 64-bit build which doesn t allow you to bind parameters . Fortunately .. . .. . It has a patch http : git.php.net p php-src.git a commit h 186ffcb72c982b0235761bdd6388ff1c36d79568 that was first included in the 5.6 release : .. . .. . This bug is also referenced in 61777 https : bugs.php.net bug.php id 61777 and is still present in the latest stable release of the 5.5 branch . I see two tickets exist for this problem already and I m just submitting these changes via github as a reminder that this is a serious problem for anyone using PDO ODBC on the x64 builds . What is wrong with your PHP s shipped PDO ODBC By looking at one of those recommended patches : .. . .. . We see the only thing that s changed is SDWORD 16-bit signed integer which is substituted with new ODBC type SQLULEN that is 64 bits in a 64-bit ODBC application and 32 bits in a 32-bit ODBC application http : www.unixodbc.org doc ODBC64.html . I believe committer wasn t aware of colsize data type only since in the very next line SQLLEN is defined properly . What should I do now 1 . Upgrade to PHP version 5.6 .. . 2 . Stick with odbc functions as a working solution . 3 . Compile a PHP v5.5.9 with provided patches . 4 . Build your own PDO wrapper as recommended by @GordonM Comment : Wow 64824 is spot on the bug I ve got too . I covet thy Google-Fu because I never came close to finding that . I m afraid that the patch was built for a slightly different bug referenced in 61777 but I m still eager to try . It might take me a couple days to get the time to spin up a test vm to build custom PDO with that patch but I m excited thanks Comment : I compared that patch to PHP 7.0 related source files and can say you are going to do it right . @JeffPuckettII Comment : Today I installed a fresh ubuntu-16.04 on a vm with php7 and confirmed that this issue doesn t exist . I edited your answer to include this option . Tomorrow I will spin up another vm with php5 and compile with the patch to fully confirm your answer and if it s successful then I will happily accept your answer . Comment : I did not add Upgrade your PHP to the list since I guessed you are not thinking about this option . So if you are able to do it you are totally fine . A PHP version 5.5.x does not come with this issue . @JeffPuckettII Comment : CONFIRMED . I cloned the php source checked out release 5.5.9 compiled and installed to verify the bug . Then I cherry-picked that commit recompiled and installed and totally verified that fixed this bug .", "Question : There is a column url nvarchar 200 not null .. . .. . Returning error : .. . .. . Is this a bug Using : php 5.4.15 unixodbc 2.2.14 freetds 0.91 sql-server-2012 centos-x64 6.4 .. . .. . Update : .. . .. . Seems to be a bug https : bugs.php.net bug.php id 61777 . I found this patch https : bugs.php.net bug.php id 61777 but works only with ODBC Driver 11 for SQL Server http : www.microsoft.com en-us download details.aspx id 36437 I tried with FreeTDS no luck . I managed to install PHP from source with this patch applied and changed from FreeTDS to ODBC Driver 11 for SQL Server now is working . php 5.4.15 .. . unixODBC 2.3.0 .. . ODBC Driver 11 for SQL Server .. . sql-server-2012 .. . centos-x64 6.4 Comment : Well seems to be a bug . Now I m trying to compile PHP with a patch I found . .. . Answer : Having done a fair bit of research into this it seems pdo-odbc is buggy on 64-bit architectures : it s built with 32-bit SQLLEN and SQLULEN sizes . Microsoft s driver used to be built this way which is probably why PHP followed suit . MS have since started to follow the ODBC spec properly but apparently PHP hasn t . The patch referenced in the question fixes one such problem in the PHP source but seemingly not all such problems . Using the MS driver and a patched PHP I was still unable to run prepared statements . I actually found the same problem when using Easysoft s driver and talking through the issues with them discovered that pdo-odbc is the culprit . They were able to provide me with a 64-bit driver built using 32-bit sizes and that works fine . Until 64-bit PHP is patched to use 64-bit SQLLEN and SQLULEN sizes it looks like the best Free solution is to use 32-bit PHP and ODBC drivers . Comment : For reference : Still an issue with Ubuntu 14.04 php 5.5.9 . I am getting Invalid character value for cast specification . Discussed in connect.microsoft.com SQLServer feedback details 737751 http : connect.microsoft.com SQLServer feedback details 737751 cannot-bind-parameters-with-php-pdo-odbc-and-sql-native-client-11-0 Comment : Just found using odbc connect odbc prepare works with queries and stored-procedures uning MSSQL Driver 11", "Question : null .. . Answer : I m trying to do a query to retrieve all users using eloquent ORM laravel5 PDO ODBC connection and when tray to do this .. . .. . I get this error .. . .. . as you see I m using FreeTDS to connect with SQL Server I don t know if this driver needs an aditional configuration or I have to modify laravel core . In this error the main problem is Users and email backslash and quotation marks around Users and email . How can I remove this quotation marks and why laravel is doing this . however if I try this .. . .. . it works perfectly but I think this isn t the better way to build queries in laravel . User model screenshot User model screenshot http : i.stack.imgur.com QGPZ5.png .. . .. . .. . .. . FYI .. . .. . I m using laravel-5 on Mac OS X EL Capitan MAMP Server php 5.6.10 pdo-odbc Comment : Are you printing the data itself I mean you re not returning a view with that data Comment : I m returning json data but I need run the query first Comment : Have you seen the SQL generated by Eloquent when working with the Users model Comment : Yes it s in the second block of code . SQL : select from Users where email myemail@domain.com Comment : Can you include a screenshot of your User model definition Just to make sure it s okay", "Question : When I execute this code : .. . .. . It says I have the odbc driver available . However when I try to use it like so : .. . .. . It doesn t do anything - no errors and it doesn t work at all . It won t even execute past that line How can I connect PHP to this MSSQL database via PDO and ODBC Comment : What operating-system and version are you using Comment : My PHP is on CentOS linux mediatemple but the MSSQL database is from Microsoft Dynamics Great Plains . I don t know what version it is . Do I need to find out My database user only has read-access they told me . .. . Answer : The accepted answer is correct up to the actual PHP call . As someone has right commented it should be calling the odbc driver . Secondly it isn t using the Data Source Name DSN that has been configured in odbc.ini but is in fact creating an ad-hoc DSN . Instead .. . .. . where mssql refers to the DSN object in odbc.ini .. . .. . You can create an ad-hoc DSN as follows : .. . .. . where mssql now refers to the server object in freetds.conf and FreeTDS the driver object in odbcinst.ini .. . .. . this should really be a comment but I don t have the rep points . Comment : This is a great answer After reading around your answer makes perfect . stackoverflow.com questions 13066716 http : stackoverflow.com questions 13066716 freetds-not-using-its-config", "Question : when i select data from ODBC with PDO in PHP some columns are fetched as NULL but in database data exists . Where i execute same query with odbc functions it works fine . Here is code i using .. . .. . With this all columns are fetched correctly : .. . .. . with this code last 9 columns are fetched as NULL . There is nothing special with this columns . It contains text or numbers . Any help would be appreciated . Thanks in advance . .. . Answer : I actually had the exact same issue with a different type of database where the id field worked but the others returned null via pdo-odbc and worked 100 with odbc . After a lot of research I came across a PHP Bug report with similar issue Bug 61573 but paved the way to for me to figure out a fix . .. . .. . Try type casting the fields to VARCHAR . This worked for me . The issue is that pdo-odbc does not work with several types that odbc can . .. . .. . For reference or if still needed please include the PHP version and table schema as these are important to figure out fixes . :", "Question : When I execute this code : .. . .. . It says I have the odbc driver available . However when I try to use it like so : .. . .. . It doesn t do anything - no errors and it doesn t work at all . It won t even execute past that line How can I connect PHP to this MSSQL database via PDO and ODBC Comment : What operating-system and version are you using Comment : My PHP is on CentOS linux mediatemple but the MSSQL database is from Microsoft Dynamics Great Plains . I don t know what version it is . Do I need to find out My database user only has read-access they told me . .. . Answer : There are several configuration-files you need to have set up . etc odbc.ini etc odbcinst.ini and etc freetds freetds.conf these locations are valid for Ubuntu 12.04 and probably correct for most nixes . You ll need to install unixodbc and freetds not sure what the package names are on CentOS . In Ubuntu this would be apt-get install unixodbc tdsodbc . For help installing these look at this question Can t Install FreeTDS via Yum Package Manager http : stackoverflow.com questions 20179649 cant-install-freetds-via-yum-package-manager .. . .. . etc odbc.ini this file may be empty .. . .. . etc odbcinst.ini .. . .. . etc freetds freetds.conf or you may find it at etc freetds.conf .. . .. . You may have to change the tds version 8.0 line above depending on your version of MSSQL . You will have to restart apache after you ve made these changes . .. . .. . In your PHP code you ll create your PDO object like this : .. . .. . Note that your username may need to be in the format : domain username . Also you will know that it worked if you execute phpinfo in your page and search for freetds which will show an mssql section with freetds listed as the Library Version . Comment : Thanks but I am not sure how to install it . I have pulled up documents like hosting.com support linux installing-freetds-for-linux http : www.hosting.com support linux installing-freetds-for-linux but I am an IIS guy I am not very comfortable with this.. . Is there a more full-proof way I am on Plesk which I believe is CentOS from mediatemple . Comment : Well just like your link says you need to install the necessary driver . SSH into your server you can use PuTTY http : www.chiark.greenend.org.uk sgtatham putty download.html and as root type yum install freetds to install FreeTDS . If you re uncomfortable doing this find someone you know who is familiar with Linux to help you . Comment : I wish I knew someone who works with Linux I know all only Microsoft people.. . I ll give it a shot and see what happens . Thanks . Comment : @user1477388 - whoo-hoo Glad you got it working : - Comment : Hi I couldn t get it to work with the dblib : .. . DSN string but I was able to do it with an odbc one : odbc : mssql skipping entirely the freetds.conf server definition . Anyone know what difference will it make doing it this way I was able to query succesfully I tried only SELECT statements as it was my goal .", "Question : There is a column url nvarchar 200 not null .. . .. . Returning error : .. . .. . Is this a bug Using : php 5.4.15 unixodbc 2.2.14 freetds 0.91 sql-server-2012 centos-x64 6.4 .. . .. . Update : .. . .. . Seems to be a bug https : bugs.php.net bug.php id 61777 . I found this patch https : bugs.php.net bug.php id 61777 but works only with ODBC Driver 11 for SQL Server http : www.microsoft.com en-us download details.aspx id 36437 I tried with FreeTDS no luck . I managed to install PHP from source with this patch applied and changed from FreeTDS to ODBC Driver 11 for SQL Server now is working . php 5.4.15 .. . unixODBC 2.3.0 .. . ODBC Driver 11 for SQL Server .. . sql-server-2012 .. . centos-x64 6.4 Comment : Well seems to be a bug . Now I m trying to compile PHP with a patch I found . .. . Answer : same error here : .. . .. . Win7 64bit PHP 5.4.12 SQL Server Express 2012 ODBC 11 for SQL Server", "Question : This question already has an answer here : .. . .. . How to use SQL Server connection in Laravel questions 18213907 how-to-use-sql-server-connection-in-laravel 2 answers .. . .. . I m working on a Laravel 5.1 project that has to connect to an existing MS SQL Server database . My project is currently on a Ubuntu 16.04 LTS server using Apache 2.4.18 . I ve installed the Microsoft ODBC Linux driver for SQL Server version 13.0.0.0 on the machine and tested it manually with the sqlcmd command : .. . .. . It all worked fine . I can log on to the database no problem . When I go to migrate my database with php artisan however it doesn t work . I get the error : .. . .. . I ve got this as the setup in database.php : .. . .. . The database login information is saved in the .env file and SQL Server is set as the default : .. . .. . Any help as to what could be going on I ve read a bunch of posts on the internet here http : stackoverflow.com questions 22463614 php-artisan-migrate-throwing-pdo-exception-could-not-find-driver-using-larav and here http : stackoverflow.com questions 25329302 laravel-error-pdoexception-could-not-find-driver-in-postgresql . People have had similar issues with different types of databases . They had to change the configuration of their php.ini file adding some lines about extensions . Maybe something along those lines I ve tried some various things in the php.ini file that I thought might work such as : .. . .. . rebooted tested but to no avail . I ve been bashing my head against the wall for a while on this one . Any help would be greatly appreciated . Thanks . Comment : stackoverflow.com questions 18213907 http : stackoverflow.com questions 18213907 how-to-use-sql-server-connection-in-laravel Comment : Awesome thank you That did it with the slight modification of using php7.0-sybase . Thanks so much Sorry I missed that post in my research . .. . Answer : Follow these steps .. . sudo apt-get install php5-mssql .. . Update etc freetds freetds.conf .. . .. . .. . Add this line to php.ini .. . .. . Reference : Laracast discussion https : laracasts.com discuss channels general-discussion sqlsrv-driver-on-linux replies 14216", "Question : null .. . Answer : I m trying to upgrade from PHP v5.4 to php v7.0 where I ran into this issue of being unable to run the inner nested query . I m was using pdo sqlsrv for my SQL server but since the PDO drivers for it aren t yet available for PHP v7.0 I switched to pdo-odbc . Is being able to run nested queries specific to sqlsrv I ve added some test code to make my situation clear . DBTEST class for the PDO instance : .. . .. . Nested Queries : Comment : The only thing nested are the loops . The queries are entirely separate . Comment : Nested for lack of a better word . What I mean is that every result from parent query will be used as a parameter in the second query .", "Question : I m getting this error when I try to start PHP via command-line : .. . .. . Here are the PHP packages I have installed : .. . .. . I have extension pdo odbc.so and extension oci8.so as the only extensions defined in my etc php.ini file . There are also a lot of .ini files in the etc php.d directory that loads most of the other extensions . The following .so files are in the usr lib64 php modules directory : .. . .. . The output of when I run phpinfo can be found here http : pastebin.com h3qKxrmT . Contents of pdo odbc.ini at etc php.d : .. . .. . Output of readelf -Ws pdo odbc.so : .. . Answer : What solved my issue was removing the line extension pdo odbc.so from etc php.ini . The pdo odbc.so extension gets imported in the etc php.d pdo odbc.ini file which also had extension pdo odbc.so in it . Explanation http : forums.phpfreaks.com topic 285467-pdo-parse-params-error-in-pdo-odbcso-whenever-php-starts-in-fedora-20 entry1465881 Comment : Not in my case I ve to add etc php.d pdo odbc.ini myself instead of put it in etc php.ini", "Question : I have to connect two MSSQL servers on php linux environment . So I decide to use unixODBC and PDO ODBC . mssql on server1 : 10.10.10.5 : 1433 .. . .. . mssql on server2 : 10.10.10.8 : 14233 non-default port-number .. . .. . I think there is a port problem of PDO ODBC or unixODBC . I tried some code below . This code works fine . connected successfully . This code didn t work . connect failed . Strangely This code also works fine with wrong value . : .. . .. . I concluded that someone ignore port setting on dsn of PDO . I also tried to other setting using etc odbc.ini .. . .. . And this code didn t make connection . Error message : .. . .. . AND this code works fine . And this code didn t make connection . The ports is all opened . tcpdump show the connection use always use ms-sql-s 1433 . sqlcmd is works fine . I wonder what I m missing . Or is there the other way to connect with mssql CentOS 6.6 .. . PHP 5.5.19 .. . sqlncli-11.0.1790.0 .. . .. . - .. . Answer : The driver doesn t support a Port keyword . Per the documentation http : msdn.microsoft.com library hh568455 you need to append the port after the server name in the DSN : .. . .. . The documentation also lists the keywords that are supported . Comment : Works fine Thank you for your reference . Actually I tried that setting but error occured because the connection was unstable .", "Question : I m getting this error when I try to start PHP via command-line : .. . .. . Here are the PHP packages I have installed : .. . .. . I have extension pdo odbc.so and extension oci8.so as the only extensions defined in my etc php.ini file . There are also a lot of .ini files in the etc php.d directory that loads most of the other extensions . The following .so files are in the usr lib64 php modules directory : .. . .. . The output of when I run phpinfo can be found here http : pastebin.com h3qKxrmT . Contents of pdo odbc.ini at etc php.d : .. . .. . Output of readelf -Ws pdo odbc.so : .. . Answer : From http : jira.cubrid.org browse APIS-545 . It it for a different driver but it s the same error so it might be the same solution .. . .. . from your php.ini I see you have a pdo odbc.ini : .. . .. . if you copy that pdo odbc.ini file to your specific php version conf files could be something like etc php5 conf.d it might rule out the problem . From this : undefined symbol : pdo parse params in Unknown on line 0 I get the impression it does not properly load a script not showing a name or even a valid line number Comment : Could you elaborate on what specific php version conf files are and where I d find them Comment : Would it help if I posted the strace output when I run php That might tell you where it s not finding the file script you re referring to . Comment : hmmm I would like to see the content of pdo odbc.so and the current pdo odbc.ini located at etc php.d pdo odbc.ini . running ee pdo odbc.so will likely open it in a readable format . Somewhere there should be a call to pdo odbc.ini . that call might be to a bad path Comment : sorry ee is for other environment reading on fedora you have to use emacs pdo odbc.ini . oh.. . but in fact it might not be installed I though it came by default with fedora installs but I can t verify that . don t bother just the .ini file would do . Comment : ok . looking into it .", "Question : We re running a completely nonchalant query and are getting the following error : .. . .. . From PHP we re using the pdo-odbc library to connect via FreeTDS to SQLServer 2008 Comment : Where is your code Comment : Sorry @Raptor I submitted the question without my answer as I d intended . I d say that the code is relatively irrelevant in this given situation . .. . Answer : It transpires that it was the preceding query that was causing problems . We were using : .. . .. . to get out a single row but not doing anything with it after then . This was leaving a cursor open which was then throwing the error then next time any query was executed . For us closing the cursor before the next query was the way forward . It s also worth noting that using fetchAll in the preceding query is also a fix as this does not leave a cursor open .", "Question : Im hashing my users password into a SQL Server 2008 R2 . The registration goes fine . The hashed password is saved correctly through this code : .. . .. . When i want to do the login script i do the following : .. . .. . This always returns false because for some reason the users info is arriving with problem in the email and the hashed password . If i do var-dump from the users info that i get with the first query i get this : .. . .. . For some reason the hashed and the email fields are arriving with problems . Thank you in advanced for you help . .. . Answer : Ok so my problem was that in SQl Server i said that those fields were MAX varchar . I leave it in varchar 100 and everything returned correctly ." ] }
[ "yes-answer-long", "yes-answer-short" ]
db2
UNK_RELATION
gocql@cassandra@55
gocql -- gocql is the golang driver for connecting to @placeholder .
{ "confidence": [ 60.791404724121094, 49.2053108215332, 46.504905700683594, 44.9688606262207, 43.0997314453125, 42.2432861328125, 41.23099899291992, 41.23099899291992, 41.23099899291992, 41.23099899291992, 41.23099899291992, 39.253807067871094, 39.253807067871094, 36.52823257446289, 36.19612121582031, 36.19612121582031, 36.19612121582031, 34.515323638916016, 34.515323638916016, 33.47054672241211, 33.11466979980469, 33.11466979980469, 30.88147735595703, 30.389095306396484, 29.663333892822266, 29.663333892822266, 28.05826187133789, 26.937759399414062, 26.937759399414062, 24.397628784179688, 20.157499313354492, 19.2559757232666, 18.041627883911133, 16.933629989624023, 16.933629989624023, 16.933629989624023, 16.933629989624023, 16.933629989624023, 16.933629989624023, 16.530399322509766, 14.13998794555664, 14.13998794555664, 14.13998794555664, 14.13998794555664, 14.13998794555664, 14.13998794555664, 14.13998794555664, 14.13998794555664, 14.13998794555664, 14.13998794555664, 14.13998794555664, 14.13998794555664, 14.13998794555664, 14.13998794555664, 14.13998794555664, 14.13998794555664, 14.13998794555664, 14.13998794555664, 14.13998794555664, 14.13998794555664, 14.13998794555664, 14.13998794555664, 14.13998794555664, 14.13998794555664, 14.13998794555664, 14.13998794555664, 14.13998794555664, 14.13998794555664, 14.13998794555664, 14.13998794555664, 14.13998794555664, 14.13998794555664, 14.13998794555664, 14.13998794555664, 14.13998794555664, 14.13998794555664, 14.13998794555664, 14.13998794555664, 14.13998794555664, 14.13998794555664, 14.13998794555664, 14.13998794555664, 14.13998794555664, 12.271254539489746, 12.271254539489746, 12.271254539489746, 12.271254539489746, 12.271254539489746, 12.271254539489746, 12.271254539489746, 12.271254539489746, 12.271254539489746, 12.271254539489746, 12.271254539489746, 12.271254539489746, 12.271254539489746, 12.271254539489746, 12.271254539489746, 12.271254539489746 ], "content": [ "Could that come from gocql https : github.com gocql gocql driver", "I ve been reading http : godoc.org github.com gocql gocql Yet I don t understand how to do INSERT -- IF NOT EXIST with gocql .", "I don t understand what column mismatching are the author is talking about http : godoc.org github.com gocql gocql Query.MapScanCAS .. . 4 .", "How to actually do INSERT IF NOT EXIST in gocql", "But when I try to install gocql I am getting error .", "I d look into seeing if there is a way to reprepare statements in gocql .", "Are there any good page that explains gocql beside its godoc page", "Note I am using the go language gocql client .", "Note : Just if it is of any use I am using gocql .", "Yea so I think the gocql lib needs an update in order to support this .", "Um well no : I don t think gocql can do anything about this .", "I m trying to query a test keyspace like : .. . .. . But I get an error like : .. . .. . Does that mean it s trying to point to the method in the gocql gocql folder but can t find it or is the syntax wrong to import stuff or", "The closest thing I could find that would help you out is Iter.NumRows https : godoc.org github.com gocql gocql Iter .. . .. . If they paginate rows that won t give you what you re looking for .", "I suppose this could be a big difference between gocql and the other drivers in that in the other drivers you explicitly use a prepared-statement object where-in gocql it gets handled for you automatically in the library .", "Do I have to wait for an update to gocql that fixes this or what should I do", "You have to put the ProtoVersion 4 up by the first gocql stuff like : .. . .. . Hope that helps someone else :", "I just want to return the number of events that take place on Tuesday and I want to do this using gocql .", "I get this error trying to compile : .. . .. . I added the line .. . .. . After reading about it here https : github.com gocql gocql issues 538 but I m too new to understand if that s my issue or I did something wrong elsewhere .", "I can t figure out how - I was trying to mimic https : github.com gocql gocql blob master marshal test.go L935 but I m getting errors where I can t set the fields in the struct cannot refer to unexported field or method proto", "It looks like gocql has a feature called Automatic query preparation which may be treating your request as a prepared-statement .", "I think your problem is that you are declaring a gocql var as a string here : .. . .. . You should just remove this and it should resolve that particular issue .", "In addition your import statement : .. . .. . Shouldn t include an underscore since you are explicitly using gocql and not just importing for its side effects .", "I am using the gocql library which is documented here : https : godoc.org github.com relops cqlc cqlc Fetchable and am trying to write an API call in golang that will ask for all of the elements in my database that fulfill a particular field and return the total number of elements returned .", "If there isn t a way to do this would be good to open up an issue against gocql as you can reprepare statements again in other drivers .", "The column mismatching is something to do with gocql not being able to control the order the columns come back in and so struct unmarshalling not working properly so MapScanCAS returns the data in a map instead .", "If you were to interface directly with Cassandra using cqlsh you could do the following : .. . .. . I ve tried to do this using gocql several times but I always get an error .", "Don t do a sudo go get as the environment variable used for sudo root wouldn t be the same as the current user : .. . .. . or you would need to do a sudo -E bash -c go get github.com gocql gocql http : stackoverflow.com a 8633575 6309 but I suspect you don t need root here .. . .. . See sudo caveat https : help.ubuntu.com community EnvironmentVariables sudo caveat : .. . .. . Any variables added to these locations will not be reflected when invoking them with a sudo command as sudo has a default policy of resetting the Environment and setting a secure path this behavior is defined in etc sudoers", "I m not familiar with the gocql library but it sounds like you may be running into a combination of not repreparing your statements and CASSANDRA-7910 https : issues.apache.org jira browse CASSANDRA-7910 .", "When you alter a table the prepared-statement does not get updated on your client-side so really the only way to fix this is to reprepare your statement not sure if you have that level of control from gocql .", "But if I do the exact same request using gocql a Go driver for cassandra I do not receive the Limit column but I receive the others here is the request made : .. . .. . I have no idea of what s going on I tried copying the data to a csv file then truncating the table and then reimporting the data still get the same result.. . .. . .. . Could it be a caching problem", "I m using the Java driver and it works with protocol v4", "this is probably a bug in the go driver : i would recommend reporting it", "If you re having issue with the go driver using protocol v4 raise an issue at their github .", "I am trying to implement paging but when I use SliceMap with PageSize I get all the rows - do you know why and what to do", "Note : I need the row maps keyed by CQL column mames .", "Using UDT : .. . .. . Note : cqlsh : show version .. . .. . .. . Tables .. . .. . Code : .. . .. . I get : .. . .. . .. . .. . .. . .. . Update config", "I updated Cassandra to 3.3 and it worked .", "The error message tricked me into thinking that having Native protocol v4 was ok running on Cassandra 2.2 .", "Upgrading to 3.3 I also had to add the following just after defining keyspace when creating a session : .. . ClusterName.ProtoVersion 4", "I know that the java driver allows you to do this but gives you a warning .", "I am outputting a dropdown list using a html template as follows : .. . .. . I want to indicate that one of the items should be selected by doing an eq comparator .", "The only potential complication I am aware of is that the .Uuid is a gocql.UUID I am trying to do this : .. . .. . But it results in the following error message : .. . .. . page : 32 : 36 : executing submit scholarship at : error calling eq : invalid type for comparison .. . .. . Any pointers in the right direction would be much appreciated .", "Two suggestions .", "Firstly I assume .Contact.Organisation is a struct which you are comparing with whatever Uuid is . .", "I assume thats a string .", "Also you may consider moving the logic here into a property of the template model itself .", "Then you can render selected selected only for the actual selected item . . but selected for the rest .", "Thanks including a Select function on the struct is how I normally do it .", "However I really want to avoid having view logic in my data model code .", "eq only works on basic types .", "You can add a custom function to do this .", "http : play.golang.org p rkYnlqmeLA", "I installed Go 1.4 in Mac OS X .", "Previously I had Go 1.0 .", "I set the GOROOT and PATH as follows .. . .. . Go is installed in usr local go bin go .", "And I set the GOPATH as my project src directory .", "I am able to run go code inside my directory .", "Could anyone help me on this", "Thank you .. . .. . EDIT 1 : @VonC I tried the other option as well .", "I changed the GOROOT to the directory where go is installed .", "But it didn t help .", "And I changed the GOPATH .", "Notes : .. . .. . GOROOT should reference a folder where go is installed not the go executable itself .. . .. . As Dave http : stackoverflow.com users 55504 dave-c mentions in the comments you should not have to set GOROOT at all in your case .", "See the article You don t need to set GOROOT really http : dave.cheney.net 2013 06 14 you-dont-need-to-set-goroot-really .", "GOPATH should reference a folder under which you will find src pkg and bin .", "it should not reference directly the src folder : .. . See How to Write Go Code - Workspace https : golang.org doc code.html Workspaces .. . .. . Regarding the GOPATH : .. . .. . try and set it in your .bashrc using export .", "check that your current shell is a bash and not another one like fish .. . check the output of go env .", "I tried .", "But still facing the same issue .", "I edited the question with the current GOPATH and GOROOT", "@DineshAppavoo I have edited the answer .", "Thank you .", "It worked without sudo .", "Could you explain me how it works .", "I am new to mac .", "You don t need to set GOROOT http : dave.cheney.net 2013 06 14 you-dont-need-to-set-goroot-really and you normally don t want to .", "@DaveC got it .", "And I edited the answer accordingly .", "How can you make sure that one user insert is not influenced by another user", "Like transactions.. . .. . .. . Do you use a batch job in combination with IF NOT EXISTS", "Cassandra introduced light weight transaction http : www.datastax.com dev blog lightweight-transactions-in-cassandra-2-0 in 2.0 but it is not fully respect to ACID properties .", "It uses Paxos to guarantee atomicity for such kind of light weight transactions but it lacks the isolations solutions for handling concurrent transactions .", "A solution could be implement two phase locking or some kind of optimistic-concurrency control on top of Cassandra by yourself .", "It stated that .. . .. . .. . func Query ScanCAS .. . .. . func q Query ScanCAS dest ...interface applied bool err error .. . .. . ScanCAS executes a lightweight transaction i.e .", "an UPDATE or INSERT statement containing an IF clause .", "If the transaction fails because the existing values did not match the previous values will be stored in dest .", "When I run .. . .. . I get : .. . Failed parsing statement : INSERT INTO tweet timeline id text VALUES", "IF NOT EXIST reason : ArrayIndexOutOfBoundsException -1 .. . .. . So my question is : .. . 1 .", "Can you guys give me any example", "2 .", "How to do proper ScanCAS", "3 .", "What makes MapScanCAS and ScanCAS different", "The correct syntax is INSERT IF NOT EXISTS S at the end", "Well that is embarassing .", "Thank you for the correction .", "It doesn t have any error now .", "But do you happen to know how can this works when ScanCAS doesn t have any argument", "I still can t understand the correct way of using ScanCAS because I thought I would be more like Scan" ] }
{ "confidence": [ 60.69286346435547, 58.67688751220703, 57.31468200683594, 57.05909729003906, 56.609352111816406, 50.75945281982422, 48.62519836425781, 46.623268127441406, 45.40943145751953, 43.535987854003906, 41.03131866455078, 38.823326110839844, 17.110557556152344, 17.110557556152344, 14.227483749389648, 14.227483749389648, 12.312459945678711, 12.312459945678711, 12.312459945678711, 12.312459945678711 ], "content": [ "Question : I get this error trying to compile : .. . .. . I added the line .. . .. . After reading about it here https : github.com gocql gocql issues 538 but I m too new to understand if that s my issue or I did something wrong elsewhere . Do I have to wait for an update to gocql that fixes this or what should I do Comment : Just a wild guess look likes protocol version mismatch what is your Cassandra version Comment : 3.1.1 . I just switched this line cluster.ProtoVersion 3 as a test to reflect 3.x but now it says no response received from cassandra within timeout period Comment : Starting from Cassandra 3.x.x the protocol version should be 4 normally . If you re having issue with the go driver using protocol v4 raise an issue at their github . I m using the Java driver and it works with protocol v4 .. . Answer : Okay I sorted out with @Zariel on the github issue 538 thread . You have to put the ProtoVersion 4 up by the first gocql stuff like : .. . .. . Hope that helps someone else :", "Question : I m trying to query a test keyspace like : .. . .. . But I get an error like : .. . .. . Does that mean it s trying to point to the method in the gocql gocql folder but can t find it or is the syntax wrong to import stuff or .. . Answer : I think your problem is that you are declaring a gocql var as a string here : .. . .. . You should just remove this and it should resolve that particular issue . In addition your import statement : .. . .. . Shouldn t include an underscore since you are explicitly using gocql and not just importing for its side effects .", "Question : I am using the gocql library which is documented here : https : godoc.org github.com relops cqlc cqlc Fetchable and am trying to write an API call in golang that will ask for all of the elements in my database that fulfill a particular field and return the total number of elements returned . I know when I am in the Cassandra interface I can use the call SELECT COUNT from table1 WHERE .. . where table1 is the table name . I have been going through the documentation and all I can find is the limit function that limits the number of entries that are returned . For example just say I have a database-table of events in Cassandra that take place on different days . I just want to return the number of events that take place on Tuesday and I want to do this using gocql . Currently I do something like : .. . .. . The BindEventLog function returns an array of the events that happen on day but again I just want the number of events not the events themselves . Is there a way to get this without iterating through this array because I am anyways going to throw out the array so it would be really slow to get the database to give me the entire array of data . I am a beginner at this so if you need more information please ask I tried to make this as specific as possible . Thanks . Comment : I don t see any aggregate support at all in the API . .. . Answer : The closest thing I could find that would help you out is Iter.NumRows https : godoc.org github.com gocql gocql Iter .. . .. . If they paginate rows that won t give you what you re looking for . In the event that they do this is a reasonable feature to request on their Github . Comment : Thanks I saw the NumRows thing too but I didn t want to have to iterate through . I have contacted the developers already . I am asking for this functionality .", "Question : I ve been reading http : godoc.org github.com gocql gocql Yet I don t understand how to do INSERT -- IF NOT EXIST with gocql . It stated that .. . .. . .. . func Query ScanCAS .. . .. . func q Query ScanCAS dest ...interface applied bool err error .. . .. . ScanCAS executes a lightweight transaction i.e . an UPDATE or INSERT statement containing an IF clause . If the transaction fails because the existing values did not match the previous values will be stored in dest . When I run .. . .. . I get : .. . Failed parsing statement : INSERT INTO tweet timeline id text VALUES IF NOT EXIST reason : ArrayIndexOutOfBoundsException -1 .. . .. . So my question is : .. . 1 . How to actually do INSERT IF NOT EXIST in gocql Can you guys give me any example 2 . How to do proper ScanCAS 3 . What makes MapScanCAS and ScanCAS different I don t understand what column mismatching are the author is talking about http : godoc.org github.com gocql gocql Query.MapScanCAS .. . 4 . Are there any good page that explains gocql beside its godoc page Comment : The correct syntax is INSERT IF NOT EXISTS S at the end Comment : Well that is embarassing . Thank you for the correction . It doesn t have any error now . But do you happen to know how can this works when ScanCAS doesn t have any argument I still can t understand the correct way of using ScanCAS because I thought I would be more like Scan Comment : If the INSERT didn t insert a new row because one already existed the dest argument will be filled in with the data from the row that already existed . The column mismatching is something to do with gocql not being able to control the order the columns come back in and so struct unmarshalling not working properly so MapScanCAS returns the data in a map instead . .. . Answer : looks like a typo you should use IF NOT EXISTS", "Question : I came across this weird behaviour while trying to implement some counters for my application . Basically I did a counter table like so : .. . .. . Then I have some specific types of message I want to count as well so in my Go app I ALTER the table to add the column I didn t have before . My app is growing and I start to have more than 30 columns shouldn t be more than 50 and when I want to retrieve all those counters some columns are missing in the result . This returns me something like 30 over 34 columns . Although when I do the request on CQLSH : .. . .. . I get the proper full result . So : .. . .. . 1 . Does that come from my request which should be different 2 . Could that come from gocql https : github.com gocql gocql driver 3 . Is that pattern completely stupid My temporary solution is to SELECT the column names from the system.schema columns table and to strings.Join all of that to my SELECT query .. . Thank you very much for your help . .. . Answer : I m not familiar with the gocql library but it sounds like you may be running into a combination of not repreparing your statements and CASSANDRA-7910 https : issues.apache.org jira browse CASSANDRA-7910 . Whenever a request is Prepared like what is being done in Select from where date in it sends a request to cassandra which responds with the column metadata for that table so when you get a response to a query back from cassandra you know what columns are available to look for . It looks like gocql has a feature called Automatic query preparation which may be treating your request as a prepared-statement . When you alter a table the prepared-statement does not get updated on your client-side so really the only way to fix this is to reprepare your statement not sure if you have that level of control from gocql . However this still doesn t work since there is a bug in cassandra CASSANDRA-7910 https : issues.apache.org jira browse CASSANDRA-7910 where it does not return the new columns since it is itself caching the prepared-statement on it s side and not invalidating it when the schema changes . This issue is fixed in 2.1.3 coming soon it may be worth trying this against the cassandra-2.1 branch in git to see if that resolves your issue . It s not an abnormal pattern to alter your schema when your application is running so this is a scenario that should work but unfortunately doesn t . I d look into seeing if there is a way to reprepare statements in gocql . I see there is a stmtsLRU var in cluster.go . If you could somehow get to that you could invalidate prepared statements . If there isn t a way to do this would be good to open up an issue against gocql as you can reprepare statements again in other drivers . I know that the java driver allows you to do this but gives you a warning . I suppose this could be a big difference between gocql and the other drivers in that in the other drivers you explicitly use a prepared-statement object where-in gocql it gets handled for you automatically in the library . With the cassandra bug outstanding I think you should stick to not using prepared statements and instead make queries like : SELECT FROM api counters WHERE date total", "Question : I have a table with a tuple column that is made up of an int64 paired with a uuid : .. . .. . and I can currently set the field using a cql statement like : .. . .. . and I pass in 2 variables as arguments an int64 and a gocql.UUID . Instead of moving 2 variables around everywhere I want to put these in a struct something like .. . .. . then use a Marshaller to pass these into the UPDATE statement . Is this possible I am not sure if I can pass in a single variable for the tuple field . If so how can I do this I can t figure out how - I was trying to mimic https : github.com gocql gocql blob master marshal test.go L935 but I m getting errors where I can t set the fields in the struct cannot refer to unexported field or method proto Comment : The error you get is because you are trying to use from a different package a variable or method that is not exported i.e . they do not start with Upper case . But beside this I don t know cql so I can t help . Writing Proto instead of proto may or may not fix your problem . .. . Answer : As you mentioned you are getting the following error : .. . .. . cannot refer to unexported field or method proto .. . .. . This means you need to export your fields inside the struct and that means beginning with a capital letter in Go . So your struct should be : .. . .. . Then it should work . Comment : Yea so I think the gocql lib needs an update in order to support this . Comment : Um well no : I don t think gocql can do anything about this . This is more like Hibernate requiring your classes to have public setter and getter methods . So YOU need to make first letters of your struct fields in capital letters . Using capital letters is THE way you make your struct usable by external code and I don t think any way around this exists .", "Question : I came across this weird behaviour while trying to implement some counters for my application . Basically I did a counter table like so : .. . .. . Then I have some specific types of message I want to count as well so in my Go app I ALTER the table to add the column I didn t have before . My app is growing and I start to have more than 30 columns shouldn t be more than 50 and when I want to retrieve all those counters some columns are missing in the result . This returns me something like 30 over 34 columns . Although when I do the request on CQLSH : .. . .. . I get the proper full result . So : .. . .. . 1 . Does that come from my request which should be different 2 . Could that come from gocql https : github.com gocql gocql driver 3 . Is that pattern completely stupid My temporary solution is to SELECT the column names from the system.schema columns table and to strings.Join all of that to my SELECT query .. . Thank you very much for your help . .. . Answer : Thanks Andy for your help . At first I thought that considering what you told me I would rather do a SELCT column name on the system.schema columns sometimes and refresh it when I alter my table . I would just then strings.join the columns in my SELECT FROM api counters . It worked but if I had 2 different instances and one would update the schema and the other would receive a GET request this one would not know the new column still . And then I rearranged my ideas and found out that there was obviously an other way of doing that and I simply change for this schema : CREATE TABLE stats dev.api counters date text description text all counter PRIMARY KEY date description and I am updating the field based on the description I am expecting . So far so good . I knew it was definitely Option 3 : my pattern was not the best one . Comment : That looks like a great approach and a better way to model the data :", "Question : I installed Go 1.4 in Mac OS X . Previously I had Go 1.0 . I set the GOROOT and PATH as follows .. . .. . Go is installed in usr local go bin go . And I set the GOPATH as my project src directory . I am able to run go code inside my directory . But when I try to install gocql I am getting error . Could anyone help me on this Thank you .. . .. . EDIT 1 : @VonC I tried the other option as well . I changed the GOROOT to the directory where go is installed . But it didn t help . And I changed the GOPATH . .. . Answer : Notes : .. . .. . GOROOT should reference a folder where go is installed not the go executable itself .. . .. . As Dave http : stackoverflow.com users 55504 dave-c mentions in the comments you should not have to set GOROOT at all in your case . See the article You don t need to set GOROOT really http : dave.cheney.net 2013 06 14 you-dont-need-to-set-goroot-really . GOPATH should reference a folder under which you will find src pkg and bin . it should not reference directly the src folder : .. . See How to Write Go Code - Workspace https : golang.org doc code.html Workspaces .. . .. . Regarding the GOPATH : .. . .. . try and set it in your .bashrc using export . check that your current shell is a bash and not another one like fish .. . check the output of go env . Don t do a sudo go get as the environment variable used for sudo root wouldn t be the same as the current user : .. . .. . or you would need to do a sudo -E bash -c go get github.com gocql gocql http : stackoverflow.com a 8633575 6309 but I suspect you don t need root here .. . .. . See sudo caveat https : help.ubuntu.com community EnvironmentVariables sudo caveat : .. . .. . Any variables added to these locations will not be reflected when invoking them with a sudo command as sudo has a default policy of resetting the Environment and setting a secure path this behavior is defined in etc sudoers Comment : I tried . But still facing the same issue . I edited the question with the current GOPATH and GOROOT Comment : @DineshAppavoo I have edited the answer . Comment : Thank you . It worked without sudo . Could you explain me how it works . I am new to mac . Comment : You don t need to set GOROOT http : dave.cheney.net 2013 06 14 you-dont-need-to-set-goroot-really and you normally don t want to . Comment : @DaveC got it . And I edited the answer accordingly .", "Question : If you were to interface directly with Cassandra using cqlsh you could do the following : .. . .. . I ve tried to do this using gocql several times but I always get an error . For example running this : .. . .. . Produces the following error : .. . .. . So what am I doing wrong here .. . Answer : SOURCE is a shortcut in cqlsh not valid CQL command in general . You ll need to read the file contents into strings and execute them . Comment : Well that is very disappointing news . Thank you though for that useful bit of information .", "Question : null .. . Answer : Note I am using the go language gocql client . Just added other cassandra tags in case someone should know something regarding JSON in cassandra that could help . Trying to follow this http : www.datastax.com dev blog whats-new-in-cassandra-2-2-json-support to use JSON but it has a strange behaviour . This is the table : .. . .. . .. . Here come the problem : .. . .. . .. . Looks good so fare . Then now change the id to : .. . json values : id : user456 age : 42 state : TX .. . .. . Same result . Now I delete the row and run the second query again with user user456 .. . .. . Same result again and - and this goes for anything else that I try to insert", "Question : Regarding Cassandra and paging . I might guess the answer but just to be sure .. . .. . I know how to ask for a pagesize but is it possible to get the eventually total number for a query . Like you query select from tableName with a pagesize of 10 but if you did not use paging you would get 100 . Is it possible to get the number 100 when using pagesize 10 Note : Just if it is of any use I am using gocql . .. . Answer : Plain answer is no getting number 100 in your example means knowing the result-of SELECT count FROM table which is a perf killer query . The best thing you can get is an estimate of number of partitions per node using nodetool or calling directly JMX Beans . But it won t get you the estimate of CQL row because in 1 partition there may be N rows if your table has clustering columns", "Question : I had a table containing those columns : .. . .. . I launched the following column to add a column named Limit of type int : .. . .. . The table already contained elements I updated them all so they have a Limit of 0 if I do the following command using cqlsh the Limit column appears and the values are also present . But if I do the exact same request using gocql a Go driver for cassandra I do not receive the Limit column but I receive the others here is the request made : .. . .. . I have no idea of what s going on I tried copying the data to a csv file then truncating the table and then reimporting the data still get the same result.. . .. . .. . Could it be a caching problem If yes how can I empty it . Else what can it be Comment : this is probably a bug in the go driver : i would recommend reporting it .. . Answer : I found a question which was relatively the same than mine and where an answer explained that it was a bug soon to be fixed . Actually it has been fixed and we just have to wait for the next update 2.1.3 . http : stackoverflow.com a 28035521 1405208 .. . .. . And here is the link-to the cassandra issue : CASSANDRA-7910 https : issues.apache.org jira browse CASSANDRA-7910 .. . .. . Edit : I edit this message because Cassandra 2.1.3 has been released now for a couple of months actually it was released the very day I posted this answer amazing : and the fix works . There you go", "Question : null .. . Answer : I am trying to implement paging but when I use SliceMap with PageSize I get all the rows - do you know why and what to do Note : I need the row maps keyed by CQL column mames .", "Question : Using UDT : .. . .. . Note : cqlsh : show version .. . .. . .. . Tables .. . .. . Code : .. . .. . I get : .. . .. . .. . .. . .. . .. . Update config .. . Answer : I updated Cassandra to 3.3 and it worked . The error message tricked me into thinking that having Native protocol v4 was ok running on Cassandra 2.2 . Upgrading to 3.3 I also had to add the following just after defining keyspace when creating a session : .. . ClusterName.ProtoVersion 4", "Question : I am outputting a dropdown list using a html template as follows : .. . .. . I want to indicate that one of the items should be selected by doing an eq comparator . The only potential complication I am aware of is that the .Uuid is a gocql.UUID I am trying to do this : .. . .. . But it results in the following error message : .. . .. . page : 32 : 36 : executing submit scholarship at : error calling eq : invalid type for comparison .. . .. . Any pointers in the right direction would be much appreciated . Comment : Two suggestions . Firstly I assume .Contact.Organisation is a struct which you are comparing with whatever Uuid is . . I assume thats a string . Also you may consider moving the logic here into a property of the template model itself . Then you can render selected selected only for the actual selected item . . but selected for the rest . Comment : Thanks including a Select function on the struct is how I normally do it . However I really want to avoid having view logic in my data model code . .. . Answer : eq only works on basic types . You can add a custom function to do this . http : play.golang.org p rkYnlqmeLA", "Question : How can you make sure that one user insert is not influenced by another user Like transactions.. . .. . .. . Do you use a batch job in combination with IF NOT EXISTS .. . Answer : Cassandra introduced light weight transaction http : www.datastax.com dev blog lightweight-transactions-in-cassandra-2-0 in 2.0 but it is not fully respect to ACID properties . It uses Paxos to guarantee atomicity for such kind of light weight transactions but it lacks the isolations solutions for handling concurrent transactions . A solution could be implement two phase locking or some kind of optimistic-concurrency control on top of Cassandra by yourself .", "Question : I am using containers to run both app servers Cassandra nodes . When starting the app server container I need to specify which Cassandra node 1..n to connect to . How would you divide the workload 1 . One app container to one or more Cassandra nodes How many . 2 . One or more app container to one Cassandra node How many . 3 . Many to many How many . This is for a production setup 100 uptime . Each data load from cassandra is small but many . I should be scalable so I can put in more app containers - like in Kubernetes they have pods . Pods is a set of nodes that make up granules of the application . Therefore I am looking for the best possible group of containers Cassandra and App server that will scale .. . .. . Info : Kubernets is a to expensive setup in the beginning . And while waiting for Docker Swarm to be in release state I will do this manually . Any insight is welcome Regards Comment : We need a lot more information . Is this setup for a local test or a production deploy If its a production deploy then whats the load and the uptime requirement . In general many-to-many is preferred for fault tolerance but I need to know you usecase to say anything .. . Answer : Don t run the app container and Cassandra node inside of the same pod . You want to be able to scale your Cassandra cluster independently of your application . For the Cassandra side of things I suggest : .. . .. . A replication controller so you can easily scale your number of Cassandra nodes . Luckily for us C nodes are all the same . A Cassandra service so that your application pods have a stable endpoint at which they can talk to C .. . A headless Kubernetes service to provide your Cassandra pods with seed node IP addresses .. . .. . You will need to have DNS working in your Kubernetes cluster . The Cassandra Replication Controller .. . .. . cassandra-replication-controller.yml .. . .. . The Cassandra Service .. . .. . The Cassandra service is pretty simple . Add the thrift port if you need that . cassandra-service.yml .. . .. . The Cassandra Peer Discovery Service .. . .. . This is a headless Kubernetes service that provides the IP addresses of Cassandra peers via DNS A records . The peer service definition looks like this : .. . .. . cassandra-peer-service.yml .. . .. . The Cassandra Docker Image .. . .. . We extend the official Cassandra image thus : .. . .. . Dockerfile .. . .. . Notice the custom-entrypoint.sh script . It simply configures the seed nodes by querying our Cassandra peer discovery service : .. . .. . custom-entrypoint.sh .. . .. . Starting Cassandra .. . .. . To start Cassandra simply run .. . .. . This will give you a one-node Cassandra cluster . To add another node : .. . .. . Talking to Cassandra .. . .. . Your application pods can connect to Cassandra using the cassandra hostname . It points to the Cassandra service . Show me the code .. . .. . I made a GitHub repo with the above setup : Multinode Cassandra Cluster on Kubernetes https : github.com vyshane cassandra-kubernetes . Comment : Your cassandra-peer-service.yml is equal to the cassandra-service.yml Comment : Woops . Thanks for pointing this out . I ve updated the answer .", "Question : I am using containers to run both app servers Cassandra nodes . When starting the app server container I need to specify which Cassandra node 1..n to connect to . How would you divide the workload 1 . One app container to one or more Cassandra nodes How many . 2 . One or more app container to one Cassandra node How many . 3 . Many to many How many . This is for a production setup 100 uptime . Each data load from cassandra is small but many . I should be scalable so I can put in more app containers - like in Kubernetes they have pods . Pods is a set of nodes that make up granules of the application . Therefore I am looking for the best possible group of containers Cassandra and App server that will scale .. . .. . Info : Kubernets is a to expensive setup in the beginning . And while waiting for Docker Swarm to be in release state I will do this manually . Any insight is welcome Regards Comment : We need a lot more information . Is this setup for a local test or a production deploy If its a production deploy then whats the load and the uptime requirement . In general many-to-many is preferred for fault tolerance but I need to know you usecase to say anything .. . Answer : Please see : .. . .. . https : github.com kubernetes kubernetes blob release-1.0 examples cassandra README.md .. . .. . for a tutorial of how to run Cassandra on Kubernetes . You will also need to add-in best practices like snapshotting the databases to persistent-storage and other such things . and why do you say that Kubernetes is expensive Google Container Engine only charges the cost of the VMs for small clusters and you can deploy open-source Kubernetes yourself for free Comment : Thanks . Hov would you devide the workload in a pod . Like 3 app containers to 3 cassandra nodes plus one seed node in pod", "Question : My scan is not updating its destination variable . I sort of got it working with : .. . .. . But I don t think it is working the way I want . Both log messages are the exact same Existing obj 0 0 0 0 0 0 0 0 0 0 0 0 Spaces are string fields . Is this because of the heavy use of reflection to generate a new object In their docs it says I should use var ValueName type to define my destination but I cannot seem to do that with reflection . I realize this may be silly but maybe even just pointing me in the direction for further debugging this would be great . My skills with Go are quite lacking .. . Answer : What is it you want exactly Do you want to update a variable you pass to Execute If so you have to pass a pointer to Execute . And then you only need to pass reflect.ValueOf incrementedValue .Interface to Scan . This works because reflect.ValueOf incrementedValue is a reflect.Value https : golang.org pkg reflect Value holding an interface the type of your parameter which holds a pointer the pointer you pass to Execute and Value.Interface https : golang.org pkg reflect Value.Interface will return a value of type interface holding the pointer the exact thing you have to pass Scan . See this example which uses fmt.Sscanf https : golang.org pkg fmt Sscanf but concept is the same : .. . .. . It will print 1 from main as the value 1 is set inside Execute . If you don t want to update the variable passed to Execute just create a new value with identical type since you re using reflect.New which returns the Value of a pointer you have to pass existingObj.Interface which returns an interface holding the pointer the thing you want to pass to Scan . What you did is you passed a pointer to a reflect.Value to Scan which is not something Scan expects . Demonstration with fmt.Sscanf : .. . .. . This will print 2 . Another variant of Execute2 is that if you call Interface right on the value returned by reflect.New : .. . .. . This Execute3 will print 3 as expected . Try all examples on the Go Playground http : play.golang.org p DpuUcN3Af3 . Comment : I am accepting a value of any type incrementedValue and I am just trying to create an uninitialized new variable of the same type to give to the bindQuery.Scan . I want a second one because I go through and compare all their fields later on . I haven t tested what you posted but I wanted to give a little more detail on why I am trying to do what I am . Essentially the end goal is get the object from the database compare with the incrementedValue then update the database with the changes between the two . Fairly simple until you want to make it really dynamic . Comment : @electrometro Then my Execute2 and Execute3 might be feasible to you . Also a link-to try my codes on the Go Playground http : play.golang.org p DpuUcN3Af3 is included at the end of my answer . Comment : The second example was exactly what I needed . It was a long night and as soon as I seen that this morning it made perfect sense . Thanks", "Question : I m trying to insert a map value into my Cassandra database . I m using Go to write my client . Currently its throwing the error can not marshal string into map varchar varchar . I understand what the error is but I can t resolve it . Here is the code that I ve written . What I don t get is that I ve written one query as a whole unbroken string and it works fine without throwing this error . Yet breaking it down with the question mark it throws the error . I know this is something simple that I m just overlooking and couldn t find in the documentation but any help would be great thanks . .. . Answer : I haven t used Go casandra client before but I guess passing map as a map instead of string should work :" ] }
[ "yes-answer-long", "yes-answer-short" ]
cassandra
UNK_RELATION
mormot@ajax@208
mormot -- synopse mormot is an open-source client-server orm soa mvc frameworkfor delphi-6 up to delphi-10-seattle and fpc targeting windows linuxfor servers and any platform for clients including mobile or @placeholder .
{ "confidence": [ 56.564491271972656, 56.29777145385742, 53.2130012512207, 50.025238037109375, 48.82019805908203, 46.77754211425781, 45.47380065917969, 44.94710922241211, 44.560585021972656, 43.709293365478516, 43.46817398071289, 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 .", "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 .", "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", "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.93727111816406, 62.463722229003906, 58.19017028808594, 57.8408203125, 54.78563690185547, 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 : 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 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 : 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" ]
ajax
UNK_RELATION
php-java-bridge@java@195
php-java-bridge -- the php-java-bridge is an implementation of a streaming xml-based network protocol which can be used to connect a native script engine for example php scheme or python with a @placeholder virtual-machine .
{ "confidence": [ 56.12936782836914, 53.97968292236328, 48.09330368041992, 48.09330368041992, 48.09330368041992, 48.00395965576172, 47.50825881958008, 43.41290283203125, 41.2667236328125, 38.5573844909668, 35.82859420776367, 34.43204879760742, 32.00014877319336, 31.505966186523438, 30.911029815673828, 30.794437408447266, 30.42447280883789, 30.42447280883789, 29.967357635498047, 28.479881286621094, 28.290132522583008, 28.290132522583008, 28.290132522583008, 28.27829360961914, 27.161144256591797, 26.868511199951172, 26.517539978027344, 26.054855346679688, 25.415185928344727, 24.709152221679688, 23.26900863647461, 23.26900863647461, 23.26900863647461, 23.202260971069336, 21.962236404418945, 21.64695930480957, 21.438575744628906, 20.777366638183594, 20.542402267456055, 19.422107696533203, 18.545513153076172, 18.194034576416016, 17.579761505126953, 16.317049026489258, 16.185134887695312, 15.983909606933594, 15.919425964355469, 15.919425964355469, 14.969766616821289, 14.798406600952148, 14.243620872497559, 14.243620872497559, 13.583508491516113, 13.583508491516113, 12.264491081237793, 12.097442626953125, 11.75393295288086, 11.75393295288086, 11.75393295288086, 11.75393295288086, 11.75393295288086, 11.75393295288086, 11.75393295288086, 11.75393295288086, 11.75393295288086, 11.75393295288086, 11.75393295288086, 11.75393295288086, 11.75393295288086, 11.75393295288086, 11.75393295288086, 11.75393295288086, 11.75393295288086, 11.75393295288086, 11.75393295288086, 11.75393295288086, 11.75393295288086, 11.75393295288086, 11.75393295288086, 11.75393295288086, 11.75393295288086, 11.75393295288086, 11.75393295288086, 11.75393295288086, 11.75393295288086, 9.607754707336426, 9.607754707336426, 9.607754707336426, 9.607754707336426, 9.607754707336426, 9.607754707336426, 9.607754707336426, 9.607754707336426, 9.607754707336426, 9.607754707336426, 9.607754707336426, 9.607754707336426, 9.607754707336426, 9.607754707336426, 9.607754707336426 ], "content": [ "It will interact with JAVA code on Model and will store data in Nosql using JAVA backend .. . .. . I read about this php-java bridge http : php-java-bridge.sourceforge.net pjb index.php .. . Which can be better PHP-JAVA bridge to use", "The php-java bridge that you linked to may prove most useful though as its built to work with the official PHP distribution .", "It could be possible that the PHP-Java bridge was compiled with J2SE 7 and the rest was on JDK 1.6 .", ".. . .. . I know py4j could do it wondering how PHP Java Bridge do it", "I know this is an old question but I do run BIRT through the PHP java bridge successfully .", "Can we use AJAX requests or should go for Java PHP Bridge Querces such applications", "Java : .. . .. . PHP : .. . .. . You can see in the PHP code a php class extend Java class and the set method is Java s methods which let PHP class pass to the Java side .", "Basically you one war file with both the PHP JavaBridge files and BIRT + a special class to load BIRT within the JAVA bridge .", "And PHP Java Bridge could also do it blog.csdn.net guotong1988 article details 51251396 http : blog.csdn.net guotong1988 article details 51251396", "I need to connect PHP client code to JAVA backend where the actions are : .. . 1 .", "How to bring PHP pages into present web pages generated by java .", "Therefore I installed the recommend Java Bridge and the BIRT Runtime by moving JavaBridgeTemplate621.war and birt.war to my Tomcat .", "The PHP code you have is correct .", "Project details : PHP project which uses a JavaBridge to complete a task .", "Example : Web page from java has JQuery Tabs and we like to display the PHP web page within a tab while all other HTML comes from java application .", "I am working on a code which requires java at the back-end and php at the front end to enable users print tickets receipt from a printer .", "http-request will be sent from PHP client .", "I want to use Birt Reports in an php webproject .", "Hi I am using Java Bridge for connecting PHP through JAVA i installed tomcat server and added java.inc file and i am including that file but i got error like this .. . .. . Warning : include once http : localhost : 9090 AT ReFactaJavaBridge java Java.inc : failed to open stream : Permission denied in var www html ReFacta AT libs connection.php on line 38 Warning : include once : Failed opening http : localhost : 9090 AT ReFactaJavaBridge java Java.inc for inclusion include path .", "Now we would like to access display web pages from PHP application within web pages generated by Java application .", "My updates to this project have only been with the PHP files .", "I m trying to use Jasper report with a PHP yii application .", "I ve already installed jasper-report-server with obviouslly tomcat and apache with php .", "Does anyone know if there is a way to do this in PHP", "If anyone is still having a problem calling BIRT from php here s very good tutorial http : www.theserverside.com news 1363642 Intergrating-BIRT-with-PHP that helped me a lot .", "Mainly 1 . how we should install setup our PHP application on same Apache server which is used to route web requests to Tomcat", "If you extends java interface in python code .", "Also notice that curl extension not loaded even though i have uncommented from ini file php-cgi is used not sure if curl extension needed for javabridge .. . .. . Could someone please help me", "Just to note I never made any changes in my recent deploy of PHP files either .", "In Ruby there is this this https : github.com louismullie stanford-core-nlp nice Stanford Core NLP integration gem which simply acts as a bridge to the JVM version .", "In a past project we tried searching for a PHP library that would work well with Core NLP to no avail .", "So far my PhP JavaBridge code is working perfectly on my xmapp tomcat intranet server .", "We would like to deploy a PHP application on the same Apache server - probably under a subdirectory var www ourapp .", "What I understood from this is I build war file using java-7 and tomact was using java-6 .", ": usr share pear : usr share php in var www html ReFacta AT libs connection.php on line 38 Fatal error : Class java not found in var www html ReFacta AT libs connection.php on line 54 .. . .. . Please help me .. . .. . Its working fine on windows server.. .", "The code here https : github.com apache-spark blob master streaming src main scala org apache-spark streaming api python PythonDStream.scala L89 val resultRDD pfunc.call time rdds means that Java code could call Python code directly without using Java s ProcessBuilder to create a python process to do it .", "I simply changed to Java 7 : Started working for me .", "My compile version of Java is JDK1.6 and the java version running on my server is : .. . .. . I am terribly frustrated for this works locally on my device but when I run it on the server it fails the tomacat log provides the following :", "We have a Java web application deployed on Tomcat .", "Your class cannot find the BIRT engine .", "Where did you deploy the class attempting to access the engine", "Cause : java.lang.ClassNotFoundException : org.altic.jasperReports.JdbcConnection VM : 1.7.0 101@ http : java.oracle.com at : -10 org.apache.catalina.loader.WebappClassLoader.loadClass WebappClassLoader.java : 1702 -9 org.apache.catalina.loader.WebappClassLoader.loadClass WebappClassLoader.java : 1547 -8 java.lang.Class.forName0 Native Method -7 java.lang.Class.forName Class.java : 278 -6 php.java.bridge.Util.classForName Util.java : 1518 -5 php.java.bridge.JavaBridge.CreateObject JavaBridge.java : 445 -4 php.java.bridge.Request.handleRequest Request.java : 458 -3 php.java.bridge.Request.handleRequests Request.java : 500 -2 php.java.bridge.http.ContextRunner.run ContextRunner.java : 145 -1 php.java.bridge.ThreadPool Delegate.run ThreadPool.java : 60 0 http : localhost : 8080 JavaBridge java Java.inc 232 : java ThrowExceptionProxyFactory- getProxy 4 php.java.bridge.. . T false 1 http : localho in http : localhost : 8080 JavaBridge java Java.inc on line 195", "In Python there is this https : github.com dasmith stanford-corenlp-python one which while slightly more complicated appears to do basically the same thing .", "It s a similar problem to this thread : Unsupported major.minor version 51.0 http : stackoverflow.com questions 10382929 unsupported-major-minor-version-51-0 .. . .. . What I would do is check and see if all of the java files are compiled with the same version .", "Hi and thanks in advance .. . .. . I am trying to use python javabridge to to do a unit test that requires me to use a java jar file that has some api classes that I am trying to use .", "I used a copy of a the back up downloaded one and it resolved the issue .", "To which recommendation are you referring", "Which line is throwing the exception", "Nope my IDE as stated above was set to the JDK which I configured .", "I just had the same issue and I solved it like that when creating JasperCompileManager : .. . .. . The cancelProxyCreationTag is a property that is used but not declared nor initialized in the Java.inc generated file.. .", "These files have remained untouched as far as I can tell .", "So I hope someone from this site can help me .", "I have installed XAMPP v3.2.1 with tomcat version and im getting the following error only when i run a report with mysql timestamp paramters : .. . .. . for the reports i m producing without date parameter Jasper report run without any problem and produce PDF .", "Thanks in advance", "Java.inc File have all the methods which is creating for getting data from database connections and all the things", "Can you please give a overall picture of how to proceed about this", "I have viewed numerous threads now .", "Version 51 according to that thread is J2SE 7 .", "You need to make sure nothing depends on J2SE 7 .", "Yeah I thought that but I never touched it since the last time I had it working .", "How do I tell if the JavaBridge.war is complied in J2SE 7", "What are you using for your IDE", "It could possibly be your IDE had compiled things in J2SE 7 .", "Since JavaBridge was downloaded it could be the file downloaded was J2SE7 .", "I had this problem with one my class file .", "Resolved by using the original downloaded version of the JavaBridge that was already deployed and backed up .", "Unsure if the version I had downloaded locally was J2SE7 but nevertheless this bug went away .", ": .. . .. . Backups are always a lifesaver .", "Could it print", "not ... .", "blog.csdn.net guotong1988 article details 51251396 http : blog.csdn.net guotong1988 article details 51251396", "I ve already make the configuration to download the reports and I m having this error : .. . .. . Screenshot here : .. . .. .", "screenshot http : i.stack.imgur.com o3pPq.png .. . .. . Fatal error : Uncaught o : Exception : java.lang.Exception : CreateInstance failed : new org.altic.jasperReports.JdbcConnection .", "What yii version are you using", "I ve installed again JavaBridge and Jasper and now is working .", "But thank you for your help .", "2 .", "Take a look at Project Zero http : www.projectzero.org and Quercus http : quercus.caucho.com .", "Both of those may be helpful .", "After that I wrote a short class calling the BirtEngine : .. . .. . As I recognize that e- getMessage returns I take a look at the catalina.out and there I found this exception : .. . .. . Especially this line takes my attention : .. . .. . But each try to get help from google and common websites failed .", "Have you tried var-dump or reflection on the Exception returned", "In its own context", "But the way that you are using the WAR files is not .", "If you still haven t solved this problem I might be able to make the WAR file I m using available .", "hi do u know how to implement birt with help of zend javabridge", "I m wondering how could it be done", "Yes py4j could do it .", "We ended up writing our own wrapper by creating methods that would just run an exec command and get us some of the base functionality we needed .", "I got Problem on CENTOS", "whats the content of Java.inc", "also use require-once so your code will stop executing when the file is not included to further prevent the errors at the bottom .", "do you have allow url fopen set to 1", "yes i have this option to 1", "But when i upload this code to my domain hosted by godaddy it shows nothing .", "Is there a special configuration i need to do to run JavaBridge on godaddy or on a remote-server", "Considered asking GoDaddy support", "I think many would agree that you should switch hosting company at once imo it is one of the most horrible of them all .", "I agree with @RonniSkansing I have recently relinquished my godaddy membership their default server configs are horrible I switched over to Digital Ocean VPN much more flexibility .", "wow...I guess i will contact them asap", "We also setup Apache and mod-proxy-ajp to route web requests port 80 443 to Tomcat ." ] }
{ "confidence": [ 68.22230529785156, 60.639976501464844, 57.797550201416016, 57.78093719482422, 53.329288482666016, 52.07847213745117, 47.488861083984375, 46.79838943481445, 45.264060974121094, 37.560142517089844, 37.33952331542969, 35.861183166503906, 30.68832015991211, 28.446577072143555, 18.592897415161133, 7.638680458068848 ], "content": [ "Question : I need to connect PHP client code to JAVA backend where the actions are : .. . 1 . http-request will be sent from PHP client . 2 . It will interact with JAVA code on Model and will store data in Nosql using JAVA backend .. . .. . I read about this php-java bridge http : php-java-bridge.sourceforge.net pjb index.php .. . Which can be better PHP-JAVA bridge to use .. . Answer : Take a look at Project Zero http : www.projectzero.org and Quercus http : quercus.caucho.com . Both of those may be helpful . The php-java bridge that you linked to may prove most useful though as its built to work with the official PHP distribution .", "Question : null .. . Answer : The code here https : github.com apache-spark blob master streaming src main scala org apache-spark streaming api python PythonDStream.scala L89 val resultRDD pfunc.call time rdds means that Java code could call Python code directly without using Java s ProcessBuilder to create a python process to do it . I m wondering how could it be done Comment : Yes py4j could do it . If you extends java interface in python code . And PHP Java Bridge could also do it blog.csdn.net guotong1988 article details 51251396 http : blog.csdn.net guotong1988 article details 51251396", "Question : I want to use Birt Reports in an php webproject . Therefore I installed the recommend Java Bridge and the BIRT Runtime by moving JavaBridgeTemplate621.war and birt.war to my Tomcat . After that I wrote a short class calling the BirtEngine : .. . .. . As I recognize that e- getMessage returns I take a look at the catalina.out and there I found this exception : .. . .. . Especially this line takes my attention : .. . .. . But each try to get help from google and common websites failed . So I hope someone from this site can help me . Comment : To which recommendation are you referring Have you tried var-dump or reflection on the Exception returned Which line is throwing the exception Comment : Your class cannot find the BIRT engine . Where did you deploy the class attempting to access the engine In its own context .. . Answer : I know this is an old question but I do run BIRT through the PHP java bridge successfully . The PHP code you have is correct . But the way that you are using the WAR files is not . Basically you one war file with both the PHP JavaBridge files and BIRT + a special class to load BIRT within the JAVA bridge . If you still haven t solved this problem I might be able to make the WAR file I m using available . Comment : hi do u know how to implement birt with help of zend javabridge", "Question : null .. . Answer : Java : .. . .. . PHP : .. . .. . You can see in the PHP code a php class extend Java class and the set method is Java s methods which let PHP class pass to the Java side . Could it print not ... . .. . .. . I know py4j could do it wondering how PHP Java Bridge do it Comment : blog.csdn.net guotong1988 article details 51251396 http : blog.csdn.net guotong1988 article details 51251396", "Question : null .. . Answer : We have a Java web application deployed on Tomcat . We also setup Apache and mod-proxy-ajp to route web requests port 80 443 to Tomcat . We would like to deploy a PHP application on the same Apache server - probably under a subdirectory var www ourapp . Now we would like to access display web pages from PHP application within web pages generated by Java application . Planning to implement Single Sign-on as well . Example : Web page from java has JQuery Tabs and we like to display the PHP web page within a tab while all other HTML comes from java application . Can you please give a overall picture of how to proceed about this Mainly 1 . how we should install setup our PHP application on same Apache server which is used to route web requests to Tomcat i.e . either setup sub domain or install in sub directory 2 . How to bring PHP pages into present web pages generated by java . Can we use AJAX requests or should go for Java PHP Bridge Querces such applications Thank you for your time in advance . Regards .", "Question : I want to use Birt Reports in an php webproject . Therefore I installed the recommend Java Bridge and the BIRT Runtime by moving JavaBridgeTemplate621.war and birt.war to my Tomcat . After that I wrote a short class calling the BirtEngine : .. . .. . As I recognize that e- getMessage returns I take a look at the catalina.out and there I found this exception : .. . .. . Especially this line takes my attention : .. . .. . But each try to get help from google and common websites failed . So I hope someone from this site can help me . Comment : To which recommendation are you referring Have you tried var-dump or reflection on the Exception returned Which line is throwing the exception Comment : Your class cannot find the BIRT engine . Where did you deploy the class attempting to access the engine In its own context .. . Answer : If anyone is still having a problem calling BIRT from php here s very good tutorial http : www.theserverside.com news 1363642 Intergrating-BIRT-with-PHP that helped me a lot .", "Question : Project details : PHP project which uses a JavaBridge to complete a task . My updates to this project have only been with the PHP files . I have viewed numerous threads now . My compile version of Java is JDK1.6 and the java version running on my server is : .. . .. . I am terribly frustrated for this works locally on my device but when I run it on the server it fails the tomacat log provides the following : .. . Answer : It s a similar problem to this thread : Unsupported major.minor version 51.0 http : stackoverflow.com questions 10382929 unsupported-major-minor-version-51-0 .. . .. . What I would do is check and see if all of the java files are compiled with the same version . Version 51 according to that thread is J2SE 7 . You need to make sure nothing depends on J2SE 7 . It could be possible that the PHP-Java bridge was compiled with J2SE 7 and the rest was on JDK 1.6 . Comment : Yeah I thought that but I never touched it since the last time I had it working . How do I tell if the JavaBridge.war is complied in J2SE 7 Comment : Just to note I never made any changes in my recent deploy of PHP files either . These files have remained untouched as far as I can tell . Comment : What are you using for your IDE It could possibly be your IDE had compiled things in J2SE 7 . Comment : Nope my IDE as stated above was set to the JDK which I configured . Since JavaBridge was downloaded it could be the file downloaded was J2SE7 . I used a copy of a the back up downloaded one and it resolved the issue .", "Question : In Ruby there is this this https : github.com louismullie stanford-core-nlp nice Stanford Core NLP integration gem which simply acts as a bridge to the JVM version . In Python there is this https : github.com dasmith stanford-corenlp-python one which while slightly more complicated appears to do basically the same thing . Does anyone know if there is a way to do this in PHP .. . Answer : In a past project we tried searching for a PHP library that would work well with Core NLP to no avail . We ended up writing our own wrapper by creating methods that would just run an exec command and get us some of the base functionality we needed .", "Question : null .. . Answer : Hi I am using Java Bridge for connecting PHP through JAVA i installed tomcat server and added java.inc file and i am including that file but i got error like this .. . .. . Warning : include once http : localhost : 9090 AT ReFactaJavaBridge java Java.inc : failed to open stream : Permission denied in var www html ReFacta AT libs connection.php on line 38 Warning : include once : Failed opening http : localhost : 9090 AT ReFactaJavaBridge java Java.inc for inclusion include path . : usr share pear : usr share php in var www html ReFacta AT libs connection.php on line 38 Fatal error : Class java not found in var www html ReFacta AT libs connection.php on line 54 .. . .. . Please help me .. . .. . Its working fine on windows server.. . I got Problem on CENTOS Comment : whats the content of Java.inc Comment : also use require-once so your code will stop executing when the file is not included to further prevent the errors at the bottom . Comment : Java.inc File have all the methods which is creating for getting data from database connections and all the things Comment : do you have allow url fopen set to 1 Comment : yes i have this option to 1", "Question : I m trying to use Jasper report with a PHP yii application . I ve already installed jasper-report-server with obviouslly tomcat and apache with php . I ve already make the configuration to download the reports and I m having this error : .. . .. . Screenshot here : .. . .. . screenshot http : i.stack.imgur.com o3pPq.png .. . .. . Fatal error : Uncaught o : Exception : java.lang.Exception : CreateInstance failed : new org.altic.jasperReports.JdbcConnection . Cause : java.lang.ClassNotFoundException : org.altic.jasperReports.JdbcConnection VM : 1.7.0 101@ http : java.oracle.com at : -10 org.apache.catalina.loader.WebappClassLoader.loadClass WebappClassLoader.java : 1702 -9 org.apache.catalina.loader.WebappClassLoader.loadClass WebappClassLoader.java : 1547 -8 java.lang.Class.forName0 Native Method -7 java.lang.Class.forName Class.java : 278 -6 php.java.bridge.Util.classForName Util.java : 1518 -5 php.java.bridge.JavaBridge.CreateObject JavaBridge.java : 445 -4 php.java.bridge.Request.handleRequest Request.java : 458 -3 php.java.bridge.Request.handleRequests Request.java : 500 -2 php.java.bridge.http.ContextRunner.run ContextRunner.java : 145 -1 php.java.bridge.ThreadPool Delegate.run ThreadPool.java : 60 0 http : localhost : 8080 JavaBridge java Java.inc 232 : java ThrowExceptionProxyFactory- getProxy 4 php.java.bridge.. . T false 1 http : localho in http : localhost : 8080 JavaBridge java Java.inc on line 195 Comment : What yii version are you using Comment : I ve installed again JavaBridge and Jasper and now is working . But thank you for your help . .. . Answer : I just had the same issue and I solved it like that when creating JasperCompileManager : .. . .. . The cancelProxyCreationTag is a property that is used but not declared nor initialized in the Java.inc generated file.. .", "Question : Project details : PHP project which uses a JavaBridge to complete a task . My updates to this project have only been with the PHP files . I have viewed numerous threads now . My compile version of Java is JDK1.6 and the java version running on my server is : .. . .. . I am terribly frustrated for this works locally on my device but when I run it on the server it fails the tomacat log provides the following : .. . Answer : I had this problem with one my class file . What I understood from this is I build war file using java-7 and tomact was using java-6 . I simply changed to Java 7 : Started working for me .", "Question : Project details : PHP project which uses a JavaBridge to complete a task . My updates to this project have only been with the PHP files . I have viewed numerous threads now . My compile version of Java is JDK1.6 and the java version running on my server is : .. . .. . I am terribly frustrated for this works locally on my device but when I run it on the server it fails the tomacat log provides the following : .. . Answer : Resolved by using the original downloaded version of the JavaBridge that was already deployed and backed up . Unsure if the version I had downloaded locally was J2SE7 but nevertheless this bug went away . : .. . .. . Backups are always a lifesaver .", "Question : null .. . Answer : I am working on a code which requires java at the back-end and php at the front end to enable users print tickets receipt from a printer . So far my PhP JavaBridge code is working perfectly on my xmapp tomcat intranet server . But when i upload this code to my domain hosted by godaddy it shows nothing . Is there a special configuration i need to do to run JavaBridge on godaddy or on a remote-server Comment : Considered asking GoDaddy support I think many would agree that you should switch hosting company at once imo it is one of the most horrible of them all . Comment : I agree with @RonniSkansing I have recently relinquished my godaddy membership their default server configs are horrible I switched over to Digital Ocean VPN much more flexibility . Comment : wow...I guess i will contact them asap", "Question : null .. . Answer : I have installed XAMPP v3.2.1 with tomcat version and im getting the following error only when i run a report with mysql timestamp paramters : .. . .. . for the reports i m producing without date parameter Jasper report run without any problem and produce PDF . Also notice that curl extension not loaded even though i have uncommented from ini file php-cgi is used not sure if curl extension needed for javabridge .. . .. . Could someone please help me Thanks in advance", "Question : null .. . Answer : Hi and thanks in advance .. . .. . I am trying to use python javabridge to to do a unit test that requires me to use a java jar file that has some api classes that I am trying to use . FYI jar file is in the same directory as the test . ERROR : .. . .. . code :", "Question : null .. . Answer : Is possible increase log verbosity using some directives within watchdog-jb.ini I can enable file logging changing the value of this directive from 0 to 1 : -Dzend.javamw.log 0 and adding this one : -Dzend.javamw.logfile usr local zendsvr var log javamw.log .. . .. . but informations logged are poor . Mirco" ] }
[ "yes-answer-long", "yes-answer-short" ]
java
UNK_RELATION
sonata@symfony2@89
sonata -- the sonata project is an open-source set of bundles which are built on top of @placeholder .
{ "confidence": [ 49.52857971191406, 49.41563415527344, 48.831199645996094, 47.492401123046875, 46.51276397705078, 46.137176513671875, 45.711177825927734, 45.711177825927734, 45.35481262207031, 45.059722900390625, 43.68516159057617, 43.12364959716797, 43.091758728027344, 43.083866119384766, 42.97285079956055, 42.36899185180664, 42.03215026855469, 42.01262664794922, 41.81137466430664, 41.54216766357422, 41.390628814697266, 41.390628814697266, 41.38936996459961, 41.38936996459961, 41.143550872802734, 41.115901947021484, 40.924129486083984, 40.814849853515625, 40.7674560546875, 40.624671936035156, 40.54999542236328, 40.29664611816406, 40.17427062988281, 40.165916442871094, 39.959922790527344, 39.8512077331543, 39.74951171875, 39.74951171875, 39.7205696105957, 39.719337463378906, 39.696128845214844, 39.59496307373047, 39.56137466430664, 39.42140197753906, 39.27954864501953, 39.27954864501953, 39.267486572265625, 39.267486572265625, 39.246803283691406, 39.04750061035156, 38.99969482421875, 38.99267578125, 38.985538482666016, 38.88870620727539, 38.86035919189453, 38.735904693603516, 38.47221374511719, 38.47221374511719, 38.423519134521484, 38.340660095214844, 38.106239318847656, 38.106239318847656, 38.06324005126953, 38.03498077392578, 38.03498077392578, 37.98612594604492, 37.871158599853516, 37.871158599853516, 37.871158599853516, 37.848838806152344, 37.84590148925781, 37.81694412231445, 37.75046920776367, 37.713775634765625, 37.69911193847656, 37.634002685546875, 37.60197067260742, 37.576255798339844, 37.51198959350586, 37.405521392822266, 37.16147994995117, 37.13655090332031, 37.13655090332031, 37.13655090332031, 37.061744689941406, 36.93299865722656, 36.88552474975586, 36.88552474975586, 36.88552474975586, 36.831878662109375, 36.692481994628906, 36.61079788208008, 36.61079788208008, 36.5892219543457, 36.5892219543457, 36.4783935546875, 36.4783935546875, 36.44782638549805, 36.44782638549805, 36.44782638549805 ], "content": [ "I m working on Sonata Admin bundles .", "I have sonata-project translation-bundle bundle installed it s configured as described in sonata-project.org bundles translation master doc reference https : sonata-project.org bundles translation master doc reference installation.html", "The primary cause of the installation problems in Sonata bundles is the fast evolution of Symfony and the sonata project .", "I m trying to find a combination of sonata bundles to work with both Sonata Media Bundle and Sonata Admin Bundle 3.0 or 2.4 but with no success .", "sonata-project.org bundles admin master doc cookbook https : sonata-project.org bundles admin master doc cookbook recipe custom action.html", "Is this Sonata project still working", "I configure a symfony-2.7 installation with the lasted sonata-admin and sonata user bundles .", "In Sonata https : sonata-project.org bundles I have created several lists and all work fine .", "Just read the doc sonata-project.org bundles admin master doc cookbook https : sonata-project.org bundles admin master doc cookbook recipe custom action.html", "From sonata media doc sonata-project.org bundles media master doc reference form.html https : sonata-project.org bundles media master doc reference form.html .", "Sonata Admin does not have any locale translation configuration parameters : https : sonata-project.org bundles admin master doc reference configuration.html .. . .. . Sonata uses your application session locale .", "I have created a Symfony application and added in my composer.json : .. . .. . sonata-project admin-bundle .. . sonata-project formatter-bundle .. . sonata-project intl-bundle .. . sonata-project media-bundle .. . sonata-project classification-bundle .. . sonata-project user-bundle .. . .. . When I used .. . .. . composer install .. . .. . All worked fine .", "I have installed Sonata Admin Bundle https : sonata-project.org bundles admin and User Bundle https : sonata-project.org bundles user in my Symfony 2.6 application .", "sonata-project admin-bundle 2.3.7 and sonata-project media-bundle 2.3.3 Maybe some other configuration forgotten", "sonata-project.org bundles media master doc reference http : sonata-project.org bundles media master doc reference helpers.html twig-usage", "Take a look at possible configuration https : sonata-project.org bundles media master doc reference advanced configuration.html of Sonata Media Bundle .", "It will work for services defined in other bundles as well therefore it will work on the Sonata bundle .", "sonata-project.org bundles user 3-x doc index.html https : sonata-project.org bundles user 3-x doc index.html", "This Sonata again.. .", "I m working with the Sonata Admin bundle https : sonata-project.org bundles admin 2-3 doc index.html for the backend of my website .", "github.com sonata-project SonataAdminBundle issues 1551 https : github.com sonata-project SonataAdminBundle issues 1551", "- Installation request for sonata-project core-bundle dev-master - satisfiable by sonata-project core-bundle dev-master .", "I had a working Sonata-Admin and Sonata-User configuration with admin prefix .", "I m working in Sonata User Bundle avatar using Sonata Media Bundle .", "I managed to install a full sonata-admin and sonata page bundle .", "Created a ticket here : github.com sonata-project SonataUserBundle issues 611 https : github.com sonata-project SonataUserBundle issues 611", "I m not well accustomed to the Sonata bundles world so I m open to any ideas you can give me .", "Try adding use Sonata MediaBundle Model MediaInterface at the top of your file .", "This will tell sonata which admin to use specifically .", "Im new to the Sonata project bundles so there may be a way of solving the original issue without having to go through these hoops .", "Icons are described here : .. . .. . You can find example configuration with icons in Sonata Sandbox https : github.com sonata-project sandbox blob 2.3 app-config sonata sonata admin.yml L51 project .", "- sonata-project doctrine-orm-admin-bundle dev-master requires sonata-project core-bundle 2.3.1 - satisfiable by sonata-project core-bundle 2.x-dev .", "I took a look at Github here https : github.com sonata-project SonataUserBundle and Docs here https : sonata-project.org bundles user 2-2 doc index.html but couldn t find nothing helpful .", "Sonata Admin Media and News is installed. .", "https : github.com sonata-project SonataAdminBundle issues 1546", "https : sonata-project.org bundles media master doc reference form.html", "I am using sonata-media-bundle https : github.com sonata-project SonataMediaBundle .", "your language .xliff with content from : vendor sonata-project admin-bundle Sonata AdminBundle Resources translations SonataAdminBundle .", "Declaration of Sonata AdminBundle Block AdminListBlockService : : validateBlock must be compatible with Sonata BlockBundle Block BlockAdminServiceInterface : : validateBlock Sonata CoreBundle Validator ErrorElement errorElement Sonata BlockBundle Model BlockInterface block .. . .. . This is my composer.json", "I ve found this bug report : github.com sonata-project SonataAdminBundle issues 1568 https : github.com sonata-project SonataAdminBundle issues 1568 which contains a fix for this but it is still open so I hope they merge it soon :", "To display custom elements in the dashbord Sonata Admin uses Sonata Block Bundle .", "I am using Sonata Media Bundle with Symfony2.3 in my project .", "I m using : .. . .. . sonata-project media-bundle : version : 2.3.1 sonata-project classification-bundle : version : 2.2.1 symfony symfony : version : v2.4.10", "I have Symfony 2.3 + Sonata Admin + Sonata User Bundle .", "@dev sonata-project block-bundle : 2.3@dev sonata-project admin-bundle : 2.4@dev", "github.com sonata-project SonataUserBundle blob master https : github.com sonata-project SonataUserBundle blob master Controller ProfileFOSUser1Controller.php", "I have a performance problem with sonata .", "Into Sonata I have a Booking Admin .", "The class Application Sonata UserBundle Entity User extends Sonata UserBundle Entity BaseUser - Sonata UserBundle Model User - FOS UserBundle Entity User", "To validate image dimensions using sonata media you need to override sonata media s ImageProvider class sonata uses this class to handle image manipulation.If you already have an extended bundle https : sonata-project.org bundles easy-extends master doc index.html of sonata-media-bundle then in services.yml file you can define your own provider as below make sure your yml file is included in main config.yml .. . .. . Now create your provider and extend it with sonata media s ImageProvider overrider validate function and define your own validation or can override buildCreateForm buildEditForm and define your asserts for binaryContent field .. . .. . namespace Application Sonata MediaBundle Provider", "did you miss sonata-project user-bundle", "Entity : .. . .. . In admin : .. . .. . FINALLY SOLVED SOLUTIONS : .. . .. . As per Sonata Admin Doc https : sonata-project.org bundles admin master doc reference conditional validation.html .. . .. . UserAdmin .. . .. . Here validation phone is only for reference .", "You could open a ticket with the project https : github.com sonata-project SonataUserBundle issues if there is none yet .", "Documentation for Sonata Admin Dashboard http : sonata-project.org bundles admin 2-1 doc reference dashboard.html .. . .. . I have not done it myself though .", "I have a problem with Sonata Admin in my Symfony2 project .", "I have using the Sonata Admin Bundle and Sonata Media Bundle .", "I m new to Symfony and Sonata .", "I m new in symfony and sonata .", "I am setting up a brand new project using Symfony 2.7.x and Sonata Admin 2.3.x plus Sonata User .", "Answer is actually given here : github.com sonata-project SonataAdminBundle issues https : github.com sonata-project SonataAdminBundle issues 165 issuecomment-1772219", "In the sonata sandbox they demonstrate overriding entities .", "Sonata menu http : i.stack.imgur.com ictlW.png .. . .. .", "The only thing that you can do is downgrade the Sonata Admin version to 2.3.1 that is the last version compatible with Sonata Media dependencies and wait until the 3.0 version of Sonata Media will be released .", "Is there a simple sonata configuration to disable the menu toggle button", "Application Sonata UserBundle Resources config validation.yml", "I finally start from a new project and use the https : github.com sonata-project sandbox as base My project will use some other sonata projects .. . .. . So probably a misconfiguration.. .", "I want to create custom roles in sonata-admin .", "How can you create new roles in Sonata", "I ve updated sonata-admin bundle to the 3.1 version .", "I m doing a project with Symfony2 and Sonata Admin Bundle .", "the configuration for fos user is wrong.. . you must use the Sonata namespace entity .. . not the generated one in the Application namespace .. . .. . notice the user class and the group class reference the BaseEntity Sonata Docs https : sonata-project.org bundles user master doc reference installation.html doctrine-configuration", "2- Open the file vendor sonata-project user-bundle Admin Model UserAdmin.php and take the configureFormFields from it .", "You have to overide the base template https : sonata-project.org bundles admin master doc reference templates.html .", "see the last version of official doc here : sonata-project.org bundles block master doc reference https : sonata-project.org bundles block master doc reference your first block.html", "I am trying to integrate Sonata Media Bundle in my project .", "I extended Sonata User Bundle with EasyExtendsBundle so I now have src Application Sonata UserBundle .", "namespace CD CarsBundle Admin .. . .. . use Sonata AdminBundle Admin Admin .. . use Sonata AdminBundle Datagrid DatagridMapper .. . use Sonata AdminBundle Datagrid ListMapper .. . use Sonata AdminBundle Form FormMapper .. . use Sonata AdminBundle Show ShowMapper .. . use Sonata AdminBundle Route RouteCollection .. . .. . .. . .. . .. . class ReservationsAdmin extends Admin .. . .. . .. . This code sets up the defaut sort column and order of the informations registered in this category .", "I am setting up the bundle and generate a ApplicationSonataCommentBundle using Sonata Easy Extend Bundle and this apear fine in the sonata-admin dashboard .", "Like : .. . .. . It will be working in Sonata Admin .", "I want to show sonata-admin bundle acl editor https : sonata-project.org bundles admin master doc reference security.html acl-editor but I can t manage to get it up and running the editor .", "I had to put the Compiler Pass in Sonata Admin Extension with its namespace and not in Sonata Media .", "can provide the result-of composer show grep sonata", "I guess it is a version issue between sonata and friendsofsymfony .", "Sonata will trigger an error telling that there are to many admins registered. .", "I agree with you actually it s over complicated to get a clean installation of sonata bundles usable for long term .", "So I have copied the file vendor bundles Sonata UserBundle Admin Model UserAdmin.php in my bundle app Application Sonata UserBundle Admin Model UserAdmin.php and modified it .", "the labels generated by sonata bundle are not working .", "This Sonata Bundle gets kind of hairy .", "Sonata Admin 3.4.0 with Symfony 3.1.3", "UPDATE : the bundle has a description as well : sonata-project.org bundles translation master doc index.html https : sonata-project.org bundles translation master doc index.html Don t just rely on bundle names read some docs at least.. .", "stackoverflow.com questions 38308774 http : stackoverflow.com questions 38308774 how-to-remove-category-from-sonata-type-model-list-at-url-admin-sonata-media-me", "Trying to install sonata-admin bundle .", "and shouldn t it be new Sonata BluePrintBundle SonataBluePrintBundle", "If you can t control that then extend http : symfony.com doc current cookbook bundles inheritance.html the Sonata bundle and define the compiler pass in it .", "Please take a look at this official doc https : sonata-project.org bundles admin master doc reference architecture.html the-admin-class .", "I use Sonata Admin Bundle in my Symfony2 project .", "I keep running into the same issue with the sonata-project page-bundle .", "I d like to add a button in sonata user list .", "Every thing works as expected in Sonata Admin Backend .", "Mongo Sonata seem to a bit incomplete still. ." ] }
{ "confidence": [ 60.79387283325195, 57.4832763671875, 57.313472747802734, 57.16255187988281, 56.29456329345703, 56.281333923339844, 56.21186828613281, 55.15541076660156, 55.15541076660156, 55.15541076660156, 54.28680419921875, 54.125160217285156, 53.97868347167969, 53.282318115234375, 53.279640197753906, 52.826454162597656, 52.744956970214844, 51.88699722290039, 51.71083450317383, 51.588748931884766 ], "content": [ "Question : I m trying to set Sonata pages locale to different value than my main application . I have in my config.yml : .. . .. . I expected to have main page in Russian and admin pages in English but all pages are in Russian . How can I change default language of Sonata Admin pages .. . Answer : As far as I know there s no such parameter sonata translation . Sonata Admin does not have any locale translation configuration parameters : https : sonata-project.org bundles admin master doc reference configuration.html .. . .. . Sonata uses your application session locale . What you can should do is set locale for authorized user and user will have his session in preferred language . Comment : I have sonata-project translation-bundle bundle installed it s configured as described in sonata-project.org bundles translation master doc reference https : sonata-project.org bundles translation master doc reference installation.html Comment : This bundle has nothing to do with translating Sonata Admin interface . This bundle provides translatable interface for your models . If you want to have a Blog Post admin with translatable title article fields - this bundle can help you save time . But as of application interface - see my answer . UPDATE : the bundle has a description as well : sonata-project.org bundles translation master doc index.html https : sonata-project.org bundles translation master doc index.html Don t just rely on bundle names read some docs at least.. .", "Question : when I try to install sonata-admin and LiipFunctionalTestBundle it gives me a validator problem .. . .. . FileLoaderLoadException : Catchable Fatal Error : Argument 1 passed to Sonata AdminBundle Admin Admin : : setValidator must implement interface Symfony Component Validator ValidatorInterface instance of Liip FunctionalTestBundle Validator DataCollectingValidator given called in var www app.gyman app cache dev appDevDebugProjectContainer.php on line 713 and defined in var www app.gyman app-config . which is being imported from var www app.gyman app-config routing.yml . and I found some propositions to install sonata dev master when i do that .. . .. . It gives me this errors : .. . .. . Problem 1 .. . - Installation request for sonata-project doctrine-orm-admin-bundle dev-master - satisfiable by sonata-project doctrine-orm-admin-bundle dev-master . - Can only install one of : sonata-project core-bundle dev-master 2.x-dev . - sonata-project doctrine-orm-admin-bundle dev-master requires sonata-project core-bundle 2.3.1 - satisfiable by sonata-project core-bundle 2.x-dev . - Installation request for sonata-project core-bundle dev-master - satisfiable by sonata-project core-bundle dev-master . Comment : I put your configuration in a composer.json file and the installation fail it looks like it s not related to LiipFunctionalTestBundle and it comes from Sonata bundles . Comment : so you have any propositions to solve that i tried many versions of sonata but same error always .. . Answer : The 3.0.0 version of SonataAdminBundle has been released 6 days ago https : github.com sonata-project SonataAdminBundle issues 3731 issuecomment-217414161 . But it looks like there was a problem with SonataDoctrineORMAdminBundle that has been fixed two days ago https : github.com sonata-project SonataDoctrineORMAdminBundle issues 546 issuecomment-218221655 it is now available on Packagist https : packagist.org packages sonata-project doctrine-orm-admin-bundle 3.0.0 . It is now possible to use these versions of the Sonata packages : .. . .. . And the installation works : .. . .. . .. . .. . There was some problems with the dependencies and it was impossible to install the Sonata bundles see these comments from my previous answer I have deleted since : .. . .. . I have tried many versions and still have the same problem than you it looks like the Sonata bundles are broken A.L May 3 at 18 : 06 .. . .. . Exactly we must wait some days hoping that can be solved with this versions Nada May 3 at 20 : 34 Comment : @Nada Did you try this solution", "Question : I have a conflict problem between sonate admin and media bundle . Here is the error : .. . .. . The error happen while in the backend I try to interact with the media control panel automaticaly added by the media bundle . The only mention of this error on google is talking about dependencies issues . https : github.com sonata-project SonataMediaBundle issues 731 .. . .. . Here is the composer.json .. . .. . If to change for sonata-project media-bundle : dev-master it s also not working .. . .. . and anyway I m not sure I want to use dev packages . Is this Sonata project still working the doc is outdated .. . .. . I m extremly tired of these sonata bundles - seems like a good idea but it s so time consuming to configure them properly .. . Comment : The primary cause of the installation problems in Sonata bundles is the fast evolution of Symfony and the sonata project . I agree with you actually it s over complicated to get a clean installation of sonata bundles usable for long term . The only advice I can give you is Try to use the same release version between all the sonata bundles of your app it s ok for the most part . .. . Answer : So here is the trick : .. . .. . in your composer.json you need to use the following version : .. . .. . in the require-dev you need to change sensio generator-bundle : 3.0 to sensio generator-bundle : 2.3 .. . .. . This doesn t solve the original issue but will make sonata-admin media working together . thx to chalasr for helping .", "Question : I am using sonata-media-bundle https : github.com sonata-project SonataMediaBundle . and I was wondering how can I access the media-url in twig . I just want the url I do not need to show the media . Any suggestions Comment : sonata-project.org bundles media master doc reference http : sonata-project.org bundles media master doc reference helpers.html twig-usage .. . Answer : You have to use the path media helper : .. . .. . In the above code media is an instance of the media entity and small is the chosen format . http : sonata-project.org bundles media master doc reference helpers.html twig-usage", "Question : null .. . Answer : I m a beginner with Symfony . I have a problem with Sonata Admin in my Symfony2 project . I want to add a custom menu in Sonata bundle under the project logo and the project name and I don t know how . This is a picture for more description : .. . .. . http : i.stack.imgur.com zKZAH.png .. . .. . I searched a lot but I don t find a clear tutorial . Thank you for your help Comment : You have to overide the base template https : sonata-project.org bundles admin master doc reference templates.html .", "Question : I m trying to find a combination of sonata bundles to work with both Sonata Media Bundle and Sonata Admin Bundle 3.0 or 2.4 but with no success . The versioning on the official documentation is a total mess and does not help . My actual composer contains : .. . .. . I m on Symfony 2.8 but I d love to be able to migrate to 3.x . Did anyone find a way .. . Answer : I have the same issue this is because Sonata Media didn t has yet 3.0 version and the 2.4 version is incompatible with the new 3.0 version of Sonata Admin . Some time ago was possible to install the unstable 2.4 version of Sonata Admin but now this version is not avaible because is replaced with the new 3.0 version . The only thing that you can do is downgrade the Sonata Admin version to 2.3.1 that is the last version compatible with Sonata Media dependencies and wait until the 3.0 version of Sonata Media will be released . I m sorry for the bad news Comment : Thank you that s what I did but Sonata Admin 2.3.1 has several problem with entity translations . I m following this discussion https : github.com sonata-project SonataAdminBundle issues 3731 but things happen so slowly .", "Question : null .. . Answer : I would like to extend the Sonata UserBundle Entity BaseUser to create my user class for the login-system in sonata but an error was occurred . those aremy bundles in composer.json .. . .. . thanks or any help Comment : did you miss sonata-project user-bundle sonata-project.org bundles user 3-x doc index.html https : sonata-project.org bundles user 3-x doc index.html Comment : thanks Isabel yes but i foud a big problem when i choose the best version for compatibility reason", "Question : I am using sonata-media-bundle https : github.com sonata-project SonataMediaBundle . and I was wondering how can I access the media-url in twig . I just want the url I do not need to show the media . Any suggestions Comment : sonata-project.org bundles media master doc reference http : sonata-project.org bundles media master doc reference helpers.html twig-usage .. . Answer : @javigzz s is perfect in case of default context . I used custom context so had to handle format first taking into account context name :", "Question : I am using sonata-media-bundle https : github.com sonata-project SonataMediaBundle . and I was wondering how can I access the media-url in twig . I just want the url I do not need to show the media . Any suggestions Comment : sonata-project.org bundles media master doc reference http : sonata-project.org bundles media master doc reference helpers.html twig-usage .. . Answer : Since @javigzz s answer did not work for me here is a twig-extension that works with the latest version of sonata media : .. . .. . services.yml : .. . .. . The usage will be the same : Comment : Just added this on GitHub : github.com SocialbitGmbH SonataMediaTwigExtensionBundle https : github.com SocialbitGmbH SonataMediaTwigExtensionBundle", "Question : I am using sonata-media-bundle https : github.com sonata-project SonataMediaBundle . and I was wondering how can I access the media-url in twig . I just want the url I do not need to show the media . Any suggestions Comment : sonata-project.org bundles media master doc reference http : sonata-project.org bundles media master doc reference helpers.html twig-usage .. . Answer : You can use : path media reference .. . .. . @Blauesocke - tried your solution and had exactly the same result for file proviser with using both .. . .. . and", "Question : I m trying to validate image . I saw answer at Sonata Media : The file could not be found http : stackoverflow.com q 15590505 1958355 .. . .. . How to validate image width and height . I need help on that . There is no proper doc in net . .. . Answer : To validate image dimensions using sonata media you need to override sonata media s ImageProvider class sonata uses this class to handle image manipulation.If you already have an extended bundle https : sonata-project.org bundles easy-extends master doc index.html of sonata-media-bundle then in services.yml file you can define your own provider as below make sure your yml file is included in main config.yml .. . .. . Now create your provider and extend it with sonata media s ImageProvider overrider validate function and define your own validation or can override buildCreateForm buildEditForm and define your asserts for binaryContent field .. . .. . namespace Application Sonata MediaBundle Provider Comment : We can t use this . It changes entire validation . While using more than one entity using sonata media . How to validate Comment : As per your answer I used buildCreateForm but I have a problem please check the link . stackoverflow.com questions 38308774 http : stackoverflow.com questions 38308774 how-to-remove-category-from-sonata-type-model-list-at-url-admin-sonata-media-me", "Question : I am setting up a brand new project using Symfony 2.7.x and Sonata Admin 2.3.x plus Sonata User . By default Sonata add a bunch of useless fields and I want to keep my entity as clean as possible . So my first question is : .. . .. . It s possible to override Sonata User entities in order to get ride of some useless properties How Now as second part of the question and related to the same I want to create or use my own form-for add new Users and or Groups because with defaults ones I can t add roles . See the image below to see what I am talking about : .. . .. . Sonata Group Add http : i.stack.imgur.com v7TLZ.png .. . .. . I should be able to add new dynamic roles from there and I can t . Is this possible How Any workaround I took a look at Github here https : github.com sonata-project SonataUserBundle and Docs here https : sonata-project.org bundles user 2-2 doc index.html but couldn t find nothing helpful . Any advices Comment : Do not use SonataUserBundle use FOSUserBundle only instead . Comment : Possible duplicate of How to remove fields from the admin user create page of Sonata User Bundle http : stackoverflow.com questions 30690298 how-to-remove-fields-from-the-admin-user-create-page-of-sonata-user-bundle .. . Answer : You can get rid of the Sonata properties by extending the FOSUserBundle entity directly rather than SonataUser User model . change the entity that your User extends actually : .. . .. . to the following : .. . .. . Then to delete useless properties from forms and maybe add new override the default sonata UserAdmin class : .. . .. . 1- Create an admin class called UserAdmin in your own bundle . 2- Open the file vendor sonata-project user-bundle Admin Model UserAdmin.php and take the configureFormFields from it . Paste it in your own admin class and keep only the fields you need by deleting useless fields from the base form builder . The class can looks like : .. . .. . 3- Define the new UserAdmin class as a service .. . .. . Then adapt the configuration of sonata-user in config.yml : .. . .. . And it should be good . Look at this similar question http : stackoverflow.com questions 11413240 overriding-the-user-admin-form in case of I forgotten something or you need more .", "Question : when I try to install sonata-admin and LiipFunctionalTestBundle it gives me a validator problem .. . .. . FileLoaderLoadException : Catchable Fatal Error : Argument 1 passed to Sonata AdminBundle Admin Admin : : setValidator must implement interface Symfony Component Validator ValidatorInterface instance of Liip FunctionalTestBundle Validator DataCollectingValidator given called in var www app.gyman app cache dev appDevDebugProjectContainer.php on line 713 and defined in var www app.gyman app-config . which is being imported from var www app.gyman app-config routing.yml . and I found some propositions to install sonata dev master when i do that .. . .. . It gives me this errors : .. . .. . Problem 1 .. . - Installation request for sonata-project doctrine-orm-admin-bundle dev-master - satisfiable by sonata-project doctrine-orm-admin-bundle dev-master . - Can only install one of : sonata-project core-bundle dev-master 2.x-dev . - sonata-project doctrine-orm-admin-bundle dev-master requires sonata-project core-bundle 2.3.1 - satisfiable by sonata-project core-bundle 2.x-dev . - Installation request for sonata-project core-bundle dev-master - satisfiable by sonata-project core-bundle dev-master . Comment : I put your configuration in a composer.json file and the installation fail it looks like it s not related to LiipFunctionalTestBundle and it comes from Sonata bundles . Comment : so you have any propositions to solve that i tried many versions of sonata but same error always .. . Answer : Solved with an older version of Liip Functional test bundle my new composer is as following :", "Question : I need to add an action to clear symfony2 cache in sonata-admin which will be used for example when JMS translations are updated . I would like to know how to create a custom-action not related to entity in sonata-admin and how to execute clear cache command from it when the admin will click on the corresponding custom link . Comment : sonata-project.org bundles admin master doc cookbook https : sonata-project.org bundles admin master doc cookbook recipe custom action.html .. . Answer : You may create an action in very straight-forward Symfony way - create a route make a common controller for this route . Or call the action in any other way Symfony offers . Sonata admin bundle just extend your application with it s CRUD controller which you can use . But any other controllers created in normal way are working as well .", "Question : I am new to Symfony . Trying to install sonata-admin bundle . form : http : symfony.com doc current bundles SonataAdminBundle getting started installation.html .. . .. . But I got an error at Sonata DoctrineORMAdminBundle SonataDoctrineORMAdminBundle not found in home ubuntu workspace app AppKernel.php .. . .. . My AppKernel.php s code is .. . .. . .. . .. . like this and composer.json s code is .. . .. . .. . .. . Thanks in Advance : Comment : Your composer update has no error Does this bundle is well in your vendors folder Comment : yes it is in vendors folder .. . Answer : I think you miss requiring the bundle in composer.. . .. . .. . try run .. . .. . and composer install update .. . .. . From the sonata-admin documentation : .. . .. . SonataAdminBundle is storage agnostic meaning it can work with several storage mechanisms . Depending on which you are using on your project you ll need to install one of the following bundles . In the respective links you ll find simple installation instructions for each of them : .. . .. . More here : https : sonata-project.org bundles admin master doc reference installation.html .. . .. . Good luck Comment : Thanks Edu for your Answer but when I run that commend to install doctrine-orm-admin-bundle it gives me error of Trying to register two bundles with the same name SecurityBundle Comment : That work for me Thanks Edu", "Question : null .. . Answer : Versions .. . .. . Symfony 2.8 .. . Sonata core 2.3 cannot upgrade it to 3 as it produces too much collateral damage .. . .. . .. . .. . Original Issue .. . .. . Basically after upgrading from symfony-2.7 to 2.8 one of the sonata core filter form types sonata type equal flips its option list key-value . This is due to some version detection in the EqualForm class where it erroneously performs an array flip on the choices array . Line 62 https : github.com sonata-project SonataCoreBundle blob 2.x Form Type EqualType.php the comments say from 2.7 but it only seems to hit 2.8 .. . .. . .. . .. . So to try to fix this I thought I would extend the original form class and fix the issue . No matter what I do I cannot get Sonata to use my custom type class . I ve looked at all sorts of posts here and elsewhere from people trying to do the same thing but none of the suggestions work . I wonder if this is due to a symfony-2.8 change that prevents these things from working I ve tried without success : .. . .. . overriding the sonata.core.form.type.equal service . This produces the error : .. . .. . The field type Sonata CoreBundle Form Type EqualType is not registered with the service container . trying to configure the mapping in config.yml as follows : .. . .. . Note : Ive tried to derive the config syntax from the DI classes so this might be inaccurate . the sonata.core docs dont seem to list any config instructions in this area .. . .. . following these https : sonata-project.org bundles core master doc reference form types.html instructions by using the FormHelper methods in the bundle class . this gets called but immediately gets overriden by the sonata DI classes . Ive even tried using composers classmap option to hook the custom class up directly but it didnt work . Im new to the Sonata project bundles so there may be a way of solving the original issue without having to go through these hoops . Comment : Sonata admin 2.3 has some issue with SF 2.8 . If you can t upgrade now to 3.0 try 2.3.9 instead of 2.3.10 . But I highly recommend to upgrade 2.x is not maintained anymore . Comment : many thanks for that . 2.3.10 cured it 2.3.11 appears to be the culprit .", "Question : I m trying to override the SonataUser Admin Model UserAdmin s configureFormFields because I need to remove some default fields from the admin form . So I have copied the file vendor bundles Sonata UserBundle Admin Model UserAdmin.php in my bundle app Application Sonata UserBundle Admin Model UserAdmin.php and modified it . Then declared it as a service : .. . .. . Now questions : Am I doing right How can I tell sonata-admin to use it .. . Answer : It is a better practice to keep your bundles in the src directory instead : See Creating a bundle section http : symfony.com doc current book page creation.html . In this case if you are using easy extends make sure to use --dest src in order to generate the bundle inside an Application namespace in src . By creating your overriding bundle in src Application Sonata UserBundle and registering the vendor bundle as a parent you won t have to create a new service . This explains you how to override the bundle properly : overriding a bundle http : symfony.com doc current cookbook bundles inheritance.html and should save you a lot of time . Don t forget to create the file you want to override in the same location as your parent bundle . In your case you would have to copy-paste SonataUser Admin Model UserAdmin.php from the vendor into your bundle src Application Sonata UserBundle Admin Model UserAdmin.php and modify it as you wish . That s why overriding bundles can be so useful . Comment : Actually I used SonataEasyExtends http : sonata-project.org bundles easy-extends master doc index.html to extend the SonataUser Bundle as told in the docs http : sonata-project.org bundles user 2-0 doc reference introduction.html it automatically creates the structure of the extending bundle . It s using app Application by default I left it because it s always mentioned like that in SonataUser docs . Comment : If you specify no parameter the files are generated in app Application Sonata.. . but you can specify the path with --dest src . I have updated my answer . Comment : I saw that I intentionally left it because they are still using this path in the docs . I ll move it later maybe . The question is more about the way to tell sonata to use my new Admin class . Comment : You can still override the class instead of creating a new service anyway . Good luck : - Comment : That s what I did see my question but this class don t get overridden .", "Question : I m trying to override the SonataUser Admin Model UserAdmin s configureFormFields because I need to remove some default fields from the admin form . So I have copied the file vendor bundles Sonata UserBundle Admin Model UserAdmin.php in my bundle app Application Sonata UserBundle Admin Model UserAdmin.php and modified it . Then declared it as a service : .. . .. . Now questions : Am I doing right How can I tell sonata-admin to use it .. . Answer : The overriding class should be set in config.yml : .. . .. . Extend original UserAdmin : .. . .. . Of course change class name MyCompany UserBundle Admin Model UserAdmin to reflect your bundle structure .", "Question : I ve hitting my head against the wall for countless hours now and I hope SO can be of help I have Retailer Branch and RetailerBranches entities which work just fine retailers can have many branches and a branch can only have one retailer . The hard part happens when trying to make Sonata Admin SonataAdminBundle play nice with that relationship . In their simplest form they look like this : .. . .. . Retailer entity .. . .. . RetailerBranches join table .. . .. . Branch entity .. . .. . The harder part happens when trying generate the form to allow that relationship to take shape : .. . .. . RetailerAdmin .. . .. . RetailerBranchesAdmin .. . .. . The problem : .. . .. . All this sort of works here s a screenshot : enter image description here http : i.stack.imgur.com YPX0L.png .. . .. . There s a Retailer and its Branches . Yay . Problem 1 : The Add new button at the bottom attempts to add a RetailerBranches object instead of a simple Branch object which obviously doesn t work . Problem 2 : This method also doesn t allow the user to modify a Branch inline . I feel like I m close to the solution but I just cannot quite get there . Any help would be greatly appreciated Comment : This Sonata again.. . I see so many people fighting it longer than it d take to write all that stuff yourself . Why do you need it at all If you need stuff like Sonata you probably want a CMS not a framework . Comment : That s what I m about to do . It s a neat piece of code but the documentation is so so poor . Comment : I have found another way to get this done will work on it tomorrow and post my findings . Comment : I m using Sonata Admin for half a year now and run into many not documented use cases . But it is in open-source project and a lot of people are doing an awesome job on improving and adding new features . That s why I took the uses cases talked to the contributors about there best practice and added them to docs . It s a simple GitHub fork and adding some lines . Feel free to join @Pier-Luc Gendreau and Elnur Abdurrakhimov . : .. . Answer : When needing to edit OneToOne or other relationships on the same page in Sonata Admin you could also create Admin classes for each Entity and add to config.yml and simply add the entire entity to your form in you main Admin class like so : .. . .. . see Sonata Doc http : sonata-project.org bundles admin master doc reference form types.html", "Question : I have installed Sonata Admin Bundle https : sonata-project.org bundles admin and User Bundle https : sonata-project.org bundles user in my Symfony 2.6 application . I found that the User bundle creates a bundle at src Application Sonata UserBundle . When I go to the admin user creation page admin sonata user user create I found a lot of fields there : .. . .. . General .. . Username .. . E-Mail-Address .. . Plain password .. . Groups .. . Profile .. . Date of birth .. . Firstname .. . Lastname .. . Website .. . Biography .. . Gender .. . Locale .. . Timezone .. . Phone .. . Social .. . Facebook Uid .. . Facebook Name .. . Twitter Uid .. . Twitter Name .. . Google+ Uid .. . Google+ Name .. . Management .. . .. . Roles .. . Locked .. . Expired .. . Enabled .. . Credentails expired .. . Security .. . .. . Token .. . Two Step Verification Code .. . .. . I only need Username E-Mail Password Groups Firstname and Lastname for my admin user creation . How can I remove the other unnecessary fields from that page .. . Answer : Under configuration for sonata user bundle in config.yml i.e sonata user you can override sonata user admin class and define your own admin class .. . .. . Now create your user admin class in your extended bundle i.e ApplicationSonataUserBundle and extend your class with sonata s Sonata UserBundle Admin Model UserAdmin now in configureFormFields define your desired fields you want to add .. . .. . Or remove some of the fields : .. . .. . See ADVANCED CONFIGURATION https : sonata-project.org bundles user master doc reference advanced configuration.html for sonata user bundle" ] }
[ "yes-answer-long", "yes-answer-short" ]
symfony2
UNK_RELATION
siebel@crm@30
siebel -- oracle siebel is a @placeholder solution for large businesses .
{ "confidence": [ 48.455955505371094, 46.15790557861328, 46.15790557861328, 44.43669509887695, 44.43669509887695, 43.72707748413086, 43.58164596557617, 43.32036209106445, 42.42794418334961, 42.125099182128906, 42.125099182128906, 42.125099182128906, 42.125099182128906, 42.125099182128906, 42.00586700439453, 42.00586700439453, 41.05711364746094, 40.98101043701172, 40.379825592041016, 39.72943115234375, 39.694271087646484, 39.694271087646484, 39.694271087646484, 39.3549690246582, 39.24672317504883, 39.24672317504883, 38.99391174316406, 38.99391174316406, 38.99391174316406, 38.99391174316406, 38.99391174316406, 38.99391174316406, 38.237953186035156, 38.11486053466797, 38.06822967529297, 38.06822967529297, 38.06822967529297, 38.00822448730469, 38.00822448730469, 38.00822448730469, 37.474853515625, 37.337623596191406, 37.337623596191406, 37.29235076904297, 36.983367919921875, 36.983367919921875, 36.983367919921875, 36.983367919921875, 36.563079833984375, 36.563079833984375, 36.563079833984375, 36.563079833984375, 36.563079833984375, 36.563079833984375, 36.563079833984375, 36.563079833984375, 36.563079833984375, 35.696624755859375, 35.696624755859375, 35.696624755859375, 35.696624755859375, 35.696624755859375, 35.696624755859375, 35.696624755859375, 35.53318786621094, 35.53318786621094, 35.51258087158203, 34.937042236328125, 34.937042236328125, 34.937042236328125, 34.937042236328125, 34.937042236328125, 34.937042236328125, 34.937042236328125, 34.937042236328125, 34.937042236328125, 34.906795501708984, 34.776214599609375, 34.776214599609375, 34.776214599609375, 34.776214599609375, 34.776214599609375, 34.776214599609375, 34.776214599609375, 34.776214599609375, 34.77249526977539, 34.40441131591797, 34.27975845336914, 34.24031066894531, 34.24031066894531, 34.227867126464844, 34.18001937866211, 34.117218017578125, 34.117218017578125, 33.85831832885742, 33.85831832885742, 33.85831832885742, 33.85831832885742, 33.36821746826172 ], "content": [ "Thanks Siebel", "Is Siebel not installed correctly", "I m using Siebel 7.8 .", "Add this file to Siebel manifest : .. . 1 .", "Well that s... . unbelieveable even for Siebel .", "Siebel Version : 8.1", "I am new to Oracle Siebel testing .", "But this is not recommended by Siebel .", "List of all bookshelfs for every Siebel version can be found here oracle.com technetwork documentation siebel-087898.html http : www.oracle.com technetwork documentation siebel-087898.html", "I have Siebel Tools Client and a sample db .", "File theme.js was deprected starting from Siebel IP2014 .", "A good point to start would be the Siebel bookshelf .", "Specially if you are Siebel developer downgrade to IE8 .", "Currently im doing Siebel Open UI .", "Which instance of ATG is Siebel connecting to", "But it s only available for Siebel 8.1+ .", "I havent install Siebel Enterprise server and Siebel Web Server Extension .", "We are integrating ATG to Siebel we are getting an error while syncing the products from Siebel below are the error .", "Siebel didnt recognize IN keyword in this function :", "Use Siebel Tools to do this .", "I am using siebel v 8.0 .", "I am using Siebel HTIM Application v8.0 .", "As far as I know that is not even possible in Siebel .", "From Siebel 8 onwards Siebel can audit any business component s any table column .", "What solution can be for the above problem from .net or Siebel side", "I am looking for a way solution to implement TDD in Siebel development .", "This code reads data from a Excel Sheet and creates record in Siebel BC .", "This is a generic message Siebel throws it all the time there is an issue in the repository .", "The message itself is stored in the core.cat file under BIN ENU in the Siebel folder .", "I have a simple requirement to change the default currency in Siebel from USD .", "I have found a very weird behaviour in our Siebel 7.8 application .", "The only thing not working seems to be the EXISTS operator which is pretty standard in Siebel .", "If you are new to Siebel may I point out that Siebel tools has some wizards which can make things easier .", "I m try to perform a query in Oracle Siebel using SWE API https : docs.oracle.com cd B40099 02 books PortalFrame PortalFrameDelConExtWebApps.html .", "I created BIP report in Siebel Open UI .", "according to Siebel documentation eScript supports varargs .", "@Reminisce : - I am afraid that there is no IN statement in Siebel .", "the ones ATG uses to call Siebel .", "IS there sample ATS framework available for Siebel", "Is unit-testing even possible with Siebel", "I don t think Siebel generates this part in it s WSDL the examples on Oracle and other blogs mention that the extra Headers need to be sent in the incoming SOAP to Siebel but they are not present in the generated WSDL .", "There doesn t seem to be anywhere in SE or elsewhere online to ask questions for help in Siebel and Open UI .. . .. . Anyways I m trying to do something simple and include a custom css file with Siebel Open UI .", "What is the difference between the configuration of Fulfillment and Part Locator Engines in open UI and Siebel 8 i try the same configuration i had the right result in Siebel 8 but there is no resullt in the Open UI .", "While trying to record Siebel application which runs in siebel v9 using Vugen Siebel Web protocol with recording setting set as to capture Socket level data there s no event is getting recorded .", "Is there any way to reuse our UFT Siebel High Interactivity automation scripts for Siebel Open UI application .", "Just wanted to know can we reuse the Siebel HI scripts for Siebel open UI app for UFT automation .", "Unfortunately there is no upgrade path between Siebel HI Sieb objects and Siebel Open UI SblOUI objects .", "Is there any other efficient way of testing Siebel application or is ATS best way to start for Siebel .", "Is this the right way to perform a query to Siebel via SWE api", "I have automated Classic Siebel application using QTP10 and it worked alright .", "It is for these reasons that Siebel provides Pre-Default settings at the Business Component Field level .", "I have developed a custom business service in siebel to send email .", "The two main differences that Siebel Open UI support adds are : .. . .. . 1 .", "Can the siebel instance where the job is running see the ATG instance it is connecting to", "If someone knows how to design floating windows in Siebel application .", "The only thing you can add to a Siebel view are applets .", "I have a question about a specific functionality in Siebel regarding service requests .", "Is there any configuration needed from siebel side", "Based on your post the VM hosts siebel right", "What sort of change-management works well with Siebel", "use the guidance provided in the documentation for Siebel Tools .", "What sort of change-management works well with Siebel", "The ideal integration should be with the Siebel repository and invidual tools .", "3 Seamless integration - directly integrates with the Siebel repository .", "I want to automate Siebel application which is having Siebel HI framework .I tried using qtp and selenium but the problem is objects tables are not recognizable .", "Please check and confirm that your project is running with this module included : Siebel Test Automation Interfaces http : www.oracle.com us support licensecodes siebel index.html .", "Thanks for the response my config atg Initial.properties has only 4 services atg siebel configurator spu StructuredProductUIRepository atg siebel configurator spu StructuredProductUITools atg siebel configurator spu generation BlockGenerationService atg siebel order submit SiebelOrderSourceSink", "I am using EAI Siebel Adapter to Insert an Account record .", "We are using .net application to call Siebel inbound web service .", "Session response header is being inserted by Siebel on run-time .", "From that stance I feel comfortable saying that it s possible with Siebel as well .", "We are able to invoke the BS method and everything is working as expected on Siebel side .", "So IN keyword can be used in Siebel like I wrote", "Get the attachment from Siebel using COM Data Control .", "Ask your Siebel team to expose a webservice to get the file .", "Ask your Siebel team to provide REST type link-to download file .", "If you ensure that the Siebel Open UI Test Automation capability is enabled on the server three additional Siebel OUI specific properties are made available for UI objects in the HTML .", "I ve even tried creating my own theme.js file and putting it in scripts siebel custom and added that to the manifest but no luck .", "I need help on Editing the Pop up Message that comes from Siebel while trying to download and attachment .", "I need a search specification to reduce the data to meet business requirement do you have a sample siebel client and tools", "I found the answer in the Siebel bookshelf https : docs.oracle.com cd B40099 02 books EAI4 EAI4 DATAMapUSDecDTE22.html .", "We have a Siebel 7.8 application with two integration objects and both have an integration component for the attachments .", "Our Siebel application has 2 tables both of them sharing 4 text fields .", "In SQL this could be easily done with something like this : .. . .. . Can I build something similar in Siebel 7.8", "In our Siebel 7.8 application we have three entities : service requests SR groups and employees .", "In Siebel High Interactive as opposed to Open UI the HTML interface is a large number of nested iFrames .", "UFT supports Siebel HI via it s STA https : docs.oracle.com cd E14004 01 books TestGuide TestGuide AutoFuncTest5.html framework so the requirements for testing Siebel HI with UFT are : .. . .. . Install and activate UFT s Siebel add-in on the testing machine .. . Install STA on the Siebel server .. . Access the Siebel application via the automation URL .. . http : hostname callcenter start.swe", "I am looking for a smart solution how to retrieve the Data from a LoV from a Business Component of Siebel .", "We have worked for Siebel HI application for the last 3 release R1 R2 R3 and automated the Siebel HI application using UFT .", "SVN CVS are not suitable for Siebel a few reasons being .. . a Siebel objects are db objects and SVN CVS etc store sif equivalent of the changes .", "do we need to enable others add-in as well like : java Siebel or Oracle along with Siebel open UI Add-In while scripting for open UI and do we require STA Enabled for Open UI as well or it will work without these configuration .", "Yes there is a way to enforce the order from Siebel .", "The Oracle Commerce and Siebel Reference application is in the standard OC module format with the source code include .", "I have read about Oracle Application Testing Suite which can be used for testing Siebel .", "In short the Siebel application takes a very long time to load .", "Though most Siebel projects have this included some don t .", "I am trying to access Siebel WSDL through python-module .", "My End Scenario is creating Service request in Siebel through external link .", "Most guides such as this http : www1.askmesiebel.com 2014 02 how-to-change-theme-in-openui this http : www.siebelhub.com main 2013 01 siebel-open-ui-custom-themes.html and this https : docs.oracle.com cd E14004 01 books config open ui customizing mobile23.html mention editing the theme.js file located at PUBLIC language build SCRIPTS siebel ." ] }
{ "confidence": [ 55.81263732910156, 55.231082916259766, 53.85613250732422, 52.676055908203125, 51.34515380859375, 51.26847839355469, 50.468284606933594, 48.92797088623047, 48.645416259765625, 48.04884338378906, 47.94558334350586, 47.861019134521484, 47.807220458984375, 47.73417282104492, 47.720558166503906, 46.9615478515625, 46.75891876220703, 46.75891876220703, 46.48814010620117, 46.450401306152344 ], "content": [ "Question : We are using Siebel CRM for an inbound integration and using session management based soap requests and response . The problem is that when we generate WSDL from Siebel it does not include session management related header neither in request nor in response . We are using .net application to call Siebel inbound web service . Now our .net application is based on the classes generated after de-serialization of the Siebel generated WSDL and it is not including session response header . Session response header is being inserted by Siebel on run-time . Due to this our .net application could not get the session header . What solution can be for the above problem from .net or Siebel side Comment : Did you try looking into the doc or web search The first search result I got was docs.oracle.com cd E14004 01 books EAI2 EAI2 WebServices34.html https : docs.oracle.com cd E14004 01 books EAI2 EAI2 WebServices34.html .. . Answer : I don t think Siebel generates this part in it s WSDL the examples on Oracle and other blogs mention that the extra Headers need to be sent in the incoming SOAP to Siebel but they are not present in the generated WSDL . You will have to modify the WSDL after it is generated from Siebel and then add the header section in it . Then your .NET side can parse out this section . Or you will have to handle the session side in the .NET app.config file", "Question : I want to automate Siebel application which is having Siebel HI framework .I tried using qtp and selenium but the problem is objects tables are not recognizable . Can anyone help me .. . Answer : The Siebel STA module is a separately licensed module as can be seen in the Bookshelf link provided by Motti . Though most Siebel projects have this included some don t . Please check and confirm that your project is running with this module included : Siebel Test Automation Interfaces http : www.oracle.com us support licensecodes siebel index.html . If you are doing a PoC and want to verify that it works then Oracle provides the temporary license codes from the same URL . In Siebel High Interactive as opposed to Open UI the HTML interface is a large number of nested iFrames . Although a very diligent Selenium person may be able to automate some scenario s this is not the best approach for HI . For HI QTP UFT and serveral other test automation vendors will be able to help you with this . In case you have the opportunity to run Open UI then my advice would be to investigate Selenium once more as the Open UI HTML interface is a single DOM object and makes this much easier .", "Question : null .. . Answer : I am new to Oracle Siebel testing . I have read about Oracle Application Testing Suite which can be used for testing Siebel . I have gone through Oracle videos regarding application testing suite and found below which can be used for Siebel testing : 1 . Oracle functional-testing OFT using openscript 2 . Oracle Load and performance-testing .. . .. . I have went through following links : https : blogs.oracle.com aamat entry siebel test automation http : download.oracle.com oll tutorials ATS9 Siebel Testing Accelerators 041210 88547 index.htm http : www.oracle.com technetwork oem grid-control overview twp-ats-test-siebel-133042.pdf http : www.oracle.com technetwork oem grid-control overview ds-application-1.pdf .. . .. . I have below queries : .. . .. . 1 . Is there any other efficient way of testing Siebel application or is ATS best way to start for Siebel . 2 . Also what are the frameworks which can be used in ATS 3 . IS there sample ATS framework available for Siebel 4 . Is there any guide or walk-through available which can help in doing a POC for it Please help . Thanks in advance", "Question : I am doing siebel atg reference integration . Here I need to do compilation installation on siebelBuild.xml . In this step 2 targets are there . one is all another is all-with-ws . But my requirement is only getting importFromSiebel and getJobStatus Webservices . Is there way to make web-services alone Please suggest. . .. . Answer : The Oracle Commerce and Siebel Reference application is in the standard OC module format with the source code include . As far as I see it you have two options : .. . .. . 1 . Figure out all the code dependencies and delete and code and configurations which we won t be using not recommended .. . 2 . Use the module as is and disable the web-services you are not going to use . recommended approach .. . .. . The reason i recommend option 2 is because : .. . .. . It does not invalidate support from Oracle .. . If in future you want to use other web-services all you have to do is enable them .. . Upgrades to the Oracle Commerce will be easier .. . .. . Extract from Oracle Support Statement : .. . .. . Oracle will not provide support for changes customizations or extensions made to the Oracle Commerce Siebel Reference Integration Pack code or for any implementation issues that arise from such changes . Below is the config atg Initial.properties from the Oracle Commerce and Siebel Integration reference application for version 11.1.1 : .. . .. . You can simply remove the web-services that you do not need from the this file or alternatively override it with your own property file assuming there are no dependencies between the respective web-services .. . .. . If you are using a different version of the reference application your file might look different but the approach is the same . Comment : As an aside did you know that you can in your own config layer do for example initialServices- atg siebel integration webservices QuotingWebService It will remove the specified value from the list . - is essentially the opposite of + Comment : @Vihung or alternatively override it with your own property file Comment : Thanks for the response my config atg Initial.properties has only 4 services atg siebel configurator spu StructuredProductUIRepository atg siebel configurator spu StructuredProductUITools atg siebel configurator spu generation BlockGenerationService atg siebel order submit SiebelOrderSourceSink", "Question : Has anybody tried for Automating Siebel open UI application using UFT if yes please let me know how would be the scripts looks like . I have the Siebel open UI Add-in Enabled however still it is identifying as Web object . .. . Answer : Siebel Open UI is implemented as a WebExtensibility http : www.advancedqtp.com DemoMTW content tech.web ext.html project in UFT so most of the objects will still be recognised as plain web-objects . The two main differences that Siebel Open UI support adds are : .. . .. . 1 . New test objects are added the most common of which is SblOUIAdvancedEdit . 2 . Additional levels are added into the object repository in order to segment the application more correctly these objects are usually SblOUIApplet but SblOUITable will also contain the objects within it . So a typical script line could look something like : .. . .. . Regarding SblOUIAdvancedEdit this object is not identified for every edit field only those which have an opener element inside it which allows opening a dialog to set the edit field see picture below . WebEdit vs SblOUIAdvancedEdit http : i.stack.imgur.com 5LriQ.png Comment : Thanks for the resolution . I have worked for Siebel HI High Interactive application earlier and followed the same steps as provided by you . But want to ask you whether this STA enabled and SiebelAx TestAutomation .exe will work for Siebel Open UI application as well . Please reply. . If yes then I will follow the same approach . Comment : @RohitArora ooops I misread the question sorry : Please see my updated answer . Comment : Thanks a lot Sir. . This is very helpful information if you have some more information related to this please share with me . I was getting this kind of script only for SbOUITree however I did not get the text box as SblOUIAdvancedEdit as you have mentioned instead it is identifying as WebEdit object . Can it be happen that text box would be developed using Web HTML technology means no interference of Siebel Open UI mens Jss Script . Please reply if you have some inputs on the above scenario . Comment : @RohitArora see my updated answer Comment : Huge thanks for the this relevant information . Appreciate your valuable response . do we need to enable others add-in as well like : java Siebel or Oracle along with Siebel open UI Add-In while scripting for open UI and do we require STA Enabled for Open UI as well or it will work without these configuration .", "Question : I need help on Editing the Pop up Message that comes from Siebel while trying to download and attachment . Have done lots of research but cant figure it yet . It looks like a Joption Pane show message dialog in Java . The image is attached within . Am also guessing its a business service method GetFile Method and its hard coded or in a class property . the File download pop-up message needs to be edited . Kindly find the Image attached within . Any help on how the attachment drill-down link works would also be appreciated so it can help my research further . enter image description here http : i.stack.imgur.com 5RHp7.jpg .. . Answer : The message itself is stored in the core.cat file under BIN ENU in the Siebel folder . If you wish to change the message to new one for all users then you can modify this .cat file . I m not sure of dynamically changing maybe possible via javascript . Comment : Hello Ranjith I have modified this file using notepad++ but the Siebel application wont start on my local when I use the original core.cat the application then starts..I cant try this on production server . Comment : How do I edit the core.cat file properly or do I suggest we ask oracle for a new core.cat with the suggested changes because I actually saw the message in the core.cat file but after editing ..the system wont start up until I used the unchanged core.cat . Thanks ranjith you have helped a lot wont mind your email-address . Regards Comment : @lawal Oracle does not recomment modifying these files . But if you open them in a hex editor and type over the text keeping the filesize the same the new message will appear . I have tried this earlier and it worked then . There are already bug enhancement requests raised for a way to modify these messages but so far there is no Oracle supplied solution .", "Question : i would like to know . Is there any way where i can interact with Siebel application using Selenium Java script . any add-on required Comment : Can you give us a clue about Siebel otherwise you may never get an answer If it involves web-applications then surely yes . .. . Answer : I have automated Classic Siebel application using QTP10 and it worked alright . However with Selenium WebDriver I was not able to automate because classic Siebel does not have a proper HTML code for Selenium WebDriver to access and control in the browser . After reading through the documents on Siebel Open UI I believe that proper HTML code will be visible in the browser . If the HTML code is available Selenium can automate the application A quick google-search returned the following result on the topic - http : www.tricentis.com enterprise-solutions solving-the-top-three-challenges-with-siebel-open-ui http : www.boxfusionconsulting.com boxfusion-blog siebel-open-ui-automated-testing .. . .. . If the HTML code is not available you can also look at providing javascript hooks from your Siebel aplication and then use Selenium to execute the Javascript code . The same principle is used in automating flash using Selenium . http : www.adobe.com devnet flash articles flash selenium.html https : code.google.com archive p flash-selenium . This is a long shot but worth a try", "Question : This might fall under the product support category so if it s off topic let me know . There doesn t seem to be anywhere in SE or elsewhere online to ask questions for help in Siebel and Open UI .. . .. . Anyways I m trying to do something simple and include a custom css file with Siebel Open UI . This is just for testing purposes so I can start twaeking the UI and see what can be done . Most guides such as this http : www1.askmesiebel.com 2014 02 how-to-change-theme-in-openui this http : www.siebelhub.com main 2013 01 siebel-open-ui-custom-themes.html and this https : docs.oracle.com cd E14004 01 books config open ui customizing mobile23.html mention editing the theme.js file located at PUBLIC language build SCRIPTS siebel . .. . .. . Problem is this file doesn t exist in my installation . The only theme.js file at all is located under PUBLIC language webeditor themes theme.js . The contents of this are minified and when I run it through a beautifier it has nothing of the siebelApp.ThemeManager.addTheme that the tutorials talk about . This instead starts with CKEDITOR.themes.add default function which is similar but I can t use it to follow the tutorials to add a theme and reference a css file . .. . .. . I ve tried every guide on this I can find through Google but it always comes down to editing theme.js file to have Siebel include a custom css file . I ve even tried creating my own theme.js file and putting it in scripts siebel custom and added that to the manifest but no luck . Is Siebel not installed correctly I have Siebel Tools Client and a sample db . Or am I missing something else .. . Answer : File theme.js was deprected starting from Siebel IP2014 . Now to add a new custom theme you have to do following : .. . .. . 1 . Create separate CSS file with your custom style .. . 2 . Put this file to PUBLIC language files custom folder .. . 3 . Add this file to Siebel manifest : .. . 1 . Navigate to Site Map Administration - Application Manifest Files .. . 2 . Create new record with a path to your file path should start from files custom .. . .. . 3 . Navigate to Site Map Administration - Application Manifest Expressions .. . 4 . Create new record with expression LookupName OUI THEME SELECTION Preference Behavior DefaultTheme YOUR CUSTOM THEME NAME .. . 5 . Navigate to Site Map Administration - Application Manifest Administration .. . 6 . Create new record in the UI Objects applet Type Application Usage Type Theme Name YOUR CUSTOM THEME NAME .. . 7 . Create new record in the Object Expression applet with the expression you ve created previosly . Level should be equal to 1 . 8 . Create new record s in the Files applet . If you just extend vanilla Aurora theme with your custom CSS rules than you need to add both files here and sequence is important - first one should be files theme-aurora.css and the second one is you custom CSS file . If you create CSS file from scratch or just copy aurora file than you just need to add only your CSS file . 4 . Create new record in LOVs Type OUI THEME SELECTION Display Value user friendly name of you theme LIC YOUR CUSTOM THEME NAME Parent LIC NAVIGATION TAB or NAVIGATION TREE or NAVIGATION SIDE Comment : Thanks . Is it just me then or is the documentation at http : docs.oracle.com cd E14004 01 books config open ui config open uiTOC.html http : docs.oracle.com cd E14004 01 books config open ui config open uiTOC.html a bit out of date then Comment : Documentation you pointed to is actualy for IP2013 version this can be determined by code E14004 in URL . List of all bookshelfs for every Siebel version can be found here oracle.com technetwork documentation siebel-087898.html http : www.oracle.com technetwork documentation siebel-087898.html Comment : Thanks so much - you ve found so simple something a bunch of people on my team have missed with this . I won t be able to try this for about a week but I m marking this as correct for now . Comment : Of course though all the links are dead on that page for me right now . I can google for them at least Comment : That is strange . It works for me just fine . E.g . I can open index page for IP2015 docs.oracle.com cd E63029 01 portalres pages docalpha all.htm http : docs.oracle.com cd E63029 01 portalres pages docalpha all.htm But of course googling is much easier but you have to be carefull with the versioning", "Question : I am looking for a way solution to implement TDD in Siebel development . I come from web development world and i used a lot unit-testing integration platform and other XP things . Today i am working on Siebel CRM development for a new job in business in and i am shocked to see that there is no test automation solution in-place . I am currently searching for some documentations feedbacks or all other interesting things regarding TDD in Siebel development environemnt . I could develop some tools myself but i don t want to reinvent the wheel . If someone have more informations interesting articles interesting way to do this it could be very usefull for me . Thanks .. . Answer : This is really several questions in one . TDD is a way of working but I think you are already wel versed in what this entails . It can be applied to any kind of technology . From that stance I feel comfortable saying that it s possible with Siebel as well . As for the tooling to be used it very much depends on the version of Siebel you are on HI Open UI the skills of your developers the way of working at your project Agile Waterfall the test automation tooling used and the general level of automation at the project program . To me it sounds more like a way-of-working transformation then the implementation of a test approach .", "Question : I have a requirement to create a business service function to calculate expiry date 2 weeks from a date field in Siebel . I have written the code in Java which is .. . .. . So how can I re-write this code on Siebel using a business service particularly E-script . The whole idea is have an output Yes is its 2 weeks before a date field in Siebel . This will later be used in a work flow . .. . Answer : OK so have started Migrating my Java coding skills to Siebel E-Script I came up with this . However I did not use the Business Service ..I used a calculated field on my Business Component . The calculated Fields .. . .. . 1 twoWeeksToExpiry Datefield-14 .. . .. . 2 . Notification IIf Today twoWeeksToExpiry Y N .. . .. . So this solved the problem without scripting .. . .. . Will appreciate any suggestions on my scripting thou I didn t use it .", "Question : null .. . Answer : I have implemented Siebel strong encryption pack AES 256 in our enterprise . I have added a new key to keyfile.bin . Now I have a confusion wheather to reencrypt all the passwords in siebns.dat file or not . Because on oracle support link https : docs.oracle.com cd E14004 01 books Secur Secur DataEncrypt34.html wp1400932 it is mentioned to reencrypt all the masked parameters in siebns.dat . while during a POC we observed if we do not reencrypt the parameters we are still able to start siebel application and all components adapters working fine . No error logged in keydbmgr.log . Since in siebns.dat encryption uses RC4 protocol how does applying SEEP increases the RC4 encryption strength . and does it require to reencrypt all the parametrs in siebns.dat . Thanks Shahbaz", "Question : We are integrating ATG to Siebel we are getting an error while syncing the products from Siebel below are the error . I have compared the port name in other Working environment but there was no difference . Really stuck in this please help . Comment : Need a lot more information to help . Which instance of ATG is Siebel connecting to Can the siebel instance where the job is running see the ATG instance it is connecting to Can you telnet to the ip-address and port Do you need to add a rule on the firewall or use a proxy server etc etc .. . Answer : The import process has been kicked off so I assume you ve correctly built the SiebelWS submodule and it s being called by SCOA . It looks like the getJobStatus WS is missing however . Did you edit the build file to leave this out Check in the Dynamo Siebel SiebelWS j2ee-apps siebelWS.war file to see if the relevant WSDL and mappings are present . Comment : Thank you very much this really helped .", "Question : I may be working with Siebel CRM soon and I m looking for advice on using modern development practices and enterprise best practices . Specifically I d like advice on the following areas : .. . .. . How should we set up version-control specifically with Subversion What kind of structure should our repository have How should we handle branches and tags How can we do code reviews How can we peer review configuration changes made through Siebel Tools that don t necessarily have any code We want to review these changes for quality assurance and knowledge transfer as well as compliance with change-management policies . What sort of change-management works well with Siebel How do we verify that only things listed in our change log are actually changed when we do a new deploy How can we automate testing of our application Is unit-testing even possible with Siebel I saw another question suggesting QTP for web testing but are there other options that work Are there other things we can do to implement Continuous Integration practices with our Siebel development efforts What recommendations do you have for naming-conventions and other things that would traditionally fall under coding-style guidelines How should we separate development roles from Siebel Administrator roles What should our build test deploy cycle look like It s not likely that I ll be able to obtain any new expensive tools for this but if there s a paid tool that provides really great ROI feel free to mention it . If you have other recommendations along these lines but not specifically addressed by one of my questions feel free to add that as well . .. . Answer : SVN CVS are not suitable for Siebel a few reasons being .. . a Siebel objects are db objects and SVN CVS etc store sif equivalent of the changes . These changes are impossible to query except for some basic queries . b The integration between Siebel tools and SVN is a loosely coupled integration . The ideal integration should be with the Siebel repository and invidual tools . Take a look at our tool Object Hive it addresses many of the short comings of a files based version-control . http : www.enterprisebeacon.com siebel version-control tool.html .. . Object Hive has been from the ground up specifically for Siebel version-control some of its features are : .. . 1 Object Based repository similar to Siebel repository that stores all version history . This makes is very easy to query changes and conduct code reviews based on the changes .. . 2 A browser based GUI that is similar to Siebel tools to query for version history no combing sif files for changes . 3 Seamless integration - directly integrates with the Siebel repository . No messy installation for invidual developer . 4 Powerful reporting realtime and batch to easily identify changes over any time period . 5 Oracle Exa-ready certified .", "Question : I want to automate Siebel application which is having Siebel HI framework .I tried using qtp and selenium but the problem is objects tables are not recognizable . Can anyone help me .. . Answer : UFT supports Siebel HI via it s STA https : docs.oracle.com cd E14004 01 books TestGuide TestGuide AutoFuncTest5.html framework so the requirements for testing Siebel HI with UFT are : .. . .. . Install and activate UFT s Siebel add-in on the testing machine .. . Install STA on the Siebel server .. . Access the Siebel application via the automation URL .. . http : hostname callcenter start.swe SWECmd AutoOn Comment : Everything is done.but STA is not running in task manager Comment : The STA process should be running in task manager if you use the correct URL regardless of whether UFT is involved . It s also possible to configure a password so that adding SWECmd AutoOn may not be enough an additional AutoToken parameter . Comment : First of all STA should run in Task manager.without running uft will not recognize the objects eventhough SWECmd AutoOn is appended to url . Comment : ...After appending Swe AutoOn to url also STA is not running in task manager . Comment : @sajju Swe or SWECmd I would suggest talking to your Siebel administrator to see if activated and if there s a need for AutoToken .", "Question : We are trying to retreive data in a custom presentation model file in Siebel Open UI . We are invoking a method of business service with a input property set . We are able to invoke the BS method and everything is working as expected on Siebel side . But when we return from Siebel BS to Calling environment In calling environment The assigned variable is not getting populated . Code in custom js file .. . .. . Please tell us if we need to change something Or any other tested way to get data from Siebel BC . As Part of our customizaation We need data from a Siebel BC to be available in this javascript file . .. . Answer : The below mentioned code seemed to be working for me . Also please ensure the out prop name is exactly the same as one defined in the BS .", "Question : Is there any way to reuse our UFT Siebel High Interactivity automation scripts for Siebel Open UI application . We have worked for Siebel HI application for the last 3 release R1 R2 R3 and automated the Siebel HI application using UFT . Now we have migrated to Siebel Open UI app . Just wanted to know can we reuse the Siebel HI scripts for Siebel open UI app for UFT automation . if yes then what is the procedure to do that Please let me know if anybody knows. . .. . Answer : Unfortunately there is no upgrade path between Siebel HI Sieb objects and Siebel Open UI SblOUI objects . Comment : I was waiting for your reply . I have seen on some of the forum and a guy from ADP asked me to how to re-use in one the interview . when I asked the same from him he replied we can re-use those however I did not get chance to ask him how can we proceed .", "Question : i would like to know . Is there any way where i can interact with Siebel application using Selenium Java script . any add-on required Comment : Can you give us a clue about Siebel otherwise you may never get an answer If it involves web-applications then surely yes . .. . Answer : If you ensure that the Siebel Open UI Test Automation capability is enabled on the server three additional Siebel OUI specific properties are made available for UI objects in the HTML . Those properties are : .. . .. . rn - Repository Name - the unique name assigned to the UI object by your Siebel developers . un - UI Name - name or caption of object as it appears in the UI . ot - Object Type - type of object that the HTML element represents . By using an object s rn property to uniquely identify the various UI elements that your tests need to interact with and verify you should be able to build automated-tests using Selenium . I have successfully deployed an automated build acceptance and regression test suite for an enterprise Siebel Open UI based CRM using Ruby Capybara and Selenium-Webdriver . Those automated-tests are integrated with a Jenkins CI server and are executed on a nightly basis . The automated-tests can be executed against Chrome Firefox Safari or IE web browser running on OS X or Windows platforms and can also be executed against emulated iOS or Android mobile browsers .", "Question : I am using Siebel HTIM Application v8.0 . I need a floating window this should not be a pop-up window . With a popup window the data main window cannot be edited . The user should be able to edit data in main window as well as floating window without closing the floating window . And the data in main window and floating window are not from same BC . They are just linked . I tried ShowPopup method but that is giving me a popup . If someone knows how to design floating windows in Siebel application . Please help . .. . Answer : As far as I know that is not even possible in Siebel . At least not easily . The only thing you can add to a Siebel view are applets . Inside an applet you can embed advanced controls like an ActiveX object a Java applet an external web page.. . but they wouldn t have the appearance nor the behaviour of a floating window . Via server scripting you can open popups raise error texts and that s all . In browser scripts you have a few more options alert confirm etc but nothing useful for your requeriment . Maybe you could tweak the webtemplate files and insert your floating window HTML code there.. . and use browser scripts to show-hide control the window . But then you could have only HTML you wouldn t be able to add fields to it . Also it would be a total pain to make it work and a maintenance nightmare since the very first moment . If you were using Siebel 8.1+ you could try the new OpenUI instead of the standard ActiveX interface . It s based on CSS and jQuery so it should be easier to tweak the appearance . But it s only available for Siebel 8.1+ . Do you really need a floating window Why don t just use a parent-child view with two applets", "Question : Siebel popups in High Interactivity can t be closed by X button in the upper right corner of the popup window after a popup is opened for the second time . Is there any way to enable it To reproduce that : .. . .. . 1 . open Help- About View.. . can be closed by X button .. . 2 . open Help- About View.. . now it can NOT be closed by X button .. . .. . siebel version : 8.1.1.14 .. . Internet Explorer 11 compatibility-mode enabled .. . .. . thanks .. . Answer : It is not a usual behaviour . It may occurs if you are using IE version other than IE8 . Which IE version you are using If you are using IE version IE8 then enable compatibility-mode and try again . Comment : Thanks . I added more detailed description . We use IE11 compatibility-mode enabled . The problem occurs after a popup is opened for the second time . Comment : Compatibility mode helps in IE10 mostly . For IE11 you will face many other issues like Field name not found etc . Specially if you are Siebel developer downgrade to IE8 .", "Question : null .. . Answer : While trying to record Siebel application which runs in siebel v9 using Vugen Siebel Web protocol with recording setting set as to capture Socket level data there s no event is getting recorded . Requesting guidance on this case . Reference data which might be helpfull as reference- I ve taken care of all necessary IE settings Siebel high-interactive frameworks are also auto-downloaded . The flow works perfectly manually but crashes in between while I tried to record using Vugen WinInet method ." ] }
[ "yes-answer-long" ]
crm
UNK_RELATION
slcomposeviewcontroller@user@138
slcomposeviewcontroller -- the slcomposeviewcontroller is a class in the tag : social-framework new in ios 6 that presents a view to the @placeholder to compose a post for supported social-networking services .
{ "confidence": [ 59.181785583496094, 54.392112731933594, 51.70099639892578, 48.21660232543945, 47.84640121459961, 47.34038543701172, 46.942955017089844, 46.572174072265625, 45.325294494628906, 44.10237121582031, 44.064247131347656, 44.064247131347656, 43.05360412597656, 42.96162414550781, 42.4554443359375, 42.24845886230469, 41.471900939941406, 40.64076232910156, 40.64076232910156, 40.597923278808594, 40.56396484375, 40.28986740112305, 40.28892135620117, 40.094444274902344, 40.089900970458984, 39.824317932128906, 39.809844970703125, 39.809844970703125, 39.56067657470703, 39.36592102050781, 39.02670669555664, 38.70722198486328, 38.27411651611328, 38.16865539550781, 38.16865539550781, 38.034889221191406, 37.76094055175781, 37.59016418457031, 37.47489547729492, 37.385704040527344, 36.97884750366211, 36.50659942626953, 36.50659942626953, 36.50659942626953, 36.50659942626953, 36.366424560546875, 36.092803955078125, 35.58926010131836, 35.40867614746094, 35.40397644042969, 35.40397644042969, 35.40397644042969, 35.40397644042969, 35.257572174072266, 34.99018478393555, 34.691917419433594, 34.691917419433594, 34.59362030029297, 34.54759979248047, 33.7012939453125, 32.8498649597168, 32.53225326538086, 32.47227096557617, 32.2299919128418, 32.05714416503906, 32.05714416503906, 32.05714416503906, 32.05714416503906, 32.05714416503906, 31.74724578857422, 30.99604606628418, 30.99604606628418, 30.954524993896484, 30.954524993896484, 30.954524993896484, 30.954524993896484, 30.954524993896484, 30.60468101501465, 30.449281692504883, 29.856590270996094, 29.84949493408203, 29.633007049560547, 29.455345153808594, 29.333986282348633, 29.333986282348633, 29.333986282348633, 29.217653274536133, 28.799625396728516, 28.753971099853516, 28.231365203857422, 28.115032196044922, 27.7167911529541, 27.432451248168945, 27.42830467224121, 27.186107635498047, 26.909847259521484, 26.909847259521484, 26.909847259521484, 26.72467041015625, 26.6241455078125 ], "content": [ "So I programmed in the SLComposeViewController for Social Framework to add a FB share-button .", "i want to share content and images on social media using SLComposeViewController in swift .", "If SLComposeViewController cannot be used to do that then what is the recommended method for doing so again within the social-framework", "What are the steps I need to follow to use iOS 6 s new SLComposeViewController to post to Facebook Twitter or Sina Weibo", "Is SLComposeViewController only supported in portrait mode", "I m trying to use SLComposeViewController to share a post to Facebook in an iOS app .", "possible duplicate of SLComposeViewController setInitialText not showing up in View http : stackoverflow.com questions 29970741 slcomposeviewcontroller-setinitialtext-not-showing-up-in-view", "LaunchServices : invalidationHandler called .. . .. . Are there new precautions to take with SLComposeViewController and UIActivityViewController in iOS 8", "I have an app using SLComposeViewController to post tweets .", "I tried to using SLComposeViewController but it not working on iOS 8 .", "I have used SLComposeViewController for that .", "That s how SLComposeViewController works .", "I am using SLComposeViewController to post tweets from within my app .", "Safe Use of SLComposeViewController", "I m trying to use the SLComposeViewController to share a link in my iOS App .", "Here is my completion handler for SLComposeViewController .", "i am using SLComposeViewController for sharing on facebook and twitter .", "I m using the Social framework with XCode 7 beta iOS 9 beta .", "My hope is to do so using the iOS Social Framework exclusively .", "According to the documentation https : developer.apple.com library ios documentation NetworkingInternet Reference SLComposeViewController Class index.html apple ref occ clm SLComposeViewController isAvailableForServiceType : : .. . .. . For the account to be available the user must be logged into the social service in the device settings .", "Even though the user had gone into the Twitter App and reset the password it was NOT until they did a password set under Settings- Twitter that we were able to tweet using the SLComposeViewController social-framework .", "However SLComposeViewController initiates a XPC Remote View : SLRemoteComposeViewController together with UIRemoteView .", "I m using a SLComposeViewController to post to a user s Facebook wall or to a user s Twitter feed .", "The problem I m encountering is when using the new SLComposeViewController the post will appear to come from the application iOS id 213546525407071 rather than the id for my application .", "Is it safe to continue using SLComposeViewController", "Here is the code i use for the SLComposeViewController :", "I am using SLComposeViewController for sharing in Facebook .", "Did you check condition for twitter if SLComposeViewController isAvailableForServiceType : SLServiceTypeTwitter", "I am fine with twitter but not with facebook using SLComposeViewController class .", "I present an instance of SLComposeViewController but to my surprise this results in autorotation of both my view controller to portrait mode along with my instance of SLComposeViewController .", "Reference : Tutorial for SLComposeViewController sharing http : stackoverflow.com questions 12503287 tutorial-for-slcomposeviewcontroller-sharing .. . .. . You first set a completion handler for the SlComposeViewController : .. . .. . Then present it with that completion handler already set :", "modalPresentationStyle of SLComposeViewController is of undocumented style 17 0x11 .", "I m using SLComposeViewController in my app .", "I want to take a screenshot of a little part of the screen and then attach it to a SLComposeViewController .", "I d like to prevent SLComposeViewController from automatically showing keyboard when opened .", "For details on this framework please see Apple s Social Framework Class Reference https : developer.apple.com library ios documentation Social Reference Social Framework index.html apple ref doc uid TP40012233 .. . .. . Additional tutorials : .. . .. . 1 .", "Seems like Apple s bug in the Social framework .", "I am using Social framework for sharing from my iOS application and testing my iOS application on iOS9 .", "When creating a SLComposeViewController using SLServiceTypeFacebook and presenting it right now a new bar appears at the bottom with two options Write Post Search .", "I am presenting the SLComposeViewController like so.. .", "I really want to use the iOS social-framework and SLComposeViewController to tweet from my app but I need the twitter handle of the user tweeting and the tweet text on the completion without me fetching latest tweets from all of users twitter accounts and detecting which one he used .", "I used the following code to display a SLComposeViewController from a tableView .", "The SLComposeViewController has no idea if the value for initial text is a hardcoded string or if it was written by the user .", "Yes if this policy is being newly enforced in SLComposeViewController it would be on Apple s side .", "SLComposeViewController takes 3-4 seconds to appear after presenting it .", "Right after showing the alert I then use the following to post a preset message to the UIPasteboard : .. . .. . So then the SLComposeViewController is presented and an alert view right over it .", "in the above link that completely avoids the use of SLComposeViewController u can directly post to twitter wall", "First in your view controller s header file .h import the Social Framework and the Accounts Framework .", "You won t actually be creating a text view but you ll want to have a pointer to assign directly to the text view inside the SLComposeViewController .", "I was wondering if it s possible to pass text from an UITextField to the SLComposeViewController", "You can use the setInitialText method to add a block of text to the SLComposeViewController .", "SLComposeViewController shows image text and url when i send .", "Finally i get some trick to make the SLComposeViewController appear faster .", "If you wish to use Twitter or SinaWeibo just change out the SLServiceType to one of the following : .. . .. . SLServiceTypeFacebook .. . SLServiceTypeSinaWeibo .. . SLServiceTypeTwitter .. . .. . iOS 6 has made it very easy to post directly to Facebook Twitter or Sina Weibo using the SLComposeViewController .", "sharingStatus uses SLComposeViewController s isAvailableForServiceType BOOL to return whether or not you can post to the service specified in its arguement .", "Bug is in Facebook s code I would assume not Social framework .", "What you need to do is : .. . .. . 1 Just import the Social framework .", "I m using some fairly standard code to post to Facebook using the Social Framework .", "So if you call SLComposeViewController the code is going to trigger this alertview if there is no twitter account in iOS :", "Here s what a curl output of a social url to my website looks like : .. . .. . Here s the code I m using from my app to display SLComposeViewController : .. . .. . What am-I missing to make the twitter dialog preview the post properly", "My immediate questions are twofold : .. . .. . Can you use the SLComposeViewController to post to a friend s wall or is that limited to only posting to the app user s wall", "I have no issues using the latest one we can use SLComposeViewController", "Don t do the SLComposeViewController isAvailableForServiceType : .. . check and if that service is not set up in the Settings app the framework will popup an alert stating that issue along with a button to go into settings .", "If you want to present the view controller from another class in MainRoot then .. . .. . First you have to present the MainRoot view controller from the self and on top of that you can present your SLComposeViewController .", "Seeing this error message in the logs though not consistently around the time that I use SLComposeViewController to open a Twitter or Facebook share sheet .", "I was getting this error too and realized it was coming when calling SLComposeViewController isAvailableForServiceType : SLServiceTypeFacebook and no facebook accounts were in settings .", "have you checked this stackoverflow.com questions 13519904 http : stackoverflow.com questions 13519904 how-to-make-the-presentviewcontroller-with-slcomposeviewcontroller-faster", "https : developers.facebook.com bugs 962985360399542 search id .. . .. . I suggest you to use UIActivityViewController instead of SLComposeViewController .", "is it possible to change the audience by default it s public in a SLComposeViewController while posting on Facebook or Twitter", "The problem is that if the user taps Post then the completion handler of the SLComposeViewController is never fired and therefore is still capturing all the user s gestures so the UI seems locked up .", "I have already tried this for attaching it to an email : .. . .. . But I want to do the same for a SLComposeViewController and I only want to take part of the screen.. . not the whole screen .", "One thing strange I see is that when this SLComposeViewController is presented for the second time per session its keyboard is no longer automatically get presented .", "It must be done before the SLComposeViewController is displayed but it should allow you to do something like :", "Instead to perform the default bare sharing I would prepare a SLComposeViewController as follows for the SFSafariViewController to use .", "Check stackoverflow.com questions 20881429 http : stackoverflow.com questions 20881429 unable-to-share-pdf-on-facebook-using-slcomposeviewcontroller", "Is there any way I can get around while still taking advantage of using SLComposeViewController", "https : developer.apple.com videos wwdc 2012 id 306 .. . .. . For this example we will be using the SLComposeViewController s SLServiceTypeFacebook .", "I m currently working on a prototype for adding Facebook social features for future iOS games .", "I am using SLComposeViewController for facebook sharing everything is working fine except if i logged out from facebook app from device and then call SLComposeViewController isAvailableForServiceType : Facebook it returns true and facebook post popup gets displayed and on top of that facebook alert Not Logged In is also shown .", "I found in FBSDKShareKit- FBSDKShareDialog.m line 546 the SLComposeViewController cannot create in iOS 9.The code is like : .. . .. . Not same code but same result.The composeViewController is nil I have no issue why this happen .", "essentially I am trying to let the user input his hers input into the text field and pass the data text to the social compose view controller so the user may share this with Facebook or Twitter I did manage to pass an image view to the post but I want the user to be able to input text with the post from the text field because I plan on passing the data from my app and have it post to multiple social media or my own website for the app for instance .", "I m using SLComposeViewController to present a very simple share to facebook prompt on the system level .", "I decided to stay away from those third party libraries and already implemented with Social framework .", "see this link may be helps with you stackoverflow.com questions 13519904 http : stackoverflow.com questions 13519904 how-to-make-the-presentviewcontroller-with-slcomposeviewcontroller-faster", "So I have defined many methods there with a parameter that specify refrence UIViewcontroller on which i want to present something like SLComposeViewController .", "The code used to tweet : .. . .. . Also I have the following messages in device console : .. . .. . .. . .. . Is it possible to tweet via SLComposeViewController with installed Twitter app", "I m trying to implement a twitter post using IOS7 SLComposeViewController and I get the following error - .. . .. . The Tweet blah blah cannot be sent because the connection to twitter failed .", "My website serves blank pages to social urls i.e .", "Now I m using this workaround : To check Twitter availability I use .. . .. . I further add an additional check before presenting the SLComposeViewController : .. . .. . This should be future proof for a bug fix in iOS 8.4 .", "The problem was with a particular version of the Facebook app which causes Apple s SLComposeViewController to not return o the completion handler and get stuck in that particular state .", "Here are my questions : .. . .. . Should I give up the SLComposeViewController and make the post call manually or it s better just use third party libraries for this particular case", "Import the social-framework into your View Controller import Social Social.h .. . .. . Then in your View Controller s viewDidLoad method add this code : .. . .. . Next add this method to your View Controller : .. . .. . At the appropriate location in your SKScene won game lost game etc.. . add this code : .. . .. . The above code sends a NSNotification with text which your View Controller will pick up and execute the specified method .", "Edit : Looks like SLComposeViewController conforms to UIAppearanceContainer http : developer.apple.com library ios recipes UIAppearanceContainer Protocol Reference Reference.html apple ref occ intf UIAppearanceContainer however the UI APPEARANCE SELECTOR is not documented .", "I am getting error Undefined symbols for architecture i386 : OBJC CLASS TWRequest referenced from : i have already included import Social Social.h import Accounts Accounts.h import Twitter Twitter.h import Social SLRequest.h and required framework", "If pressed the alert view disappears but the Twitter compose view stays there with the Post button grayed out .", "Due to FB policy http : stackoverflow.com questions 29879354 facebook-is-not-shown-in-uiactivityviewcontroller-but-twitter-does is not possible to autofill the text of a share sheet using SLComposeViewController or UIActivityViewController .", "I want the device to handle login via the settings if they are not logged in so I leave off the check +isAvailableForServiceType and just go ahead and present the SLComposeViewController .", "Safari is previewing the screenshot to the website because it has it loaded and ready in on the screen when you addURL : on the SLComposeViewController it doesn t resolve that URL and grab a preview .", "I have already written code for posting via SLComposeViewController tweetSheet instance but in this case i cannot directly press send button presented by tweetSheet without presenting it by .. . .. . Is it possible to bypass this presentation and set text message and post to twitter via my custom ui which has post button", "i have also done it in objC but i am new in swift development.please suggest me if there is any common class for this or Any library to share content on social media in swift ." ] }
{ "confidence": [ 77.60920715332031, 75.92608642578125, 72.88314056396484, 71.74422454833984, 67.66793060302734, 66.41866302490234, 64.93092346191406, 64.34107971191406, 64.28669738769531, 63.55399703979492, 62.67892074584961, 62.43745803833008, 61.3816032409668, 58.7376594543457, 57.358001708984375, 57.21792984008789, 56.54041290283203, 56.54041290283203, 56.48421096801758, 55.62824630737305 ], "content": [ "Question : I was wondering if it s possible to pass text from an UITextField to the SLComposeViewController If so that would be nice essentially I am trying to let the user input his hers input into the text field and pass the data text to the social compose view controller so the user may share this with Facebook or Twitter I did manage to pass an image view to the post but I want the user to be able to input text with the post from the text field because I plan on passing the data from my app and have it post to multiple social media or my own website for the app for instance . Any help would be appreciated if you want my code to be posted please don t hesitate to ask thanks in advance .. . Answer : You can use the setInitialText method to add a block of text to the SLComposeViewController . It must be done before the SLComposeViewController is displayed but it should allow you to do something like : Comment : thanks it worked", "Question : What are the steps I need to follow to use iOS 6 s new SLComposeViewController to post to Facebook Twitter or Sina Weibo .. . Answer : For details on this framework please see Apple s Social Framework Class Reference https : developer.apple.com library ios documentation Social Reference Social Framework index.html apple ref doc uid TP40012233 .. . .. . Additional tutorials : .. . .. . 1 . http : soulwithmobiletechnology.blogspot.com 2012 07 tutorial-how-to-use-inbuilt.html .. . 2 . http : www.mobile.safilsunny.com iphone integrating-facebook-ios .. . 3 . http : rudeboy-quickies.blogspot.com 2012 06 steps-to-integrate-facebook-in-ios6.html .. . 4 . https : developer.apple.com videos wwdc 2012 id 306 .. . .. . For this example we will be using the SLComposeViewController s SLServiceTypeFacebook . If you wish to use Twitter or SinaWeibo just change out the SLServiceType to one of the following : .. . .. . SLServiceTypeFacebook .. . SLServiceTypeSinaWeibo .. . SLServiceTypeTwitter .. . .. . iOS 6 has made it very easy to post directly to Facebook Twitter or Sina Weibo using the SLComposeViewController . This works very similarly to iOS 5 s TWTweetComposeViewController . First in your view controller s header file .h import the Social Framework and the Accounts Framework . import Social Social.h .. . .. . import Accounts Accounts.h .. . .. . Here we will declare a simple UIButton and an IBAction that we will later link-to that button and a void sharingStatus which will be used to check that the selected sharing service is available . Then in your implementation file .m we ll start by implementing the sharingStatus void that we declared in the header file . sharingStatus uses SLComposeViewController s isAvailableForServiceType BOOL to return whether or not you can post to the service specified in its arguement . In this case we will use the service type SLServiceTypeFacebook . If the service is available the post button will be enabled with an alpha value of 1.0f and if the service isn t available the button will be disabled the its alpha value set to 0.5f . Here we will set up the IBAction that will call up the composer . For good practice we will check isAvailableForServiceType again to avoid calling up the composer for a service type that isn t available . Incase something went wrong during the last check or if availblility somehow changed in the fraction of a second in between tapping the post button and the composers alloc init . The code below has been set up to display a Facebook composers sheet with text an image and a link . This action also utilizes a completion handler for the composer s canceled and done results . In viewWillAppear we will register an observer to ACAccountStoreDidChangeNotification so the application can be notified when account information changes . This observer will then be removed in viewDidDisappear . And finally open up interface-builder and add a UIButton which will be the post button . Then in the connections inspector link the IBOutlet and IBAction we created earlier to the button and that s it You re done enter image description here http : i.stack.imgur.com 2tR7g.png Comment : Hi It was a nice answer though i have small doubt can we also present Login interface in case user s twitter Facebook account is not set up Comment : @AbhinandanSahgal no not with this class . However when working properly the composer will detect if the user isn t logged in and present an alert to take them to the settings for the appropriate service to log in to their account . Comment : @AbhinandanSahgal Sorry but no I can t . This is build in behavior that should be working automatically if you aren t already logged in . Additionally Apple used to offer API for sending the user to the preferences app but it was removed in iOS 5.1 : Comment : There s no need to link-to Accounts.framework when using Social.framework . Also it can be a disadvantage to check if a service is available since the OS will do this automatically and fail with an alert that has a Settings button . Comment : Don t do the SLComposeViewController isAvailableForServiceType : .. . check and if that service is not set up in the Settings app the framework will popup an alert stating that issue along with a button to go into settings .", "Question : i want to share content and images on social media using SLComposeViewController in swift . i have also done it in objC but i am new in swift development.please suggest me if there is any common class for this or Any library to share content on social media in swift . .. . Answer : There is no need of library . What you need to do is : .. . .. . 1 Just import the Social framework . 2 Code to post on Facebook .. . .. . 3 Code to post on Twitter", "Question : null .. . Answer : My underlying goal is to allow the user of my app to invite a facebook friend to also use the app by either posting a story to that friend s timeline or by sending them a private message . My hope is to do so using the iOS Social Framework exclusively . My immediate questions are twofold : .. . .. . Can you use the SLComposeViewController to post to a friend s wall or is that limited to only posting to the app user s wall If SLComposeViewController cannot be used to do that then what is the recommended method for doing so again within the social-framework Comment : Please don t include Thanks in your questions : meta.stackexchange.com questions 2950 http : meta.stackexchange.com questions 2950 should-hi-thanks-taglines-and-salutations-be-removed-from-posts Comment : ok but please if you can help me by any tutorial", "Question : null .. . Answer : I am using Social framework for sharing from my iOS application and testing my iOS application on iOS9 . When I click on share-button it opens native facebook application ViewController as shown in following image . enter image description here http : i.stack.imgur.com SyL23.png .. . .. . The problem is that irrespective of user clicks post or hit back button it still return SLComposeViewControllerResultDone result . Here is my completion handler for SLComposeViewController . Here is code :", "Question : null .. . Answer : I m using the Social framework with XCode 7 beta iOS 9 beta . The Facebook app is installed on the physical device but in settings no account is configured . According to the documentation https : developer.apple.com library ios documentation NetworkingInternet Reference SLComposeViewController Class index.html apple ref occ clm SLComposeViewController isAvailableForServiceType : : .. . .. . For the account to be available the user must be logged into the social service in the device settings . Nonetheless SLComposeViewController.isAvailableForServiceType SLServiceTypeFacebook returns true . Any idea why this should be As a side note : .. . .. . When not logged in this returns nil but when logged in this returns an empty array type AnyObject . Comment : Observing same behaviour on release version of iOS 9 Comment : I am seeing the same issue .", "Question : null .. . Answer : My website serves blank pages to social urls i.e . urls that start with social as a path and originally generated by my app to share on FB and Twitter . Those served pages only include open graph and twitter meta-tags in their head and a few lines of javascript to redirect the user to either a deep link-to the app iTunes or the appropriate section of the website when they visit the page . I m using this technique to avoid distracting my web server by serving unnecessary content sometimes significantly large amounts of content to social media Twitter Facebook whereas all they really need to represent data is just meta-tags . My shared social links are successfully tested on both Facebook and Twitter online validators . They re also presented as expected on both FB and Twitter timelines when shared from the app but the only problem I m having is SLComposeViewController twitter dialog which displays a blank image preview as a preview of my blank page I guess when the user is prompted to enter his tweet . Also neither the title nor the description from the url page meta-tags are pre-rendered in the tweet dialog which might give the impression of something wrong to the user and potentially canceling his tweet . If the user decides to post the miss-previewed tweet though everything goes well and the card displays on his timeline properly . I m experiencing the preview problem only with the Twitter dialog with Facebook the post preview is presented as expected to the user before he validates his post . Here s what a curl output of a social url to my website looks like : .. . .. . Here s the code I m using from my app to display SLComposeViewController : .. . .. . What am-I missing to make the twitter dialog preview the post properly Comment : check it from stackoverflow.com a 22963277 3388012 http : stackoverflow.com a 22963277 3388012 Comment : @Rushi Not really what I m looking for I do not want to bundle the images in my app I want them to be auto scraped from the url . Also my code above works perfectly with Facebook it only has a problem with the Twitter compose dialog . Comment : Did you check condition for twitter if SLComposeViewController isAvailableForServiceType : SLServiceTypeTwitter Comment : @Rushi Absolutely the parameter serviceType in my code above is equal to SLServiceTypeTwitter when I share on Twitter . I reiterate the dialog shares successfully on Twitter the card displays properly in the timeline when the user clicks the post button . The only problem is the preview before the post neither the title nor the description nor the image are pre-rendered in the tweet dialog which might give the impression of a bug to the user and potentially cause them to cancel the tweet .", "Question : Our app has sharing options with Twitter that was implemented with third party libraries and I m trying to re-implement them . Before we used MGTwitterEngine SA OAuthTwitterController and REComposeViewController to link and post message to Twitter . Everything works fine but I don t like the fact that we started getting problems as we started supporting new iOS version and dropping old ones . I decided to stay away from those third party libraries and already implemented with Social framework . Considering the post it looks pretty good and the implementation itself become quite simple but there s a PROBLEM . SLComposeViewController s completion block doesn t tell you that the post was successful or not . I need to know if the post was successful or not because I m making extra api call to our server to keep tracks of user s posts if the post is successful . Here are my questions : .. . .. . Should I give up the SLComposeViewController and make the post call manually or it s better just use third party libraries for this particular case Is there any way I can get around while still taking advantage of using SLComposeViewController Thanks for any inputs idea from you guys in advance . .. . Answer : This is old but heres an answer for anyone who stumbles upon it like I did . Reference : Tutorial for SLComposeViewController sharing http : stackoverflow.com questions 12503287 tutorial-for-slcomposeviewcontroller-sharing .. . .. . You first set a completion handler for the SlComposeViewController : .. . .. . Then present it with that completion handler already set :", "Question : I m currently working on a prototype for adding Facebook social features for future iOS games . One of the features I ve been working on involves using the new native Facebook Composer to post to a link-to the game and then tracking the post and giving the player coins for every person who likes the post . After the post I get their feed and look for a post with a matching application ID . I ve already got that part working correctly if I don t use the new native Facebook Composer either old style dialogs or just a direct post with no dialog . The problem I m encountering is when using the new SLComposeViewController the post will appear to come from the application iOS id 213546525407071 rather than the id for my application . Is there a way to change the attributed application so that it uses my application ID instead of iOS Comment : See this answer http : stackoverflow.com a 12605241 730701 . .. . Answer : That s how SLComposeViewController works . If you want your own app designated you have to design your own UI and use FBRequestConnection from the Facebook SDK as discussed here https : developers.facebook.com docs howtos publish-to-feed-ios-sdk . Comment : Disappointing but it appears to be the way it is.. . Comment : Sigh . So true.. . Comment : another sigh.. .", "Question : null .. . Answer : I really want to use the iOS social-framework and SLComposeViewController to tweet from my app but I need the twitter handle of the user tweeting and the tweet text on the completion without me fetching latest tweets from all of users twitter accounts and detecting which one he used . Can I achieve this If not is there a good alternative for a textView with twitter handle autocomplete character counter and twitter account selection", "Question : I m trying to use SLComposeViewController to share a post to Facebook in an iOS app . However if I hit cancel on the post a result-of Done is returned to the completion handler instead of Cancelled . When I hit post it dismisses and just freezes the app without returning any result . This code works fine if the Facebook app is not installed on the device . Here is the code that I m using for the Facebook portion : Comment : same problem here since 8.3 - When aborting cancelling SLServiceTypeFacebook then SLComposeViewControllerResultDone is returned Comment : It s discussed in this bug report https : developers.facebook.com bugs 962985360399542 . Comment : For the time being I m checking to see if the Facebook app is installed on device and if so I alert the user in the success dialog that canceled posts will incorrectly report back as posted even though they didn t . Bug is in Facebook s code I would assume not Social framework . Based on the above Fb bug report it doesn t look like they are in any rush to fix it . Surprised Apple let them swap in their own implementation for such a core iOS action if the Fb app is installed . .. . Answer : I have the same issue on iOS 8.3 and only with Facebook service type . Seems like Apple s bug in the Social framework . Comment : Same issue here . If anyone has a workaround please post it . Comment : Same problem here and only with Facebook .", "Question : My app needs to support iOS 5 . I have my custom UI where user can enter tweet message and when he presses post button It should post message twitter . I have already written code for posting via SLComposeViewController tweetSheet instance but in this case i cannot directly press send button presented by tweetSheet without presenting it by .. . .. . Is it possible to bypass this presentation and set text message and post to twitter via my custom ui which has post button How to give select option if user have multiple Twitter accounts Comment : see this link this worked for me stackoverflow.com questions 9423447 http : stackoverflow.com questions 9423447 ios-5-twitter-framework-tweeting-without-user-input-and-confirmation-modal-vie Comment : in the above link that completely avoids the use of SLComposeViewController u can directly post to twitter wall Comment : I am getting error Undefined symbols for architecture i386 : OBJC CLASS TWRequest referenced from : i have already included import Social Social.h import Accounts Accounts.h import Twitter Twitter.h import Social SLRequest.h and required framework Comment : in which line u are getting this error Comment : and check did u also set user twitter account in device settings .. . Answer : Comment : how can i give user option to select twitter account to which tweet message must be posted Comment : Above code works perfectly fine only thing how can we provide list accounts user has pre-configured on its device and by selecting anyone account to which tweet message will be posted Comment : that u can check in NSArray arrayOfAccounts account accountsWithAccountType : accountType this method since it gives all the accounts that user has configured in his device and based on this u can select the account to post i will check and update ok Comment : Hmm i checked and i updated my answer check let me know if there are any difficulties : Comment : hey its not working for me I am getting following response Twitter HTTP response : 403", "Question : What are the steps I need to follow to use iOS 6 s new SLComposeViewController to post to Facebook Twitter or Sina Weibo .. . Answer : Safe Use of SLComposeViewController", "Question : I m developing an application that allow the user to share through Facebook Twitter and Email . For this social networks I have created a separated class that contains this code : .. . .. . Whenever I call this function I m getting this Error : .. . .. . Anyone can help me please how I can present this view from another class Comment : Maybe you should try this : UIApplication sharedApplication .keyWindow.rootViewController presentViewController : facebook animated : YES completion : nil .. . Answer : If you want to present the view controller from another class in MainRoot then .. . .. . First you have to present the MainRoot view controller from the self and on top of that you can present your SLComposeViewController .", "Question : Seeing this error message in the logs though not consistently around the time that I use SLComposeViewController to open a Twitter or Facebook share sheet . I am not using any new iOS 8 API just testing existing code on iOS 8 . I see others have had this problem and even seen crashes when using other modal view controllers from the Cocoa Touch SDK . LaunchServices : invalidationHandler called .. . .. . Are there new precautions to take with SLComposeViewController and UIActivityViewController in iOS 8 Something else to consider Comment : Seeing same log just opening and closing a share sheet in iOS 8.0 GM . No answer yet . Comment : Same thing here . UIActivityViewController is very buggy . Comment : This guy figured it out for Objective-C...but i m not sure how to follow his answer in Swift . stackoverflow.com questions 25192313 http : stackoverflow.com questions 25192313 sharing-via-uiactivityviewcontroller-to-twitter-facebook-etc-causing-crash Comment : Check out my answer on the other thread : stackoverflow.com a 25895667 2546659 http : stackoverflow.com a 25895667 2546659 Comment : I was getting this error too and realized it was coming when calling SLComposeViewController isAvailableForServiceType : SLServiceTypeFacebook and no facebook accounts were in settings . I just stopped checking for this since it automatically handles not having accounts and presents a message . .. . Answer : You may also need to define the sourceRect . I used the following code to display a SLComposeViewController from a tableView .", "Question : I m trying to implement a twitter post using IOS7 SLComposeViewController and I get the following error - .. . .. . The Tweet blah blah cannot be sent because the connection to twitter failed . I am including image and URL in my tweet - if that makes any difference. . .. . .. . code below - Comment : see stackoverflow.com questions 9837285 http : stackoverflow.com questions 9837285 cannot-send-tweet-popup-appears .. . Answer : Can you check your debug console to see what error is returned Typically those messages will be more informative . Also if you have multiple accounts configured on your device there is an open radar issue related to it which may apply in your case . Please check http : www.openradar.me radar id 5262535380959232 . Comment : it was indeed the open radar issue - went to settings and re-entered password - got some green ticks - tried again - all cool Cheers for your help. . Comment : This hit us also on iOS7 phones . Thank you . Even though the user had gone into the Twitter App and reset the password it was NOT until they did a password set under Settings- Twitter that we were able to tweet using the SLComposeViewController social-framework . The console had these error messages : Unable to get entitlement com.apple.private.social.twitter.service and The connection to com.apple.twitter.xpc was invalidated .", "Question : Seeing this error message in the logs though not consistently around the time that I use SLComposeViewController to open a Twitter or Facebook share sheet . I am not using any new iOS 8 API just testing existing code on iOS 8 . I see others have had this problem and even seen crashes when using other modal view controllers from the Cocoa Touch SDK . LaunchServices : invalidationHandler called .. . .. . Are there new precautions to take with SLComposeViewController and UIActivityViewController in iOS 8 Something else to consider Comment : Seeing same log just opening and closing a share sheet in iOS 8.0 GM . No answer yet . Comment : Same thing here . UIActivityViewController is very buggy . Comment : This guy figured it out for Objective-C...but i m not sure how to follow his answer in Swift . stackoverflow.com questions 25192313 http : stackoverflow.com questions 25192313 sharing-via-uiactivityviewcontroller-to-twitter-facebook-etc-causing-crash Comment : Check out my answer on the other thread : stackoverflow.com a 25895667 2546659 http : stackoverflow.com a 25895667 2546659 Comment : I was getting this error too and realized it was coming when calling SLComposeViewController isAvailableForServiceType : SLServiceTypeFacebook and no facebook accounts were in settings . I just stopped checking for this since it automatically handles not having accounts and presents a message . .. . Answer : Looking at the developer forums https : devforums.apple.com message 1049415 1049415 : That log message does not indicate any error on your part . Comment : I guess you are specifically referring to this post : devforums.apple.com message 1049415 1049415 https : devforums.apple.com message 1049415 1049415", "Question : Seeing this error message in the logs though not consistently around the time that I use SLComposeViewController to open a Twitter or Facebook share sheet . I am not using any new iOS 8 API just testing existing code on iOS 8 . I see others have had this problem and even seen crashes when using other modal view controllers from the Cocoa Touch SDK . LaunchServices : invalidationHandler called .. . .. . Are there new precautions to take with SLComposeViewController and UIActivityViewController in iOS 8 Something else to consider Comment : Seeing same log just opening and closing a share sheet in iOS 8.0 GM . No answer yet . Comment : Same thing here . UIActivityViewController is very buggy . Comment : This guy figured it out for Objective-C...but i m not sure how to follow his answer in Swift . stackoverflow.com questions 25192313 http : stackoverflow.com questions 25192313 sharing-via-uiactivityviewcontroller-to-twitter-facebook-etc-causing-crash Comment : Check out my answer on the other thread : stackoverflow.com a 25895667 2546659 http : stackoverflow.com a 25895667 2546659 Comment : I was getting this error too and realized it was coming when calling SLComposeViewController isAvailableForServiceType : SLServiceTypeFacebook and no facebook accounts were in settings . I just stopped checking for this since it automatically handles not having accounts and presents a message . .. . Answer : Regarding the auto-closing not the crash : I think it s probably related to the link you are trying to share . I m seeing the same thing when trying to post music links Spotify SoundCloud .. . . The same tweet works if I replace the link by a link-to some non-media-content . I ll file radar on this to see whether it s intentional.. .", "Question : I have a UIViewController which is always in landscape orientation . I present an instance of SLComposeViewController but to my surprise this results in autorotation of both my view controller to portrait mode along with my instance of SLComposeViewController . How do I stop this autorotation from happening Is SLComposeViewController only supported in portrait mode .. . Answer : Instead of rewriting an existing post I will give you a link-to another post that has the code . Take a look at this post http : stackoverflow.com questions 6108210 autorotation-lock-programmatically . The individual did a good work on explaining it as well . Please view the second anwser by klkl", "Question : null .. . Answer : The Facebook sheet appears but contains no text . I am using XCode 6.3.1 and iOS 8.3 on an iPhone 6 . Thank you in advance . My code is Comment : Facebook does not want you to pre-fill text ven if user can edit or delete it . Check their platform policy https : developers.facebook.com policy point 2.3 . Comment : possible duplicate of SLComposeViewController setInitialText not showing up in View http : stackoverflow.com questions 29970741 slcomposeviewcontroller-setinitialtext-not-showing-up-in-view Comment : It s required by Facebook you can t pre-fill it now" ] }
[ "yes-answer-long", "yes-answer-short" ]
user
UNK_RELATION
google-code-prettify@code-snippets@100
google-code-prettify -- a javascript module and css file that allows syntax-highlighting of source @placeholder in an html page .
{ "confidence": [ 52.08833694458008, 46.04985046386719, 43.642242431640625, 43.19766616821289, 42.85753631591797, 42.321632385253906, 42.13479995727539, 42.0836296081543, 41.55077362060547, 40.93357467651367, 40.93185806274414, 40.662506103515625, 40.59217834472656, 40.21173858642578, 39.54838562011719, 39.54838562011719, 39.54838562011719, 39.07486343383789, 38.631065368652344, 38.614845275878906, 37.977882385253906, 37.12599182128906, 37.12599182128906, 37.06346893310547, 36.598548889160156, 36.55023193359375, 36.2967529296875, 36.2967529296875, 36.209266662597656, 36.10822296142578, 36.06450653076172, 36.06450653076172, 36.05992126464844, 35.91307067871094, 35.46098327636719, 35.2150764465332, 35.2150764465332, 35.2150764465332, 35.105987548828125, 35.09246063232422, 35.0303955078125, 34.9014778137207, 34.77984619140625, 34.686180114746094, 34.595420837402344, 34.595420837402344, 34.29985046386719, 34.09349822998047, 34.07356262207031, 33.98232650756836, 33.93229675292969, 33.690086364746094, 33.50608825683594, 33.07923126220703, 32.60300827026367, 32.586490631103516, 32.404624938964844, 32.10255432128906, 32.07727813720703, 32.01911163330078, 31.961292266845703, 31.792802810668945, 31.774911880493164, 31.7311954498291, 31.7311954498291, 31.688310623168945, 31.62002182006836, 31.544145584106445, 31.460601806640625, 31.251434326171875, 31.18636131286621, 30.91521453857422, 30.852598190307617, 30.71595573425293, 30.42345428466797, 30.264896392822266, 30.21077537536621, 30.100528717041016, 29.991859436035156, 29.803625106811523, 29.740251541137695, 29.364906311035156, 29.339691162109375, 29.243703842163086, 29.15735626220703, 29.12059783935547, 29.077999114990234, 29.077999114990234, 29.061046600341797, 28.969161987304688, 28.922508239746094, 28.911197662353516, 28.90726089477539, 28.87965965270996, 28.591232299804688, 28.55207061767578, 28.55207061767578, 28.3807373046875, 28.30182456970215, 28.258373260498047 ], "content": [ "I just created a new .php file on my server and made a basic html page with only the Google Prettify javascript and the same problem happened .", "Am using google-code-prettify for my javascript code .", "Also I m using Google Prettify to highlight the syntax .", "Google Code Prettify https : code.google.com p google-code-prettify is published under Apache License 2.0 .", "code.google.com p google-code-prettify source browse trunk https : code.google.com p google-code-prettify source browse trunk js-modules prettify.js 905", "I am using google-code-prettify to syntax-highlight CPP code .", "I m the author of the Ada lexer for google-code-prettify .", "I found it in the loader directory https : github.com google code-prettify tree master loader that @MikeSamuel linked to from Javascript code prettifier https : github.com google code-prettify .", "I have built an application with a Twitter bootstrap front-end and the google prettify syntax-highlighting .", "take a look at https : github.com google code-prettify blob master docs getting started.md serving-your-own-js--css", "Google Code Prettify https : code.google.com p google-code-prettify is distributed under Apache Licence 2.0 http : www.apache.org licenses LICENSE-2.0 .", "I am currently trying to highlight Ada code on my website using google prettify https : code.google.com p google-code-prettify wiki GettingStarted and a file I have found here https : code.google.com p google-code-prettify issues detail id 312 .", "I want to remove the border on code while using google-code-prettify .", "As the readme states the prettify.js https : github.com google code-prettify blob master js-modules prettify.js comments are the authoritative source .", "Can I use google-code-prettify for commercial use .", "Therefore I install Google code prettify but encounter the above issue incompatiable .", "How can I highlight some lines with google code-prettify", "It can be found here Google Code Prettify http : google-code-prettify.googlecode.com svn-trunk README.html .", "pretty print is part of Google Code Prettify google-code-prettify.googlecode.com svn-trunk README.html http : google-code-prettify.googlecode.com svn-trunk README.html", "I am trying to use google-code-prettify to highlight the syntax of some code but the browser is rendering the HTML I am including in the tags .", "According to the Documentation https : code.google.com p google-code-prettify wiki GettingStarted there are two ways to run Prettify : .. . .. . 1 The auto-loader run prettify.js .", "Is there a way to use markdown and google-code-prettify library to use together to pretify the my code", "Unfortunately google-code-prettify and other code highlighers appear to interpret include preprocessor directives as tags and leave them out .", "I solved this using and adapted version of google-code prettify which can be found here : https : github.com angular code.angularjs.org tree master 1.3.0-beta.3 docs components google-code-prettify-1.0.1 Simply follow the instructions on that page .", "I am trying to pretty print boolean queries using google-code-prettify http : code.google.com p google-code-prettify .", "Is there a already implemented solution that decodes already encoded syntax from googles code-prettify", "However What is syntax-highlighting and how does it work", ".. . .. . default .. . .. . .. . Explicitly do not use any syntax-highlighting .", "You might want to send this to google s code.google.com p google-code-prettify http : code.google.com p google-code-prettify so that make the default work like this .", "This is my HTML that I am trying to Prettify .. . .. . This is how it appears on the website .. . .. .", "See Issue 312 http : code.google.com p google-code-prettify issues detail id 312 for more information", "It s already included proof from their GitHub https : github.com google code-prettify for-which-languages-does-it-work :", "The google prettify is working great for me .", "Are you sure that s the only solution StackOverflow also uses google-code-prettify for its code blocks and has code blocks inside the pre look at your browser page-inspector to see it in action on your post", "https : code.google.com p google-code-prettify issues detail id 341 thanks 341 ts 1398085413 https : code.google.com p google-code-prettify issues detail id 341 thanks 341 ts 1398085413 .. . .. . and refers to the following file of the prettify code : https : code.google.com p google-code-prettify source browse trunk src lang-sql.js r 179 .. . .. . The issue is that .. . .. . 1 .", "https : code.google.com p google-code-prettify wiki GettingStarted", "So I m using AnchorCMS and using Google code prettify .", "I ended up using Hightlight.js instead of google-code-prettify .", "I am using google-code-prettify through CDN script src https : cdn.rawgit.com google code-prettify master loader run prettify.js script as mentioned in faq over here https : github.com google code-prettify prettyPrint is the function which highlights code .", "http : stackoverflow.com questions 8399547 how-to-add-line-numbers-to-all-lines-in-google-prettify .. . .. . I am looking at google s http : code.google.com p google-code-prettify to display come code I have written in Mathematica inside a web page .", "So I m using Google code prettify with AnchorCMS .", ".. . Other languages are supported via extensions : .. . .. . .. . .. . .. . You can find the handlers with their extensions in the loader directory https : github.com google code-prettify tree master loader .. . .. . .. . .. . For the mapping from extensions to builtin languages see the registerLangHandler calls in prettify.js https : github.com google code-prettify blob c67d80209c38e55431e6659ec51fc2d6a96ecf38 src prettify.js L1349-L1447", "Hi Mike I need to work offline but in the prettify.js file it is calling externally : e.src https : google-code-prettify.googlecode.com svn loader lang- +encodeURIC omponent D m + .js See the Google project here : code.google.com p google-code-prettify https : code.google.com p google-code-prettify", "I ve been trying to implement Code Prettify https : github.com google code-prettify in my Jekyll blog https : github.com pdelfan blog .", "related How to add line numbers to all lines in Google Prettify", "I noticed as soon as google prettify loads this problem occurs", "To use it add this to your page : .. . .. . Do not use the auto-loader it won t use custom lexers change the paths to where you put the files of google-code-prettify .", "I use pre because google prettify class needs it and xmp because I found on internet that it will force code not to render .", "Is it possible for a button to call a function that would prettify a dynamic code pre", "I m trying to prettify my code in Blogger .", "You can find a table in the FAQ https : github.com google code-prettify blob master README.md under the header Which languages does it support", "Also does prettify support Batch", "The GettingStarted https : code.google.com p google-code-prettify wiki GettingStarted Serving your own JS CSS wiki page explains : .. . .. . Serving your own JS CSS .. . .. . You can download the scripts and styles and serve them yourself .", "If you are using the Prettify codes to markup Stack Overflow code you use .. . .. . Language Codes : http : meta.stackexchange.com a 184109 284743 .. . .. . Let Prettify interpret the code and guess .", "I am using Google s code prettify to make code appear nicely on my website .", "I m trying to prettify some text that is generated dynamically .", "And here is the css : google-code-prettify.googlecode.com svn-trunk styles http : google-code-prettify.googlecode.com svn-trunk styles sunburst.css .", "It seems that I got the class prettyprint confused with prettify which was already in the code .", "I am trying to set up my tumblr theme using prettify and css customization to display python code-snippets .", "I added the proper HTML comment syntax.. .", "When it s saved to a database pulled back down and the prettyprint google-code-prettify class is added it seems to add a bunch of random spaces .", "Slightly related and just as reference a question on Meta Stack Overflow http : meta.stackoverflow.com : What is syntax-highlighting and how does it work", "Please show your HTML including where you use prettify .", "If not is there any documentation or any resources on the web that can help me write custom language definitions for google-code-prettify", "Are there any other alternatives to google-code-prettify that supports these types of boolean queries out of the box", "Single Code Comment for Visual Basic Script VBScript seems to be not working i am using Google-code-prettify .. . .. . https : code.google.com p google-code-prettify .. . .. . For more details please see this fiddle : .. . .. . http : jsfiddle.net dekajp 27skU 1 .. . .. . Looks like the single quote comment is not working or am i missing something", "The code-snippets are successfully getting formatted by prettify .", "I can t seem to get google prettify to work with basic XML : anyone got this to work or can see what I am doing wrong : here is my code : .. . .. . Any help would be gratefully appreciated", "@SparkandShine I have just run this on a blank HTML page that contains only pre code jQuery and the code above and works fine for me so there may be other errors in your code that relate to the ajax error stated above .", "OR .. . .. . EDIT 3 My template HTML is just the default Dynamics View Classic Template with the prettify library added as explained above .", "Hey I have a weird problem I use the google-code-prettify code to display code on my blog but somehow the pre tags don t really preserve the whitespace .", "For highlighting 11th line use :", "Using this method javascript converted the to lt on page load .", "I made class tag somewhere in my css and apperently google prettify use same class name .tag to mark the html tags so after I changed the name of my class to another name everything was ok .", "one thing that s just odd to me is that it s not even syntax-highlighting the php or css code but rather just printing it our like a regular code block .", "I understand that I can pre-html-ize my source code to : .. . .. . for proper display .", "http : meta.stackexchange.com questions 184108 what-is-syntax-highlighting-and-how-does-it-work provided a better formatted list so I will copy that below .", "The code generated will be xml but the problem is thate once i try to highlight the code using google prettify and not the only one same problem with higlight.js the code is not higlighted i tried to google but all solution doesn t appear to apply to my problem .", "You can use the xmp tag in conjuction with prettify to display your code the way you want without having to escape anything .", "i am using my WMD editor to as markup editor and google prettify to highlight syntax marked by WMD editor i am using yii as a framework and whenever i include some html in my code in stead of being highlighted they are being interpreted as part of the my main html page and break down the structure of the web i think this is because i used the yii method of decoding what will be displayed in stead of encode but again if i use the encode method..the posted syntax is treated as a string therefore can not be highlighted any help will be appreciated .. . .. . Thanks you very much .. . .. . here is how the website is broken", "If none of these are possible is there a better alternative to Jekyll which supports Code Prettify", "HTML : .. . .. . JavaScript : .. . .. . Example : .. . .. . JSFiddle http : jsfiddle.net 2D7EY", ": .. . .. . The comments in prettify.js are authoritative but the lexer should work on a number of languages including C and friends Java Python Bash SQL HTML XML CSS Javascript Makefiles and Rust .", "Im trying to setup a code highlighter for my up coming blog however.. . it seems like code prettify has dropped the support for csharp C or they have hidden the loader somewhere else. . any ideas", "This is what I did : .. . .. . 1- I went to includes and added the necessary files in head.html : .. . .. . The sunburst theme : .. . .. . script src https : cdn.rawgit.com google code-prettify master loader run prettify.js autoload true amp skin sunburst amp lang css defer defer script .. . .. . The CSS file of the theme it is in my css folder on GitHub : .. . .. . link rel stylesheet href css prettify.css rel stylesheet type text css .. . .. . 2- For example I used the tag pre class prettyprint pre to test it .", "Unfortunately applying that to pre .prettify did not have an effect and the border remained .", "Re does prettify support Batch by Batch do you mean the shell languages interpreted by cmd.exe on Windows OSes", "@Cupcake Just because Stack Overflow happens to use prettify it doesn t mean other projects don t as well .", "@Bergi : I want to enable it on Wikipedia I know that prettify.js can be used on personal Mediawikis richardnichols.net 2010 04 http : www.richardnichols.net 2010 04 adding-google-prettify-syntax-highlight-to-mediawiki", "i self hosted google-code-prettify and then i used prettyPrint and it worked fine but when i call this function after i change my code nothing happens it doesn t highlights my syntax .. . .. . Here is the code i am using", "To reproduce use this code as source code : with Google Code Prettify installed .. . .. . pre class prettyprint lang-sql .. . SELECT @BUPath c : backups + @DBName + -B4 CHANGE.bak .. . SELECT @BUName @DBName + -B4 CHANGE .. . pre .. . .. . .. . I would expect the code to understand that the slash before the quote in the part c : backups is not an escaping character.. .", "Currently there s good support for Mathematica syntax highlight in prettify.js https : github.com halirutan Mathematica-Source-Highlighting and this is what mathematica.stackexchange.com and the Wolfram Community use to display code .", "I ve linked Google JS and CSS files to my template .", "I managed to make it work by adding the following lines to the head section of the html template using source editor of postach.io .. . .. . and my markdown code is", "However I am not able to use the later file with prettify and the automatic language-detection messes up attributes with characters such as Array first or integer image and highlights them as string delimiters .", ".. . .. . which produces pre code code pre HTML markup .", "code pre .. . .. . but postach.io seems to remove the pre and code html tags .", "Since the syntax is JS and the file is lang-Pascal .", "Any JavaScript code that runs on document-ready DOMContentLoaded or window load will run before your content is loaded into the page .", "I m using the Google Code Prettify CDN link .. . .. . By design it appends a CSS stylesheet into the DOM .. . .. . This is great if you want to use the default skin or one of the url parameter-defined skins the project makes available but in my case I want to use a custom theme .. . .. . Uh oh GCP appended it s theme after mine so now all of my styles are getting overwritten .. . .. . Is there a way to use the GCP CDN or a CDN and a custom stylesheet without having to add important to every style in the sheet" ] }
{ "confidence": [ 61.36042404174805, 57.90620040893555, 57.48347091674805, 55.13034439086914, 54.2512321472168, 52.631561279296875, 49.55796813964844, 48.724029541015625, 47.55171585083008, 46.99825668334961, 45.819515228271484, 45.086097717285156, 44.987037658691406, 44.91813659667969, 44.878936767578125, 44.785400390625, 44.524818420410156, 44.22328567504883, 44.180206298828125, 44.16483688354492 ], "content": [ "Question : I cannot find this anywhere and I swear I used to be able to very simply without much prying . Can anyone help me Thanks . I would appreciate it . Also does prettify support Batch Comment : Re does prettify support Batch by Batch do you mean the shell languages interpreted by cmd.exe on Windows OSes Comment : Yes I do . Although that s a different question . Comment : Slightly related and just as reference a question on Meta Stack Overflow http : meta.stackoverflow.com : What is syntax-highlighting and how does it work http : meta.stackexchange.com q 184108 . Comment : @Cupcake Just because Stack Overflow happens to use prettify it doesn t mean other projects don t as well . Comment : @TimParenti looking at the question again it s obvious that it s not in reference to Stack Overflow specifically so I don t remember why I made my previous comment because now it doesn t make any sense . .. . Answer : I thought it would be helpful to have an actual list rather than just a link . I found it in the loader directory https : github.com google code-prettify tree master loader that @MikeSamuel linked to from Javascript code prettifier https : github.com google code-prettify . As the readme states the prettify.js https : github.com google code-prettify blob master js-modules prettify.js comments are the authoritative source . However What is syntax-highlighting and how does it work http : meta.stackexchange.com questions 184108 what-is-syntax-highlighting-and-how-does-it-work provided a better formatted list so I will copy that below . Refer to the the links for the most up-to-date information . If you are using the Prettify codes to markup Stack Overflow code you use .. . .. . Language Codes : http : meta.stackexchange.com a 184109 284743 .. . .. . Let Prettify interpret the code and guess . .. . .. . default .. . .. . .. . Explicitly do not use any syntax-highlighting . .. . .. . lang-none .. . .. . .. . Bash and other Shell scripting .. . .. . .. . lang-bash lang-bsh lang-csh lang-sh .. . .. . .. . C C++ et al .. . .. . .. . lang-c lang-cc lang-cpp lang-cxx lang-cyc lang-m .. . .. . .. . C .. . .. . .. . lang-cs .. . .. . .. . Clojure .. . .. . .. . lang-clj .. . .. . .. . CoffeeScript .. . .. . .. . lang-coffee .. . .. . .. . CSS .. . .. . .. . lang-css .. . .. . .. . Dart .. . .. . .. . lang-dart .. . .. . .. . Delphi .. . .. . .. . lang-pascal .. . .. . .. . Erlang .. . .. . .. . lang-erl lang-erlang .. . .. . .. . Go .. . .. . .. . lang-go .. . .. . .. . Haskell .. . .. . .. . lang-hs .. . .. . .. . HTML .. . .. . .. . lang-html .. . .. . .. . Java .. . .. . .. . lang-java .. . .. . .. . JavaScript .. . .. . .. . lang-js lang-javascript .. . .. . .. . JSON .. . .. . .. . lang-json .. . .. . .. . LaTeX and TeX .. . .. . .. . lang-latex lang-tex .. . .. . .. . Lisp and Scheme .. . .. . .. . lang-cl lang-el lang-lisp lang-lsp lang-scm lang-ss lang-rkt .. . .. . .. . Lua .. . .. . .. . lang-lua .. . .. . .. . OCaml SML F et al .. . .. . .. . lang-fs lang-ml .. . .. . .. . Pascal .. . .. . .. . lang-pascal .. . .. . .. . Perl .. . .. . .. . lang-pl lang-perl .. . .. . .. . PHP .. . .. . .. . lang-php .. . .. . .. . Protocol buffers .. . .. . .. . lang-proto .. . .. . .. . Python .. . .. . .. . lang-py lang-python lang-cv .. . .. . .. . R and S .. . .. . .. . lang-r lang-s .. . .. . .. . Regex .. . .. . .. . lang-regex .. . .. . .. . Ruby .. . .. . .. . lang-rb lang-ruby .. . .. . .. . Rust .. . .. . .. . lang-rc lang-rs lang-rust .. . .. . .. . Scala .. . .. . .. . lang-scala .. . .. . .. . SQL .. . .. . .. . lang-sql .. . .. . .. . VHDL .. . .. . .. . lang-vhdl lang-vhd .. . .. . .. . Visual Basic .. . .. . .. . lang-vb lang-vbs .. . .. . .. . XML .. . .. . .. . lang-xml .. .", "Question : I am using Google s code prettify to make code appear nicely on my website . It can be found here Google Code Prettify http : google-code-prettify.googlecode.com svn-trunk README.html . It does not work for HTML . I know you are suppose to replace with lt and with gt . I have done this but the browser still interprets it as HTML . This is my HTML that I am trying to Prettify .. . .. . This is how it appears on the website .. . .. . enter image description here http : i.stack.imgur.com c2Okl.png .. . .. . And when I inspect element it looks like this .. . .. . What is going on Comment : The most minimal setup with your code works in chrome : jsfiddle.net nt3j32sf 1 https : jsfiddle.net nt3j32sf 1 The error must be somewhere else in your code that might interact with the tag.. . Comment : How do I detect if something else is affecting the tag Comment : I don t know any easy ways I d temporarily comment out all javascript if it is possible . However another guess is that you are including the source code to be prettyfied somehow wrong . How is it included how do you fetch it Comment : I just created a new .php file on my server and made a basic html page with only the Google Prettify javascript and the same problem happened . I believe it has something to do with my web host . .. . Answer : You can use the xmp tag in conjuction with prettify to display your code the way you want without having to escape anything . Check it out : .. . .. . Make sure to include the script on the same page : .. . .. . And you re good to go Comment : This method worked . I believe my web-hosting services converted the lt to when I saved the document . Using this method javascript converted the to lt on page load . Thanks", "Question : The google prettify is working great for me . I have built an application with a Twitter bootstrap front-end and the google prettify syntax-highlighting . But the application is also used for working offline e.g . localhost so I included the prettify.js and prettify.css . Now when I go offline and work in the application it will start looking for online code through the local prettify.js version : .. . .. . https : google-code-prettify.googlecode.com svn loader lang- +encodeURIComponent D m + .js .. . .. . https : google-code-prettify.googlecode.com svn loader skins +encodeURIComponent N m + .css .. . .. . https : google-code-prettify.googlecode.com svn loader prettify.css .. . .. . It is working fine offline but why is it requesting the external js and css files and how can I remove this from the minified prettify.js I don t need it and it is slowing down the application . Comment : What does your HTML look like Specifically what script and link elements does it have and what does it run on-load Comment : Hi Mike I need to work offline but in the prettify.js file it is calling externally : e.src https : google-code-prettify.googlecode.com svn loader lang- +encodeURIC omponent D m + .js See the Google project here : code.google.com p google-code-prettify https : code.google.com p google-code-prettify .. . Answer : The GettingStarted https : code.google.com p google-code-prettify wiki GettingStarted Serving your own JS CSS wiki page explains : .. . .. . Serving your own JS CSS .. . .. . You can download the scripts and styles and serve them yourself . Make sure to include both the script and a stylesheet : .. . .. . .. . link href prettify.css type text css rel stylesheet .. . script type text javascript src prettify.js script .. . Comment : That is what I am doing Mike but look inside the prettify.js and you will find that it is requesting more files from googlecode . I would like to know how I can use all of it and still keep it working . Comment : @Theo If you load prettify.js instead of runprettify.js then it won t load those other files . Are you sure you didn t save runprettify.js as prettify.js by mistake", "Question : I cannot find this anywhere and I swear I used to be able to very simply without much prying . Can anyone help me Thanks . I would appreciate it . Also does prettify support Batch Comment : Re does prettify support Batch by Batch do you mean the shell languages interpreted by cmd.exe on Windows OSes Comment : Yes I do . Although that s a different question . Comment : Slightly related and just as reference a question on Meta Stack Overflow http : meta.stackoverflow.com : What is syntax-highlighting and how does it work http : meta.stackexchange.com q 184108 . Comment : @Cupcake Just because Stack Overflow happens to use prettify it doesn t mean other projects don t as well . Comment : @TimParenti looking at the question again it s obvious that it s not in reference to Stack Overflow specifically so I don t remember why I made my previous comment because now it doesn t make any sense . .. . Answer : You can find a table in the FAQ https : github.com google code-prettify blob master README.md under the header Which languages does it support : .. . .. . The comments in prettify.js are authoritative but the lexer should work on a number of languages including C and friends Java Python Bash SQL HTML XML CSS Javascript Makefiles and Rust . It works passably on Ruby PHP VB and Awk and a decent subset of Perl and Ruby but because of commenting conventions but doesn t work on Smalltalk . .. . Other languages are supported via extensions : .. . .. . .. . .. . .. . You can find the handlers with their extensions in the loader directory https : github.com google code-prettify tree master loader .. . .. . .. . .. . For the mapping from extensions to builtin languages see the registerLangHandler calls in prettify.js https : github.com google code-prettify blob c67d80209c38e55431e6659ec51fc2d6a96ecf38 src prettify.js L1349-L1447 Comment : These links appear to be broken now most likely due to the project moving to GitHub . Comment : @jpmc26 will fix", "Question : related How to add line numbers to all lines in Google Prettify http : stackoverflow.com questions 8399547 how-to-add-line-numbers-to-all-lines-in-google-prettify .. . .. . I am looking at google s http : code.google.com p google-code-prettify to display come code I have written in Mathematica inside a web page . Mathematica is not supported language . So even thought I can do the following .. . .. . and that works in terms of showing the line numbers but the syntax-highlighting used is off and not correct for the language I am using since it is not supported of course which I understand . I d be happy just to list the code using the nocode class without having the highlighting but I like to also be able to get line numbers . So I tried this : .. . .. . but the lines numbers do not show inside the nocode class . Is there a way to modify prettify.js and make it also show the line numbers for nocode I will mainly be using it to list the code but need to see line numbers . Here is a complete MWE .. . .. . update .. . .. . thanks to Gaby it is working now . Here is the final result .. . .. . enter image description here http : i.stack.imgur.com IvD6v.png .. . Answer : Put the nocode class on the pre element. . .. . .. . Demo at http : jsfiddle.net gaby 8Jwja 1 .. . .. . .. . .. . Update .. . .. . To show all numbers and show them without the dot after the number you will have to override the CSS .. . .. . Add .. . .. . Demo at http : jsfiddle.net gaby 8Jwja 2 Comment : thanks that works very well . Would you happen to know by any chance how to make it show the line numbers without the decimal point as I show in the screen shot above if not no problem . thank you . Comment : @Nasser updated answer with CSS solution Comment : wow that worked so well . You might want to send this to google s code.google.com p google-code-prettify http : code.google.com p google-code-prettify so that make the default work like this . Having a decimal point next to line numbers is not a good idea . Thanks again .", "Question : I ve been trying to implement Code Prettify https : github.com google code-prettify in my Jekyll blog https : github.com pdelfan blog . I followed some guides and was able to implement it but it s not ideal . This is what I did : .. . .. . 1- I went to includes and added the necessary files in head.html : .. . .. . The sunburst theme : .. . .. . script src https : cdn.rawgit.com google code-prettify master loader run prettify.js autoload true amp skin sunburst amp lang css defer defer script .. . .. . The CSS file of the theme it is in my css folder on GitHub : .. . .. . link rel stylesheet href css prettify.css rel stylesheet type text css .. . .. . 2- For example I used the tag pre class prettyprint pre to test it . As you can see in this post http : pdelfan.me blog jekyll update 2016 02 22 on-life.html the code block is at the bottom of the page it does work . If you notice you see that iostream is missing because I used pre pre and therefore it sees the characters takes them as HTML and doesn t show iostream . This is how it looks : .. . .. . enter image description here http : i.stack.imgur.com HL9aL.png .. . .. . I could use HTML entities to fix it but this is not ideal . I ve searched for 2 hours and couldn t find a reliable source to fix this . .. . .. . So my question is : .. . .. . Is it possible to make Code Prettify work in markdown using instead of pre pre If not is there another way to implement it in Jekyll Or make it easier to use If none of these are possible is there a better alternative to Jekyll which supports Code Prettify If you need to see other files please do check my repository https : github.com pdelfan blog . .. . Answer : The plugin I m currently using for code highlighting is jekyll-rouge which supports style markdown well : .. . .. . https : sacha.me articles jekyll-rouge", "Question : I m trying to display some HTML code in pre and xmp tags but instead of just showing the code this HTML code actually renders . Also I m using Google Prettify to highlight the syntax . javascript .. . .. . So when I try to display b HEllo b I get Hello Comment : Not reproduceable . The code when augmented to a real example works as intended . It is not clear why you are using both pre and xmp since they are basically similar except for parsing : in xmp no markup except the element s own end tag is recognized and this seems to be what you want . Comment : I use pre because google prettify class needs it and xmp because I found on internet that it will force code not to render . I don t have problems with code from other programming-languages just when I use HTML it renders Comment : Same thing happends if I put only xmp tag . When I open chrome developer tools in html I can see my html tags as raw text but in browser they are rendered Comment : So You are supposed to see tags in developer tools . Comment : pastebin.com DJB0Wu2H http : pastebin.com DJB0Wu2H This my problem see the link . I noticed as soon as google prettify loads this problem occurs .. . Answer : I solved this problem . I made class tag somewhere in my css and apperently google prettify use same class name .tag to mark the html tags so after I changed the name of my class to another name everything was ok .", "Question : I am trying to pretty print boolean queries using google-code-prettify http : code.google.com p google-code-prettify . Specifially queries that will be parsed by the StandardQueryParser in lucene . So far I have been playing around trying to define a new language definition by modifying the existing lang-sql.js file . Unfortunately I cannot find any documentation to help me in this process and I m terrible at regular expressions so it s not going that well . I am therefore wondering if anyone can help me out with the following : .. . .. . 1 . Are there any pre-existing language definitions for boolean and or lucene queries 2 . If not is there any documentation or any resources on the web that can help me write custom language definitions for google-code-prettify 3 . Are there any other alternatives to google-code-prettify that supports these types of boolean queries out of the box Any help would be greatly appreciated . Comment : are you asking what the lucene query syntax is if so look no further than lucene.apache.org core 4 9 0 queryparser org apache lucene http : lucene.apache.org core 4 9 0 queryparser org apache lucene queryparser classic package-summary.html Comment : It s not really what I am after at the current time although it will certainly help if I ever get the hang of writing the language definitions for code-prettify . Thanks .. . Answer : I ended up using Hightlight.js instead of google-code-prettify . I was able to make a simple syntax for highlighting Lucene queries in a way that fits my requirements . Hightlight.js has decent development documentation http : highlightjs.readthedocs.org en latest language-guide.html and the source code cloned from git repository https : github.com isagalaev highlight.js comes with build script in python and easy to use tools for testing styles and language definitions .", "Question : I m trying to prettify my code in Blogger . I ve linked Google JS and CSS files to my template . The problem is that I want the code to be prettified on page load so I add prettyPrint to page load event on the template . body onload prettyPrint .. . .. . This code doesn t get executed . However if I type prettyPrint manually in the console my codes get prettified correctly . Does blogger template block invoking JS functions manually EDIT I get it to work by manually invoking the function in every post that I needs code prettifying see below . Still I want to know why I can t do it on the template . EDIT 2 The README http : google-code-prettify.googlecode.com svn-trunk README.html said that I shouldn t use prettyPrint directly as a handler but wrap it in a closure instead . So I added this code similar to the example in the README in my head but to no avail . OR .. . .. . EDIT 3 My template HTML is just the default Dynamics View Classic Template with the prettify library added as explained above . EDIT 4 Here is a link-to demonstrate the problem : http : testprettyprint.blogspot.com 2013 02 blog-post.html -- the code block is not prettified automatically but if you open Chrome s console and type prettyPrint the codes will be correctly highlighted . EDIT 5 The reason why I think it s my problem not blogger s because this guy still has his code prettified using the same technique : http : errorbuster.blogspot.com 2012 07 prettify-syntax-highlighter-for-blogger.html .. . .. . EDIT 6 As Jeffery To has pointed in his answer the Dynamics View loads blog content with AJAX so any JS call on document load will get executed BEFORE the actual content is loaded . Therefore any JavaScript performed on the actual blog content not the document is invalid . So I guess the question now is how to hook into Dynamics View ajax : complete event if there is such a thing but I doubt there is . Thanks everyone who has replied . I m not sure if this can be counted as a bug but I ll file an issue with blogger . CONCLUSION Please read Jeffery To s answer . He found the event to invoke the function . Comment : what argument are you giving to prettyPrint Comment : there is no argument.. . Comment : Where is it defined in the Google JS you mentioned Comment : This is the JS : google-code-prettify.googlecode.com svn-trunk src prettify.js http : google-code-prettify.googlecode.com svn-trunk src prettify.js . And here is the css : google-code-prettify.googlecode.com svn-trunk styles http : google-code-prettify.googlecode.com svn-trunk styles sunburst.css . They are added to the head of my template . Comment : Do you see any error messages in the debug console If you replace the prettyPrint call with alert onload happened does it pop--up an alert when you expect .. . Answer : I believe your test page is using Blogger s Ajax templates not sure what the official name is whereas the other link you posted is using classic templates . If you reload your test page you ll first see the Blogger logo in the middle of the page then your content appears . If you view the test page source you ll see a lot of code but not your content . I believe with layout templates Blogger s code-first runs then it fetches your content using Ajax . Any JavaScript code that runs on document-ready DOMContentLoaded or window load will run before your content is loaded into the page . I believe if you add a HTML Javascript widget http : www.wikihow.com Add-a-Widget-to-Blogger to the page after your content block then include a call to prettyPrint within that widget it should be called every time a post is displayed . .. . .. . Update : The official name of this template is Dynamic Views and it appears that the HTML JavaScript widget isn t supported for Dynamic Views . I can t find any mention of an API that lets you hook into Blogger s JavaScript so I believe the answer for now at least is that it s not possible to add template-level code to do what you want . The most practical way would be to include a script-tag with prettyPrint in every post : - .. . .. . .. . .. . Update 2 : I ve traced through Blogger s code and I think I ve found a suitable and bindable event . Try including this after the Dynamic Views code in the head element after the script src www.blogblog.com dynamicviews .. . script tags : .. . .. . The viewitem event is triggered every time the user views an item which can happen multiple times in the page s lifetime . The element argument is a jQuery object of the item s container element so if you want to save prettyPrint a little time you can do this : Comment : Thanks . Is there any way to do this on the template For example is the anyway to hook into blogger s ajax success callback from the template itself Comment : HOLY COW THAT WAS AMAZING . THANK YOU Comment : Very nice analysis . Comment : Finally I can add whatever custom script I like to a Blogger page . Thank you very much .", "Question : How can I highlight some lines with google code-prettify Like on Github http : i.stack.imgur.com uNtR5.png . .. . Answer : For highlighting 11th line use :", "Question : Can I use google-code-prettify for commercial use . I see that Code license - Apache License 2.0 . Do I need to have a copy of the Apache license .. . Answer : Google Code Prettify https : code.google.com p google-code-prettify is published under Apache License 2.0 . Take a look to this FAQ http : www.apache.org foundation license-faq.html . It allows you to use Apache software in packages or distributions that you create . .. . .. . However you need to include a copy of license in any distribution of your software and show clear attribution to Google .", "Question : I ve been trying to implement Code Prettify https : github.com google code-prettify in my Jekyll blog https : github.com pdelfan blog . I followed some guides and was able to implement it but it s not ideal . This is what I did : .. . .. . 1- I went to includes and added the necessary files in head.html : .. . .. . The sunburst theme : .. . .. . script src https : cdn.rawgit.com google code-prettify master loader run prettify.js autoload true amp skin sunburst amp lang css defer defer script .. . .. . The CSS file of the theme it is in my css folder on GitHub : .. . .. . link rel stylesheet href css prettify.css rel stylesheet type text css .. . .. . 2- For example I used the tag pre class prettyprint pre to test it . As you can see in this post http : pdelfan.me blog jekyll update 2016 02 22 on-life.html the code block is at the bottom of the page it does work . If you notice you see that iostream is missing because I used pre pre and therefore it sees the characters takes them as HTML and doesn t show iostream . This is how it looks : .. . .. . enter image description here http : i.stack.imgur.com HL9aL.png .. . .. . I could use HTML entities to fix it but this is not ideal . I ve searched for 2 hours and couldn t find a reliable source to fix this . .. . .. . So my question is : .. . .. . Is it possible to make Code Prettify work in markdown using instead of pre pre If not is there another way to implement it in Jekyll Or make it easier to use If none of these are possible is there a better alternative to Jekyll which supports Code Prettify If you need to see other files please do check my repository https : github.com pdelfan blog . .. . Answer : With Jekyll you can use two highligting methods : .. . .. . backtick-style fenced-code .. . .. . In config.yml set : .. . .. . Highlight your code like this : .. . .. . With highlight liquid tag .. . .. . Styling .. . .. . Styles are from scss syntax-highlighting.scss . Comment : Not sure why I should highlight my c++ code block using Java . I did try this and it worked but I ended up switching to Hexo https : hexo.io before I saw your post . Comment : Sorry . I ve edited my answer . Comment : I think it should be cpp . : D", "Question : I m trying to display some HTML code in pre and xmp tags but instead of just showing the code this HTML code actually renders . Also I m using Google Prettify to highlight the syntax . javascript .. . .. . So when I try to display b HEllo b I get Hello Comment : Not reproduceable . The code when augmented to a real example works as intended . It is not clear why you are using both pre and xmp since they are basically similar except for parsing : in xmp no markup except the element s own end tag is recognized and this seems to be what you want . Comment : I use pre because google prettify class needs it and xmp because I found on internet that it will force code not to render . I don t have problems with code from other programming-languages just when I use HTML it renders Comment : Same thing happends if I put only xmp tag . When I open chrome developer tools in html I can see my html tags as raw text but in browser they are rendered Comment : So You are supposed to see tags in developer tools . Comment : pastebin.com DJB0Wu2H http : pastebin.com DJB0Wu2H This my problem see the link . I noticed as soon as google prettify loads this problem occurs .. . Answer : You have to use HTML-Entities . e.g . gets displayed as b HEllo b Comment : Tried that but instead getting I get lt", "Question : I m trying to prettify some text that is generated dynamically . The output : .. . .. . Any ideas why http : jsfiddle.net yAv4f 62 .. . Answer : Hard to say what does prettyPrint should return It seems quite strange that you don t give any arguments to prettyPrint.. . .. . .. . By the way I think an angular filter would be a better fit for your need instead of a directive . EDIT .. . .. . This one is working dynamically using filter : .. . .. . html : .. . .. . js : .. . .. . You can see it at .. . .. . http : jsfiddle.net cSXpV 1 .. . .. . You can uncomment the input to change directly the text that will be prettyfied .. . .. . Note that this version is for Angular 1.1.1 the version you choosed in your initial jsfiddle for Angular 1.2 . you have to use ng-bind-html and the ngSanitize module .. . .. . Last point : now that it is dynamically prettyfied the setTimeOut and scope . apply can be removed info for readers .. . .. . EDIT Comment : pretty print is part of Google Code Prettify google-code-prettify.googlecode.com svn-trunk README.html http : google-code-prettify.googlecode.com svn-trunk README.html Comment : ok IMHO your directive is useless just remove and it works pretty print code . Comment : As far as I can see prettyPrint is aimed to be called in event callback but link function is not an event callback so in this context Google prettyfier just doing some mess.. . Comment : It doesn t work - it applies the class yes but does not correctly color syntax for real code . Comment : I used int function int i int j as code in text in your jsfiddle and there was some colors after removing directive . Moreover you re creating a directive with the very same name as a class that is already used by Google prettifier to launch prettifying probable conflicts there.. .", "Question : Is it possible for a button to call a function that would prettify a dynamic code pre I can t get it to work . After the page loads the initial code is prettified but when I change it and call prettyPrint afterwards it no longer works . Example : http : jsfiddle.net uwBjD 2 .. . .. . Edit : Sorry I was using a local prettify.js . Updated it still encountered the same error . Comment : Did you look at the console It pretty explicitly tells you prettyPrint is not defined for me . This may have to do with the fact that one of your scripts prettify.js http : apps-02.rwmanila.com Scripts prettify.js is 404ing . .. . Answer : Apparently after the code is prettified an additional class is added which is prettyprinted . Anything with the class of prettyprinted is not re-prettified . You need to remove that class before recalling the function : .. . .. . http : jsfiddle.net uwBjD 3 Comment : code.google.com p google-code-prettify source browse trunk https : code.google.com p google-code-prettify source browse trunk js-modules prettify.js 905 Comment : Excellent I battled against this for an hour Comment : @James Google has a tarded way of dealing with things . Comment : Great Worked for me", "Question : The triple backticks in markdown render as pre code class .. . .. . code pre . More specifically .. . .. . My current solution is to add the following code but it doesn t work . How do I remove code class .. . .. . code .. . .. . I used SyntaxHighlighter pre class brush : java .. . pre to highlighter my code blocks in WordPress + Windows Live Writer + PreCode based on SyntaxHighlighter . Currently I turn to markdown . To insert a code blocks in markdown I use .. . .. . Both of them doesn t work for me because SyntaxHighlighter requires all left angle brackets inside pre pre should be HTML entries escaped . Therefore I install Google code prettify but encounter the above issue incompatiable . Comment : Are you sure that s the only solution StackOverflow also uses google-code-prettify for its code blocks and has code blocks inside the pre look at your browser page-inspector to see it in action on your post Comment : @Ferrybig I didn t mean this is the only option . Using pre code class .. . .. . code pre is not compatible with my previous code blocks which is formatted by SyntaxHighlighter . Comment : I am not sure what are you asking for could you be more specific Comment : @LuisGonz lez please check the edited question . .. . Answer : Try the below out and let me know if this works for you . JSFiddle Demo https : jsfiddle.net 4jsyn2yz Comment : thx . encounter Uncaught TypeError : is not a function . What are the differences between jQuery and Comment : @SparkandShine they should mean the same thing is a valid variable name like jQuery is it is weird that it doesn t work correctly or you Comment : @Ferrybig because of missing xregExp in my site I replace all with jQuery and it still doesn t work for TypeError : n.ajax.request is not a function . Comment : @ChronixPsyc it works though encounter TypeError : n.ajax.request is not a function Comment : @SparkandShine I have just run this on a blank HTML page that contains only pre code jQuery and the code above and works fine for me so there may be other errors in your code that relate to the ajax error stated above . There are also no errors being thrown in the JSFiddle", "Question : I m trying to prettify my code in Blogger . I ve linked Google JS and CSS files to my template . The problem is that I want the code to be prettified on page load so I add prettyPrint to page load event on the template . body onload prettyPrint .. . .. . This code doesn t get executed . However if I type prettyPrint manually in the console my codes get prettified correctly . Does blogger template block invoking JS functions manually EDIT I get it to work by manually invoking the function in every post that I needs code prettifying see below . Still I want to know why I can t do it on the template . EDIT 2 The README http : google-code-prettify.googlecode.com svn-trunk README.html said that I shouldn t use prettyPrint directly as a handler but wrap it in a closure instead . So I added this code similar to the example in the README in my head but to no avail . OR .. . .. . EDIT 3 My template HTML is just the default Dynamics View Classic Template with the prettify library added as explained above . EDIT 4 Here is a link-to demonstrate the problem : http : testprettyprint.blogspot.com 2013 02 blog-post.html -- the code block is not prettified automatically but if you open Chrome s console and type prettyPrint the codes will be correctly highlighted . EDIT 5 The reason why I think it s my problem not blogger s because this guy still has his code prettified using the same technique : http : errorbuster.blogspot.com 2012 07 prettify-syntax-highlighter-for-blogger.html .. . .. . EDIT 6 As Jeffery To has pointed in his answer the Dynamics View loads blog content with AJAX so any JS call on document load will get executed BEFORE the actual content is loaded . Therefore any JavaScript performed on the actual blog content not the document is invalid . So I guess the question now is how to hook into Dynamics View ajax : complete event if there is such a thing but I doubt there is . Thanks everyone who has replied . I m not sure if this can be counted as a bug but I ll file an issue with blogger . CONCLUSION Please read Jeffery To s answer . He found the event to invoke the function . Comment : what argument are you giving to prettyPrint Comment : there is no argument.. . Comment : Where is it defined in the Google JS you mentioned Comment : This is the JS : google-code-prettify.googlecode.com svn-trunk src prettify.js http : google-code-prettify.googlecode.com svn-trunk src prettify.js . And here is the css : google-code-prettify.googlecode.com svn-trunk styles http : google-code-prettify.googlecode.com svn-trunk styles sunburst.css . They are added to the head of my template . Comment : Do you see any error messages in the debug console If you replace the prettyPrint call with alert onload happened does it pop--up an alert when you expect .. . Answer : There can be a few problems with your snippets above . If you hook an event with body onload .. . other javascript codes could overwrite it . Dom.addEventListener will not work with internet-explorer you need to use Dom.attachEvent there . Basicly when I don t or can t use a javascript-framework like jquery for event-handling then I use my old code for onload event-handling : .. . .. . I attach two codes which work in slightly different ways . Mainly if you use document.ready 2nd snippet then the hooked code will run when the page is loaded and all HTML elements are created . But on document.ready there is no guarantee that all javasript and css codes are loaded also so if you want all codes and scripts to be loaded then you need window.ready 1st snippet . For your situation I belive you need the 2nd document.ready snippet and you can use it the following way : .. . .. . Also I recommend you put your javacript code between CDATA .. . symbols so your final code will look like : .. . .. . Hope this helps you solve your problem . Comment : Thanks for the detailed answer . I didn t work though : And I ve tried quite a few onload approaches including jQuery . I ve also tried CDATA as a comment suggested . No luck : I ll replicate the problem and post the link soon.. . Comment : Please see the update for a demonstration .", "Question : Single Code Comment for Visual Basic Script VBScript seems to be not working i am using Google-code-prettify .. . .. . https : code.google.com p google-code-prettify .. . .. . For more details please see this fiddle : .. . .. . http : jsfiddle.net dekajp 27skU 1 .. . .. . Looks like the single quote comment is not working or am i missing something .. . Answer : I m not familiar with the tool . I am familiar with VB and VB.net you re using but see if this syntax works better for you . AHH.. . also.. . you can t use unless you re using straight VB programming . You must exit your with an addition at the end . Looking at Fiddle.. . all your Declarations and szToken were all highlighted as comments . Comment : i tried to update the jsfiddle with your code it did not work . can you try Comment : ok - i got it - jsfiddle.net 27skU 2 http : jsfiddle.net 27skU 2 Comment : Other workarounds are using Rem or for comments that s two single quotation marks . Comment : I added the proper HTML comment syntax.. . -- Something Here -- Comment : @SteveKline you do not need those comments .please see my above fiddle link", "Question : null .. . Answer : Am using google-code-prettify for my javascript code . I have a form which has a submit button on filling up of the form and clicking on submit buttom generates some code snippet . problem : Same function is called on onload and onclick which generates the code . The code generated through onload is prettified but am unable to see the same result on click of submit button though generates the correct code . code : .. . .. . Please note that onload my pre tag looks like : pre class prettyprint lang-html prettyprinted style and onclick of submit button pre class prettyprint lang-html Comment : Is your onsubmit handler stopping the form from submitting and reloading the page", "Question : null .. . Answer : So I m using AnchorCMS and using Google code prettify . All languages but HTML work . I ve asked this before and I was told to use lt and gt and so fourth . So I used it but when I save the post its rendered back into HTML so the HTML which I m trying to display doesn t show . Here s http : colourity.com posts html-stuff what I m talking about . That s when I try displauing DOCTYPE html and here s http : colourity.com posts arrays-in-php what it should look like with the code highlighting . Is there a way I can disable markdown maybe on certain posts Comment : When I go to the html link http : colourity.com posts html-stuff and inspect element there is nothing in the code code block . But when I add formatted HTML betweeon the code code blocks using my browser tools it shows up . Can you post what you are trying to insert into the code block Are you using lt gt or and Comment : I m using lt and gt but when I save the post its turns into and @adilapapaya Comment : one thing that s just odd to me is that it s not even syntax-highlighting the php or css code but rather just printing it our like a regular code block . I m wondering if there s an error in the way you re applying it . Maybe try removing the class lang-html from the code blocks and just using straight-up code code to see if it shows up Comment : Just got rid of it . But it still doesn t show @adilapapaya Comment : hmm ok one more thing you can try is to add html markup to a php code block . E.g . add a div something something div to one of the php code blocks at colourity.com posts arrays-in-php http : colourity.com posts arrays-in-php and see if it shows up . It does when I do it from the browser but not when you load it directly into the html so I think the script must be messing up somewhere . I m just not sure where ." ] }
[ "yes-answer-long", "yes-answer-short" ]
code-snippets
UNK_RELATION
uievent@ios@78
uievent -- a uievent object or simply an event object represents an event in @placeholder .
{ "confidence": [ 49.47587585449219, 49.462100982666016, 43.034217834472656, 42.98611831665039, 42.05691909790039, 40.71680450439453, 40.71680450439453, 40.400794982910156, 39.03314208984375, 37.71575927734375, 36.621273040771484, 35.960487365722656, 35.834903717041016, 34.717952728271484, 33.37925720214844, 33.2105598449707, 31.526897430419922, 30.640636444091797, 30.409944534301758, 29.932418823242188, 29.932418823242188, 28.890304565429688, 28.890304565429688, 27.773351669311523, 27.773351669311523, 27.123823165893555, 25.43714141845703, 25.43714141845703, 25.15179443359375, 24.867412567138672, 24.867412567138672, 24.31412124633789, 24.207252502441406, 24.207252502441406, 23.481014251708984, 23.481014251708984, 23.481014251708984, 23.31783676147461, 23.183746337890625, 23.183746337890625, 23.183746337890625, 23.183746337890625, 23.1015625, 22.724342346191406, 21.797348022460938, 21.797348022460938, 21.751604080200195, 21.613544464111328, 21.063995361328125, 21.040678024291992, 21.01750373840332, 20.728097915649414, 20.728097915649414, 20.680397033691406, 20.680397033691406, 20.680397033691406, 20.470611572265625, 20.470611572265625, 20.27542495727539, 20.083282470703125, 19.947044372558594, 19.947044372558594, 19.92987823486328, 19.92987823486328, 19.92987823486328, 19.92987823486328, 19.92987823486328, 19.92987823486328, 19.92987823486328, 19.92987823486328, 19.341699600219727, 19.341699600219727, 19.341699600219727, 19.341699600219727, 19.190486907958984, 19.190486907958984, 18.97447967529297, 18.81292724609375, 18.81292724609375, 18.81292724609375, 18.81292724609375, 18.81292724609375, 18.81292724609375, 18.81292724609375, 18.78694725036621, 18.60834503173828, 18.58502960205078, 18.361793518066406, 17.8006591796875, 17.8006591796875, 17.669994354248047, 17.50682258605957, 17.47422981262207, 17.47422981262207, 17.47422981262207, 17.47422981262207, 17.47422981262207, 17.443618774414062, 17.244840621948242, 16.85080909729004 ], "content": [ "The UIEvent parameter is now UIEvent .", "From the docs : A UIEvent object representing a touch-event is persistent throughout a multi-touch sequence UIKit reuses the same UIEvent instance for every event delivered to the application .", "I tried many approach : .. . .. . i.e using : .. . .. . - id hitTest : CGPoint point withEvent : UIEvent event .. . .. . - BOOL pointInside : CGPoint point withEvent : UIEvent event .. . .. . in UIView C but the problem is that i have two layers .", "If you need to keep information from an event around from one phase to another you should copy that information from the UITouch or UIEvent object .", "The reason is we cannot create such an Event UIEvent to send out by using : .. . .. . You can however save a registered event then play back by calling the above-function .", "The method - remoteControlReceivedWithEvent : gives a UIEvent with a type and a subtype property .", "I was just wondering if the UIEvent touchesBegan can be delayed", "Should I implement the method override func motionEnded motion : UIEventSubtype withEvent event : UIEvent in every panel then", "Is there a way to gain the type of touch gestures that triggered a UIEvent", "The compiler is complaining because UIEventTypeTouches is an NSInteger defined in an enum and touchesMoved : withEvent : is expecting a UIEvent object .", "In your UIView you need to have public methods for the OS to call and one of them is void touchesBegan : NSSet touches withEvent : UIEvent event .", "You should never retain an event object or any object returned from an event object .", "I need to copy a UIEvent in order to forward it to a UIView UIWebView at a later time .", "I want to detect various motions using the built-in UIEvent methods. . i.e .", "The UIEvent has a different array of touches than the NSSet touches .", "I realise they both use the RemoteControl UIEvent but I m wondering if I can discern .", "I thought a solution was to post a UIEventSubtypeRemoteControlNextTrack notification but i can t found how to build a UIEvent notification .", "The thing is that it doesn t work with hitTest : withEvent : because event allTouches returns an empty object .", "I keep thinking that there must be an elegant solution within the entire UIKit UIEvent UIResponder stack .", "I tried subclassing UIWindow and overriding sendEvent and sending the event to the external display s UIWindow as well but each UIEvent seems to have info in it that ties it to the UIWindow it originated in as the external display UIWindow did nothing with it when I sent it .", "I ve thought about swizzling UIView s touch-events but I m not even sure if that will help since UITouches and UIEvents are tied to the UIWindow they originated from and UIEvent doesn t seem to provide a way for me to create my own event .", "Well I would say forget about copying the UIEvent and take whatever it is you want from it and then send only that information to the view later on .", "I can gain the type of remote events from the UIEvent subtype and even if the device was shaken but there is no parameter for touch events.. . .. . .. . How do you identify those", "Here is my relevant code : .. . .. . here is the declaration of touchesMoved : withEvent : method : .. . .. . Seems like I need to explicitly convert UIEventTypeTouches to UIEvent how to fix that", "In fact neither are any of the touch-related UIEvent methods called as near as I can tell nor UIApplication s UIWindow s sendEvent : apparently .", "After all how would another object know what to do with that event and how should the first object properly finish its expected behavior", "I would suggest - creating the event with a different time or creating it an all day event .", "For an all day event .. . .. . For creating the event with a different time - I bumped up the day with different time .. . .. . Does this help", "I have been reading about an event queue but I do not yet see how I could get a reference to this queue object .", "Is there any way to delay the event of this touchBegan function", "And you can then create an event for that specific date .", "If no class handled that event ultimately that event is handled by NSObject .", "I implemented shake gesture event .", "What s wrong with keeping a reference to this event", "Without private API you cannot send remotecontrol event to your application .", "Take a look at GSEvent to know how to send an event to OS iOS .", "I want to be able to add the event to the next instance of a particular day .", "AppDelegate delegate UIApplication sharedApplication .delegate UIWindow window delegate.window .. . .. . window sendEvent : event .. . .. . Yes you can send event to window but you can not create your own event like Touch event .", "However if alert is shown I don t get event .", "Are event objects re-used in some unconventional manner", "And you can not tell window how to handle that event", "All touch-event s event type is UIEventSubtypeNone .", "So the question is really when the mouse event gets into the JS event queue .", "the UIImageView is the object with a center property UITouch location", "The second location should make itself known via a touchesBegan event .", "The UITouchDownEvent event must happen inside the button for the button to track the touch .", "Use event allTouches to get that array .", "I want to be able to have that event recurring on that day a certain number of times - lets say 4 .", "So I found solution https : github.com square KIF contains UIView-KIFAdditions with method that provides opportunity to send a touch-event .. . .. . also this links may be usefull How to send a touch-event to iPhone OS", "In that case it is a matter of calling nextEventMatchingMask and then sendEvent on the NSApplication object .", "Event Delivery http : developer.apple.com library ios documentation EventHandling Conceptual EventHandlingiPhoneOS EventsiPhoneOS EventsiPhoneOS.html apple ref doc uid TP40009541-CH2-SW4 chapter says .. . .. . The window object uses hit-testing and the responder chain to find the view to receive the touch-event .", "the superview could then decide to pass the true responder to this event .", "But if you need to handle event for UITableView then handle it for UIView", "You can probably get away with just passing nil for the event param :", "You cannot know number of touches here - event parameter is useless .", "So what example can clarify how an event can t be handled", "Edit : I ve found 2 event types in GSEvent.GSEventType : .. . .. . PS : - this use private API so it will be rejected if you post this app to AppStore .", "the next coming Monday .. . .. . 2 - I want to be able to have that event recurring on that day a certain number of times - lets say 4 .", "enter image description here http : i.stack.imgur.com uP0US.png .. . .. . what I did : .. . .. . I have created a custom view for my viewController View and have override hitTest : WithEvent : method : .. . .. . but the problem is that I can t detect swipe-gesture from UIEvent .", "the problem : .. . .. . I want when user try to drag scrollView To the right to send the event up to UIView so UIPanGestureRecognizer can handle the touch-event", "With scrollEnabled NO I could touch my subviews - but apparently the scrollview was only forwarding me the initial touch-event and all subsequent touches were part of that initial event .", "How would you allow a UIGestureRecognizer of a UIView to receive a touch-event but also make sure that another underlaying overlaying UIView also receives that very same touch-event", "Edit : Currently we are using TouchUpInside event only there we are checking .. . .. . But this is causing issue when user quickly taps on button .", "I want to keep the start event when UITouchPhaseBegan in startEvent and forward it to another view at a later time .", "But at a later time event might have changed for example to UITouchPhaseEnded and if I forward startEvent at this time it also has UITouchPhaseEnded .", "I m not sure how to implement this because I m not sure how I would find the time of the event .", "You could have a NSDate property which you assign every time the event is fired .", "You should be able to pinpoint what part of your implementation is involved in creating this event .", "I am working on a project where I want to manually run the main event-loop on IOS .", "To handle motion event on some certain vc your should override it in its extension : .. . .. . .. . .. . Hope it helps", "then use the event sendEvent in MyUIApplication .. . .. . and don t forget to add the class in main", "I think this could not be done pass touch-event to UIGestureRecognizer is private API .", "You can add your implementation for tracking touch-event inside this method .", "but how can I forward horizontal swipe and tap event to imageSlider", "I have to call to ui-event focus function with passing input name in it or constant value. . .. . .. . i have a function in controller .. . .. . but this prompts me error Is there any way to add a constant value in it .", "Here s the documentation https : developer.apple.com library ios documentation DataManagement Conceptual EventKitProgGuide CreatingRecurringEvents CreatingRecurringEvents.html for creating Recurring Events and it seems you cannot have an event recurring n times on a particular day .", "I am pretty new to swift so I am just hoping someone could help me out - I am trying to use UIEventKit to add an event to the calendar which I have figured out how to do however there are two things that I am unsure about : .. . .. . 1 - I want to be able to add the event to the next instance of a particular day .", "My problem is how to transfer tap event from C uiview to uitableviewcell of A uitableview .", "The subview immediately receives touch-events and responds to them if the scrolling touch-down event is on one of the subviews .", "The events go through then a cancellation touch-event is triggered later after the scroll view determines it is scrolling .", "I thought maybe there is some way to cancel the touch-event but I ve searched and so far have come up empty .", "I m trying to get the event touch-location in window within the UIApplication s sendEvent : method .", "When set to NO the receiver receives only the first touch-event in a multi-touch sequence .", "Now it s said that for example when a hit-test can t handle an event it passes it up a chain of responders .", "The UITouchDragEnter event means that the touch started inside the button generating UITouchDownEvent moved outside the button generating UITouchDragExitEvent then moved back inside the button generating UITouchDragEnterEvent .", "Summarizing Results : .. . .. . .. . .. . For reference here s the test case that hogs the CPU in the button click event handler : .. . .. . And here s the test case that hogs the CPU after the button client event handler has finished .", "I m just using the wrong object entry.audioManager .", "However I cannot find the equivalent means to gather events on IOS with a UIApplication object .", "Hi Karthik Thanks so much for taking the time to get back to me - unfortunately it probably would detract from the user-experience for them to have to pick their own date to store the event on as it will be something that just occurs every week .", "With regards to the recurring events I dont think I worded that question very well as i actually meant for the event to occur once on the same day for the next 4 weeks rather than on the same day - i m not sure whether this is something that is possible", "And on the Mac you may query the mouse position but in normal application flow there ll always be a mouse down before you get a mouse up event .", "When I try to print the event type it shows me something weird I think it s a memory location that doesn t exist : .. . .. . Somehow I think this is related to how I handle the rotation .", "@dooleyo you can NSLog the description of event that might help you to figure out .", "Best approach will be overwriting send event of UIApplication and UIWindow but its not possible in your case .", "Does anyone have a good clean workaround for the aggressive event-handling of MKMapView and annotation selection handling", "i want the touch to trigger something within the window but still forward the event along to views behind the window .", "Most events in the browser are processed in FIFO order first in first out via a central event queue .", "By returning NO will prevent the gesture recognizer from seeing this touch object .", "This is even true within a properly programmed app : All events regarding one touch are delivered to the very same object .", "If a UI event is what is hogging the JS Thread then it looks like the other UI events don t get into the queue in front of the timer but if the UI event finishes and some other action not on the UI hogs the CPU then the evnets are queued in proper FIFO order ." ] }
{ "confidence": [ 61.3668327331543, 55.36406707763672, 52.17976379394531, 47.515777587890625, 46.92146301269531, 46.09107971191406, 43.01686096191406, 42.8917121887207, 42.42026138305664, 41.82302474975586, 35.79469680786133, 34.75822448730469, 33.68389129638672, 32.04075622558594, 31.232803344726562, 31.088481903076172, 30.537311553955078, 27.530315399169922, 26.992801666259766, 26.95452117919922 ], "content": [ "Question : I need to copy a UIEvent in order to forward it to a UIView UIWebView at a later time . Is this possible And if so how can I achieve it example subclass of main UIWindow .. . .. . Has anyone done this before and found a solution that will not cause the app to be rejected by Apple ... . Comment : What s wrong with keeping a reference to this event Are event objects re-used in some unconventional manner Comment : I want to keep the start event when UITouchPhaseBegan in startEvent and forward it to another view at a later time . But at a later time event might have changed for example to UITouchPhaseEnded and if I forward startEvent at this time it also has UITouchPhaseEnded . Comment : How do you mean changed Comment : Well I would say forget about copying the UIEvent and take whatever it is you want from it and then send only that information to the view later on . Comment : From the docs : A UIEvent object representing a touch-event is persistent throughout a multi-touch sequence UIKit reuses the same UIEvent instance for every event delivered to the application . You should never retain an event object or any object returned from an event object . If you need to keep information from an event around from one phase to another you should copy that information from the UITouch or UIEvent object . .. . Answer : AppDelegate delegate UIApplication sharedApplication .delegate UIWindow window delegate.window .. . .. . window sendEvent : event .. . .. . Yes you can send event to window but you can not create your own event like Touch event . And you can not tell window how to handle that event", "Question : Here is my relevant code : .. . .. . here is the declaration of touchesMoved : withEvent : method : .. . .. . Seems like I need to explicitly convert UIEventTypeTouches to UIEvent how to fix that Comment : What are you trying to do You can t call touchesMoved : withEvent : manually . You can implement it as a delegate method or override it in a UIGestureRecognizer subclass . .. . Answer : The compiler is complaining because UIEventTypeTouches is an NSInteger defined in an enum and touchesMoved : withEvent : is expecting a UIEvent object . You can probably get away with just passing nil for the event param :", "Question : Is there any way to delay the event of this touchBegan function Comment : Why would you want a delay Are you looking for dispatch after Comment : I have a UIImageView that is chasing the position of another UIImageView which is touched and dragged on the screen . Comment : I don t understand what having a UIImageView has to do with anything . Comment : the UIImageView is the object with a center property UITouch location Comment : I was just wondering if the UIEvent touchesBegan can be delayed .. . Answer : Here is an example . It animates the movement of a square a half second after the touch moves :", "Question : I have two questions regarding Remote Control Events on iOS : .. . .. . 1 . I know that music applications are registered to remote control events and then can receive such events from the iPhone s player widget . Let s say I want my app to fire such events is that possible .. . 2 . How does headphones for example generate those events .. . Answer : Without private API you cannot send remotecontrol event to your application . The reason is we cannot create such an Event UIEvent to send out by using : .. . .. . You can however save a registered event then play back by calling the above-function .", "Question : Is there a way to gain the type of touch gestures that triggered a UIEvent So let s say I intercept a gesture with hitTest : withEvent : . How do I identify what kind of touch pinch tap swipe etc . happened that triggered this method I can gain the type of remote events from the UIEvent subtype and even if the device was shaken but there is no parameter for touch events.. . .. . .. . How do you identify those Comment : @blub : actually it is no duplicate -- the question here is about low-level touch detection in hitTest : withEvent : Comment : possible my fault sorry .. . Answer : You need to analysis the touches the count of touches and there position yourself . Another easier way is to add corresponding gesture recognizer to get the corresponding type . All touch-event s event type is UIEventSubtypeNone .", "Question : null .. . Answer : I have layout witch is shown in the figure below . It has 2 layers . First marked as C is transparent uiview with added pan gesture recognizer . It is used to syncing setting content offset of A and B view which are on second layer . Layer means uiview which is directly add to uiviewcontroller s view . The view A is uitableview with same option to select . My problem is how to transfer tap event from C uiview to uitableviewcell of A uitableview . I tried many approach : .. . .. . i.e using : .. . .. . - id hitTest : CGPoint point withEvent : UIEvent event .. . .. . - BOOL pointInside : CGPoint point withEvent : UIEvent event .. . .. . in UIView C but the problem is that i have two layers . enter image description here http : i.stack.imgur.com TxXGC.png Comment : Why not get rid of C and use the fact that a tableView is a s scrollView override viewDidScroll and synchronize A to B B to A this way Comment : View A and B are embedded in scrollview . First i tried build my layout interaction by viewDidScroll but in this method as parameter got only UIScrollview . And if i manually manipulate contentoffset for example A i don t get real user action . Another problem is that view A and B must react on pan gesture which start in view B and finish in view A", "Question : Simple question really : is there a way to tell whether a user double-tapped their headset remote to skip a track or whether they pushed the skip button in Control Center for example I realise they both use the RemoteControl UIEvent but I m wondering if I can discern . I d like to play a little auditory beep much like Spotify does upon skip or pause but only when performed via a headset . Can this be done .. . Answer : The method - remoteControlReceivedWithEvent : gives a UIEvent with a type and a subtype property . The type property gives the same result when you press the button on the headset or on the lockscreen . For me there is no method to differenciate the events except if you want to check if a headset is plugged to the device but it is not perfect.. .", "Question : Is there a way to gain the type of touch gestures that triggered a UIEvent So let s say I intercept a gesture with hitTest : withEvent : . How do I identify what kind of touch pinch tap swipe etc . happened that triggered this method I can gain the type of remote events from the UIEvent subtype and even if the device was shaken but there is no parameter for touch events.. . .. . .. . How do you identify those Comment : @blub : actually it is no duplicate -- the question here is about low-level touch detection in hitTest : withEvent : Comment : possible my fault sorry .. . Answer : You have to do touch analysis on your own . It is not that difficult but it is not done for you . Here a sample from some code I am actually using . It is not meant as a full-scale solution . It only detects basic tap swipe pinch gestures in a very concrete context that of my app and uses a rather uncool mechanism to deliver the gestures notifications . So it might apply to your case or more likely not but I hope it gives you an idea of what is required . Comment : I ll give it a test run and report back in a little while . Thanks Comment : please consider that my code is just a snippet : it is not meant as a full-scale solution . It only detects basic tap swipe pinch gestures in a very concrete context that of my app and uses a rather uncool mechanism to deliver the gestures notifications . I hope it gives you an idea of what is required . Comment : I am aware of that . : Comment : I am done with trying out your solution . The thing is that it doesn t work with hitTest : withEvent : because event allTouches returns an empty object . Although if I put your code into a regular touchesBegan : withevent : method it works . Comment : actually I am using that code inside of a custom UIWindow sendEvent : and there the touches are defined . I don t know what you are trying to do but would it be ok for you customizing your UIWindow and go the gesture detection there", "Question : I want to get two touch point on multitouch . I am touching and holding one point then after i touch second point on screen . Then touches moved method called but both time i get the frirst touch location.I am not geting second touch position in touches moved method . .. . Answer : The second location should make itself known via a touchesBegan event . In your UIView you need to have public methods for the OS to call and one of them is void touchesBegan : NSSet touches withEvent : UIEvent event . touchesMoved will only list existing touches . If you move both touch points later calls of touchesMoved should list pointers to both touches in the NSSet touches . It will be easier to help if you post the relevant part of your code . Please edit your question .", "Question : I can t seem to get the motion-detection methods to work with Swift 2.0 Xcode 7 . The error I m getting indicates : Method does not override any method from its superclass . I want to detect various motions using the built-in UIEvent methods. . i.e . shake . Here s what I have inside the class .. . .. . ... . The same problem was encountered here : Swift 2 migration problems http : stackoverflow.com questions 30788485 swift-2-migration-problems .. . Answer : The issue here is that the parameters have been updated in Swift 2.0 . The UIEvent parameter is now UIEvent . To avoid these issues in the future if you know the function to be overridden just start typing in override func and Xcode s autocomplete should give you the desired function .", "Question : I m writing an ios swift app and I want to include a support for shaking the device . As for now I want to print a msg to the console when user shakes his phone . I found this tutorial http : www.ioscreator.com tutorials detect-shake-gesture-ios8-swift and it looks super easy however there s one thing that bothers me . I want it to work from any view in the app not only a single one . So no matter where user currently is in the app - he should be able to invoke the shake method . Should I implement the method override func motionEnded motion : UIEventSubtype withEvent event : UIEvent in every panel then Or is there a way of implementing it once and populating it across the whole app .. . Answer : First of all lets find out where these motion methods come from as docs say : .. . .. . The UIResponder class defines an interface for objects that respond to and handle events . It is the superclass of UIApplication UIView and its subclasses. . https : developer.apple.com library ios documentation UIKit Reference UIResponder Class .. . .. . The event-handling methods for motion events are : .. . .. . So as you see to catch motion events on every screen of the app - we should override these methods in these screens . Thanks God with extensions - we can make it much easier : .. . .. . To incapculate motion logic lets make a protocol and name it MotionDelegate : .. . .. . .. . .. . And make an extension of UIViewController conforming MotionDelegate protocol : .. . .. . .. . .. . In this way motion handling will be working on EVERY UIViewController instances of your appliction . To handle motion event on some certain vc your should override it in its extension : .. . .. . .. . .. . Hope it helps Comment : Thank you it does help a lot Just two small questions - should I put this protocol in a completely new and separated file The same with extension - where exactly can I put it Comment : It is does not really matter but it is a good way to separate files to logic pieces so I would advise to implement protocol and vc extension in new file .", "Question : null .. . Answer : I m trying to mirror a view controller : .. . .. . 1 . app instantiates view controller 1 of class A .. . 2 . app instantiates view controller 2 also of class A on another UIWindow external display via Airplay or physical connector .. . 3 . any touch-event that view controller 1 receives should be mimicked on view controller 2 .. . .. . I ve got part of this working on things like MkMapViews and simple view controllers by just catching things like region changes or scrolling in vc1 and telling vc2 to set its region or scroll to that position having UIControl IBActions on vc1 also call the same action in vc2 etc . This works with simple cases but the problem comes with complex view controllers that have things like UITableViews with custom UITableViewCells that expand contract etc . I find myself having to implement every single possible delegate action and make a bunch of objects aware of things they shouldn t be aware of which just seems wrong if I m going to make this at all reusable . I ve tried walking the subview tree of vc1 and using objc setAssociatedObject to associate the UIResponders in the view controller instances with each other but I still have to catch every delegate action on vc1 to look up the UIResponder on vc2 to mimic the event . There has to be a simpler way to do this . I tried subclassing UIWindow and overriding sendEvent and sending the event to the external display s UIWindow as well but each UIEvent seems to have info in it that ties it to the UIWindow it originated in as the external display UIWindow did nothing with it when I sent it . How would I do this in a way that would allow me to abstract away the mirroring into a nice subclass or something so I don t have to litter every view controller with special-case code I ve thought about swizzling UIView s touch-events but I m not even sure if that will help since UITouches and UIEvents are tied to the UIWindow they originated from and UIEvent doesn t seem to provide a way for me to create my own event . NOTE : what I m trying to do is not default Airplay mirroring as I want the external display experience to take advantage of the full display resolution and dimensions . The idea is to allow an iPhone app to work on the device itself i.e . taller than it is wide while also providing an experience on an external display that is geared for that display wider than it is tall greater resolution opportunities to present info in a more readable HDTV-friendly format . Thoughts Comment : Any luck with this challenge Comment : Not really . It was a demo project and I ended up doing what I feared - that being implementing every single delegate I could checking to see if the VC had a mirror VC and if so calling the same delegate on the mirror VC . It was ugly and demanded that every VC was aware of it s mirror and while it worked for a lot of UI actions it didn t work for everything . I d really love to know how to do it better .", "Question : On Mac one can always get the location of the mouse outside the event stream ie even if you ve not subscribed to any delegate methods for mouseUp : et al by calling NSEvent mouseLocation . Is there any way on iOS to get current touch-events without listening to touchesBegan : .. . .. . I ask because there is at least one situation in which touchesBegan is not called : at app launch if a touch is already in progress touchesBegan is never called . In fact neither are any of the touch-related UIEvent methods called as near as I can tell nor UIApplication s UIWindow s sendEvent : apparently . I would like to vary the behavior of my app slightly based on whether a touch is in progress at launch . Is there any way to detect an in-progress touch at app launch Comment : What does at app launch mean for you application Do you do any time-consuming actions on the main thread at the load-time Comment : at app launch is when the user taps the app icon on the springboard and the app opens . Not getting touch-events is not because the app is unduly burdened with heavy processing it s because touches which are in progress when the app opens are not delivered to the app via the normal means . I m trying to find out if anyone knows a way outside the normal loop perhaps subclassing and overriding to get touches which are in progress arbitrarily from any method at any time . Comment : I think that this is not possible . UIApplication is not suitable for subclassing and that is the entry-point for your application Comment : Understood . You want to get touches that have been started at springboard and continues while you app is launching . I don t believe it is possible . Comment : UIApplication is easy subclassed . If there were a method which were being called on UIApplication for touches already in progress at launch I would go that route . Do you know of one .. . Answer : This cannot be done . The simple reason : The touch-events don t belong to your app . Each touch belongs-to some UI element or responder . As you already know this element gets the began moved ended cancelled messages . This is even true within a properly programmed app : All events regarding one touch are delivered to the very same object . After all how would another object know what to do with that event and how should the first object properly finish its expected behavior While you can or could but probably shouldn t find a work around within your app there s just no way for cross-app-touch passings . And on the Mac you may query the mouse position but in normal application flow there ll always be a mouse down before you get a mouse up event . To be honest I don t see any reason why this would be needed anyway.. . oh wait.. . I could split my app icon into several areas.. . not sure if it would already break privacy laws though if you get to know where the user has his icon on screen . Comment : Thanks for the time put into the answer and the clarification . While this seems to be the current canonical answer I feel like I want to wait until there is an answer to this question - eg in iOS 9 after my bug report is addressed I think I can change answers later though so.. .", "Question : So I m doing custom gesture recognizing and I ve ran into trouble . I need to monitor all the current touches but touchesBegan touchesEnded touchesMoved and touchesCancelled all only give me the touches that they are monitoring . I need to do calculations on all the touches regardless of wether they are being monitored or not . I ve done some research and I ve seen suggestions to monitor the touches myself but it hasn t been going well for me . Here is my code : .. . .. . What I want : myTouches should be an accurate representation of all the touches on the screen . What I get : myTouches constantly grows although sometimes touches from events are correctly registered as the same as touches in myTouches . I also did a test where I had an integer count the number of touches registered in touchesBegan and subtracted the touches registered in touchesEnded and the number always came out to be positive meaning that more touches are being registered than ended . Please help Comment : you are taking touchesCancelled also in consideration Comment : I do have myTouches minusSet : touches in touchesCancelled : . Comment : The UIEvent has a different array of touches than the NSSet touches . I had to use this array to do manual multitouch events . I m not sure if it is the complete set but it is more complete than touches . Use event allTouches to get that array . Comment : Thanks it turns out that was all I needed to do . allTouches seems to give me all the touches on the screen which is what I need . Make it an answer and I ll accept it . .. . Answer : Try subclass of UIApplication to monitor all the touches in application . then use the event sendEvent in MyUIApplication .. . .. . and don t forget to add the class in main Comment : Where does sendEvent : go How does this interact with the UIViewController Comment : Since MyUIApplication is a sub class of UIApplication sendEvent : will respond to all events irrespective to UIViewController .", "Question : On Mac one can always get the location of the mouse outside the event stream ie even if you ve not subscribed to any delegate methods for mouseUp : et al by calling NSEvent mouseLocation . Is there any way on iOS to get current touch-events without listening to touchesBegan : .. . .. . I ask because there is at least one situation in which touchesBegan is not called : at app launch if a touch is already in progress touchesBegan is never called . In fact neither are any of the touch-related UIEvent methods called as near as I can tell nor UIApplication s UIWindow s sendEvent : apparently . I would like to vary the behavior of my app slightly based on whether a touch is in progress at launch . Is there any way to detect an in-progress touch at app launch Comment : What does at app launch mean for you application Do you do any time-consuming actions on the main thread at the load-time Comment : at app launch is when the user taps the app icon on the springboard and the app opens . Not getting touch-events is not because the app is unduly burdened with heavy processing it s because touches which are in progress when the app opens are not delivered to the app via the normal means . I m trying to find out if anyone knows a way outside the normal loop perhaps subclassing and overriding to get touches which are in progress arbitrarily from any method at any time . Comment : I think that this is not possible . UIApplication is not suitable for subclassing and that is the entry-point for your application Comment : Understood . You want to get touches that have been started at springboard and continues while you app is launching . I don t believe it is possible . Comment : UIApplication is easy subclassed . If there were a method which were being called on UIApplication for touches already in progress at launch I would go that route . Do you know of one .. . Answer : I think you could simply extend the application launch . When I had time consuming tasks during my application launch I used to show the same splash-screen with a UIActivityIndicator while the action was being carried out . You could simply create a NSTimer wait for about 2 seconds and during this time check for touches while the splash-screen will still be showing . To do this in applicationDidFinishLaunch push a ViewController that looks exactaly like the splash-screen and check for touches in this ViewController . After those 2 seconds proceed with normal initialisation . This behaviour also helps if you have time consuming tasks during initialisation . I know it s a workaround but my guess is that it is not possible to check for touches because application will be working on the main thread and the touches also processes on the main thread . This could happen also because there are no ViewControllers or UIWindow initialised and ready to listen to touches . Hope it helps .", "Question : On Mac one can always get the location of the mouse outside the event stream ie even if you ve not subscribed to any delegate methods for mouseUp : et al by calling NSEvent mouseLocation . Is there any way on iOS to get current touch-events without listening to touchesBegan : .. . .. . I ask because there is at least one situation in which touchesBegan is not called : at app launch if a touch is already in progress touchesBegan is never called . In fact neither are any of the touch-related UIEvent methods called as near as I can tell nor UIApplication s UIWindow s sendEvent : apparently . I would like to vary the behavior of my app slightly based on whether a touch is in progress at launch . Is there any way to detect an in-progress touch at app launch Comment : What does at app launch mean for you application Do you do any time-consuming actions on the main thread at the load-time Comment : at app launch is when the user taps the app icon on the springboard and the app opens . Not getting touch-events is not because the app is unduly burdened with heavy processing it s because touches which are in progress when the app opens are not delivered to the app via the normal means . I m trying to find out if anyone knows a way outside the normal loop perhaps subclassing and overriding to get touches which are in progress arbitrarily from any method at any time . Comment : I think that this is not possible . UIApplication is not suitable for subclassing and that is the entry-point for your application Comment : Understood . You want to get touches that have been started at springboard and continues while you app is launching . I don t believe it is possible . Comment : UIApplication is easy subclassed . If there were a method which were being called on UIApplication for touches already in progress at launch I would go that route . Do you know of one .. . Answer : You might try handling the hitTest : withEvent : instead . Since according to apple doc Returns the farthest descendant of the receiver in the view-hierarchy including itself that contains a specified point .", "Question : How would you allow a UIGestureRecognizer of a UIView to receive a touch-event but also make sure that another underlaying overlaying UIView also receives that very same touch-event Lets say I have got the following view-hierachie : view hierachie scribble http : i.stack.imgur.com BtYpK.jpg .. . .. . Views A blue and B red are both subviews of the same superview gray . In other words they are both siblings and the order decides on which of them covers the other . Option 1 : View B red has a regular UIButton as its subview . Option 2 : View A blue has a regular UIButton as its subview . Given Option 1 for the sake of explanations : View A blue has a UITapGestureRecognizer or maybe even more other UIGestureRecognizers attached . What would be the most elegant approach to make sure that the UIButton does receive all touches on its region but also the view A blue receives those touches on its UITapGestureRecognizer If possible by any means the solution should not involve extending the UIButton -class and manually forwarding any events from the button itself . Imagine view B would contain a lot more controls and not just a button . All of those controls should somehow allow view A to receive the touches on its UIGestureRecognizer . I did provide two options as I do not care which of those views A or B comes first as long as both receive the touches . All of my approaches so far abruptly reached dead-ends . Maybe a custom responder-chain would be a nice solution I keep thinking that there must be an elegant solution within the entire UIKit UIEvent UIResponder stack . Comment : +1 for such a thoroughly crafted question : .. . Answer : Have you tried with this http : developer.apple.com library ios documentation uikit reference UIGestureRecognizer Class Reference Reference.html cancelsTouchesInView A Boolean value affecting whether touches are delivered to a view when a gesture is recognized . Comment : I did try that with both Option 1 and 2 and using that property did not make any difference in both cases only the button or only the view received the touches on that button-region . Comment : Whoops I did actually try a different option when attempting to get cancelsTouchesInView to work . My button was a sibling of view A and B hence the property had no effect . When using option 1 as described in my question that property works exactly as described . Any touch onto that button triggers the button touch-up-inside as well as a touch gesture-recognition on the superview of that button . That does not actually solve my entire quest get touch recognized also onto that other view but it gets me a big step closer to the goal - hence a +1 - ty . Comment : example code in my case - IBAction handleHoldOnPlay : UIGestureRecognizer sender sender.cancelsTouchesInView NO .. . thank you sergio", "Question : null .. . Answer : I am working on a project where I want to manually run the main event-loop on IOS . That is to say I want to dequeue the UIEvents myself from the source and then send them on to the UIApplication . I have found examples on how to do this for OS X and it works . In that case it is a matter of calling nextEventMatchingMask and then sendEvent on the NSApplication object . However I cannot find the equivalent means to gather events on IOS with a UIApplication object . I have been reading about an event queue but I do not yet see how I could get a reference to this queue object . Does anybody know how I could acquire UIEvents from the source so that I can send them to the UIApplication", "Question : I m trying to control the active music-player from my app to skip the currently playing song . I m able to do it for the iPod music-player with .. . .. . The problem is that i would like to control the Spotify app or any other music app currently playing . Since they can be controlled with the control on the lock screen i though there might be a way to do it . I thought a solution was to post a UIEventSubtypeRemoteControlNextTrack notification but i can t found how to build a UIEvent notification . Has anyone already solved something like that Thanks .. . Answer : You can not stop Spotify app or any other app from playing using your app . Spotify has it s own process which is separated from your process . The notification you are trying to send will be sent within your app the system uses this notification to send to all processes apps registered for this notification when the user interacts with the remote . What you are doing is initiating a music-player for your app and skipping to next track which will not affect Spotify app at all Because Spotify has it s own MPMusicPlayerController instance Comment : Thanks for your response i understand that Spotify has it s own MPMusicPlayerController that s why i stated that this solution doesn t work... . The question is : is there a way to simulate the next notification send by Apple from the lock screen Because this notification allow any player currently playing a song to skip to the next . Comment : No @MtotheK you can not this is a system private method and unfortunately you cannot do this on iOS", "Question : null .. . Answer : in my viewController I have an imageSlider which is above a UITableView . I want to forward vertical swipeGesture from imageSlider to the underlying tableview . so when I swipe vertically on imageSlider underlying tableView begins to scrolling . tableview can scroll below imageSlider .. . .. . enter image description here http : i.stack.imgur.com uP0US.png .. . .. . what I did : .. . .. . I have created a custom view for my viewController View and have override hitTest : WithEvent : method : .. . .. . but the problem is that I can t detect swipe-gesture from UIEvent . because allTouches property is empty I can put imageSlider below tableView so When I start to scroll vertically on imageSlider tableView begins to start scrolling . but how can I forward horizontal swipe and tap event to imageSlider so whats your idea how do you handle this dilemma Comment : When you say beneath it is ambiguous . Do you mean beneath on the y axis so the whole table view is visible or z-axis so the top of the table view is partially obscured by the image view Comment : z-axis . tableView can goes under imageSlider . like appStore app on your iPhone . when you scroll vertically on the banner slider tableView starts to scroll Comment : Possible duplicate of Forward vertical scrolls from UIScrollView to a sibling UITableView http : stackoverflow.com questions 26967940 forward-vertical-scrolls-from-uiscrollview-to-a-sibling-uitableview Comment : In the App Store the banner slider is most likely a cell in a collection view and doesn t remain in a fixed position . It doesn t slides vertically . Which exactly do you want You can do this with a table view but actually I would do it in a UICollectionView they probably do that for the App Store . You can add the images slider as a supplementary view in a fixed position at the top of the collection view . This makes it easy to change layouts in the future and gives more flexibility around the behaviour of the supplementary view images slider . Comment : in the appStore app bannerSlider is fixed at top but collectionView supplementaryView is not fixed at top another note is my custom imageSlider doesn t have a fixed height as you scroll down imageSlider scales down to 44pt . like safari app address-bar" ] }
[ "yes-answer-long", "yes-answer-short" ]
ios
UNK_RELATION
asp.net-mvc-awesome@asp.net-mvc@90
asp.net-mvc-awesome -- asp.net-mvc-awesome is a library of jquery based ajax helpers for @placeholder .
{ "confidence": [ 55.540714263916016, 48.94580841064453, 45.62093734741211, 43.58934020996094, 35.80858612060547, 31.679807662963867, 31.489566802978516, 29.294200897216797, 26.800500869750977, 23.53569793701172, 22.323680877685547, 19.892269134521484, 17.427621841430664, 17.118194580078125, 17.118194580078125, 17.118194580078125, 17.118194580078125, 17.118194580078125, 17.017288208007812, 15.388794898986816, 15.388794898986816, 15.300432205200195, 13.96750545501709, 13.316062927246094, 13.316062927246094, 13.316062927246094, 13.316062927246094, 13.316062927246094, 13.316062927246094, 13.316062927246094, 13.316062927246094, 13.316062927246094, 13.316062927246094, 13.316062927246094, 13.316062927246094, 13.316062927246094, 13.316062927246094, 13.316062927246094, 13.316062927246094, 13.316062927246094, 13.316062927246094, 13.316062927246094, 13.316062927246094, 13.316062927246094, 13.316062927246094, 13.316062927246094, 13.316062927246094, 10.884652137756348, 10.884652137756348, 10.884652137756348, 10.884652137756348, 10.884652137756348, 10.884652137756348, 10.884652137756348, 10.884652137756348, 10.884652137756348, 10.884652137756348, 10.884652137756348, 10.884652137756348, 10.884652137756348, 10.884652137756348, 10.884652137756348, 10.884652137756348, 10.884652137756348, 10.884652137756348, 10.884652137756348, 10.884652137756348, 10.884652137756348, 10.884652137756348, 10.884652137756348, 10.884652137756348, 10.884652137756348, 10.884652137756348, 10.884652137756348, 10.884652137756348 ], "content": [ "what is the live nuget code for that ASP.net MVC Awesome tool", "I have Added ASP.net MVC Awesome dll as refference and put themes js and css file to my project and add awesome namespaces in Views web.config .", "I want to append a .Parent attribute to my awesome mvc grid using jquery-on dropdown change .", "it looks like you re building an asp.net-mvc-4 project but you ve referenced the mvc 5 version of the library you need to reference the mvc 4 version of Omu.AwesomeMvc or build upgrade your project to mvc5", "@Alp that package was removed the nuget packages mentioned in the answer are the microsoft asp.net-mvc package and related", "Thanks Omu btw awesome project it is. .", "It might be using heigher version MVC pls try with updating MVC package either nuget or manually", "the demo is using mvc 5 version of the library and is referencing Microsoft.AspNet.Mvc version 5.1.2 in packages.config the nuget packages get pulled when you first build see readme.txt for some reason you are referencing the Aspnet.mvc version 3 .. . .. . in case you need to use the library on a different version of mvc you can download the library trial version http : aspnetawesome.com Download MvcTrial it has separate dlls for mvc 3 4 and 5", "I m using this code in JavaScript file to open awesome MVC pop-up but it s not working any help appreciated .. . .. . right now i m using this code for pop-up and it is giving me error like a is undefined in awesomeMVC.js script file any idea what is this error is", "Assembly Omu.AwesomeMvc Version 4.7.3.1 Culture neutral PublicKeyToken 9c6fbba722ea1caf uses System.Web.Mvc Version 5.0.0.0 Culture neutral PublicKeyToken 31bf3856ad364e35 which has a higher version than referenced assembly System.Web.Mvc Version 4.0.0.0 Culture neutral PublicKeyToken 31bf3856ad364e35 d : MVC Projects Shipping Management System trunk RefDll Omu.AwesomeMvc.dll SMS.Controls", "How can I hide the Ok button in Awesome Popup Form Action .. . .. . this my code : .. . .. . I want to hide The Ok button it in the PopupForm having the Title D tail", "you re using a popup but you want to use the PopupForm you can download the Awesome v 1.9 the one that you re using Demo from codeplex awesome.codeplex.com releases view 66067 https : awesome.codeplex.com releases view 66067", "In case of popup use ajax submit rather than the normal submission of the form .", "How would I do this", "why do you need this", "I have multiple grids in my project .", "And a partial view with drop downs instead of appending .Parent attribute in each grid I want to generate it dynamically on drop down change so which ever gird it is it will get the drop down value", "this still doesn t explain why do you need this dynamically you have a dropdown and a few grids if you set parent on all of them when the dropdown changes value they will reload", "try follow the instructions on the installation page http : aspnetawesome.com learn mvc Installation and it should just work .. . .. . or if you just do the first step and download the minimum setup demo http : aspnetawesome.com Download MvcMinSetupDemo open the solution file and Build this is when all the packages get pulled from nuget note you have to have packages restore enabled see readme.txt in the demo download then you will have a running demo project that you can copy from file by file until you get it working in your other project .", "Recently come across a Master Detail CRUD Demo using Grid and PopupForm by aspnetawesome.com http : aspnetawesome.com .", "I downloaded the demo because it was exactly what i was looking for but when i try to run it i keep getting the error .. . .. . Error 4 Assembly Omu.AwesomeMvc Version 4.7.3.1 Culture neutral PublicKeyToken 9c6fbba722ea1caf uses System.Web.Mvc Version 5.0.0.0 Culture neutral PublicKeyToken 31bf3856ad364e35 which has a higher version than referenced assembly System.Web.Mvc Version 3.0.0.0 Culture neutral PublicKeyToken 31bf3856ad364e35 C : Users Administrator Downloads Compressed AwesomeMvcDemo AwesomeMvcDemo bin Omu.AwesomeMvc.dll .. . .. . thanks for your response .", "the code you show should work providing that everything else is corect .. . .. . for example if I put this line : .. . .. . in the demo app https : awesome.codeplex.com releases view 121694 PopupFormDemo Index.aspx it works and the popup will have the desired size .. . .. . my guess is that some js files are modified corrupted or a buggy jqueryUI version or some other js is overriding the default behaviour of jquery-ui-dialog", "If the problem is that your view is getting the site s layout surrounding it you should be able to avoid that by specifying that it s a partial view : .. . .. . Update .. . .. . You need to make the button or form in your dialog be picked up by a JavaScript handler that does the form submission via AJAX and replaces the dialog contents with what comes back from the server .", "in latest version 3.5 you can call .. . .. . this is used in the wizard demo http : demo.aspnetawesome.com WizardDemo .. . .. . and after call .Button to add any buttons you need", "With use of .hide : .. . .. . The matter of fact is that you have to mention your situation or scenario where and how do you want to hide it .", "update :", "I want to hide The Ok button it in the PopupForm having the Title D tail", "just updated the answer .", "No it is not Ok", "Check your console to see if you have any javascript errors click F12 in google-chrome go to console .", "The line in the if clause isn t doing anything .", "It s just concatenating strings .", "It also looks like you re mixing javascript and razor code there which you ll need to correct .", "You forgot the serverside code : @ in Razor and in asp", "you can use the InitPopupForm helper to initialize the popupform and after call awe.open name in js to open the popup .. . .. . example : .. . .. . an example where the popup form is used with a grid for CRUD operations : http : demo.aspnetawesome.com GridCrudDemo", "Thanks for you r reply", "When I set the height and width of the popupform the values are not taken into account .", "No matter what values i set the size of the popup remains the same .", "Is there anything more to do", "Yes it was indeed some js file .", "@vishalk you should click the V under the upvote downvote if this is the accepted answer", "Project Build Succesfully but html-helper doesn t work in intellisense .", "could you please give more details the base html-helper doesn t work things like Html.Textbox or Html.Awe .Textbox if you still write it and run does the page work do you get an error message", "also next to Omu.AwesomeMvc.dll there s is Omu.AwesomeMvc.xml the presence of that file will insure that you have documentation for intellisense", "Install-Package MvcProjectAwesome is not working .", "When I run that I got These errors .", "Install-Package : Unable to find package MvcProjectAwesome At line : 1 char : 1 + Install-Package MvcProjectAwesome + CategoryInfo : NotSpecified : : Install-Package Exception + FullyQualifiedErrorId : NuGetCmdletUnhandledException NuGet.PackageManagement.PowerShellCmdlets.InstallP ackag eCommand", "On my layout view I have .. . .. . This renders a button that creates a dialog where a view Create is rendered .", "Everything works fine .", "The problem is when I submit the form if the ModelState is not valid I want to return the view with the model and the validation messages .", "But if I return the view like this .. . .. . The browser shows the view as a whole .", "How can I return the view to the dialog that is opened", "Here s one example http : stackoverflow.com a 5410121 120955 of how you might do that .", "It as the same result .", "The view is rendered as the main page instead of being returned to the dialog", "@MiguelTeixeira : Sorry I thought your problem was that the returned whole page was being displayed inside your dialog .", "I ve updated my answer .", "Bear in mind that this is a simplistic answer that will have other caveats .", "For example how does the javascript handler decide whether to update the dialog or change the whole page", "You ll need to decide how you want to deal with the complicated parts yourself .", "You re using the Popup helper which only creates a popup the PopupForm creates a popup that handles form submits also adds an Ok and Cancel button .. . .. . http : awesome.codeplex.com wikipage title PopupForm .. . .. . .. . .. . so in your case the browser was showing the view as a whole because the submit wasn t handled you should use the PopupForm instead", "I m trying to incorporate a bootstrap toggle http : www.bootstraptoggle.com into a column of my AwesomeMVC Grid http : demo.aspnetawesome.com GridDemo but the toggle doesn t get rendered correctly even after initializing the bootstrap toggle .", "This is because the AwesomeMVC grid gets rendered after page load .", "I don t want to implement a timeout in initializing the bootstrap toggles as Grid loading times may be different .", "Has anyone tried implementing any similar bootstrap plugin with AwesomeMVC", "Here s my code sample .", "View .. . .. . Javascript", "there s the aweload event that you can hook up to also when you render the checkbox I think you need to set its checked state so you should end up with something like this : .. . .. . I also removed .Selectable SelectionType.None because it is like that by default and also I see that you group-by a boolean column active not sure if that makes sense it will just split your grid in 2 groups Column.Name is not required it is used for binding to model for sorting grouping and it s better to always have at least 1 column without width if you set width to all columns and the grid width doesn t match they work as percentages", "Thanks Omu", "I m binding it to a model thus the name column as for the grouping it s part of the requirements .", "Thanks for the width tip it s a neat trick to keep one without width spec .", "I have been using AweomeGrid for about 2 mvc4 Projects Now and It has been working fine However I am completely bumped when I tried the mvc5 Branch .", "I basically have a grid and controller setup as follows .. . .. . And the controller listing is as follows .. . .. . The problem is that The controller actually returns the data but somehow strangely The Grid just displays empty table cells without any values at all .", "The number of empty rows displayed however corresponda to the records returned by the controller method .. . .. . Please what Am I doing wrong .. . .. . A speedy answer will be appreaciated", "it s possible that on mvc5 you re using minification and the minification broke the script try adding AwesomeMvc.js without including it in a script bundle .. . .. . btw using version 4.7 this shouldn t happen anymore" ] }
{ "confidence": [ 50.875789642333984, 45.264854431152344, 43.51117706298828, 33.594337463378906, 31.797348022460938, 27.866985321044922, 27.696453094482422, 25.33185577392578, 25.33185577392578, 24.2489070892334, 23.3338565826416, 10.543094635009766, 10.543094635009766 ], "content": [ "Question : I have Added ASP.net MVC Awesome dll as refference and put themes js and css file to my project and add awesome namespaces in Views web.config . Project Build Succesfully but html-helper doesn t work in intellisense . Comment : could you please give more details the base html-helper doesn t work things like Html.Textbox or Html.Awe .Textbox if you still write it and run does the page work do you get an error message .. . Answer : try follow the instructions on the installation page http : aspnetawesome.com learn mvc Installation and it should just work .. . .. . or if you just do the first step and download the minimum setup demo http : aspnetawesome.com Download MvcMinSetupDemo open the solution file and Build this is when all the packages get pulled from nuget note you have to have packages restore enabled see readme.txt in the demo download then you will have a running demo project that you can copy from file by file until you get it working in your other project . also next to Omu.AwesomeMvc.dll there s is Omu.AwesomeMvc.xml the presence of that file will insure that you have documentation for intellisense Comment : what is the live nuget code for that ASP.net MVC Awesome tool Install-Package MvcProjectAwesome is not working . When I run that I got These errors . Install-Package : Unable to find package MvcProjectAwesome At line : 1 char : 1 + Install-Package MvcProjectAwesome + CategoryInfo : NotSpecified : : Install-Package Exception + FullyQualifiedErrorId : NuGetCmdletUnhandledException NuGet.PackageManagement.PowerShellCmdlets.InstallP ackag eCommand Comment : @Alp that package was removed the nuget packages mentioned in the answer are the microsoft asp.net-mvc package and related", "Question : Assembly Omu.AwesomeMvc Version 4.7.3.1 Culture neutral PublicKeyToken 9c6fbba722ea1caf uses System.Web.Mvc Version 5.0.0.0 Culture neutral PublicKeyToken 31bf3856ad364e35 which has a higher version than referenced assembly System.Web.Mvc Version 4.0.0.0 Culture neutral PublicKeyToken 31bf3856ad364e35 d : MVC Projects Shipping Management System trunk RefDll Omu.AwesomeMvc.dll SMS.Controls .. . Answer : it looks like you re building an asp.net-mvc-4 project but you ve referenced the mvc 5 version of the library you need to reference the mvc 4 version of Omu.AwesomeMvc or build upgrade your project to mvc5", "Question : null .. . Answer : I want to append a .Parent attribute to my awesome mvc grid using jquery-on dropdown change . How would I do this Comment : why do you need this Comment : I have multiple grids in my project . And a partial view with drop downs instead of appending .Parent attribute in each grid I want to generate it dynamically on drop down change so which ever gird it is it will get the drop down value Comment : this still doesn t explain why do you need this dynamically you have a dropdown and a few grids if you set parent on all of them when the dropdown changes value they will reload", "Question : I m using this code in JavaScript file to open awesome MVC pop-up but it s not working any help appreciated .. . .. . right now i m using this code for pop-up and it is giving me error like a is undefined in awesomeMVC.js script file any idea what is this error is Comment : Check your console to see if you have any javascript errors click F12 in google-chrome go to console . Comment : The line in the if clause isn t doing anything . It s just concatenating strings . It also looks like you re mixing javascript and razor code there which you ll need to correct . Comment : You forgot the serverside code : @ in Razor and in asp .. . Answer : you can use the InitPopupForm helper to initialize the popupform and after call awe.open name in js to open the popup .. . .. . example : .. . .. . an example where the popup form is used with a grid for CRUD operations : http : demo.aspnetawesome.com GridCrudDemo Comment : Thanks for you r reply", "Question : Recently come across a Master Detail CRUD Demo using Grid and PopupForm by aspnetawesome.com http : aspnetawesome.com . I downloaded the demo because it was exactly what i was looking for but when i try to run it i keep getting the error .. . .. . Error 4 Assembly Omu.AwesomeMvc Version 4.7.3.1 Culture neutral PublicKeyToken 9c6fbba722ea1caf uses System.Web.Mvc Version 5.0.0.0 Culture neutral PublicKeyToken 31bf3856ad364e35 which has a higher version than referenced assembly System.Web.Mvc Version 3.0.0.0 Culture neutral PublicKeyToken 31bf3856ad364e35 C : Users Administrator Downloads Compressed AwesomeMvcDemo AwesomeMvcDemo bin Omu.AwesomeMvc.dll .. . .. . thanks for your response . .. . Answer : the demo is using mvc 5 version of the library and is referencing Microsoft.AspNet.Mvc version 5.1.2 in packages.config the nuget packages get pulled when you first build see readme.txt for some reason you are referencing the Aspnet.mvc version 3 .. . .. . in case you need to use the library on a different version of mvc you can download the library trial version http : aspnetawesome.com Download MvcTrial it has separate dlls for mvc 3 4 and 5", "Question : Recently come across a Master Detail CRUD Demo using Grid and PopupForm by aspnetawesome.com http : aspnetawesome.com . I downloaded the demo because it was exactly what i was looking for but when i try to run it i keep getting the error .. . .. . Error 4 Assembly Omu.AwesomeMvc Version 4.7.3.1 Culture neutral PublicKeyToken 9c6fbba722ea1caf uses System.Web.Mvc Version 5.0.0.0 Culture neutral PublicKeyToken 31bf3856ad364e35 which has a higher version than referenced assembly System.Web.Mvc Version 3.0.0.0 Culture neutral PublicKeyToken 31bf3856ad364e35 C : Users Administrator Downloads Compressed AwesomeMvcDemo AwesomeMvcDemo bin Omu.AwesomeMvc.dll .. . .. . thanks for your response . .. . Answer : It might be using heigher version MVC pls try with updating MVC package either nuget or manually", "Question : When I set the height and width of the popupform the values are not taken into account . No matter what values i set the size of the popup remains the same . Is there anything more to do .. . Answer : the code you show should work providing that everything else is corect .. . .. . for example if I put this line : .. . .. . in the demo app https : awesome.codeplex.com releases view 121694 PopupFormDemo Index.aspx it works and the popup will have the desired size .. . .. . my guess is that some js files are modified corrupted or a buggy jqueryUI version or some other js is overriding the default behaviour of jquery-ui-dialog Comment : Yes it was indeed some js file . Thanks Omu btw awesome project it is. . Comment : @vishalk you should click the V under the upvote downvote if this is the accepted answer", "Question : How can I hide the Ok button in Awesome Popup Form Action .. . .. . this my code : .. . .. . I want to hide The Ok button it in the PopupForm having the Title D tail .. . Answer : in latest version 3.5 you can call .. . .. . this is used in the wizard demo http : demo.aspnetawesome.com WizardDemo .. . .. . and after call .Button to add any buttons you need", "Question : How can I hide the Ok button in Awesome Popup Form Action .. . .. . this my code : .. . .. . I want to hide The Ok button it in the PopupForm having the Title D tail .. . Answer : With use of .hide : .. . .. . The matter of fact is that you have to mention your situation or scenario where and how do you want to hide it . update : Comment : I want to hide The Ok button it in the PopupForm having the Title D tail Comment : just updated the answer . Comment : No it is not Ok", "Question : On my layout view I have .. . .. . This renders a button that creates a dialog where a view Create is rendered . Everything works fine . The problem is when I submit the form if the ModelState is not valid I want to return the view with the model and the validation messages . But if I return the view like this .. . .. . The browser shows the view as a whole . How can I return the view to the dialog that is opened Comment : you re using a popup but you want to use the PopupForm you can download the Awesome v 1.9 the one that you re using Demo from codeplex awesome.codeplex.com releases view 66067 https : awesome.codeplex.com releases view 66067 Comment : In case of popup use ajax submit rather than the normal submission of the form . .. . Answer : You re using the Popup helper which only creates a popup the PopupForm creates a popup that handles form submits also adds an Ok and Cancel button .. . .. . http : awesome.codeplex.com wikipage title PopupForm .. . .. . .. . .. . so in your case the browser was showing the view as a whole because the submit wasn t handled you should use the PopupForm instead", "Question : On my layout view I have .. . .. . This renders a button that creates a dialog where a view Create is rendered . Everything works fine . The problem is when I submit the form if the ModelState is not valid I want to return the view with the model and the validation messages . But if I return the view like this .. . .. . The browser shows the view as a whole . How can I return the view to the dialog that is opened Comment : you re using a popup but you want to use the PopupForm you can download the Awesome v 1.9 the one that you re using Demo from codeplex awesome.codeplex.com releases view 66067 https : awesome.codeplex.com releases view 66067 Comment : In case of popup use ajax submit rather than the normal submission of the form . .. . Answer : If the problem is that your view is getting the site s layout surrounding it you should be able to avoid that by specifying that it s a partial view : .. . .. . Update .. . .. . You need to make the button or form in your dialog be picked up by a JavaScript handler that does the form submission via AJAX and replaces the dialog contents with what comes back from the server . Here s one example http : stackoverflow.com a 5410121 120955 of how you might do that . Comment : It as the same result . The view is rendered as the main page instead of being returned to the dialog Comment : @MiguelTeixeira : Sorry I thought your problem was that the returned whole page was being displayed inside your dialog . I ve updated my answer . Bear in mind that this is a simplistic answer that will have other caveats . For example how does the javascript handler decide whether to update the dialog or change the whole page You ll need to decide how you want to deal with the complicated parts yourself .", "Question : I m trying to incorporate a bootstrap toggle http : www.bootstraptoggle.com into a column of my AwesomeMVC Grid http : demo.aspnetawesome.com GridDemo but the toggle doesn t get rendered correctly even after initializing the bootstrap toggle . This is because the AwesomeMVC grid gets rendered after page load . I don t want to implement a timeout in initializing the bootstrap toggles as Grid loading times may be different . Has anyone tried implementing any similar bootstrap plugin with AwesomeMVC Here s my code sample . View .. . .. . Javascript .. . Answer : there s the aweload event that you can hook up to also when you render the checkbox I think you need to set its checked state so you should end up with something like this : .. . .. . I also removed .Selectable SelectionType.None because it is like that by default and also I see that you group-by a boolean column active not sure if that makes sense it will just split your grid in 2 groups Column.Name is not required it is used for binding to model for sorting grouping and it s better to always have at least 1 column without width if you set width to all columns and the grid width doesn t match they work as percentages Comment : Thanks Omu I m binding it to a model thus the name column as for the grouping it s part of the requirements . Thanks for the width tip it s a neat trick to keep one without width spec .", "Question : I have been using AweomeGrid for about 2 mvc4 Projects Now and It has been working fine However I am completely bumped when I tried the mvc5 Branch . I basically have a grid and controller setup as follows .. . .. . And the controller listing is as follows .. . .. . The problem is that The controller actually returns the data but somehow strangely The Grid just displays empty table cells without any values at all . The number of empty rows displayed however corresponda to the records returned by the controller method .. . .. . Please what Am I doing wrong .. . .. . A speedy answer will be appreaciated .. . Answer : it s possible that on mvc5 you re using minification and the minification broke the script try adding AwesomeMvc.js without including it in a script bundle .. . .. . btw using version 4.7 this shouldn t happen anymore" ] }
[ "yes-answer-long", "yes-answer-short" ]
asp.net-mvc
UNK_RELATION
react.rb@wrapper@53
react.rb -- react.rb is a ruby opal reactjs library @placeholder for building user interfaces in pure ruby .
{ "confidence": [ 61.8563232421875, 53.72083282470703, 52.716285705566406, 52.457584381103516, 47.853233337402344, 46.55498504638672, 45.903167724609375, 44.51494598388672, 43.66582489013672, 41.761634826660156, 41.761634826660156, 41.761634826660156, 41.425819396972656, 41.425819396972656, 41.10077667236328, 39.73590850830078, 39.66155242919922, 38.57917404174805, 36.674983978271484, 35.41173553466797, 33.8976936340332, 33.56184387207031, 32.67301940917969, 32.34883117675781, 32.34883117675781, 32.29859161376953, 30.075016021728516, 30.075016021728516, 29.553630828857422, 28.78925132751465, 28.299152374267578, 27.911062240600586, 27.297725677490234, 26.156166076660156, 25.757835388183594, 25.211505889892578, 23.54831314086914, 23.378875732421875, 23.229583740234375, 23.015762329101562, 22.71668815612793, 22.38408660888672, 22.38408660888672, 22.167993545532227, 22.125850677490234, 21.111572265625, 21.111572265625, 20.771024703979492, 20.53264045715332, 19.848323822021484, 19.848323822021484, 19.686311721801758, 18.91830825805664, 18.33428382873535, 18.13890838623047, 18.13890838623047, 17.254924774169922, 17.254924774169922, 17.254924774169922, 17.254924774169922, 17.254924774169922, 17.254924774169922, 17.254924774169922, 17.254924774169922, 17.254924774169922, 17.254924774169922, 17.254924774169922, 17.254924774169922, 17.254924774169922, 17.254924774169922, 17.254924774169922, 17.254924774169922, 17.254924774169922, 17.254924774169922, 17.254924774169922, 17.254924774169922, 17.254924774169922, 17.254924774169922, 17.254924774169922, 17.254924774169922, 17.254924774169922, 17.254924774169922, 17.254924774169922, 17.254924774169922, 17.254924774169922, 17.254924774169922, 17.254924774169922, 17.254924774169922, 17.254924774169922, 17.254924774169922, 17.254924774169922, 17.254924774169922, 17.254924774169922, 17.254924774169922, 17.254924774169922, 16.875656127929688, 16.83005142211914, 15.361618041992188, 15.102090835571289, 14.40827751159668 ], "content": [ "I am using React.rb a opal-ruby binding to react.js and Opal-rspec for testing .", "I m trying to use the react.rb gem with opal however I m having trouble with it .", "This keeps react.rb and opal-jquery independent but you have to remember to require opal-jquery first .", "I m using opal and react.rb so the code might look a little odd .", "You can look at reactive-ruby and reactive-record s code in the files labeled isomorphic.. . See the React.rb Reactive-Ruby branch readme for more info .", "If that s the case that Opal React.rb only work standalone then you wouldn t be able to use them with Gatsby .", "React.rb currently has an open issue regarding how to better handle this situation : github.com zetachang react.rb issues 108 https : github.com zetachang react.rb issues 108 .", "Okay well hopefully we should have something up for you to try in under an hour...check in gitter.im zetachang react.rb https : gitter.im zetachang react.rb I will post any updates there first", "If React.rb detects that Element has been required then it adds the render method to Element .", "I m using react.rb in my project And I want to use bootstrap too .", "I found the React-Bootstrap but don t know how to use it in react.rb .", "I am trying to use React Router from within react.rb .", "We collaborated together to make a generator in order to simplify greatly the installation of react.rb and reactive-record .", "Jamie - thanks a lot.. . fyi there should be a rails generator for react.rb and reactive-record out there shortly .", "Is it possible to embed serverside ruby to Opal .js.rb files", "change require opal-jquery before require reactive-ruby fix this", "Edited reactive-record-master Gemfile to read : .. . .. . gem reactive-ruby .. . gem opal .. . gem opal-browser .. . gem react-rails .. . .. . .. . 4 .", "I can t seem to recall about passing in a proc as a param for a component in react.rb can someone remind me", "React.rb components like react.js can only render a single root dom element .", "When using React.rb how do I keep Rails from prerendering the components", "Working with the react.rb authors there is now a fix PR for this so this will be working in future gem versions .", "React.rb is NOT being loaded twice I have made sure a couple of ways including putting a console.log into the first line of the react source file .", "I m trying to use Devise with React.rb so I thought I ll move my user model to the public directory to be able to edit it through React however I get this error :", "I have Rails 4.2.5 and Ruby 2.1.2 .", "Set rvm to use Ruby 2.2.2 and Rails 4.2.4 .", "I m not sure which one it is but I m inclined to believe it s the former because it was working fine before I switched to using react.rb for the front end .", "I use content for and partials in my layouts and I was wondering how to add my React components same way I add partials using React.rb http : reactrb.org .", "So I m basically still pretty new to the whole npm react.js let alone react.rb ecosystem and I m wondering if it would be possible to use reactrb with the gatsby static site generator .", "I would like to have examples using inline reactive-ruby https : github.com reactive-ruby inline-reactive-ruby for example .", "The important part : you ll need to have a User class in your Opal app .", "3 For application defined components you need to use a legal ruby variable name and class and style attributes are handled specially .", "To explain precisely : Element is the Opal-jQuery wrapper .", "Using the example given for React-Bootstrap and react.rb works perfectly but I am trying to get a NPN component called React-TimeAgo working and I am lost .", "I ve been attempting to get opal reactrb support through opal-webpack but have been running into some issues see this issue for some backstory https : github.com cj opal-webpack issues 36 .", "If your Rails app sets up User an ActiveRecord model you won t be able to reuse it so you ll need to create a new one but if it s just a PORO plain-old Ruby object you can add the following line to an initializer : .. . .. . Then you can put Ruby code that you want available in both your Rails app and your Opal app in app shared .", "Then webpack to package Reactrb and Opal corelib stdlib files into a small number of JS files and not the nearly 200 files they come in today .. . .. . In my case I am using Rails so Sprockets is doing the work to compile Ruby to JS and that is working fine with the opal-rails Gem .", "You can btw use Coffeescript CJSX with Gatsby which gives a bit more of a Ruby flavor .", "try to use this github repositories : .. . .. . opal-webpack https : github.com cj opal-webpack .. . .. . opalrb-loader https : github.com zetachang opalrb-loader .. . .. . In examples folder you can see how to integrate opal and webpack .", "Is it possible to have NPM Webpack package Opal and Reactrb", "I want to mount my component use this code in Opal file : .. . .. . I got the Error .. . .. . Uncaught NoMethodError : undefined method render for", "Here is an example : .. . .. . .. . script src https : ajax.googleapis.com ajax libs jquery 2.1.1 jquery.min.js script .. . .. . script src https : rawgit.com reactive-ruby inline-reactive-ruby master inline-reactive-ruby.js script .. . .. . div id timer-target div .. . .. . script type text ruby .. . .. . class Ticker React : : Component : : Base .. . .. . before mount do .. . state.ticks", "EDIT : Hmz the opal react examples are full of backticks so I might be wrong here .", "From what I ve seen poking around all the documentation assume you re writing everything in Opal .", "end .. . end .. . def render .. . Time.now .. . end .. . end .. . .. . Element container .render do .. . Alarm .. . at : Time.now+10.seconds .. . notify : - alert beep beep beep .. . .. . end .. . .. . script .. . .. . .. . script src https : ajax.googleapis.com ajax libs jquery 2.1.1 jquery.min.js script .. . .. . script src https : rawgit.com reactive-ruby inline-reactive-ruby master inline-reactive-ruby.js script", "But we ll need to convert that from a JS object to a Ruby hash using Hash.new gon.current user then you can pass that resulting hash to a User.new call .", "In other words I need to access for example User.find 1 in some opal file in Rails like one would do with .erb .", "However it doesn t know what the devise method means so wrapping it in unless RUBY ENGINE opal will prevent this from being called on the client .", "Also i think you can add Reactrb gem to Gemfile and require it in ruby file .", "There is a new way of doing this simply add require reactrb auto-import to components.rb then all JS libraries that are required will be automatically imported into the Ruby namespace so after that you can access the JS components directly .", "I m using opal-jquery to send an ajax request to my backend but the json payload is malformed when I try to access it on the backend .", "I guess in the end it boils down to is whether it s .. . .. . 1 . opal-jquery sending the post request incorrectly .. . .. . 2 . sinatra improperly parsing the request .", "Since I m using ajax requests in the end I decided to add opal-jquery to my stack unless you know an easier way and switched to using the Document.ready function provided by it .", "Sure checkout http : reactrb.org docs reusable-components.html about half way down the page or http : reactrb.org docs component-api.html .. . .. . Here is a working example .. . .. . .. . div id container div .. . script type text ruby .. . class Alarm React : : Component : : Base .. . param : at type : Time .. . param : notify type : Proc .. . after mount do .. . @clock every 1 do .. . if Time.now params.at .. . params.notify .. . @clock.stop .. . end .. . force update", "I would simply like to install Reactrb like this : .. . .. . NPM install Opal --save .. . .. . NPM install Reactrb --save .. . .. . And then require as necessary .", "This : .. . .. . just gives me : .. . .. . So I thought it was becuase document.body doesn t exist yet however none of the following to access the window work or document : .. . .. . There doesn t seem to be an opal command doc for JS equivalents and none of the examples I can find work .", "I do not because I can t access the document object from opal it just won t let me in the exact same way I can t access the window object I forgot to add that in so I have my bad .", "My code is input type : text name : name defalut value : obj.name and I try this too input type : text name : name defalutValue : obj.name .. . .. . I always got input type text name name data-reactid .0.1.1.1.1 with no defalutValue", "Is this just a typo", "Should be default rather than defalut", "YES Thanks My typo .", "Short answer : try defaultValue not defalutValue you had a typo in the string .. . .. . Long answer : .. . .. . React only passes along standard attributes or data attributes like data-foo to built-in tags everything else is scrubbed off .", "Standard attributes that have dashes should be camel cased i.e .", "defaultValue .", "The camel casing is a bit inconsistent and is planned to be fixed in 0.9 BTW .. . .. . For now the rules are : .. . .. . 1 for built-in tags only standard attributes or attributes beginning with data-.. . are passed along .", "2 if the html attribute has a dash like default-value the react attribute will be camel cased like defaultValue except for data- tags .", "Here is a working example http : goo.gl abv28C", "Thank you very much It s very helpful", "When I make a new Rails project add gem reactive-record and run rails server I get a Bundler error : There was an error while trying to load the gem reactive-record .", "Bundler : : GemRequireError .", "What gives", "Cheers", "The latest version of the generator should work very well with the help of Mitch .", "You should be able to get up and running by adding to your gem file : .. . gem reactive rails generator .. . .. . Then do a bundle install .. . .. . and finally : .. . rails g reactrb : install --all bundle update .. . .. . Will install you reactrb reactive-record and reactive-router .", "Once installed you can create components by doing : rails g reactrb : component Home : : Show", "I worked around the problem like this : .. . .. . 1 .", "2 .", "Download https : codeload.github.com catprintlabs reactive-record zip master .. . 3 .", "cd reactive-record-master spec test app .. . .. . 5 .", "bundle install .. . 6 .", "rails server .. . .. . This seemed to work .", "Then I made a new Rails 4.2.4 project .", "Adding only gem reactive-record to the Gemfile resulted in the same error .", "Then I made the Gemfile read : .. . .. . And voila rails server works", "Hope this helps someone else .", "We will be sure to incorporate your suggestion to make sure it all works .", "@MitchVanDuyn Oh gosh I would love a generator : I m still having trouble getting my full stack going and will be posting another question here shortly.. . that would be resolved if a generator existed .", "see my answer below.. . a preliminary version is working and available .", "I m having trouble adding reactive-record to my project .", "Gemfile : .. . .. . When I run the application as-is it renders the React component just fine .", "When I uncomment gem reactive-record I get a NoMethodError in my controller : undefined method path for nil : NilClass .", "Here is my simple controller : .. . .. . home controller.rb : .. . .. . render component is the line that triggers the error .", "Any clue what the problem is", "I feel like I m missing something obvious but I ve been troubleshooting for two days .", "The installation of reactrb and reactiverecord has been proven more difficult than it should have before .", "That s why I created a generator to install everything : https : github.com loicboutet reactive-rails-generator .. . .. . You should be able to get up and running by adding to your gem file : gem reactive rails generator .. . .. . Then do a bundle install .. . .. . and finally : rails g reactrb : install --all bundle update .. . .. . Will install you reactrb reactive-record and reactive-router .", "When I do puts @params.to s on my back end it gets displays as : .. . .. . So to get the login details I have to do : .. . .. . My front end opal submit request looks like this : .. . .. . I definitely know that details is correctly formatted so that s not an issue .", "You probably have some devise specific macros in your user model .", "Sprockets will of course compile all that into one JS file when I precompile-assets but I am looking for an approach to do that via Webpack so I can develop with far fewer JS files for Opal and Reactrb and just my own components being downloaded on each page refresh .", "for example if you user model looks like this : .. . .. . then you will need to insure the devise call only runs on the server like this : .. . .. . Reactive-Record stubs and proxies all the standard active-record macros like scope and belongs-to on the client .", "Sorry if my question is badly worded I m a little tired ." ] }
{ "confidence": [ 82.81488800048828, 74.07759857177734, 72.01213836669922, 70.5694580078125, 66.95775604248047, 62.59210205078125, 54.176368713378906, 53.96470642089844, 52.988624572753906, 51.66752624511719, 49.44011688232422, 46.842529296875, 46.37093734741211, 43.75285720825195, 42.56690216064453, 42.26496887207031, 39.56996154785156, 38.82026672363281, 36.941139221191406, 36.40020751953125 ], "content": [ "Question : I want to mount my component use this code in Opal file : .. . .. . I got the Error .. . .. . Uncaught NoMethodError : undefined method render for .. . Answer : change require opal-jquery before require reactive-ruby fix this Comment : To explain precisely : Element is the Opal-jQuery wrapper . If React.rb detects that Element has been required then it adds the render method to Element . This keeps react.rb and opal-jquery independent but you have to remember to require opal-jquery first .", "Question : When I make a new Rails project add gem reactive-record and run rails server I get a Bundler error : There was an error while trying to load the gem reactive-record . Bundler : : GemRequireError . What gives I have Rails 4.2.5 and Ruby 2.1.2 . Cheers .. . Answer : I worked around the problem like this : .. . .. . 1 . Set rvm to use Ruby 2.2.2 and Rails 4.2.4 . 2 . Download https : codeload.github.com catprintlabs reactive-record zip master .. . 3 . Edited reactive-record-master Gemfile to read : .. . .. . gem reactive-ruby .. . gem opal .. . gem opal-browser .. . gem react-rails .. . .. . .. . 4 . cd reactive-record-master spec test app .. . .. . 5 . bundle install .. . 6 . rails server .. . .. . This seemed to work . Then I made a new Rails 4.2.4 project . Adding only gem reactive-record to the Gemfile resulted in the same error . Then I made the Gemfile read : .. . .. . And voila rails server works Hope this helps someone else . Comment : Jamie - thanks a lot.. . fyi there should be a rails generator for react.rb and reactive-record out there shortly . We will be sure to incorporate your suggestion to make sure it all works . Comment : @MitchVanDuyn Oh gosh I would love a generator : I m still having trouble getting my full stack going and will be posting another question here shortly.. . that would be resolved if a generator existed . Comment : Okay well hopefully we should have something up for you to try in under an hour...check in gitter.im zetachang react.rb https : gitter.im zetachang react.rb I will post any updates there first Comment : see my answer below.. . a preliminary version is working and available .", "Question : Is it possible to embed serverside ruby to Opal .js.rb files In other words I need to access for example User.find 1 in some opal file in Rails like one would do with .erb . .. . Answer : Works like this out of the box in Reactive-Record . Otherwise you have to build some kind of api between the client + v8 prerendering engine and the server to get the data which is what reactive-record does . You can look at reactive-ruby and reactive-record s code in the files labeled isomorphic.. . See the React.rb Reactive-Ruby branch readme for more info .", "Question : null .. . Answer : So I m basically still pretty new to the whole npm react.js let alone react.rb ecosystem and I m wondering if it would be possible to use reactrb with the gatsby static site generator . I ve been attempting to get opal reactrb support through opal-webpack but have been running into some issues see this issue for some backstory https : github.com cj opal-webpack issues 36 . Specifically where I got stuck was trying to get it to play nice with bundler . Is combining reactrb components with gatsby something that s even feasible I m hoping the answer is yes . Comment : Not sure actually.. . haven t seen reactrb before . What you ll need to find out is if you can include reactrb components in a JS project . From what I ve seen poking around all the documentation assume you re writing everything in Opal . If that s the case that Opal React.rb only work standalone then you wouldn t be able to use them with Gatsby . You can btw use Coffeescript CJSX with Gatsby which gives a bit more of a Ruby flavor .", "Question : I am using React.rb a opal-ruby binding to react.js and Opal-rspec for testing . It seems like I need to reset react s internals between tests as I am getting the awful Cannot read property firstChild of undefined error in some tests . If I move the failing test to be the first test then the error goes away but can come up in a later test . React.rb is NOT being loaded twice I have made sure a couple of ways including putting a console.log into the first line of the react source file . SOOO It would seem I need a way to completely clear reacts state between tests . Any way to do that .. . Answer : The problem seems to occur if you do a static render of a component that is later asynchronously updated i.e . when a promise is fulfilled . Once this happens react is busted . I don t know if this is inherent in react or its because of the reactrb bindings I doubt that as they are very simple or something else .", "Question : I m using react.rb in my project And I want to use bootstrap too . I found the React-Bootstrap but don t know how to use it in react.rb . .. . Answer : There is a new way of doing this simply add require reactrb auto-import to components.rb then all JS libraries that are required will be automatically imported into the Ruby namespace so after that you can access the JS components directly . See an example here : https : github.com barriehadfield reactrb-showcase working-with-react-bootstrap", "Question : When I make a new Rails project add gem reactive-record and run rails server I get a Bundler error : There was an error while trying to load the gem reactive-record . Bundler : : GemRequireError . What gives I have Rails 4.2.5 and Ruby 2.1.2 . Cheers .. . Answer : The latest version of the generator should work very well with the help of Mitch . We collaborated together to make a generator in order to simplify greatly the installation of react.rb and reactive-record . You should be able to get up and running by adding to your gem file : .. . gem reactive rails generator .. . .. . Then do a bundle install .. . .. . and finally : .. . rails g reactrb : install --all bundle update .. . .. . Will install you reactrb reactive-record and reactive-router . Once installed you can create components by doing : rails g reactrb : component Home : : Show", "Question : I m trying to use Devise with React.rb so I thought I ll move my user model to the public directory to be able to edit it through React however I get this error : .. . Answer : You probably have some devise specific macros in your user model . for example if you user model looks like this : .. . .. . then you will need to insure the devise call only runs on the server like this : .. . .. . Reactive-Record stubs and proxies all the standard active-record macros like scope and belongs-to on the client . However it doesn t know what the devise method means so wrapping it in unless RUBY ENGINE opal will prevent this from being called on the client . FYI I added an issue https : github.com catprintlabs reactive-record issues 17 to reactive-record to cover this.. .", "Question : I m using react.rb in my project And I want to use bootstrap too . I found the React-Bootstrap but don t know how to use it in react.rb . .. . Answer : Thanks to @catmando share the answer . First define a wrapper : .. . .. . Then using it like this", "Question : I can t seem to recall about passing in a proc as a param for a component in react.rb can someone remind me Sorry if my question is badly worded I m a little tired . .. . Answer : Sure checkout http : reactrb.org docs reusable-components.html about half way down the page or http : reactrb.org docs component-api.html .. . .. . Here is a working example .. . .. . .. . div id container div .. . script type text ruby .. . class Alarm React : : Component : : Base .. . param : at type : Time .. . param : notify type : Proc .. . after mount do .. . @clock every 1 do .. . if Time.now params.at .. . params.notify .. . @clock.stop .. . end .. . force update end .. . end .. . def render .. . Time.now .. . end .. . end .. . .. . Element container .render do .. . Alarm .. . at : Time.now+10.seconds .. . notify : - alert beep beep beep .. . .. . end .. . .. . script .. . .. . .. . script src https : ajax.googleapis.com ajax libs jquery 2.1.1 jquery.min.js script .. . .. . script src https : rawgit.com reactive-ruby inline-reactive-ruby master inline-reactive-ruby.js script", "Question : I ve noticed that when I try to set the z-index of a page element using inline style px gets added to the value automatically but z-index needs a number not a pixel value . So the web-browser won t accept it as a valid value and so Z-index effectively doesn t work because of it . I m doing .. . Answer : Style attributes should be specified in camel case . For css z-index : -1 write zIndex : -1 . React.js converts css declarations from camel case to their proper format .. . .. . React also automatically adds the px suffix to unit-less property values with some exception as outlined in these docs https : facebook.github.io react tips style-props-value-px.html . Comment : I see I think it s stupid but I guess if that s the way it has to be then that s the way it has to be . Comment : The choice was most likely made by the React.js team to play nice with JSON key formatting . React.rb currently has an open issue regarding how to better handle this situation : github.com zetachang react.rb issues 108 https : github.com zetachang react.rb issues 108 .", "Question : I m trying to use the react.rb gem with opal however I m having trouble with it . The following is a simple hello world component nothing complex . Doing this : .. . .. . gets me what I expected this : .. . .. . The problem is when I try to render the template to the dom . This : .. . .. . just gives me : .. . .. . So I thought it was becuase document.body doesn t exist yet however none of the following to access the window work or document : .. . .. . There doesn t seem to be an opal command doc for JS equivalents and none of the examples I can find work . I m on the verge of pulling my hair out what do I do EDIT : .. . .. . Doing the following actualy works : .. . .. . I m not using jquery so I have to do the following to get document.ready : .. . .. . but it s suuuuper hacky . Comment : Are those really backticks or is that a copy-paste error : document.body . Because those backticks should be single quotes : document.body . EDIT : Hmz the opal react examples are full of backticks so I might be wrong here . Comment : They are backticks and I ve tried with normal quotes as well it errors Target container is not a DOM element . Comment : Does this work React.render React.create element Hello World document.getElementById hello word . You should also create a div hello world in your template . Comment : Another question : is that call to React.render wrapped in a Document.ready block Comment : I do not because I can t access the document object from opal it just won t let me in the exact same way I can t access the window object I forgot to add that in so I have my bad . I m not using jquery so I can t do document.ready without bootstrapping my own which works btw just a wrapper for document.addEventListener DOMContentLoaded event . Just came up with a hacky solution . .. . Answer : The problem is that body.getElementById mount point was returning nil this was because the script was executing before the dom was ready . Since I m not using Jquery and for some reason I couldn t access the document object I was having trouble . In the end though I was able to create a method to deal with that for me . So defining this : .. . .. . allows me to do :", "Question : When using React.rb how do I keep Rails from prerendering the components .. . Answer : Simply add no prerender 1 as a parameter to the URL example : .. . .. . http : localhost : 3000 leads no prerender 1", "Question : I am trying to get the following code working : .. . .. . but I keep getting this error : .. . .. . Exception raised while rendering HelloWorld : 0x489 RuntimeError : a components render method must generate and return exactly 1 element or a string .. . Answer : React.rb components like react.js can only render a single root dom element . To generate multiple elements you need to wrap the elements in a div for example :", "Question : Is it possible to embed serverside ruby to Opal .js.rb files In other words I need to access for example User.find 1 in some opal file in Rails like one would do with .erb . .. . Answer : It sounds like you re looking for a way to pass data to the client in the initial request . If you load the data in the server app and just want to pass it along you can look into the gon gem . TL DR version .. . .. . Here s enough to get your feet wet .. . .. . The explanation : .. . .. . The gon gem sets up a hash that will be JS-objectified and placed into your JS runtime in the browser . For more info on that see the Railscast http : railscasts.com episodes 324-passing-data-to-javascript about it it s still mostly relevant not much has changed . In the browser that JS object is also named gon so gon.current user would be whatever you set in gon.push current user : some user in the controller action or before action callback . But we ll need to convert that from a JS object to a Ruby hash using Hash.new gon.current user then you can pass that resulting hash to a User.new call . The important part : you ll need to have a User class in your Opal app . If your Rails app sets up User an ActiveRecord model you won t be able to reuse it so you ll need to create a new one but if it s just a PORO plain-old Ruby object you can add the following line to an initializer : .. . .. . Then you can put Ruby code that you want available in both your Rails app and your Opal app in app shared . For example you could do this in app shared user.rb :", "Question : Using the example given for React-Bootstrap and react.rb works perfectly but I am trying to get a NPN component called React-TimeAgo working and I am lost . This is what I have done : .. . .. . In index.js for Webpack to import it into the webpack bundle : .. . .. . In the actual component.rb I have this : .. . .. . Then referencing the Bootstrap components work perfectly : .. . .. . But I am not managing to get anything out of the TimeAgo wrapper : .. . .. . What am I doing wrong All help appreciated Comment : try TimeAgo : : TimeAgo date : Aug 29 2014 Comment : also in the js console try looking at Opal.TimeAgo and see what is in there .. . Answer : I found a workaround to this but it is not all that pretty . Would love to find a better solution Of course you would need to ensure the id of the span is unique and you passed the date as a prop but I left that out for brevity . Comment : Working with the react.rb authors there is now a fix PR for this so this will be working in future gem versions . I will update here when that happens .", "Question : I use content for and partials in my layouts and I was wondering how to add my React components same way I add partials using React.rb http : reactrb.org . Thanks . Comment : Add react component to your partials Comment : @HieuPham I meant as I add partials edited the question sorry about that . .. . Answer : You would use react component in-place of a partial . So react component Components : : Foo name : @user.name rank : @user.rank .. . .. . would mount the Components : : Foo component at this point passing the users name and rank . There is no direct equivalent to content for when bridging between layouts and react . Instead you would break the view into several component one for each content for block and individually reference them using react component . Be aware that you can also directly mount the component from the controller using the render component method in the controller .", "Question : I have a form that makes an ajax request the problem is that every time I click on it the amount of times it makes that request multiplies . Now I m sure it s because of the way I ve set up submit-intercept but I don t know how else to do it whilst still encapsulating it as a single component . I m using react as my view layer and I ve attached a function that contains code to intercept the request and this function is called in both the afterMount callback and the after update callback if I don t do this then either the form-submit is never intercepted or it only intercepts it once and then just does a normal submit . Now obviously it s multiplying because those events fire and add an extra submit-handler . I m using opal and react.rb so the code might look a little odd . Here s my function that intercepts the submit action on the form .. . .. . Here are my call backs : .. . .. . I was able to reduce the amount of requests made by checking if the component state was already in the middle of a request whilst this doesn t reduce the amount of submit handlers being added it does stop a good amount from doing anything but it doesn t stop the actual multiplying of handlers being added . .. . Answer : I don t know why I didn t think of it till a colleague mentioned it but by moving the form to a sub-component I can now run the intercept code on the form components mount which only happens when it s rendered so problem solved", "Question : Is it possible to have NPM Webpack package Opal and Reactrb I would simply like to install Reactrb like this : .. . .. . NPM install Opal --save .. . .. . NPM install Reactrb --save .. . .. . And then require as necessary . Then webpack to package Reactrb and Opal corelib stdlib files into a small number of JS files and not the nearly 200 files they come in today .. . .. . In my case I am using Rails so Sprockets is doing the work to compile Ruby to JS and that is working fine with the opal-rails Gem . What I am trying to past is that this approach results in over 200 files being downloaded each time there is a page refresh during development . Sprockets will of course compile all that into one JS file when I precompile-assets but I am looking for an approach to do that via Webpack so I can develop with far fewer JS files for Opal and Reactrb and just my own components being downloaded on each page refresh . It would be great to see a community certified approach to this . Thanks .. . Answer : try to use this github repositories : .. . .. . opal-webpack https : github.com cj opal-webpack .. . .. . opalrb-loader https : github.com zetachang opalrb-loader .. . .. . In examples folder you can see how to integrate opal and webpack . Also i think you can add Reactrb gem to Gemfile and require it in ruby file . The integration with Rails available but i think need write additional gem .", "Question : I m using opal-jquery to send an ajax request to my backend but the json payload is malformed when I try to access it on the backend . When I do puts @params.to s on my back end it gets displays as : .. . .. . So to get the login details I have to do : .. . .. . My front end opal submit request looks like this : .. . .. . I definitely know that details is correctly formatted so that s not an issue . I guess in the end it boils down to is whether it s .. . .. . 1 . opal-jquery sending the post request incorrectly .. . .. . 2 . sinatra improperly parsing the request . I m not sure which one it is but I m inclined to believe it s the former because it was working fine before I switched to using react.rb for the front end . Comment : I d do a couple of things . Firstly I d watch details in the javascript console and see if it s what you think it is . Secondly I d use cURL to send a request with the values as you expect them to be and see how your backend handles that or set up a spec to do it hint hint One or the other will give you an idea of what s happening . Comment : I definitely know that details is correctly formatted so that s not an issue . - did you not read this I wouldn t have said that if I hadn t already stuck it in the console to check the value and the class both before and after being turned into json . I get that your trying to be helpful so thank you but please read the OP otherwise you end up posting something that s already been done . Comment : And yet you offered no evidence of that other than your personal assertion . Considering you re the one with the problem and the one looking for help you may consider being a bit less critical of others and tighten up the question . Good luck with getting further help with this Comment : I m not being critical If you WANT me to treat people like they re stupid and can t think for themselves then ok I ll speak slowly . But I don t because I expect people on this site to have a minimal level of intelligence so when I say I definitely know that details is correctly formatted so that s not an issue I expect people to read this and go Op must have already done some basic debugging through the console and seen that it was both a Json string and that the correct Key values were being sent or are you saying that people are in fact incapable and need be spoken to like idiots Comment : I try not to make assumptions when approaching a problem it s not helpful and I expect the person I m helping to make allowances for my lack of knowledge of their situation - especially when it is incumbent upon them to provide as much information as they can which you haven t done . More importantly it seems you have an attitude problem more than a technical problem I hope you get both of them resolved soon . .. . Answer : After following the advice from this http : stackoverflow.com a 17049683 3536548 specifically I m doing : .. . .. . I was able to see that the request arrived at the server correctly and as expected . I don t know why but sinatra was mangling the response in such a away that @params came out as .. . .. . so in the end I m doing .. . .. . To read out the request body before sinatra gets anything and just reading out the params I need from @request payload ." ] }
[ "yes-answer-long", "yes-answer-short" ]
wrapper
UNK_RELATION
xmlpullparser@xml@126
xmlpullparser -- either the android-xmlpullparser or any other xml parser implementation that uses the concept of pulling in @placeholder events .
{ "confidence": [ 44.72187805175781, 44.01380157470703, 40.2396240234375, 36.068904876708984, 36.068904876708984, 33.95328903198242, 32.935699462890625, 32.30691146850586, 31.391468048095703, 31.109085083007812, 30.13970184326172, 29.955379486083984, 29.955379486083984, 26.749061584472656, 25.49087142944336, 22.629302978515625, 22.07079315185547, 21.520151138305664, 20.891925811767578, 20.78289794921875, 20.288616180419922, 19.82703399658203, 19.59505844116211, 19.592599868774414, 19.435707092285156, 19.0294132232666, 18.788650512695312, 18.78543472290039, 18.581470489501953, 18.4559383392334, 18.4559383392334, 18.35601806640625, 18.15648078918457, 18.009103775024414, 17.427772521972656, 17.427772521972656, 17.427772521972656, 17.427772521972656, 17.427772521972656, 17.427772521972656, 17.36204719543457, 17.36204719543457, 17.105026245117188, 17.042314529418945, 17.031307220458984, 17.01873207092285, 17.007221221923828, 16.787099838256836, 16.672916412353516, 16.589412689208984, 16.589412689208984, 16.46182632446289, 16.446208953857422, 16.446208953857422, 16.446208953857422, 16.446208953857422, 16.446208953857422, 16.425003051757812, 16.24468421936035, 16.24468421936035, 16.237476348876953, 16.237476348876953, 16.237476348876953, 16.237476348876953, 16.237476348876953, 16.237476348876953, 16.142005920410156, 16.077545166015625, 15.921856880187988, 15.85201644897461, 15.725139617919922, 15.671952247619629, 15.560118675231934, 15.539578437805176, 15.539578437805176, 15.539578437805176, 15.539578437805176, 15.482617378234863, 15.255910873413086, 15.255910873413086, 15.255910873413086, 15.255910873413086, 15.255910873413086, 15.172621726989746, 15.172621726989746, 15.162809371948242, 15.054386138916016, 14.996055603027344, 14.95170783996582, 14.934518814086914, 14.928373336791992, 14.928373336791992, 14.928373336791992, 14.810871124267578, 14.810871124267578, 14.810871124267578, 14.809942245483398, 14.655172348022461, 14.628276824951172, 14.492566108703613 ], "content": [ "To workaround this when using XmlPullParser replace .. . .. . with", "I am using XmlPullParser .", "This question is an exact duplicate of : .. . .. . XmlPullParser exception - can t work it out questions 11076645 xmlpullparser-exception-cant-work-it-out .. . .. . So on review of the code there is no exception thrown when the xml is read in...works fine .", "Since these two are in the top of the list you no need to think of the XMLPullparser .", "However never used Xerces and XMLPullParser has never failed me .", "I m using XmlPullParser sample but when run in API 8 or 10 the values return null I m not sure but in other version API 16 + working fine .", "I need the location of XML events .", "I think the XMLPullParser would be a good option as they have mentioned in Android documentation http : developer.android.com training basics network-ops xml.html .", "Means sax if good then dom for heavy data but please tell me about xmlpullparser .", "Iterate while-loop until end of document reach like this .. . .. . private void eBooksXmlParser String xmlData Context context XmlPullParserFactory pullParserFactory ArrayList eBooks null try pullParserFactory XmlPullParserFactory.newInstance XmlPullParser parser pullParserFactory.newPullParser", "And I cannot contact the author of that library .. . .. . I guess the library invokes the XppReader http : xstream.codehaus.org javadoc com thoughtworks xstream io xml XppReader.html which then tries to create a XmlPullParser class and fails .", "The reason : .. . .. . XStreamClient Reader WARN - Client disconnected Exception : com.thoughtworks.xstream.io.StreamException : Cannot create XmlPullParser .. . .. . This Exeption only appears in the gcj compiled version of the client .", "EDIT : .. . .. . I figured out that the reason why the XmlPullParser creation fails is that the META-INF directory with the services org.xmlpull.v1.XmlPullParserFactory file can not be found by the XmlPullParserFactory.newInstance function .", "My OS Ubuntu .. . .. . What i already did to overcome this problem : I googled intensively for XStream XmlPullParser and gcj and replaced the xmlpull - and kxml2 -files with different versions .", "SAX : .. . .. . Sequence of events .", "How ever i am getting xmlpullparser exception when trying with android client as : 10-24 15 : 25 : 44.409 : WARN System.err 277 : org.xmlpull.v1.XmlPullParserException : expected : START TAG http : www.w3.org 2001 12 soap-envelope Envelope position : START TAG @2 : 327 in java.io.InputStreamReader@44ee2268 .. . .. . well this is my wsdl file from which i am trying to access login method :", "Using the SAX parser you will be only be able to read the data from the XML .", "With kXML you either parse the XML with .. . .. . 1 .", "Allright so I debugged into the parser source code and I found out that this pull-parser implementation has trouble with entities that are not very common .", "I am doing regular XML parsing on android and very rarely I get this exception and only on particular phones .", "But it is faster uses less memory and is far better suited to large XML data sets or streaming XML data .", "After the call to doc.parse parser you automatically advanced to the end of the XML document and reached the XmlPullParser.END DOCUMENT tag .", "What I am doing to parse it is something similar as the example on the android developeres website : .. . .. . This steo is to instantiate a parser and start the parsing process .", "everyone I m new in Android and I m trying to parse a XML file and get the info in a List .", "The rest of this class s this : .. . .. . .. . .. . And the call to the parser and the declaration of the inputStream : .. . .. . I hope any of you can help me .", "update : heres a few links to read if you dont mind reading : p shows cons and perks to both sides .. . .. . http : www.firstobject.com xml-reader-sax-vs-xml-pull-parser.htm .. . .. . Also another answer to maybe read into SAX parser vs XMLPull parser http : stackoverflow.com questions 5808105 sax-parser-vs-xmlpull-parser", "I am trying to use the Scala StAX parser .", "In all the XML parser s Sax parser is the fastest one so you can go for it with no doubt ....If you need to read and write the data from an XML you can go for DOM .", "New Android programmed .", "The reason you are getting the error is that the xml file doesn t actually start with xml version 1.0 encoding utf-8 .", "Basically once the user downloaded the xml the first time it will be referenced in internal-storage from that point on occassionally the xml file will be updated .", "Ok here is what is happening : .. . .. . The parser must decode entities in attributes unless you set this property : .. . .. . But this implementation throws an exception when that line is called .", "The downloaded xml file will not be changed very often .", "sorry but SAX parser has issue with self close tag tag do you have any solution to solve that", "I m using scala.xml.pull to parse through a vary large xml file .", "I m having trouble parsing an xml file from internal-storage .", "can you post line 37-42 of your XML file", "Have you tried on a short test xml file first", "The error message seems to indicate an error in the XML file not the code .", "In my case the xml had been downloaded and saved to the SD .", "DOM .. . .. . Which is the best parser to parse data", "Remove the call to doc.parse parser from your code .", "I think xmlpull need an implementation which can use xpp3 as its implementation .", "I have a xml file that looks like this : .. . .. . I have a copy of this xml file in my assets folder called test.xml and I have a copy on my webserver called test.xml .", "If you don t know what that means read a debugging Android tutorial .", "Is this a KSOAP2 or an Android OS version bug", "I did try to set parser to XmlPullParser.FEATURE PROCESS DOCDECL false but that didn t help .. . .. . I did research this on the web and here and can t find anything that helps", "I have following xml structure : .. . .. . I want to parse this xml .", "I found a bug-fix for Android 4.4 mentioning this : Change 61530 https : android-review.googlesource.com c 61530 .. . .. . So the proper exception you should be getting is : Unterminated element content spec meaning unexpected EOF .", "I will be using a pull parser so that I can keep my code functional-programming pure and run it multi-threaded .", "I would prefer to use the pull parser in scala.xml.pull.XMLEventReader but it does not appear to offer location information .", "Android client .", "What I m ultimately looking for is a process that scans the file and emits an xml element an Elem", "for each instance of a particular tag or set of tags that I can process using the normal scala-xml processing .", "im having this error but i have the xml in a string variable what could i do", "The lower layer kxml is incorrectly throwing an unchecked Exception when it encounters bad xml .", "This is my xml file .. . .. . I want to use atrribute name showInput in my MainActivity .", "But i am not able to select which parser is efficient or best suited for parsing .", "Any help is appreciated .", "Could be any method there .", "possible duplicate of How to track the source line of an XML element", "http : stackoverflow.com questions 4446137 how-to-track-the-source-line-of-an-xml-element", "I m trying to bind an xml file as a byte to a java object .", "The ByteArrayInputstream is empty : .. . .. . means that a u0 Bit was found as first char within the XML .", "Go to to mvn repository path and delete that folder for xml file .", "sorry but i don t find that line in my code or xml file .", "This works great for event processing but what I want to do is have my parser cough up a mini-document for particular nodes and I don t see an easy way to do this or at least not a scala way .", "An XML reply from FCM CCS", "I m trying to parse an RSS feed from Monster on Android v.17 using this URL : .. . .. . http : rss.jobsearch.monster.com rssquery.ashx q java .. . .. . To get the content I m using HttpUrlConnection in the following fashion .. . .. . What comes back is as far as I can say and I verified it too a legit RSS .. . .. . It starts like this click the URL above if you want to see complete XML : .. . .. . But when I attempt to parse it : .. . .. . The code immediately chokes on type xpp.next with the following Exception .. . .. . Which actually means it cannot process 2nd char at line 1 xml version 1.0 encoding utf-8 .. . .. . Here are the offending lines in the KXmlParser.java 425-426 .", "I m currently working with kXML2 and here s my code - .. . .. . My input XML is as follows - .. . .. . My problem briefly is I m expecting it to hit XmlPullParser.END TAG when it encounters a closing xml tag .", "view my compound.xml : .. . .. . Then in your Activity you ll just inflate it : .. . .. . This way you don t need to consider the attribute set apart from inside your view class Android will call the MyCompound Context AttributeSet constructor for you with the values set in the XML layout file .", "The type TEXT evaluates to true .. . .. . Any help", "thanks @Simon I have read enough questions in my quest for android programming enlightenmen on SO to figure out that plenty of information is needed", "The XML has heavy data with a number of tags .", "If I remove the problematic line from XML then there are no errors .", "i am parsing xml from a website .", "Here is my XMLParser : .. . .. . Here is Xml : description", "found my solution groups.google.com group android-developers browse thread thread http : groups.google.com group android-developers browse thread thread c0bcc28612617380 pli 1 i had to use KXmlParser instead of Xml.newPullParser .", "Create an xml-layout file which contains only your custom view e.g .", "I have been asked to write a utility to search a large number of XML files for elements with a missing attribute .", "I failed to see that what I thought was a the original question was a full XML loader while this is concerned about pull reader .", "My XML file is this http : servidoralvaro.ddns.net files Catalogo.xml and what I want is get the objects .", "I m trying to figure out a way to rewrite some of my XML parsing code .", "So in the finished app as this is only practice on a core piece of functionality the app will require internet access to download the xml file but then the app will be able to access it offline from that point forward .", "Deleting the file and re-downloading fixed the issue in this instance but to prevent future issues of the same type I check for ArrayIndexOutOfBoundsException when reading an xml and assume the file is corrupt when it catches one .", "Judging by your code you decided to use the second method therefore you should get rid of the call to doc.parser parser .", "Any help will be appreciated .", "This seems to work for all other librarys too .", "The parser is initialized Without namespaces and to use the provided InputStream as its input.It starts the parsing process with a call to nextTag and invokes the readFeed method which extracts and processes the data the app is interested in .", "i am trying to access a magento web service from a android client.which should return a session id.i hav already done this uing java client using apache and am successful in calling the method .", "I am trying to write some code in Android to set parameters in an AttributeSet from attrs.xml file .", "I ve been using KSOAP2 for quite some time in my Android app following SOAP protocol for web service .", "So far the problem is known to occur in some Android 5.0 devices .. . .. . Does anyone know the issue", "xml content from url .. . .. . XmlParser code .. . .. . .. . .. . ListActivity code", "Immediately after that you tried to parse the XML again using the second method .", "I m receiving an XML where some attributes contain encoded entites .", "Any help is much appreciated .. . Teja .", ".. . .. . Instead of calling your custom view s constructor directly you can let the system handle that by inflating your custom view from xml .", "Please suggest me if u have any idea what am i doing wrong", "The other question deals specifically with SAX parsers -- the API for Locator is clear ." ] }
{ "confidence": [ 52.00025939941406, 48.92787551879883, 47.83285903930664, 47.648067474365234, 47.623558044433594, 47.55653381347656, 46.832374572753906, 44.94204330444336, 42.10475540161133, 42.06874084472656, 39.14594268798828, 34.05799102783203, 32.757572174072266, 28.868427276611328, 28.068782806396484, 27.405458450317383, 25.314123153686523, 24.53571891784668, 21.90264129638672, 21.593849182128906 ], "content": [ "Question : I am developing an application in which the first time I am going to parse data from an xml file coming from a remote-server . But i am not able to select which parser is efficient or best suited for parsing . As there are mainly three types of parsing which i know : .. . .. . 1 . SAX .. . 2 . XMLPullParsing .. . 3 . DOM .. . .. . Which is the best parser to parse data As I searched on Google and found the positive and negative both sides of the above parsers . But I was not able to determine which is the most efficient . The XML has heavy data with a number of tags . Please guide me and suggest me which parser I should use as I am using parsing in my application for first time . Comment : use sax or xmlpullparsing . Comment : if the file size is reasonable try dom . if it won t fit in core use sax . show us your schema and tell us what kind of stuff you are doing with the data Comment : Means sax if good then dom for heavy data but please tell me about xmlpullparser . The best among sax and xmlpull . .. . Answer : I think the XMLPullParser would be a good option as they have mentioned in Android documentation http : developer.android.com training basics network-ops xml.html .", "Question : I m enhancing a client which is part of a bigger project . Because of the lack of speed i was forced to switch to CNI and therefore i had to generate native-code with the GNU-gcj compiler gnu 4.6.3 . The compiling and linking works fine thanks to the -findirect-dispatch flag and i don t have any problems executing the output . But when it comes to the communication between the client and the server the client immediately disconnects . The reason : .. . .. . XStreamClient Reader WARN - Client disconnected Exception : com.thoughtworks.xstream.io.StreamException : Cannot create XmlPullParser .. . .. . This Exeption only appears in the gcj compiled version of the client . When i run the code with the java interpreter - things work well but too slow -- The challenging part is that i can t retrieve the source code of where this exception occurs because it is in a pre-compiled Java class files library the client uses . And I cannot contact the author of that library .. . .. . I guess the library invokes the XppReader http : xstream.codehaus.org javadoc com thoughtworks xstream io xml XppReader.html which then tries to create a XmlPullParser class and fails . I bind in the XStream vers . 1.4.3 library and other required .jars by unpacking them and compiling the created .class files and then linking the object-files . This seems to work for all other librarys too . My OS Ubuntu .. . .. . What i already did to overcome this problem : I googled intensively for XStream XmlPullParser and gcj and replaced the xmlpull - and kxml2 -files with different versions . But nothing worked . Does anyone of you have a clue of what might be the solution EDIT : .. . .. . I figured out that the reason why the XmlPullParser creation fails is that the META-INF directory with the services org.xmlpull.v1.XmlPullParserFactory file can not be found by the XmlPullParserFactory.newInstance function . This is due to the fact that i only compiled and linked the .jar s .class files . So as soon as i found i way to link the META-INF directory into the executable in away that the function can find and access it the problem should be solved . Does anyone of you already know a way to do so Comment : for me this error was caused by missing library xpp3 min-1.1.4c.jar . . not a compile problem .. . Answer : I think xmlpull need an implementation which can use xpp3 as its implementation . Please add following code into your pom.xml and if required add these jar files to the software which requires them .", "Question : I am doing regular XML parsing on android and very rarely I get this exception and only on particular phones . Haven t been able to get to the root of this issue . Does anybody have an idea what might be causing this .. . Answer : The lower layer kxml is incorrectly throwing an unchecked Exception when it encounters bad xml . To workaround this when using XmlPullParser replace .. . .. . with", "Question : This question is an exact duplicate of : .. . .. . XmlPullParser exception - can t work it out questions 11076645 xmlpullparser-exception-cant-work-it-out .. . .. . So on review of the code there is no exception thrown when the xml is read in...works fine . The problem is in the doXML method where i m trying to read the text b w two tags.. . eg . The error that is generated is 18 : 19 : 41.654 : W System.err 329 : org.xmlpull.v1.XmlPullParserException : name expected position : START TAG @59 : 57 in java.io.InputStreamReader@44f049c8 .. . .. . I think the code is probably more complicated than it needs to be...but can t figure out the error . Thanks Comment : can you post line 37-42 of your XML file Comment : I think this can happen if you mistype or don t use the same letter case in your tags . Have you tried on a short test xml file first .. . Answer : The error message seems to indicate an error in the XML file not the code .", "Question : I am developing an application in which the first time I am going to parse data from an xml file coming from a remote-server . But i am not able to select which parser is efficient or best suited for parsing . As there are mainly three types of parsing which i know : .. . .. . 1 . SAX .. . 2 . XMLPullParsing .. . 3 . DOM .. . .. . Which is the best parser to parse data As I searched on Google and found the positive and negative both sides of the above parsers . But I was not able to determine which is the most efficient . The XML has heavy data with a number of tags . Please guide me and suggest me which parser I should use as I am using parsing in my application for first time . Comment : use sax or xmlpullparsing . Comment : if the file size is reasonable try dom . if it won t fit in core use sax . show us your schema and tell us what kind of stuff you are doing with the data Comment : Means sax if good then dom for heavy data but please tell me about xmlpullparser . The best among sax and xmlpull . .. . Answer : In all the XML parser s Sax parser is the fastest one so you can go for it with no doubt ....If you need to read and write the data from an XML you can go for DOM . Using the SAX parser you will be only be able to read the data from the XML . Since these two are in the top of the list you no need to think of the XMLPullparser . Comment : sorry but SAX parser has issue with self close tag tag do you have any solution to solve that", "Question : I am developing an application in which the first time I am going to parse data from an xml file coming from a remote-server . But i am not able to select which parser is efficient or best suited for parsing . As there are mainly three types of parsing which i know : .. . .. . 1 . SAX .. . 2 . XMLPullParsing .. . 3 . DOM .. . .. . Which is the best parser to parse data As I searched on Google and found the positive and negative both sides of the above parsers . But I was not able to determine which is the most efficient . The XML has heavy data with a number of tags . Please guide me and suggest me which parser I should use as I am using parsing in my application for first time . Comment : use sax or xmlpullparsing . Comment : if the file size is reasonable try dom . if it won t fit in core use sax . show us your schema and tell us what kind of stuff you are doing with the data Comment : Means sax if good then dom for heavy data but please tell me about xmlpullparser . The best among sax and xmlpull . .. . Answer : SAX Parsing is the Best one to implement than DOM . See the difference between these two in the following : .. . .. . DOM : .. . .. . The Nodes are in the form of Tree Structure . Memory : It Occupies more memory DOM is only preffered in the case of small XML documents . Slower at runtime . Stored as an objects . Programmatically easy to implement . Ease of navigation and use . SAX : .. . .. . Sequence of events . It doesn t use any memory preferred for large documents . Faster at runtime because of the above mentioned point . Objects are to be created . Need to write code for creating objects . In SAX Backward navigation is not possible as it sequentially processes the document . Comment : +1 . This is an excellent comparison . I would emphasize that SAX is more difficult to implement because you the programmer must step through the nodes . But it is faster uses less memory and is far better suited to large XML data sets or streaming XML data . Comment : Exactly friend . :", "Question : I am developing an application in which the first time I am going to parse data from an xml file coming from a remote-server . But i am not able to select which parser is efficient or best suited for parsing . As there are mainly three types of parsing which i know : .. . .. . 1 . SAX .. . 2 . XMLPullParsing .. . 3 . DOM .. . .. . Which is the best parser to parse data As I searched on Google and found the positive and negative both sides of the above parsers . But I was not able to determine which is the most efficient . The XML has heavy data with a number of tags . Please guide me and suggest me which parser I should use as I am using parsing in my application for first time . Comment : use sax or xmlpullparsing . Comment : if the file size is reasonable try dom . if it won t fit in core use sax . show us your schema and tell us what kind of stuff you are doing with the data Comment : Means sax if good then dom for heavy data but please tell me about xmlpullparser . The best among sax and xmlpull . .. . Answer : I would say XMLPullParsing but i have heard great things lately about Xerces http : xerces.apache.org might want to look into that one as well . However never used Xerces and XMLPullParser has never failed me . We build a color blind app that used it and it pulls thousands of color combo s in order to tell you what color you just took a picture of . update : heres a few links to read if you dont mind reading : p shows cons and perks to both sides .. . .. . http : www.firstobject.com xml-reader-sax-vs-xml-pull-parser.htm .. . .. . Also another answer to maybe read into SAX parser vs XMLPull parser http : stackoverflow.com questions 5808105 sax-parser-vs-xmlpull-parser", "Question : everyone I m new in Android and I m trying to parse a XML file and get the info in a List . My XML file is this http : servidoralvaro.ddns.net files Catalogo.xml and what I want is get the objects . What I am doing to parse it is something similar as the example on the android developeres website : .. . .. . This steo is to instantiate a parser and start the parsing process . The parser is initialized Without namespaces and to use the provided InputStream as its input.It starts the parsing process with a call to nextTag and invokes the readFeed method which extracts and processes the data the app is interested in . Here is where the exception happens and the error is the following . The rest of this class s this : .. . .. . .. . .. . And the call to the parser and the declaration of the inputStream : .. . .. . I hope any of you can help me . Thanks a lot . .. . .. . This is how the file appears in its very first lines : .. . .. . enter image description here http : i.stack.imgur.com bZY86.png Comment : What happens if you remove this line script Comment : which line @FrankN.Stein Comment : The second one : script Comment : sorry but i don t find that line in my code or xml file . @FrankN.Stein Comment : So the link you posted points to some other file I can read first 3 lines : database name Entrelazadas script -- Tabla Catalogo -- .. . Answer : Iterate while-loop until end of document reach like this .. . .. . private void eBooksXmlParser String xmlData Context context XmlPullParserFactory pullParserFactory ArrayList eBooks null try pullParserFactory XmlPullParserFactory.newInstance XmlPullParser parser pullParserFactory.newPullParser", "Question : null .. . Answer : I m using XmlPullParser sample but when run in API 8 or 10 the values return null I m not sure but in other version API 16 + working fine . What could be happening . The parameter that returns null is getAttributeValue null name . UPDATE : Into the AndroidManifest use android : minSdkVersion 8", "Question : I m enhancing a client which is part of a bigger project . Because of the lack of speed i was forced to switch to CNI and therefore i had to generate native-code with the GNU-gcj compiler gnu 4.6.3 . The compiling and linking works fine thanks to the -findirect-dispatch flag and i don t have any problems executing the output . But when it comes to the communication between the client and the server the client immediately disconnects . The reason : .. . .. . XStreamClient Reader WARN - Client disconnected Exception : com.thoughtworks.xstream.io.StreamException : Cannot create XmlPullParser .. . .. . This Exeption only appears in the gcj compiled version of the client . When i run the code with the java interpreter - things work well but too slow -- The challenging part is that i can t retrieve the source code of where this exception occurs because it is in a pre-compiled Java class files library the client uses . And I cannot contact the author of that library .. . .. . I guess the library invokes the XppReader http : xstream.codehaus.org javadoc com thoughtworks xstream io xml XppReader.html which then tries to create a XmlPullParser class and fails . I bind in the XStream vers . 1.4.3 library and other required .jars by unpacking them and compiling the created .class files and then linking the object-files . This seems to work for all other librarys too . My OS Ubuntu .. . .. . What i already did to overcome this problem : I googled intensively for XStream XmlPullParser and gcj and replaced the xmlpull - and kxml2 -files with different versions . But nothing worked . Does anyone of you have a clue of what might be the solution EDIT : .. . .. . I figured out that the reason why the XmlPullParser creation fails is that the META-INF directory with the services org.xmlpull.v1.XmlPullParserFactory file can not be found by the XmlPullParserFactory.newInstance function . This is due to the fact that i only compiled and linked the .jar s .class files . So as soon as i found i way to link the META-INF directory into the executable in away that the function can find and access it the problem should be solved . Does anyone of you already know a way to do so Comment : for me this error was caused by missing library xpp3 min-1.1.4c.jar . . not a compile problem .. . Answer : As i already edited into my question the reason why the creation fails is that the XmlPullParserFactory.newInstance method is not able to access the META-INF services org.xmlpull.v1.XmlPullParserFactory file by using the following line of code : .. . .. . RESOURCE NAME equals META-INF services org.xmlpull.v1.XmlPullParserFactory .. . .. . I must admit that i didn t find a way to bind in the needed META-INF directory into the executable which would have been one of the most elegant solutions . But since the XmlPullParserFactory.java http : m-im.googlecode.com svn-history r79 trunk m-im src org xmlpull v1 XmlPullParserFactory.java file and XStream library is open-source you just need do add one line of code into above s source file and replace the old class with the new one - and that s it . In the public static XmlPullParserFactory newInstance String classNames Class context function the program only wants to read from the RESOURCE NAME file when classNames null . So what we do to avoid this is to assign the RESOURCE NAME s file content to the classNames variable by our selves and for that place this line of code above the if classNames null classNames.length 0 DEFAULT .equals classNames statement : .. . .. . org.xmlpull.mxp1.MXParser org.xmlpull.mxp1 serializer.MXSerializer is my RESOURCE NAME-file s content . If the content of your file differs from mine - put in yours instead . Best regards Chris", "Question : I m enhancing a client which is part of a bigger project . Because of the lack of speed i was forced to switch to CNI and therefore i had to generate native-code with the GNU-gcj compiler gnu 4.6.3 . The compiling and linking works fine thanks to the -findirect-dispatch flag and i don t have any problems executing the output . But when it comes to the communication between the client and the server the client immediately disconnects . The reason : .. . .. . XStreamClient Reader WARN - Client disconnected Exception : com.thoughtworks.xstream.io.StreamException : Cannot create XmlPullParser .. . .. . This Exeption only appears in the gcj compiled version of the client . When i run the code with the java interpreter - things work well but too slow -- The challenging part is that i can t retrieve the source code of where this exception occurs because it is in a pre-compiled Java class files library the client uses . And I cannot contact the author of that library .. . .. . I guess the library invokes the XppReader http : xstream.codehaus.org javadoc com thoughtworks xstream io xml XppReader.html which then tries to create a XmlPullParser class and fails . I bind in the XStream vers . 1.4.3 library and other required .jars by unpacking them and compiling the created .class files and then linking the object-files . This seems to work for all other librarys too . My OS Ubuntu .. . .. . What i already did to overcome this problem : I googled intensively for XStream XmlPullParser and gcj and replaced the xmlpull - and kxml2 -files with different versions . But nothing worked . Does anyone of you have a clue of what might be the solution EDIT : .. . .. . I figured out that the reason why the XmlPullParser creation fails is that the META-INF directory with the services org.xmlpull.v1.XmlPullParserFactory file can not be found by the XmlPullParserFactory.newInstance function . This is due to the fact that i only compiled and linked the .jar s .class files . So as soon as i found i way to link the META-INF directory into the executable in away that the function can find and access it the problem should be solved . Does anyone of you already know a way to do so Comment : for me this error was caused by missing library xpp3 min-1.1.4c.jar . . not a compile problem .. . Answer : I think that you ve made a couple of mistakes in your implementation platform choices : .. . .. . You probably didn t need to go to the lengths of implementing stuff in native-code for speed . For most things you can get roughly comparable speed in Jana as in native-code especially if you take the time to profile and optimize your Java code . Assuming that you did CNI was a poor choice . You would have been better off using JNI or JNA both of which allow you to use Oracle HotSpot OpenJDK releases . GCJ is a poor choice because as you have observed some things don t work and debugging is more difficult . See also Is GNU s Java Compiler GCJ dead http : stackoverflow.com questions 4035538 is-gnus-java-compiler-gcj-dead .. . .. . Relying on a library that you cannot get source code for is unfortunate . My advice would be to revisit as many of those missteps as possible . Comment : Thank s for your reply @Stephen C The client has to work on very time-critical tasks even a very small increase of its speed has a big effect . But rewriting the whole project to C C++ or in some parts even to Assembler would be too much work for a minimal increase of speed . So using JNI was my first idea . Then i got aware of CNI and read that it is more efficient . I did several speed tests and CNI tourned out to be the best choice for the algorithms i want to use . Since CNI is in maintenance mode i thought there should be a way to get it work . But if it turns out there isn t i ll use JNI . Comment : Yes .. . well I still think you have made bad choices and that you are paying the price . If I was your PM I d have asked for some hard numbers to back up your assumptions that the tasks were really time critical and that a pure Java solution really wouldn t work . This has the smell of premature-optimization . I can t offer you any help to get your current approach to work .", "Question : i am parsing xml from a website . But while parsing the text in the CDATA section doesn t seem like a regular text . For example the text contains for the character . How can i solve this problem How can i parse the text in CDATA Section normally I am using XmlPullParser . Here is my XMLParser : .. . .. . Here is Xml : description CDATA Balyoz davas ndan yarg lanan Emekli Amiral Semih etin CNNT RK 8217 te Ahmet Hakan 8217 n sundu u Tarafs z B lge program na konuk oldu . etin programda 15 Temmuz darbe giri imiyle ilgili dikkat eken bir iddiay payla t . 160 8220 FET 8217 c lerin s zde darbe konseyi 8216 Yurtta Sulh 8217 ta yer alan isimler a klanmadan darbe giri imi bitti say lmaz . nsanlar ancak o zaman evine d nebilir 8221 diyen etin arp c a klamalar yapt . Yurtta 8230 description PLEASE HELP ME .. . Answer : It looks html encoded You need to html decode it . Comment : It works I am new bee . You know what i have been searching in internet for hours and couldn t find that answer . THANK YOU SO MUCH", "Question : i am trying to access a magento web service from a android client.which should return a session id.i hav already done this uing java client using apache and am successful in calling the method . How ever i am getting xmlpullparser exception when trying with android client as : 10-24 15 : 25 : 44.409 : WARN System.err 277 : org.xmlpull.v1.XmlPullParserException : expected : START TAG http : www.w3.org 2001 12 soap-envelope Envelope position : START TAG @2 : 327 in java.io.InputStreamReader@44ee2268 .. . .. . well this is my wsdl file from which i am trying to access login method : wsdl http : i.stack.imgur.com ZurTi.png .. . .. . my java code : .. . .. . objsoap.addProperty username alokxxxx .. . objsoap.addProperty apiKey xxxxxx .. . Log.d WS Construction of SOAP Object End .. . .. . error here WARN System.err 277 : org.xmlpull.v1.XmlPullParserException : expected : START TAG http : www.w3.org 2001 12 soap-envelope Envelope position : START TAG @2 : 327 in java.io.InputStreamReader@44ee2268 .. . .. . .. . .. . log for your help : DEBUG WS 333 : --------------------- Webservice Part Begins --------------------- .. . 10-29 15 : 38 : 33.643 : DEBUG WS 333 : 1 . SoapObject Construction .. . 10-29 15 : 38 : 33.673 : DEBUG WS 333 : Construction of SOAP Object End 10-29 15 : 38 : 33.673 : DEBUG WS 333 : 2 . Envelop Created 10-29 15 : 38 : 33.673 : DEBUG WS 333 : 3 . Request Into Envelop .. . 10-29 15 : 38 : 33.683 : DEBUG WS 333 : 5 . Transport Level to Trueorg.ksoap2.transport.AndroidHttpTransport@44eeb200 10-29 15 : 38 : 33.683 : DEBUG Try 333 : inside try block .. . 10-29 15 : 38 : 34.903 : WARN System.err 333 : org.xmlpull.v1.XmlPullParserException : expected : START TAG http : schemas.xmlsoap.org soap envelope Envelope position : START TAG @2 : 327 in java.io.InputStreamReader@44efbe90 .. . any suggestion thanks . Comment : If you have got the solutions then please help me ...I am facing the same problem...Thanks and Regards . .. . Answer : This is how i got the login to work . the trick is not to put the wsdl on the url", "Question : I have been asked to write a utility to search a large number of XML files for elements with a missing attribute . The department responsible cannot just make the attribute mandatory in the DTD because it will break hundreds of files . They want to edit them manually over a period of days weeks . I am writing a small command-line tool in Scala 2.8.1 . I will be using a pull parser so that I can keep my code functional-programming pure and run it multi-threaded . I need the location of XML events . The API provided in Java 6 javax.xml.stream . XMLStreamReader has a method getLocation that returns the line number of an event . I can use this to write messages that inform the user where to look for the missing attribute . I would prefer to use the pull parser in scala.xml.pull.XMLEventReader but it does not appear to offer location information . Am I missing something Is it somewhere else in the Scala API Comment : possible duplicate of How to track the source line of an XML element http : stackoverflow.com questions 4446137 how-to-track-the-source-line-of-an-xml-element Comment : I m amazed at how low the original duplicate of this question is on the list of related links . I ll try editing its title to make it closer . Comment : Ugh . I failed to see that what I thought was a the original question was a full XML loader while this is concerned about pull reader . Sorry . I d retract my vote to close if it was possible . Comment : It is not a duplicate . The other question deals specifically with SAX parsers -- the API for Locator is clear . I am trying to use the Scala StAX parser . I even know how to do it in the javax.xml.stream package just not the scala.xml.pull version . .. . Answer : As far as I can see this is not provided by the XMLEventReader api . It relies on io.Source and could provide access to the location but does not . I don t see an easy way to go around that as the object that has access to the position is private . You may want to make your own copy of XMLEventReader http : lampsvn.epfl.ch trac scala browser scala tags R 2 8 1 final src library scala-xml pull XMLEventReader.scala that produces a custom XMLEvent with the position . The method to modify would be override def elemStart which has access to the position and could generate another EvPos line : Int column : Int after each EvElemStart . You may also consider using 2.9.RC1 as certain performance related bugs were fixed . Comment : See gist.github.com 930315 https : gist.github.com 930315", "Question : everyone I m new in Android and I m trying to parse a XML file and get the info in a List . My XML file is this http : servidoralvaro.ddns.net files Catalogo.xml and what I want is get the objects . What I am doing to parse it is something similar as the example on the android developeres website : .. . .. . This steo is to instantiate a parser and start the parsing process . The parser is initialized Without namespaces and to use the provided InputStream as its input.It starts the parsing process with a call to nextTag and invokes the readFeed method which extracts and processes the data the app is interested in . Here is where the exception happens and the error is the following . The rest of this class s this : .. . .. . .. . .. . And the call to the parser and the declaration of the inputStream : .. . .. . I hope any of you can help me . Thanks a lot . .. . .. . This is how the file appears in its very first lines : .. . .. . enter image description here http : i.stack.imgur.com bZY86.png Comment : What happens if you remove this line script Comment : which line @FrankN.Stein Comment : The second one : script Comment : sorry but i don t find that line in my code or xml file . @FrankN.Stein Comment : So the link you posted points to some other file I can read first 3 lines : database name Entrelazadas script -- Tabla Catalogo -- .. . Answer : The problem finally was the file which was empty due to I had a line in other part of the code that erase that file .", "Question : I m using kXML2 on a legacy JavaME project . I m receiving an XML where some attributes contain encoded entites . When I retrieve that attribute value with the call : .. . .. . It throws an Exception : .. . .. . I have downloaded the last version of this parser but it still shows this behavior . If I remove the problematic line from XML then there are no errors . .. . Answer : Ok here is what is happening : .. . .. . The parser must decode entities in attributes unless you set this property : .. . .. . But this implementation throws an exception when that line is called . Allright so I debugged into the parser source code and I found out that this pull-parser implementation has trouble with entities that are not very common . So I must inflate the parser entity replacement map with my own odd entities for it to work like this : .. . .. . And then everything works fine .", "Question : I have following xml structure : .. . .. . I want to parse this xml . I wrote this code : .. . .. . First call parser.next always return END DOCUMENT and appropriately I receive exception in require method . org.xmlpull.v1.XmlPullParserException : expected : START TAG null Packages position : END DOCUMENT null@1 : 1268 in java.io.InputStreamReader@bd3ab6b6 .. . .. . What I m doing wrong Thanks in advance .. . Answer : Remove the call to doc.parse parser from your code . With kXML you either parse the XML with .. . .. . 1 . Document parse method .. . or .. . 2 . with the XML pull API using a loop .. . .. . You tried to do both . After the call to doc.parse parser you automatically advanced to the end of the XML document and reached the XmlPullParser.END DOCUMENT tag . Immediately after that you tried to parse the XML again using the second method . Judging by your code you decided to use the second method therefore you should get rid of the call to doc.parser parser . Comment : @olegk Did my answer solved you problem", "Question : I m trying to parse an RSS feed from Monster on Android v.17 using this URL : .. . .. . http : rss.jobsearch.monster.com rssquery.ashx q java .. . .. . To get the content I m using HttpUrlConnection in the following fashion .. . .. . What comes back is as far as I can say and I verified it too a legit RSS .. . .. . It starts like this click the URL above if you want to see complete XML : .. . .. . But when I attempt to parse it : .. . .. . The code immediately chokes on type xpp.next with the following Exception .. . .. . Which actually means it cannot process 2nd char at line 1 xml version 1.0 encoding utf-8 .. . .. . Here are the offending lines in the KXmlParser.java 425-426 . The type TEXT evaluates to true .. . .. . Any help I did try to set parser to XmlPullParser.FEATURE PROCESS DOCDECL false but that didn t help .. . .. . I did research this on the web and here and can t find anything that helps .. . Answer : The reason you are getting the error is that the xml file doesn t actually start with xml version 1.0 encoding utf-8 . It starts with three special bytes EF BB BF which are Byte order mark http : en.wikipedia.org wiki Byte order mark . Hex representation http : i.stack.imgur.com c7uqI.png .. . .. . InputStreamReader doesn t handle these bytes automatically so you have to handle them manually . The simplest way to it is to use BOMInpustStream http : commons.apache.org proper commons-io apidocs org apache-commons-io input BOMInputStream.html available in Commons IO http : commons.apache.org proper commons-io download io.cgi library : .. . .. . I ve checked the code above and it works well for me . Comment : That s exactly the reason I love Stackoverflow One can always find a person smarter than yourself Well deserved bounty though I can t award it sooner than tomorrow Thank you Comment : im having this error but i have the xml in a string variable what could i do Comment : Or you can do data.replaceAll . Works for me Comment : @vmironov with which tool did you analyse the file can you provide name and a download link if possible Comment : @viperbone it s just a usual hex viewer", "Question : I m using scala.xml.pull to parse through a vary large xml file . This works great for event processing but what I want to do is have my parser cough up a mini-document for particular nodes and I don t see an easy way to do this or at least not a scala way . I m thinking I build a seek function like this that can use the iterator to find an EvElemStart event that matches my tag : .. . .. . After that I m less clear . Is there a simple way to grab all of the children of this tag into a document rather than having to iterate through every event the XMLEventReader pops out What I m ultimately looking for is a process that scans the file and emits an xml element an Elem for each instance of a particular tag or set of tags that I can process using the normal scala-xml processing . Comment : Can you please add some more info in your question as an exemple of the behavior you would want from a short snippet .. . Answer : Here s what I ended up doing . slurp tag seeks to the next instance of the tag and returns a complete node tree for that tag .", "Question : I am doing regular XML parsing on android and very rarely I get this exception and only on particular phones . Haven t been able to get to the root of this issue . Does anybody have an idea what might be causing this .. . Answer : I found a bug-fix for Android 4.4 mentioning this : Change 61530 https : android-review.googlesource.com c 61530 .. . .. . So the proper exception you should be getting is : Unterminated element content spec meaning unexpected EOF ." ] }
[ "yes-answer-long", "yes-answer-short" ]
xml
UNK_RELATION
monkeyrunner@emulator@132
monkeyrunner -- monkeyrunner is tool from android sdk which provides an api for writing programs that control an android device or @placeholder from outside of android code .
{ "confidence": [ 56.319244384765625, 56.235382080078125, 56.22594451904297, 52.170074462890625, 51.38398742675781, 50.00298309326172, 46.684410095214844, 46.641395568847656, 45.9897346496582, 45.9897346496582, 45.55391311645508, 45.109169006347656, 45.044677734375, 44.17787170410156, 44.17787170410156, 44.17693328857422, 42.294654846191406, 41.800228118896484, 41.74232482910156, 41.74232482910156, 41.50050354003906, 40.20851135253906, 40.038246154785156, 40.038246154785156, 40.038246154785156, 40.038246154785156, 40.038246154785156, 39.54291534423828, 39.036014556884766, 38.90774917602539, 38.77592468261719, 38.36949157714844, 38.359519958496094, 38.00986862182617, 37.78305435180664, 37.769920349121094, 37.55282211303711, 37.55282211303711, 37.55282211303711, 37.46684646606445, 37.16130065917969, 37.16130065917969, 37.080013275146484, 36.74043273925781, 36.74043273925781, 36.74043273925781, 36.74043273925781, 36.74043273925781, 36.74043273925781, 36.74043273925781, 36.74043273925781, 36.67705535888672, 36.659114837646484, 36.03436279296875, 35.96342468261719, 35.94951629638672, 35.60993957519531, 35.60993957519531, 35.60993957519531, 35.60993957519531, 35.08313751220703, 34.996009826660156, 34.318145751953125, 34.255008697509766, 34.255008697509766, 34.255008697509766, 34.00238037109375, 33.844818115234375, 33.844818115234375, 33.82453918457031, 33.70823287963867, 33.005191802978516, 32.66561508178711, 32.298301696777344, 32.298301696777344, 32.298301696777344, 32.298301696777344, 32.298301696777344, 32.298301696777344, 32.298301696777344, 32.298301696777344, 32.298301696777344, 32.298301696777344, 32.298301696777344, 32.298301696777344, 32.19109344482422, 32.18894958496094, 31.894174575805664, 31.588499069213867, 31.588499069213867, 31.28369903564453, 31.28369903564453, 31.28369903564453, 31.28369903564453, 31.167804718017578, 31.167804718017578, 30.81537628173828, 30.812114715576172, 29.81287384033203, 29.81287384033203 ], "content": [ "There is sample script in this link http : dtmilano.blogspot.in 2011 06 using-android-monkeyrunner-to-automate.html which uses monkeyrunner to lock unlock device screen .", "Is it possible to install Monkeyrunner without downloading the entire Android SDK possibly similar to the android-tools-adb package", "I m using Android Studio and in the SDK that s installed there is the monkeyrunner Jython in tools from what I can tell monkeyrunner uses jython .", "Why not just ssh user@server opt android-sdk tools monkeyrunner -v ALL opt android-sdk tools MYSCRIPT.py", "Monkeyrunner hangs from time to time .", "In general MonkeyRunner is based on a generic build-in android-instrumentation based on user inputs .", "recieve logs in python monkeyrunner from udp socket", "and the code of CallTest.php using Yii that call a Python Script is like this : .. . .. . The PythonScript call MonkeyRunner adb and others android commands .", "Monkeyrunner is kind of deprecated .", "Has anyone used monkeyrunner with AS", "How do I read from stdin with monkeyrunner", "This code is used to detect the Monkeyrunner hang issue and reconnect .", "I do not know how to connect the device in a sequence one after the other .. . .. . connection sequence : Monkeyrunner -- UI Automator -- Monkeyrunner", "I am trying to build a program with Eclipse that will send touch-events via MonkeyRunner to an Android phone .", "This seems to be a bug https : code.google.com p android issues detail id 56318 with Jython 2.5.3 the version that is included with MonkeyRunner .", "AS utilizes standalone Jython to run MonkeyRunner .", "Which Android SDK Platform-tools", "Monkeyrunner can do it .", "Or is there another way to solve the Monkeyrunner hang issue", "I m trying to use monkeyrunner for my project .", "I have downloaded the android-studio and the android sdk .", "I read Issues using monkeyrunner startActivity http : stackoverflow.com questions 24215965 issues-using-monkeyrunner-startactivity but still it didn t work .", "Any suggestion as to why this might be the case with monkeyrunner", "It will provide you with almost all the functionality in monkeyrunner and more .", "How can I do this with adb monkeyrunner", "As that MonkeyRunner and Jython aren t really compatible with Python3 .", "But when the monkeyrunner test runs Talkback seems to be pausing .", "if monkeyrunner doesn t support the network connection i will give up this tool and choose another tool .", "I m tryng to test some app using monkeyrunner and AndroidViewClient also I have used culebra to generate code But I have this erro : .. . .. . This is my script whit monkeyrunner and AndroidViewClient .. . .. . If I execute this wthiout monkeyrunner it show an erro about ViewClient device This script is inside an loop for .", "I need to run a monkeyrunner script in a remote machine .", "conn.modules.subprocess.Popen opt android-sdk tools monkeyrunner -v ALL .. . opt android-sdk tools MYSCRIPT.py shell True .. . .. . The chunk of code below solved my problem : .. . .. . import rpyc .. . .. . import subprocess os .. . .. . conn rpyc.classic.connect 192.XXX.XXX.XXX XXXXX .. . .. . conn.execute print Hello .. . .. . conn.modules.os.popen monkeyrunner -v ALL MYSCRIPT.py .. . .. . Hope this helps to those who are experiencing the same problem as mine .", "Edit the first line of your script with the results of the following command : .. . .. . for example if monkeyrunner usually provided with android sdk has been installed under usr local bin sdk write : .. . .. . or even use env .. . .. . then set you script file as executable .. . .. . You can now launch your script from the shell .", "Now i m studying how to use the MonkeyRunner to test android devices in the win7 now i have downloaded the latest android sdk and configured all of the env .. . .. . There is an android4.4.2 tv set that enabled adbd no usb debug port but network is available .", "MonkeyRunner waitForConnection float string can take a timeout and a device identifier to start the script on an specific device .", "I was wondering if anyone ever tried to use PyCharm http : www.jetbrains.com pycharm to code scripts for MonkeyRunner https : developer.android.com tools help monkeyrunner concepts.html for Android and how to do it", "written below is the command that I used : .. . .. . import rpyc .. . .. . import subprocess .. . .. . conn rpyc.classic.connect 192.XXX.XXX.XXX XXXXX .. . .. . conn.execute print Hello .. . .. . subprocess.Popen opt android-sdk tools monkeyrunner -v ALL .. . .. . opt android-sdk tools MYSCRIPT.py shell True .. . .. . and this is the result : .. . .. . can t open specified script file .. . .. . Usage : monkeyrunner option script file .. . .. . -s MonkeyServer IP Address .. . .. . -p MonkeyServer TCP Port .. . .. . -v MonkeyServer Logging level .. . .. . And then I realized that if you use the command below it is running the command in your machine .", "I want monkeyrunner not to get involve to UIAutomation service .", "How to use MonkeyRunner and Robotium together not separately", "There is a scheme how to use a combination of Robotium and Monkeyrunner .", "As I understood there are 2 basic scripts for that : .. . .. . monkey recorder.py : https : android.googlesource.com platform sdk + ics-mr0 monkeyrunner scripts monkey recorder.py .. . .. . monkey playback.py : https : android.googlesource.com platform sdk + ics-mr0 monkeyrunner scripts monkey playback.py .. . .. . So monkey recorder.py is for recording actions and monkey playback.py is for reproducing these actions .", "I am trying to run Android s MonkeyRunner but having problems running it from my Git Shell .", "If I open Settings via touch-events from Monkeyrunner Users option is not there .. . If I do it as follows same thing .", "There are also other AndroidViewClient culebra features not available in monkeyrunner like multi-device testing automatic test generation GUI etc .", "I m using a combination of direct adb.exe calls and monkeyrunner calls to .py scripts .", "Is there a way to import BeautifulSoup or something similar for web-scraping to monkeyrunner", "This was not what I expected as I wanted a way to work with the monkeyrunner .", "I have used MonkeyRunner but moved to ADB since it is more flexible .", "I am trying to write a monkeyrunner script that searches in a SearchView that is in the Toolbar .", "I know MonkeyRunner is kind of deprecated but I still have a weird question .", "i wrote a python script called test.py to test the MonkeyRunner .", "I want to run a monkeyrunner test and generate swipes on the screen .", "from com.android.monkeyrunner import MonkeyRunner MonkeyDevice .. . device MonkeyRunner.waitForConnection ---can t connect device .. . if device is not None : .. . device.takeSnapshot .. . after aboves done i input the monkeyrunner.bat test.py in the win7 command window .", "It doesn t seem a problem related with AndroidViewClient but with Windows monkeyrunner in general if it cannot execute a script which is specified by its absolute path .", "However I was getting the importError when importing to monkeyrunner .. . .. . After some digging I appended the BeautifulSoup path name .. . .. . import sys .. . .. . sys.path.append path to monkeyrunner directory the filename.egg sys.path.append path to monekeyrunner directory .. . .. . This enabled Monkeyrunner to correctly see the directory for BeautifulSoup .", "I want to stop monkeyrunner to connect the service for temporarily .", "The thing i fidn with monkeyrunner is that in my case it becomes device dependant as i record coordintes for my sequence of events .", "I use MonkeyRunner to connect start the Antimalware Software and start the scan .", "How can I push the Next button in the Instagram Application with MonkeyRunner", "However I can t figure out how to get MonkeyRunner to work .", "AndroidViewClient culebra https : github.com dtmilano AndroidViewClient is a monkeyrunner replacement .", "Try to export your env PATH to : Applications Android Studio.app sdk tools", "Yes it s really so because monkeyrunner changes current directory to where it monkeyrunner.bat on Windows is located thus looking for the script first.py in your case in monkeyrunner folder .", "Here s an example of what i m trying to do : .. . .. . I have a script where I import MonkeyRunner MonkeyDevice ViewClient .. . from com.dtmilano.android.viewclient import ViewClient .. . from com.android.monkeyrunner import MonkeyRunner MonkeyDevice .. . .. . Connect the tablet and create a MonkeyDevice object .. . device MonkeyDevice.waitForConnection .. . .. . Using the device I then create an Android ViewClient object .. . vc ViewClient device .. . .. . I open the Settings app on my tablet device.startActivity com.android.settings .Settings .. . .. . I then find the desired view using : .. . displayView findViewWithAttribute text : mText Display .. . .. . Then I try to click on that view by simulating a touch-event : .. . displayView.touch .. . .. . The problem is that this script touches another part of the screen somewhere in the left part of the WiFi line in the Settings app .", "The problem is everytime I try to run ui automator monkeyrunner an error occured .", "Robotium and monkeyrunner have nothing much to do with each other .", "If so is it possible to run monkeyrunner scripts while Emma computes the coverage", "Per bash profile PATH points to .. . .. . When I cd to that directory I can t find monkeyrunner .", "those you run ADB commands from must be authorized by the Android device i.e .", "the one those commands are runnin on -- so your Android device can tell trusted callers from malicious attackers .", "I have multiple test cases for which i have respective monkeyrunner scripts .", "I m executing script test using monkeyrunner on AVD Android Emulator sequentially with the code below and I want to know if it is possible to execute Script Tests in a parallel on all emulators .", "device connecting to monkeyrunner http : i.stack.imgur.com xWYcj.png .. . .. . I don t really know where to start with .", "It s possible with AndroidViewClient culebra https : github.com dtmilano AndroidViewClient but no with monkeyrunner .", "I am using MonkeyRunner to test my very broad application and running many different scripts on my devices .", "All things equal I kind of prefer the monkeyrunner script just because it seems a little more flexible and readable .", "When I tried to use monkeyrunner command to run recorder I got the error : mismatched input monkey recorder expecting NEWLINE .", "But this turns out to be better option because I am no longer limited to only use the modules available in monkeyrunner .", "scriptfile should be a full path file name try below monkeyrunner c : test script first.py", "There is no way to disable the lock screen on my phone and the screen has to be unlocked in order for my adb monkeyrunner interactions to work .", "Does anyone know why or how to get Users to display or open using MonkeyRunner", "I am trying to run some test instrumentations using MonkeyRunner but I somehow can t get it to work like it should .", "Thanks for your suggestion but i don t want to use other tools to replace the monkeyrunner .", "So i want to know the root cause why the monkeyrunner can t work in network environment .", "In fact better question- does anyone know ANY way to get monkeyrunner working on a raspberry-pi running raspbian", "So i have installed a keyboard replacement for monkeyrunner i have found on StackOverflow .", "I am working on Android Studio and I cannot see my package inside Android Data folder of my device when I run apk on it .", "I am trying to implement Android viewclient and Monkeyrunner together as i want to take snapshot load image and compare files using Monkeyrunner and run viewbased scripts using AndroidViewClient can you please let me know how to do that or if there is a way we can implement image loading and comparision from viewclient itself that would be fine too .", "You should try AndroidViewClient culebra https : github.com dtmilano AndroidViewClient which will give you some advantages over monkeyrunner and monkey recorder .", "go to FileManager Android Data .", "Running Android v6.0.1 .", "The following is my AndroiManifest.xml : .. . .. . I want to launch my app using monkeyrunner but when I give the command .. . .. . It doesn t start my app .", "AndroidViewClient https : github.com dtmilano AndroidViewClient is a github repo that allows you to call on views directly without specifying exact coordinates with monkeyrunner .", "enter image description here http : i.stack.imgur.com Flbt2.png .. . .. . When I try to run monkeyrunner dump.py : .. . .. . Typing in the full path :", "You only need to download the source distribution and set the environment variable ANDROID VIEW CLIENT HOME or PYTHONPATH to allow the monkeyrunner interpreter to find the required modules .", "You can use AdbClient.sameAs as a replacement and in such case you don t need Monkeyrunner at all .", "Use the absolute path of monkeyrunner or set the PATH environment variable before invoking the script .", "I want to use monkeyrunner to test my MainActivity and I have edit a python file like below : .. . .. . And then I open up my app and use the command of monkeyrunner monkeyrunnerprogram2.py but the monkey runner can do nothing except takesnapshot .It doesnot do anything above .", "I am trying to launch and then stop an Android emulator from a python-2.5 script to be executed with monkeyrunner and I wrote the following code : .. . .. . When I execute this script I get a working Android emulator so the subprocess.Popen instruction works but then I get an error TypeError : kill : 1st arg can t be coerced to int in os.kill function since the emulator proc s PID is None verified by the output message .", "error-log http : i.stack.imgur.com G1wPN.png So do I need to disabled monkeyrunner", "I have come across tools like adb monkeyrunner but I think for both of them the tablet has to be connected to a PC ." ] }
{ "confidence": [ 71.74183654785156, 70.99327087402344, 67.26887512207031, 67.02513885498047, 65.50704193115234, 65.48870849609375, 63.868614196777344, 63.123138427734375, 63.11582565307617, 63.02011489868164, 62.89403533935547, 62.05003356933594, 61.075443267822266, 60.710086822509766, 60.56077194213867, 60.20497512817383, 59.235206604003906, 58.8543701171875, 57.72548294067383, 56.74110794067383 ], "content": [ "Question : Now i m studying how to use the MonkeyRunner to test android devices in the win7 now i have downloaded the latest android sdk and configured all of the env .. . .. . There is an android4.4.2 tv set that enabled adbd no usb debug port but network is available . I can use a following commend to connect this device with adb in my pc : .. . .. . .. . Then i saw following print in my command window : .. . .. . List of devices attached .. . 172.30.198.240 : 5555 device .. . .. . Checked this connection that was successful . we can use adb shell command to login the tv system shell . i wrote a python script called test.py to test the MonkeyRunner . from com.android.monkeyrunner import MonkeyRunner MonkeyDevice .. . device MonkeyRunner.waitForConnection ---can t connect device .. . if device is not None : .. . device.takeSnapshot .. . after aboves done i input the monkeyrunner.bat test.py in the win7 command window . the codes blocked at the MonkeyRunner.waitForConnection for ever and adb server was killed . I have tried many ways but all of them were failed . Try1 : input monkeyrunner.bat -s 172.30.198.240 test.py but failed again . Try2 : i googled this issue someone said we must set the adb port to 12345 so i changed the adb default port from 5555 to 12345 by using adb tcpip 12345 failed again . Try3 : modify the script add parameters for the waitForConnection method .. . .. . .. . i got a nullpointer error for the device . But if i use a phone with a usb debug port to connect my pc above script ran ok . I don t know why could you help me thanks a lot .. . Answer : Try AndroidViewClient culebra https : github.com dtmilano AndroidViewClient that could connect to devices connected over the network i.e . TV with no problems . If you want to just take screenshots dump -f one of the tools included in the package does just that . NOTE : .. . .. . There s also a typo in your snippet : MokeyRunner missing n but I guess you don t have it in your real code or you ll be receiving an exception . Comment : Thanks for your suggestion but i don t want to use other tools to replace the monkeyrunner . So i want to know the root cause why the monkeyrunner can t work in network environment . if monkeyrunner doesn t support the network connection i will give up this tool and choose another tool . Comment : I mentioned it because is almost a drop-in replacement Comment : I have submitted this question to the google android group . Till now no one reply to me.. . This tool is developed by google there should be no such obvious problem .", "Question : There is no way to disable the lock screen on my phone and the screen has to be unlocked in order for my adb monkeyrunner interactions to work . There is no password or pattern security on the device but I have to drag the lock and move it to the right and the screen unlocks . How can I do this with adb monkeyrunner .. . Answer : Did you tried using below command : .. . .. . This command would unlock the screen at first boot and would then allow further commands to launch applications and have them displayed on the screen . But As of the Android 4.2.2 update when you connect your phone to a computer you are presented with your computer s RSA key fingerprint to open the adb connection . You also have the ability to permanently trust the computer so you don t have to repeat this step upon every re-connect . Starting with this Android version remote devices i.e . those you run ADB commands from must be authorized by the Android device i.e . the one those commands are runnin on -- so your Android device can tell trusted callers from malicious attackers . On these and later version use below command : .. . .. . This locks the screen if the screen is unlocked . If the screen is already locked it wakes up the device . There is sample script in this link http : dtmilano.blogspot.in 2011 06 using-android-monkeyrunner-to-automate.html which uses monkeyrunner to lock unlock device screen .", "Question : I am using AS version 0.5.4 on a Mac . Per bash profile PATH points to .. . .. . When I cd to that directory I can t find monkeyrunner . I also tried updating AS but that didn t help . Has anyone used monkeyrunner with AS Any help shall be appreciated . Thanks . .. . Answer : AS utilizes standalone Jython to run MonkeyRunner . Try to export your env PATH to : Applications Android Studio.app sdk tools", "Question : I need to run a monkeyrunner script in a remote machine . I m using python to to automate it and RPyC so that I could connect to other machines everything is running in CentOS . written below is the command that I used : .. . .. . import rpyc .. . .. . import subprocess .. . .. . conn rpyc.classic.connect 192.XXX.XXX.XXX XXXXX .. . .. . conn.execute print Hello .. . .. . subprocess.Popen opt android-sdk tools monkeyrunner -v ALL .. . .. . opt android-sdk tools MYSCRIPT.py shell True .. . .. . and this is the result : .. . .. . can t open specified script file .. . .. . Usage : monkeyrunner option script file .. . .. . -s MonkeyServer IP Address .. . .. . -p MonkeyServer TCP Port .. . .. . -v MonkeyServer Logging level .. . .. . And then I realized that if you use the command below it is running the command in your machine . example : the command inside the Popen is ls the result that it will give you is the list of files and directories in the current directory of the LOCALHOST hence the command is wrong . subprocess.Popen opt android-sdk tools monkeyrunner -v ALL .. . .. . opt android-sdk tools MYSCRIPT.py shell True .. . .. . and so I replaced the code with this .. . .. . conn.modules.subprocess.Popen opt android-sdk tools monkeyrunner -v ALL .. . .. . opt android-sdk tools MYSCRIPT.py shell True .. . .. . And give me this error message .. . .. . Remote traceback Traceback most recent call last : File usr lib python2.4 site-packages rpyc-3.2.2-py2.4.egg rpyc core protocol.py line 300 in dispatch request res self . HANDLERS handler self args File usr lib python2.4 site-packages rpyc-3.2.2-py2.4.egg rpyc core protocol.py line 532 in handle call return self . local objects oid args dict kwargs File usr lib python2.4 subprocess.py line 542 in init errread errwrite File usr lib python2.4 subprocess.py line 975 in execute child raise child exception OSError : Errno 2 No such file or directory .. . .. . Local exception Traceback most recent call last : File line 1 in File usr lib python2.4 site-packages rpyc-3.2.2-py2.4.egg rpyc core netref.py line 196 in call return syncreq self consts.HANDLE CALL args kwargs File usr lib python2.4 site-packages rpyc-3.2.2-py2.4.egg rpyc core netref.py line 71 in syncreq return conn.sync request handler oid args File usr lib python2.4 site-packages rpyc-3.2.2-py2.4.egg rpyc core protocol.py line 438 in sync request raise obj OSError : Errno 2 No such file or directory .. . .. . I am thinking that it cannot run the file because I don t have administrator access since I didn t supply the username and password of the remote machine Help Comment : Why not just ssh user@server opt android-sdk tools monkeyrunner -v ALL opt android-sdk tools MYSCRIPT.py .. . Answer : Using this function to run monekyrunner doesn t work although running ls pwd works fine . conn.modules.subprocess.Popen opt android-sdk tools monkeyrunner -v ALL .. . opt android-sdk tools MYSCRIPT.py shell True .. . .. . The chunk of code below solved my problem : .. . .. . import rpyc .. . .. . import subprocess os .. . .. . conn rpyc.classic.connect 192.XXX.XXX.XXX XXXXX .. . .. . conn.execute print Hello .. . .. . conn.modules.os.popen monkeyrunner -v ALL MYSCRIPT.py .. . .. . Hope this helps to those who are experiencing the same problem as mine .", "Question : I m trying to use monkeyrunner for my project . As I understood there are 2 basic scripts for that : .. . .. . monkey recorder.py : https : android.googlesource.com platform sdk + ics-mr0 monkeyrunner scripts monkey recorder.py .. . .. . monkey playback.py : https : android.googlesource.com platform sdk + ics-mr0 monkeyrunner scripts monkey playback.py .. . .. . So monkey recorder.py is for recording actions and monkey playback.py is for reproducing these actions . I found here http : hariniachala.blogspot.ru 2011 09 android-application-ui-testing-with.html that I can run recorder with this line : .. . .. . I tried to execute this command from this directory : .. . .. . And I got this error : .. . .. . So I expected that this window will be opened : .. . .. . enter image description here http : i.stack.imgur.com 2OgWG.png .. . .. . OS : OS X Yosemite v10.10.5 .. . .. . Please help me to solve this problem . Thanks . .. . Answer : Give AndroidViewClient culebra https : github.com dtmilano AndroidViewClient a try . It provides similar functionality with the big advantage of being able to generate plain python unit tests or scripts . Culebra UI https : github.com dtmilano AndroidViewClient wiki Culebra-GUI describes the UI similar to monkey recorder.py . Comment : thank you for your help", "Question : I have Installed LAMP Yii Framework 2 Android SDK path are defined . and the code of CallTest.php using Yii that call a Python Script is like this : .. . .. . The PythonScript call MonkeyRunner adb and others android commands . When I execute TestAVDs.py from command Line it works But If I Call it from Yii it return as NULL and in log shows this error : .. . .. . Code of TestAVDs.py below . I change shell-exec by exec write the path on code but doesn t work . Some ideas to execute my TestAVDs.py from Yii webpage . Thanks . .. . Answer : Use the absolute path of monkeyrunner or set the PATH environment variable before invoking the script . For example : Comment : Thanks dtmilano it work for me . Comment : NP . I noticed you are running tests on multiple devices you should take a look at dtmilano.blogspot.ca 2015 05 android-culebra-multi-device.html http : dtmilano.blogspot.ca 2015 05 android-culebra-multi-device.html", "Question : I am trying to build a program with Eclipse that will send touch-events via MonkeyRunner to an Android phone . However I can t figure out how to get MonkeyRunner to work . I searched for questions similar to mine and found that there were several .jar dependencies and I added them to Libraries under the Java Build Path but it still fails cannot be resolved to do .. . .. . What else am I missing besides adding the .jars to the libraries .. . Answer : If your intention is to send events from Java to a device you should use UIAutomator http : developer.android.com tools testing-support-library index.html UIAutomator from the Testing Support Library . UIAutomator provides a set of APIs to build tests that allow you to send events and interact with the applications on the device . Building with Eclipse may be difficult but not impossible or you can use Android Studio and make your life easier . However if you just want to send events to the device and want to use a scripting-language like python instead of Java you can use AndroidViewClient culebra https : github.com dtmilano AndroidViewClient which facilitates the creation of tests and scripts from a UI see Culebra UI https : github.com dtmilano AndroidViewClient wiki Culebra-GUI . It can also be used from Eclipse using PyDev or PyCharm .", "Question : I need to run a monkeyrunner script in a remote machine . I m using python to to automate it and RPyC so that I could connect to other machines everything is running in CentOS . written below is the command that I used : .. . .. . import rpyc .. . .. . import subprocess .. . .. . conn rpyc.classic.connect 192.XXX.XXX.XXX XXXXX .. . .. . conn.execute print Hello .. . .. . subprocess.Popen opt android-sdk tools monkeyrunner -v ALL .. . .. . opt android-sdk tools MYSCRIPT.py shell True .. . .. . and this is the result : .. . .. . can t open specified script file .. . .. . Usage : monkeyrunner option script file .. . .. . -s MonkeyServer IP Address .. . .. . -p MonkeyServer TCP Port .. . .. . -v MonkeyServer Logging level .. . .. . And then I realized that if you use the command below it is running the command in your machine . example : the command inside the Popen is ls the result that it will give you is the list of files and directories in the current directory of the LOCALHOST hence the command is wrong . subprocess.Popen opt android-sdk tools monkeyrunner -v ALL .. . .. . opt android-sdk tools MYSCRIPT.py shell True .. . .. . and so I replaced the code with this .. . .. . conn.modules.subprocess.Popen opt android-sdk tools monkeyrunner -v ALL .. . .. . opt android-sdk tools MYSCRIPT.py shell True .. . .. . And give me this error message .. . .. . Remote traceback Traceback most recent call last : File usr lib python2.4 site-packages rpyc-3.2.2-py2.4.egg rpyc core protocol.py line 300 in dispatch request res self . HANDLERS handler self args File usr lib python2.4 site-packages rpyc-3.2.2-py2.4.egg rpyc core protocol.py line 532 in handle call return self . local objects oid args dict kwargs File usr lib python2.4 subprocess.py line 542 in init errread errwrite File usr lib python2.4 subprocess.py line 975 in execute child raise child exception OSError : Errno 2 No such file or directory .. . .. . Local exception Traceback most recent call last : File line 1 in File usr lib python2.4 site-packages rpyc-3.2.2-py2.4.egg rpyc core netref.py line 196 in call return syncreq self consts.HANDLE CALL args kwargs File usr lib python2.4 site-packages rpyc-3.2.2-py2.4.egg rpyc core netref.py line 71 in syncreq return conn.sync request handler oid args File usr lib python2.4 site-packages rpyc-3.2.2-py2.4.egg rpyc core protocol.py line 438 in sync request raise obj OSError : Errno 2 No such file or directory .. . .. . I am thinking that it cannot run the file because I don t have administrator access since I didn t supply the username and password of the remote machine Help Comment : Why not just ssh user@server opt android-sdk tools monkeyrunner -v ALL opt android-sdk tools MYSCRIPT.py .. . Answer : As i see you are already connected .. . .. . Try to use next command : .. . .. . instead of : Comment : it s still not working the result is the same with the first set of commands that I tried . Comment : Do you really have this script file on remote machine Comment : yes . I manually checked it several times . I used find and locate command to know if it is capable of locating the file in a remote machine however those commands are giving me error msgs as well. .", "Question : I m trying to simulate a click on an Android tablet using monkey runner and Android ViewClient . I want to click on a region view which has specific text . Here s an example of what i m trying to do : .. . .. . I have a script where I import MonkeyRunner MonkeyDevice ViewClient .. . from com.dtmilano.android.viewclient import ViewClient .. . from com.android.monkeyrunner import MonkeyRunner MonkeyDevice .. . .. . Connect the tablet and create a MonkeyDevice object .. . device MonkeyDevice.waitForConnection .. . .. . Using the device I then create an Android ViewClient object .. . vc ViewClient device .. . .. . I open the Settings app on my tablet device.startActivity com.android.settings .Settings .. . .. . I then find the desired view using : .. . displayView findViewWithAttribute text : mText Display .. . .. . Then I try to click on that view by simulating a touch-event : .. . displayView.touch .. . .. . The problem is that this script touches another part of the screen somewhere in the left part of the WiFi line in the Settings app . I looked in ViewClient s source code and found that the touch method returns the x y coordinates of the view and then uses the MonkeyDevice.touch method . But the x y coordinates returned are relative to the view s parent . Does anybody know how to get the correct x y coordinates of the view object Or at least a way to get the parents of the view . .. . Answer : Problem solved . The latest version of AndroidViewClient solves my issue with the views . I can use :", "Question : How to use MonkeyRunner and Robotium together not separately for testing my Android app Comment : The question is too generic do you have an example on how both should work together Comment : Robotium and monkeyrunner have nothing much to do with each other . .. . Answer : Well I found this .. . .. . http : download.yandex.ru company experience yac2012 kharitonenko yac 2012.pdf .. . .. . slide 22 . There is a scheme how to use a combination of Robotium and Monkeyrunner . For example when in your tests you need to take a snapshot from Android native Camera and Robotium can t do that . Monkeyrunner can do it . But most of your test case developed in Robotium so as I understood you can run monkeyrunner script for this action and then continue with Robotium . Am I right Comment : Hey guys Has anybody tried method of testing Robotium+Monkeyrunner as shown in slide 22 in the link", "Question : null .. . Answer : I learn Automated Performance Testing here https : codelabs.developers.google.com codelabs android-perf-testing 0 . I want to replace Espresso with UI Automator because I do unit-testing without sorce code . When I replaced and ran the testing project I got the error : .. . .. . I guess is that both of Monkeyrunner and UI Automator use the UiAutomationService at the same time . How can I fix it I do not know how to connect the device in a sequence one after the other .. . .. . connection sequence : Monkeyrunner -- UI Automator -- Monkeyrunner", "Question : Is it possible to install Monkeyrunner without downloading the entire Android SDK possibly similar to the android-tools-adb package I m looking to install the software on a raspberry-pi which doesn t have a huge amount of disk space free which is why I don t want to download the entire sdk . Comment : In fact better question- does anyone know ANY way to get monkeyrunner working on a raspberry-pi running raspbian .. . Answer : If you have already android-tools-adb package installed you can try AndroidViewClient culebra https : github.com dtmilano AndroidViewClient which requires only python and some optional modules which may not be needed in your case i.e . PIL for image-manipulation . Comment : Unfortunately this hasn t solved the issue - the event I wanted was a slow drag- the version of android 4.4.2 i m using doesn t have duration available as a parameter for adb swipe so it is also not working with the drag function in AndroidViewClient .", "Question : I m using Android Studio and in the SDK that s installed there is the monkeyrunner Jython in tools from what I can tell monkeyrunner uses jython . However the jython used is an old version 2.5 I have installed the newest SDK for Android Studio .. . .. . How can i change the interpreter for jython to use the more updated version 2.7.0 that exists in the official jython site Thanks Comment : Did you get a chance to change the jython version to latest I want to do the same . Please share me . .. . Answer : You have to recompile monkeyrunner.jar to change jython version and you may have to fix lot of issues . Alternatively you can use AndroidViewClient culebra https : github.com dtmilano AndroidViewClient that uses python and works perfectly with pycharm https : www.jetbrains.com pycharm specials pycharm pycharm.html .", "Question : null .. . Answer : I was wondering if anyone ever tried to use PyCharm http : www.jetbrains.com pycharm to code scripts for MonkeyRunner https : developer.android.com tools help monkeyrunner concepts.html for Android and how to do it Comment : I have used MonkeyRunner but moved to ADB since it is more flexible . I would recommend to write your tests in shell . Comment : Use AndroidViewClient culebra https : github.com dtmilano AndroidViewClient which works very well with pycharm and you get UI and automatic test generation for free . Comment : I believe PyCharm uses the installed Python version on your system . Mine is Python3 . As that MonkeyRunner and Jython aren t really compatible with Python3 .", "Question : I have downloaded the android-studio and the android sdk . I am handicapped beyond this point . It would be great if anyone could help me out beyond this point . Comment : see developer.android.com tools help monkeyrunner concepts.html http : developer.android.com tools help monkeyrunner concepts.html or developer.android.com tools help monkey.html http : developer.android.com tools help monkey.html Comment : @Rithe According to the manual developer.android.com tools help http : developer.android.com tools help monkeyrunner concepts.html SampleProgram monkeyrunner has nothing in common with Monkey tester . .. . Answer : Probably the best you can do is to use AndroidViewClient culebra https : github.com dtmilano AndroidViewClient and Pycharm https : www.jetbrains.com pycharm . Because AndroidViewClient culebra is based on python instead of jython you won t have some of the problems you may encounter using monkeyrunner .", "Question : I have created an android app and I d like to analyze the code-coverage of integration tests . Assuming the activities as units I have tested the interaction between some activities with monkeyrunner so as to validate some scenarios of my app s use cases . Is it possible to evaluate my integration tests code-coverage through tools like Emma If so is it possible to run monkeyrunner scripts while Emma computes the coverage I have just found tutorials that show how computes Emma code-coverage for Android Unit Test.. . .. . Answer : Obtaining code-coverage of a running Android application http : dtmilano.blogspot.ca 2011 11 obtaining-code-coverage-of-running.html is probably what you are looking for . Also for creating your tests I would recommend giving AndroidViewClient https : github.com dtmilano AndroidViewClient a try as a monkeyrunner drop-in replacement which allows automatic generation of tests just recording your actions on the screen try culebra -UG . Comment : Hi you do not use monkeyrunner in the guide...unfortunately I MUST use it to test my app .", "Question : I m using National Instruments Teststand to set up some sequences for automating an android device . I m using a combination of direct adb.exe calls and monkeyrunner calls to .py scripts . When I am settin up a sequence to say automate some touch commands on a device I have a choice of either using a seqeuence of adb shell input tap commands or calling a single .py script to automate these actions using device.press and device.touch functions . Is one preferred over the other for any reason Is one any more stable All things equal I kind of prefer the monkeyrunner script just because it seems a little more flexible and readable . But if adb is more stable I d opt that way when possible . This is going to be a test that runs for 24 hours doing repeated operations so stability is my first goal . Thanks for any input David Jenkinson .. . Answer : adb is more stable and reliable for long running tests . Fortunately you don t have to choose between adb or python scripts because AndroidViewClient https : github.com dtmilano AndroidViewClient provides the necessary bindings to invoke most adb commands from python .", "Question : How do I read from stdin with monkeyrunner I tried the following code . I also tried the following : .. . .. . In both cases the program prints type something but it does not respond after I type something . It seems i am making some silly mistake .. . Answer : This seems to be a bug https : code.google.com p android issues detail id 56318 with Jython 2.5.3 the version that is included with MonkeyRunner . The issue says Mac OS X but I am able to reproduce on Ubuntu . To fix it you can download the Jython 2.5.4rc1 standalone Jar from the Jython website http : www.jython.org downloads.html and copy it into the SDK tools lib directory . Note that the Jython 2.7.0 standalone Jar will not work properly . You don t need to rename the new Jar but you do need to re move the old jython-standalone-2.5.3.jar from the directory . Another option if you only need user input is to use the input function http : developer.android.com tools help MonkeyRunner.html input in the MonkeyRunner class .", "Question : null .. . Answer : I ve been trying to turn on an Accessibility Service using Android s . I run an emulator using Android Studio Nexus S API 19 armabi-v7 . I m able to open the accessibility settings when the emulator is running . By clicking on the circled submenu Setting Screen with Accessibility Sub-Menu highlighted http : i.stack.imgur.com HXDtz.png .. . .. . Yet when I run try to attach monkeyrunner by opening an interactive monkeyrunner terminal and running : .. . .. . I m unable to get navigate to the accessibility settings screen and get the error message .. . .. . Result of selecting accessibility sub-menu from settings when MonkeyDevice is attached http : i.stack.imgur.com vlRw3.png .. . .. . as soon as I detach the monkeyDevice I m able to get to the accessibility settings screen again . Any idea what could cause it snippet from the logs when there s an error : .. . .. . There seems to be a NullPointer exception but I don t know what could cause that", "Question : I know MonkeyRunner is kind of deprecated but I still have a weird question . If I open Settings via touch-events from Monkeyrunner Users option is not there .. . If I do it as follows same thing . Does anyone know why or how to get Users to display or open using MonkeyRunner Running Android v6.0.1 . Thanks .. . Eugene .. . Answer : You can use AndroidViewClient culebra https : github.com dtmilano AndroidViewClient to do it . This is a culebra script slightly modified to check for Users while scrolling but most of it is generated using Culebra GUI https : github.com dtmilano AndroidViewClient wiki Culebra-GUI : Comment : Hi Thanks for this but it seems as-if opening settings via monkeyrunner is hidding the Users menu item even using the drop-down-menu and clicking on the Profile icon then selecting More Settings causes it to display a blank Users settings page . If I then manually to go to any settings item and back then Users appear . I would just really like to know why or is it just my set-up" ] }
[ "yes-answer-long", "yes-answer-short" ]
emulator
UNK_RELATION
qspinbox@widget@77
qspinbox -- the qspinbox class part of the qt framework provides a spin box @placeholder .
{ "confidence": [ 45.180572509765625, 45.180572509765625, 44.674007415771484, 44.242340087890625, 44.104217529296875, 44.104217529296875, 43.73094177246094, 43.55901336669922, 42.42350769042969, 41.34052276611328, 41.34052276611328, 41.34052276611328, 41.34052276611328, 41.30851364135742, 40.74827194213867, 39.980796813964844, 39.980796813964844, 39.980796813964844, 39.980796813964844, 38.865806579589844, 38.44187927246094, 38.35272216796875, 37.61713409423828, 37.529457092285156, 36.67201232910156, 36.67201232910156, 36.67201232910156, 36.67201232910156, 36.67201232910156, 36.67201232910156, 35.85740661621094, 35.71824645996094, 35.64912033081055, 35.5570182800293, 35.5570182800293, 35.5570182800293, 35.5570182800293, 35.5570182800293, 34.810394287109375, 34.68285369873047, 34.53412628173828, 34.53412628173828, 34.53412628173828, 33.89580535888672, 33.89580535888672, 33.89580535888672, 33.89580535888672, 33.89580535888672, 33.89580535888672, 33.89580535888672, 33.89580535888672, 33.89580535888672, 33.5678596496582, 33.157958984375, 32.40794372558594, 32.21509552001953, 32.21509552001953, 32.21509552001953, 32.21509552001953, 32.21509552001953, 32.21509552001953, 32.21509552001953, 32.21509552001953, 32.21509552001953, 32.21509552001953, 32.21509552001953, 32.21509552001953, 31.168075561523438, 31.168075561523438, 31.100101470947266, 31.100101470947266, 31.100101470947266, 31.100101470947266, 31.100101470947266, 31.100101470947266, 31.100101470947266, 30.436931610107422, 29.487363815307617, 29.487363815307617, 28.756221771240234, 28.411296844482422, 28.372371673583984, 28.372371673583984, 28.1129207611084, 26.7305850982666, 26.7305850982666, 26.7305850982666, 26.432209014892578, 26.432209014892578, 26.432209014892578, 26.432209014892578, 26.412643432617188, 26.412643432617188, 26.07253646850586, 25.91668701171875, 25.682771682739258, 24.796981811523438, 24.796981811523438, 24.002059936523438, 24.002059936523438 ], "content": [ "However you can use a QMap QSpinBox QString to map each spin-box to its name .", "Then the QSpinBox steals focus and the wheel events manipulate the spin box value rather than scrolling the scroll area .", "Sub class QSpinBox and define your behavior .", "Currently setValue is not using by that QSpinBox .", "I have a widget containing a QSpinBox .", "I d like to stick to QSpinBox if possible .", "If you subclass QSpinBox don t forget to add calls to superclass methods QSpinBox : : focusOutEvent event and QSpinBox : : focusInEvent event if you don t want strange behaviors .", "This would not compile since there is no getValue method in the QSpinBox class .", "If you use integers then QSpinBox will be enough .", "I know how to add a QSpinBox to a QTreeWidgetItem : .. . .. . But how to add a QSpinBox to a child of QTreeWidgetItem", "According to QSpinBox . init documentation http : pyqt.sourceforge.net Docs PyQt4 qspinbox.html QSpinBox it does take only parent parameter .", "I have a QSpinBox and can change its value with the mouse wheel only if the mouse is over the QSpinBox .", "If the mouse is not over the QSpinBox scrolling the mouse wheel has no effect even though the QSpinBox still has focus .", "Make a custom QSpinBox overriding textFromValue :", "You can try extend the QSpinBox and then reimplement focusOutEvent .. . http : qt-project.org doc qt-5.0 qtwidgets qwidget.html focusOutEvent", "For example I have a QSpinbox in a QCombobox in a Groubbox .", "and how do i set limit in QSpinBox", "I need to draw dash instead of null in QSpinBox .", "Now QSpinBox also accepts dash entered by keyboard", "I have added a QSpinBox to a QGraphicsScene using a QGraphicsProxyWidget .", "I don t want to completely disable using the mouse wheel to manipulate the QSpinBox but I only want it to happen if the user explicitly clicks or tabs into the QSpinBox .", "I have a QSpinBox and I want it to only accept positive natural numbers .", "I can pass values between the dialog and the main GUI just fine for the most part until it comes to a QSpinBox in the dialog box .", "The largest a normal QSpinBox can go is 0x7FFFFFFF .", "Why don t you inherit QSpinBox and implement this logic in that subclass", "Maybe QSpinBox sets a lineEdit wich has a QIntValidator as QValidator .", "I have a control with several QSpinBox objects inside a QScrollArea .", "Is there a way to prevent the QSpinBox from stealing the focus from the QScrollArea", "I had to create a subclass of QSpinBox and implement focusInEvent QFocusEvent and focusOutEvent QFocusEvent .", "Then you also need to filter the wheel events from reaching QSpinBox .", "This can simply be done by reimplementing QWidget : : wheelEvent within a QSpinBox subclass named MySpinBox here : .. . .. . Next we need to prevent that the mouse wheel itself can cause the spin box to gain focus .", "However if you really want it you just need to subclass QSpinBox and reimplement textFromValue http : qt-project.org doc qt-4.8 qspinbox.html textFromValue and valueFromText http : qt-project.org doc qt-4.8 qspinbox.html valueFromText :", "So if the QComboBox was named comboBox and the QSpinBox named spinBox they could be accessed within the MainWindow class like this :", "Let s say I have just delete everything in the QSpinBox .", "But If you use a QSpinBox you don t need this extra step .", "One of my Maya s script use something similar except that these are Int in the QSpinBox .", "I had to finally add the QSpinBox to a regular QWidget and not under QGraphicsView .", "I need some user interaction with the QSpinBox to control the display of these elements .", "As pezy in the other answer says using setSpecialValueText http : qt-project.org doc qt-4.8 qabstractspinbox.html specialValueText-prop where the text is shown when the current value minimum of the spinbox .. . .. . or a bit more powerful : subclass QSpinBox and override following functions : .. . .. . Have a look here trying something similar QSpinBox enter NaN as a valid value http : stackoverflow.com questions 10133336 qspinbox-enter-nan-as-a-valid-value .", "I m using Qt 5.5 .. . .. . With this sample background-color of read-only QSpinBox stays red what is not correct : .. . .. . But if you remove border properties - it works as expected .", "You can derived your own version of QSpinBox including this code or implemented in the class it has to receive the signal .", "Does that mean there is no direct method to set how the values are being displayed other than inheriting from QSpinBox class", "I have this QSpinBox class which is modified to display 3 digits including zeros .", "What I would like to do is get the QSpinBox to display values issued from Values only .", "QSpinBox emit another valueChanged after I call its setValue resulting in an infinite-loop until my QVector explodes .", "I still have to find a way to keep track of Index depending on which of the QSpinBox arrows was clicked up or down.. .", "QSpinBox emit another valueChanged after I call its setValue resulting in an infinite-loop until my QVector explodes .", "I still have to find a way to keep track of Index depending on which of the QSpinBox arrows was clicked up or down.. .", "So I am looking for a way to ignore everything behind the . .. . .. . Is this possible without subclassing QSpinBox", "In this case I think you will have create your custom spinbox derived from QSpinBox .", "I need to implement a QSpinBox control which should be able to process int64 values as it s minimum maximum values .", "Implement the methods and properties specific to QSpinBox that you are interested in minimum maximum limits prefix suffix etc .", "You could subclass QSpinBox and reimplement the textFromValue http : developer.qt.nokia.com doc qt-4.8 qspinbox.html textFromValue which is responsible for the display of the value to the spinbox widget .", "You can simply inherit from QSpinBox and re-implement the textFromValue http : qt-project.org doc qt-4.8 qspinbox.html textFromValue function : .. . .. . Filling QString this way does the trick .", "Maybe take a look at the accepted answer on this question : How to subclass QSpinBox so it could have int64 values as maxium and minimum http : stackoverflow.com questions 15654769 how-to-subclass-qspinbox-so-it-could-have-int64-values-as-maxium-and-minimum rq 1", "I encountered strange behavior of background-color of QSpinBox if you configure some border properties in stylesheet .", "How can I make the spinner that is right-clicked have it s value changed to the minimum value of that particular QSpinBox", "Hence I have a QSpinBox and want to unset validation for writing not only int values but also string in it .", "Strangely not a single QSpinBox allows me to copy text from it and paste in other spinbox .", "Also I tried to select the text in QSpinBox and copy with right-click copy option .", "I didn t succeed to find on which method work to grant auto-repeat to my QSpinBox .", "That sounds a bit weird AFAIK QSpinBox QDoubleSpinBox by default do that auto repeat thing .", "I am trying to extend the QSpinBox to be able to enter NaN or nan as a valid value .", "QSpinBox makes its contents selected highlighted upon using up down buttons .", "Is there any way to clear selection other than use my own subclass of QSpinBox to access the underlying QLineEdit", "Note that if you don t want to create a new QSpinBox subclass you could also use event filters instead to solve this .", "the problem will be when editing the QSpinBox and I put there a number that is not one of the 128 numbers that would be on the vector .", "That said I don t know if that s enough to make QSpinBox behave like you want correcting the value after it was changed once is a bit hacky .", "End of the day my QSpinBox should accept any value between 9223372036854775807 and -9223372036854775808 .. . .. . What do I need to do if I m to achieve this by subclassing QAbstractSpinbox", "My objective is to use a QSpinBox to display the numbers from 0 to 9999 with the increasement of 1 using 4-digits format .", "How do i display the numbers in 4-digits format i.e adding leading zero as required in QSpinBox", "I add QSlider and QSpinBox with this code .. . .. . I would like to add 30 of them how can I do it by a loop", "All I need are the QSpinBox to enter the value of luminosity 0 255 and the QPushButton to confirm the value and send this signal to Arduino to execute .", "Each time I hover over the QSpinBox it flickers with a black band overlaid on the spinbox controls .", "I would put a layout in the QTabWidget containing both the QGraphicsView and the QSpinBox so that the spinbox doesn t have to be inside the graphicsview .", "With a QSpinBox is it possible to display the thousand separator of a number while user enter it like 10 000 Which is the best way to do that", "The spin box has what appears to be a bug in this area .", "What do I need to do to be able to change values in the QSpinBox that has focus with the mouse wheel even if the mouse is not hovering over it", "Let s suppose I have a QSpinBox how I can find out if the value was changed manually from user or from a other function", "For me this already works with a standard spin-box .", "is there a way to get my spin box to be able to be adjusted in 0.1 value steps", "I solved the QSpinBox problem and now I am solving the QPushButton I would like the Button waiting for my command to send the value into Arduino .", "QSpinBox flickering on hover http : i.stack.imgur.com nwCCH.jpg .. . .. . EDIT .. . .. . Apparently there is a bug report filed here : Bugreport https : bugreports.qt-project.org browse QTBUG-18167 .", "Well I suppose you can store the old value in a member variable and when QSpinBox emits valueChanged you can compare the new to the old value to figure out whether the up or the down arrow was pressed .", "Maybe using a label along with the spin box would be better idea", "I want to have a spin box with little buttons under each number .", "We want the spin box to only accept wheel events if it has focus .", "How can I make it so when a user clicks on the up or down arrow of a QSpinBox the value will increase as the cursor is dragging up and the value will decrease if dragging down .", "I did not mention it in the question but I have more that one QSpinBox and testing them all seems sub-optimal so I need a generic message forwarder .", "I created a QSpinBox for my application but when I let the mouse pressed on the buttons on the right of the inbox to upgrade or downgrade the value it only changes value one time .", "If you can extend the lower-bound of your range by -1 and use a normal QSpinBox or QDoubleSpinBox and call spinbox- specialValueText nan which will show the string nan when value minimum .", "I m writig a code using qt libraries in which I need to get the value of a spin box by a signal just before it changes .", "Scale width new width old .. . .. . I didn t found any slot in Qt which returns the old value of a spin box while changing the value .", "Check out Model View Tutorial http : doc.qt.io qt-5 modelview.html and Spin Box Delegate Example http : doc.qt.io qt-5 qtwidgets-itemviews-spinboxdelegate-example.html .", "So I have figured out how to dynamically generate controls how I wanted in QDialog for question i asked here http : stackoverflow.com questions 20688654 how-do-i-dynamically-add-controls-to-modles-qdialog-based-on-data-dictionary noredirect 1 comment30983214 20688654 but now I am not able to set the value on QSpinBox from the dictionary below .. . .. . Here is the error message I am getting : .. . .. . Also how do I set the limit in QSPinBox", "Is it possible to make it so that if I set a value for a spin box within the program it does not highlight the changed field or add a cursor .", "As said in a comment to an answer below setting Qt : : StrongFocus does prevent the focus rect from appearing on the control however it still steals the mouse wheel and adjusts the value in the spin box and stops the QScrollArea from scrolling .", "Setting Qt : : StrongFocus does prevent the focus rect from appearing on the control however it still steals the mouse wheel and adjusts the value in the spin box and stops the QScrollArea from scrolling .", "Please show the actual sequence of code where you getting the value of spin box and using it .", "I ve figure out how to get all the behavior I want and I ve combined the spin box with appropriate buttons ." ] }
{ "confidence": [ 74.31843566894531, 73.14623260498047, 71.76446533203125, 71.63233947753906, 68.68502807617188, 61.010684967041016, 56.67170715332031, 56.408992767333984, 55.79053497314453, 54.2067985534668, 53.15840148925781, 52.45037078857422, 52.14892578125, 51.84042739868164, 51.82011795043945, 51.75163269042969, 51.046058654785156, 50.70979309082031, 50.544029235839844, 49.68214416503906 ], "content": [ "Question : I have a control with several QSpinBox objects inside a QScrollArea . All works fine when scrolling in the scroll area unless the mouse happens to be over one of the QSpinBoxes . Then the QSpinBox steals focus and the wheel events manipulate the spin box value rather than scrolling the scroll area . I don t want to completely disable using the mouse wheel to manipulate the QSpinBox but I only want it to happen if the user explicitly clicks or tabs into the QSpinBox . Is there a way to prevent the QSpinBox from stealing the focus from the QScrollArea As said in a comment to an answer below setting Qt : : StrongFocus does prevent the focus rect from appearing on the control however it still steals the mouse wheel and adjusts the value in the spin box and stops the QScrollArea from scrolling . Same with Qt : : ClickFocus . .. . Answer : Just to expand you can do this with the eventFilter instead to remove the need to derive a new QMySpinBox type class :", "Question : I have a control with several QSpinBox objects inside a QScrollArea . All works fine when scrolling in the scroll area unless the mouse happens to be over one of the QSpinBoxes . Then the QSpinBox steals focus and the wheel events manipulate the spin box value rather than scrolling the scroll area . I don t want to completely disable using the mouse wheel to manipulate the QSpinBox but I only want it to happen if the user explicitly clicks or tabs into the QSpinBox . Is there a way to prevent the QSpinBox from stealing the focus from the QScrollArea As said in a comment to an answer below setting Qt : : StrongFocus does prevent the focus rect from appearing on the control however it still steals the mouse wheel and adjusts the value in the spin box and stops the QScrollArea from scrolling . Same with Qt : : ClickFocus . .. . Answer : Try removing Qt : : WheelFocus http : doc.trolltech.com latest qt.html FocusPolicy-enum from the spinbox QWidget : : focusPolicy http : doc.trolltech.com latest qwidget.html focusPolicy-prop : .. . .. . In addition you need to prevent the wheel event from reaching the spinboxes . You can do that with an event filter : .. . .. . .. . .. . edit from Grant Limberg for completeness as this got me 90 of the way there : .. . .. . In addition to what mmutz said above I needed to do a few other things . I had to create a subclass of QSpinBox and implement focusInEvent QFocusEvent and focusOutEvent QFocusEvent . Basically on a focusInEvent I change the Focus Policy to Qt : : WheelFocus and on the focusOutEvent I change it back to Qt : : StrongFocus . Additionally the eventFilter method implementation in the event filter class changes its behavior based on the current focus policy of the spinbox subclass : Comment : Setting Qt : : StrongFocus does prevent the focus rect from appearing on the control however it still steals the mouse wheel and adjusts the value in the spin box and stops the QScrollArea from scrolling . Comment : Then you also need to filter the wheel events from reaching QSpinBox . I ve extended my answer . Comment : Unfortunately the event filter also filters out the wheel events I do want on the spin box ie when the box is explicitly selected via clicking in the edit area or tab focusing to the edit area . Comment : @Grant : have you tried just asking the spinbox for hasFocus in the event filter Comment : If you subclass QSpinBox don t forget to add calls to superclass methods QSpinBox : : focusOutEvent event and QSpinBox : : focusInEvent event if you don t want strange behaviors .", "Question : I have a control with several QSpinBox objects inside a QScrollArea . All works fine when scrolling in the scroll area unless the mouse happens to be over one of the QSpinBoxes . Then the QSpinBox steals focus and the wheel events manipulate the spin box value rather than scrolling the scroll area . I don t want to completely disable using the mouse wheel to manipulate the QSpinBox but I only want it to happen if the user explicitly clicks or tabs into the QSpinBox . Is there a way to prevent the QSpinBox from stealing the focus from the QScrollArea As said in a comment to an answer below setting Qt : : StrongFocus does prevent the focus rect from appearing on the control however it still steals the mouse wheel and adjusts the value in the spin box and stops the QScrollArea from scrolling . Same with Qt : : ClickFocus . .. . Answer : The easiest and cleanest way to solve this hasn t been mentioned so far so I m doing now . We want the spin box to only accept wheel events if it has focus . This can simply be done by reimplementing QWidget : : wheelEvent within a QSpinBox subclass named MySpinBox here : .. . .. . Next we need to prevent that the mouse wheel itself can cause the spin box to gain focus . This can be done by setting the focus policy like this : .. . .. . That s it . Note that if you don t want to create a new QSpinBox subclass you could also use event filters instead to solve this . Comment : This way works for me instead of the accepted answer . However for the spin to work when the MySpinBox does have focus you need to also override focusInEvent and focusOutEvent to set focus policy to Qt : : WheelFocus when focus in and set back to Qt : : StrongFocus when focus out .", "Question : I have a control with several QSpinBox objects inside a QScrollArea . All works fine when scrolling in the scroll area unless the mouse happens to be over one of the QSpinBoxes . Then the QSpinBox steals focus and the wheel events manipulate the spin box value rather than scrolling the scroll area . I don t want to completely disable using the mouse wheel to manipulate the QSpinBox but I only want it to happen if the user explicitly clicks or tabs into the QSpinBox . Is there a way to prevent the QSpinBox from stealing the focus from the QScrollArea As said in a comment to an answer below setting Qt : : StrongFocus does prevent the focus rect from appearing on the control however it still steals the mouse wheel and adjusts the value in the spin box and stops the QScrollArea from scrolling . Same with Qt : : ClickFocus . .. . Answer : My attempt at a solution . Easy to use no subclassing required . First I created a new helper class : .. . .. . Then I set the focus policy of the problematic widget to StrongFocus either at runtime or in Qt Designer . And then I install my event filter : .. . .. . ui.comboBox- installEventFilter new MouseWheelWidgetAdjustmentGuard ui.comboBox .. . .. . Done . The MouseWheelWidgetAdjustmentGuard will be deleted automatically when the parent object - the combobox - is destroyed .", "Question : I have a control with several QSpinBox objects inside a QScrollArea . All works fine when scrolling in the scroll area unless the mouse happens to be over one of the QSpinBoxes . Then the QSpinBox steals focus and the wheel events manipulate the spin box value rather than scrolling the scroll area . I don t want to completely disable using the mouse wheel to manipulate the QSpinBox but I only want it to happen if the user explicitly clicks or tabs into the QSpinBox . Is there a way to prevent the QSpinBox from stealing the focus from the QScrollArea As said in a comment to an answer below setting Qt : : StrongFocus does prevent the focus rect from appearing on the control however it still steals the mouse wheel and adjusts the value in the spin box and stops the QScrollArea from scrolling . Same with Qt : : ClickFocus . .. . Answer : Just to help anyone s in need it lacks a small detail : Comment : Hi jerome welcome to Stack Overflow . Could you substantiate your answer a little to provide the reasons why it didn t work This helps to explain to others especially people who aren t so proficient in a particular language why this solves the issue Thanks", "Question : Regarding some task I must do the following . Consider I have a QDoubleSpinBox with positive values from 0 to 1000 . And every time when user tries to lower the value of spinbox f.e . to click the down button when value is 0 the value of spinbox must be string unset . I tried to do this to clear the value of spinbox and then setPrefix . But it did not worked . Any other solutions Comment : Hm but QDoubleSpinBox is to display floating-point numbers . However you want to set a string Maybe using a label along with the spin box would be better idea .. . Answer : There are two solutions to achieve what you want . As pezy in the other answer says using setSpecialValueText http : qt-project.org doc qt-4.8 qabstractspinbox.html specialValueText-prop where the text is shown when the current value minimum of the spinbox .. . .. . or a bit more powerful : subclass QSpinBox and override following functions : .. . .. . Have a look here trying something similar QSpinBox enter NaN as a valid value http : stackoverflow.com questions 10133336 qspinbox-enter-nan-as-a-valid-value .", "Question : Regarding some task I must do the following . Consider I have a QDoubleSpinBox with positive values from 0 to 1000 . And every time when user tries to lower the value of spinbox f.e . to click the down button when value is 0 the value of spinbox must be string unset . I tried to do this to clear the value of spinbox and then setPrefix . But it did not worked . Any other solutions Comment : Hm but QDoubleSpinBox is to display floating-point numbers . However you want to set a string Maybe using a label along with the spin box would be better idea .. . Answer : Sub class QSpinBox and define your behavior . Take a look at this example http : qt-project.org doc qt-4.8 widgets-icons-iconsizespinbox-cpp.html", "Question : null .. . Answer : I created a QSpinBox for my application but when I let the mouse pressed on the buttons on the right of the inbox to upgrade or downgrade the value it only changes value one time . However the functionality works when I create a QDoubleSpinBox . I didn t succeed to find on which method work to grant auto-repeat to my QSpinBox . Comment : Can you show some code How do you create it Which version of Qt are you using From the docs it seems as rhis should work out of the box . Maybe try calling setAccelerated true on it Comment : I create the Widget with Qt Designer there is no really code to show . The version of Qt used is the 4.8 . I tried the setAccelerated true fiew days ago it did not work unfortunately . Comment : What do you mean by auto repeat. . Comment : Auto-repeat is for me the fact that when you let the mouse pressed on the button the value in the box increaaaase until you release the mouse . Actually when pressed the button continually during 10sc the value increase once only . Comment : That sounds a bit weird AFAIK QSpinBox QDoubleSpinBox by default do that auto repeat thing .", "Question : I m using Qt-desiger to make a GUI . For example I have a QSpinbox in a QCombobox in a Groubbox . How can i use SetValue for my Spinbox how i have to describe the way to my Spinbox .. . Answer : You first need to use pyuic to generate a python-module from the designer ui file : .. . .. . Then import it into your application : .. . .. . This will add all the widgets from Qt Designer and make them attributes of the MainWindow class . The attribute names will be the same as the objectName property that was set in Qt Designer . So if the QComboBox was named comboBox and the QSpinBox named spinBox they could be accessed within the MainWindow class like this :", "Question : I m writig a code using qt libraries in which I need to get the value of a spin box by a signal just before it changes . I ve got : .. . .. . I want to connect a signal from spinBoxWidth to spinBoxScale so that the value of SpinBoxScale is always the Value of SpinBoxWidth after changing to its value before changing . Scale width new width old .. . .. . I didn t found any slot in Qt which returns the old value of a spin box while changing the value . Can I somehow write a slot for that Best Regards Comment : Why don t you just cache the old value manually Every time the spinBoxWidth is changed use the new value cache value and then update the cache value to the new value . .. . Answer : I believe there is no specific signal to the value before change because you can always store it from the previous signal onValueChanged you received . So the basic idea would be : .. . .. . 1 . First time receive signal onValueChanged value and store the value value old .. . 2 . Next time you receive the signal you can compute you scale value value old .. . 3 . Then you can send a new signal or directly modify the object with the new value . You can derived your own version of QSpinBox including this code or implemented in the class it has to receive the signal . It depends on your architecture .", "Question : I have a QDoubleSpinBox in range 0-7000 but want the value always displayed as 4 digits 0- 0000 1 - 0001 30 - 0030 3333 - 3333 . I understand I can add a prefix http : qt-project.org doc qt-5 qabstractspinbox.html prefix but a prefix is always added . What are my options .. . Answer : If you use integers then QSpinBox will be enough . You can simply inherit from QSpinBox and re-implement the textFromValue http : qt-project.org doc qt-4.8 qspinbox.html textFromValue function : .. . .. . Filling QString this way does the trick .", "Question : I am using Qt 5.3.2 with Qt Creator 3.2.1 with MinGW 4.8.2 on Windows 7 . I have a QSpinBox and can change its value with the mouse wheel only if the mouse is over the QSpinBox . If the mouse is not over the QSpinBox scrolling the mouse wheel has no effect even though the QSpinBox still has focus . What do I need to do to be able to change values in the QSpinBox that has focus with the mouse wheel even if the mouse is not hovering over it Setting mouseTracking to true does not have that effect . Comment : See my edit please I added code which do what you need but doesn t require additional bool variable . .. . Answer : I did not mention it in the question but I have more that one QSpinBox and testing them all seems sub-optimal so I need a generic message forwarder . Based on the Chernobyl s code http : stackoverflow.com a 26041722 3484570 I made my own version of the message filter : .. . .. . This forwards all QWheelEvent s to the QWidget with the focus . One could also add other events that need to be forwarded . The qApp- removeEventFilter and qApp- installEventFilter inside the event filter is the only way I found that prevents the event filter calling itself when scrolling on the main window causing a stack-overflow condition focusWidget this does not help . There isprobably a way to prevent the infinite recursion without reinstalling the event filter on every QWheelEvent .", "Question : I have added a QSpinBox to a QGraphicsScene using a QGraphicsProxyWidget . Each time I hover over the QSpinBox it flickers with a black band overlaid on the spinbox controls . I have attached a screenshot and the code below . Am I doing something wrong Is there a way to avoid this Pyside 1.1.2 Python 2.7 Windows7 . QSpinBox flickering on hover http : i.stack.imgur.com nwCCH.jpg .. . .. . EDIT .. . .. . Apparently there is a bug report filed here : Bugreport https : bugreports.qt-project.org browse QTBUG-18167 . I had to finally add the QSpinBox to a regular QWidget and not under QGraphicsView . Comment : I can confirm that this does not occur with either PySide or PyQt in OSX .. . Answer : Why do you put the spinbox in a QGraphicsScene This seems rather odd . If you don t have some mysterious reason for that but just want a functional nonflashing UI element try making your testWidget a QDialog instead of a QGraphicsView . Comment : Well this is part of a larger application where I am displaying a large number of graphic elements in the window . I need some user interaction with the QSpinBox to control the display of these elements . I have the central widget inside QMainWindow set to QTabWidget and each of the tabs is set to QGraphicsView and am now trying to add other elements onto one of the tabs . Comment : @JohnSmith : Does the problem go away if its being used in a normal widget Qt Devs even suggest to avoid proxy widgets in QGraphics if you can help it . Comment : @jdi : I am afraid not the flickering still persists . Another post here though suggests proxywidgets might be the way to go so I assumed it was the appropriate method to adopt . stackoverflow.com q 2985374 1718027 http : stackoverflow.com q 2985374 1718027 Comment : @jSmith : I m sure people would suggest them because they are indeed part of the framework but when I watched a presentation from the devs about QGraphicsScene they talked about how they were added purely for a convenience . They are slower and require extra work to be drawn and he said to try and avoid them using them only as a last resort . Comment : @jSmith : The flicker did disappear for me after switching to a normal widget - in PyQt4.7 that is . I would put a layout in the QTabWidget containing both the QGraphicsView and the QSpinBox so that the spinbox doesn t have to be inside the graphicsview .", "Question : Is there a simple way to create a spinbox in PyQt4 whose varying values are strings I want to create a spinbox which varies between low medium and high . I ve looked around and can t find anything that doesn t look very complicated . In Tkinter it might look trivially like : .. . .. . I noticed in the documentation http : pyqt.sourceforge.net Docs PyQt4 qspinbox.html it said QSpinBox is designed to handle integers and discrete sets of values e.g . month names which I thought might lead to strings but I couldn t find any more on that . I m tempted to use a combobox instead but I feel that the spinbox would be more appropriate . .. . Answer : I don t really see how this would be in any way an improvement over a combo-box especially if there s more than a few strings . However if you really want it you just need to subclass QSpinBox and reimplement textFromValue http : qt-project.org doc qt-4.8 qspinbox.html textFromValue and valueFromText http : qt-project.org doc qt-4.8 qspinbox.html valueFromText :", "Question : null .. . Answer : I encountered strange behavior of background-color of QSpinBox if you configure some border properties in stylesheet . I m using Qt 5.5 .. . .. . With this sample background-color of read-only QSpinBox stays red what is not correct : .. . .. . But if you remove border properties - it works as expected . Does anybody have an idea why could it happen", "Question : I have a widget containing a QSpinBox . This widget also has a QVector int Values . What I would like to do is get the QSpinBox to display values issued from Values only . At first I thought that a new slot and signal in my widget would do the trick something like .. . .. . slot : .. . .. . connects : .. . .. . But then several problems arise : .. . .. . 1 . QSpinBox emit another valueChanged after I call its setValue resulting in an infinite-loop until my QVector explodes . 2 . I still have to find a way to keep track of Index depending on which of the QSpinBox arrows was clicked up or down.. . I don t even think this is possible . So my solution with its problems seems to be a dead end . Any idea . I d like to stick to QSpinBox if possible . Thanks EDIT .. . .. . Subclassing : .. . Answer : I Would suggest writing your own class to do it by sub-classing QAbstractSpinBox . Maybe take a look at the accepted answer on this question : How to subclass QSpinBox so it could have int64 values as maxium and minimum http : stackoverflow.com questions 15654769 how-to-subclass-qspinbox-so-it-could-have-int64-values-as-maxium-and-minimum rq 1 Comment : Then it may be faster to switch to something like QComboBox . At first I actually started to write the sub-class you suggest but it looked like a waste of time . Thanks anyway Comment : Well its probably not a waste of time if you might use this class a lot . Sounds quite useful to me . Comment : Well I ll probably give it a chance this week end if I find some time to spare . I will edit my question accordingly . Comment : Edited works as expected . Comment : @CTZStef Nice . Easier than doing a full subclass or QAbstractSpinBox", "Question : I am using Qt 5.3.2 with Qt Creator 3.2.1 with MinGW 4.8.2 on Windows 7 . I have a QSpinBox and can change its value with the mouse wheel only if the mouse is over the QSpinBox . If the mouse is not over the QSpinBox scrolling the mouse wheel has no effect even though the QSpinBox still has focus . What do I need to do to be able to change values in the QSpinBox that has focus with the mouse wheel even if the mouse is not hovering over it Setting mouseTracking to true does not have that effect . Comment : See my edit please I added code which do what you need but doesn t require additional bool variable . .. . Answer : Use eventFilter to do this . Install it on your mainWindow : .. . .. . It is just example so you can improve it as you want . Or use this : .. . .. . In this example when you detect wheel event you send it to your spinbox . But don t forget .. . .. . and .. . .. . As DmitrySazonov recommended . We will detect wheelEvents when our spinBox in focus when spinBox losed focus we don t react on wheel other widgets react normal . We do this in one eventFilter . To do this provide new bool variable . For example : .. . .. . Initialize it in constructor : .. . .. . And your eventFilter should be . Or do just this without additional variable : Comment : You may improve your solution if you will install event filter only when control gets a focus . And uninstall event filter on focus lost . Comment : @DmitrySazonov Excuse me but what is this control Do you mean install filter in QWidget : : focusInEvent and remove it in QWidget : : focusOutEvent Thank you for your attention . Comment : Yes handle focus events on spinbox . Comment : @DmitrySazonov Oh I understood you thank you for this great hint . I need a few minutes to add this thank you . Comment : Your answer sent me on the right track . One note : You never return anything from your eventFilter s creating funny effects .", "Question : null .. . Answer : I ve a legacy code using c++ with Qt . It has-many QSpinBoxes . Strangely not a single QSpinBox allows me to copy text from it and paste in other spinbox . Ctr+C and Ctr+V simply doesn t work . Also I tried to select the text in QSpinBox and copy with right-click copy option . But the text is not copied and could not be pasted . In my other PyQt code I can do these copy-paste operations without any problem . Can somebody help me resolve this problem I m running Qt 4.8.6 on Win32 XP . Comment : It should be some code processing that in your application you should find it and delete if this is undesired . Try to look for eventFilter and QEvent : : KeyPress Comment : The initial idea behind that is preventing user pasting wrong value into spin box I guess Comment : I checked for any KeyPress event override . Also signals and slots related to the QSpinBoxes . The application is using many spinboxes none of them allows copy-paste . Comment : If there is an in the names of some of the QActions or QMenu items or if Ctrl+C is set as an accelerator shortcut key for something it may be trumping your copy-paste actions . Another thing to note is if you are on a Mac it would be Command+C or Command+V . Have you tried block commenting out large parts of the program to see if there is some other chunk of code causing the behavior Basically finding the minimum amount of code to reproduce the problem", "Question : I have a widget containing a QSpinBox . This widget also has a QVector int Values . What I would like to do is get the QSpinBox to display values issued from Values only . At first I thought that a new slot and signal in my widget would do the trick something like .. . .. . slot : .. . .. . connects : .. . .. . But then several problems arise : .. . .. . 1 . QSpinBox emit another valueChanged after I call its setValue resulting in an infinite-loop until my QVector explodes . 2 . I still have to find a way to keep track of Index depending on which of the QSpinBox arrows was clicked up or down.. . I don t even think this is possible . So my solution with its problems seems to be a dead end . Any idea . I d like to stick to QSpinBox if possible . Thanks EDIT .. . .. . Subclassing : .. . Answer : QSpinBox emit another valueChanged after I call its setValue resulting in an infinite-loop until my QVector explodes . You can prevent this by using QObject : : blockSignals . Make sure to unblock signals afterwards . I still have to find a way to keep track of Index depending on which of the QSpinBox arrows was clicked up or down.. . I don t even think this is possible . Well I suppose you can store the old value in a member variable and when QSpinBox emits valueChanged you can compare the new to the old value to figure out whether the up or the down arrow was pressed . That said I don t know if that s enough to make QSpinBox behave like you want correcting the value after it was changed once is a bit hacky . Subclassing QAbstractSpinbox might be better indeed .", "Question : I have a QSpinBox and I want it to only accept positive natural numbers . This works fine until I enter a dot . .. . .. . If I enter 234235.23456 and change the focus to some other spinbox the value is changed to 23423523456 . So I am looking for a way to ignore everything behind the . .. . .. . Is this possible without subclassing QSpinBox Comment : use a comma Qt respects localization settings IIRC so that may help Comment : Probably no but QDoubleSpinBox with setDecimals 0 might be your workaround . : p Otherwise just reimplement this http : doc-snapshot.qt-project.org qt5-5.4 qspinbox.html textFromValue . Comment : I first tried the QDoubleSpinBox with setDecimals 0 but it acts the same way Comment : Does it work as expected if you enter a comma Comment : the Spinbox only takes digits from 0-9 and if setDecimals 0 it takes . . .. . Answer : I found a fix for my porblem :" ] }
[ "yes-answer-long", "yes-answer-short" ]
widget
UNK_RELATION
facebook-c -sdk@web@69
facebook-c - sdk -- the facebook sdk for .net helps developers build @placeholder desktop phone and windows store applications that integrate with facebook .
{ "confidence": [ 58.60538101196289, 54.97092056274414, 53.36737060546875, 53.36737060546875, 53.002342224121094, 49.85212326049805, 47.525691986083984, 46.6441764831543, 46.6441764831543, 46.6441764831543, 46.59081268310547, 46.56325912475586, 46.56325912475586, 46.56325912475586, 46.56325912475586, 46.56325912475586, 45.93954086303711, 45.7352180480957, 44.709774017333984, 44.709774017333984, 44.35862731933594, 43.627071380615234, 43.41648483276367, 41.84067916870117, 41.81293487548828, 41.757362365722656, 40.153812408447266, 40.035865783691406, 39.9318962097168, 39.9318962097168, 39.9318962097168, 39.599178314208984, 39.34850311279297, 39.048309326171875, 38.269920349121094, 37.99370574951172, 37.75440216064453, 37.466678619384766, 36.83845138549805, 36.549373626708984, 36.46377944946289, 36.444705963134766, 36.38888168334961, 36.271270751953125, 36.2565803527832, 36.19499206542969, 35.58563995361328, 35.583961486816406, 34.901702880859375, 34.8009147644043, 34.8009147644043, 34.667720794677734, 34.667720794677734, 34.10637664794922, 34.097694396972656, 34.097694396972656, 34.097694396972656, 33.980411529541016, 33.980411529541016, 33.800289154052734, 33.78849411010742, 33.52284622192383, 33.21173095703125, 33.21173095703125, 33.21173095703125, 33.21173095703125, 33.21173095703125, 33.21173095703125, 33.21173095703125, 33.20869827270508, 32.87712478637695, 32.87712478637695, 32.72146224975586, 32.72146224975586, 32.09937286376953, 32.09937286376953, 32.09937286376953, 32.09937286376953, 32.09937286376953, 32.09937286376953, 31.3243408203125, 31.273574829101562, 31.273574829101562, 31.273574829101562, 31.137149810791016, 31.093280792236328, 31.093280792236328, 30.840423583984375, 30.840423583984375, 30.76413345336914, 30.694034576416016, 30.668231964111328, 30.568960189819336, 30.524314880371094, 29.990032196044922, 29.980924606323242, 29.97983169555664, 29.95232391357422, 29.841754913330078, 29.841754913330078 ], "content": [ "Just downloaded the facebook c sdk .", "The Facebook C SDK logout also no longer works .", "You are using an old version of the Facebook C SDK .", "I am using the facebook-c -sdk with VB .", "facebook c sdk sucks unfortunately .", "Look at the following commit : github.com facebook-csharp-sdk facebook-csharp-sdk commit https : github.com facebook-csharp-sdk facebook-csharp-sdk commit c984c635af1bc5cbdb65f2221cff9d735d394912 .", "My WPF application i am using facebook C SDK http : www.nuget.org packages facebook to upload videos to facebook-wall .", "You will be able to download facebook sdk at http : facebooksdk.codeplex.com .", "Or maybe can I use Facebook PHP SDK", "An SDK does not have to be officially endorsed by Facebook .", "As far as i know the Facebook C SDK requires Net Framework 3.5 or greater .", "I am using Facebook C SDK to login to my website .", "I have developed a Facebook app using the C SDK and it is working fine .", "I just start to googling and found that there tools C FACEBOOK SDK .", "I ve built a few facebook-apps using the c sdk .", "c 4.5 - using latest facebook sdk thank you .. . .. .", "Does the Facebook SDK for .NET http : facebooksdk.net make versioned calls", "Have you had a look at the Authentication and Authorization section at https : github.com facebook facebook-ios-sdk", ".. . .. . Are there helper or utility methods or stronger types in the facebook C SDK or should I use standard .NET reflection techniques", "I removed the reference ensured my project was set to .net-4.0 and used Nuget to re-install the Facebook C SDK .", "I m following the post at http : ntotten.com 2013 03 14 using-windows-azure-mobile-services-with-the-facebook-sdk-for-windows-phone and I can successfully get a Facebook access token .", "I ve seen a lot of documentation about integration between ASP .NET web sites and Facebook but I haven t found a simple working example even using Facebook C SDK .", "Has anyone solved this problem or seen any documentation that can be ported to work with the Facebook C SDK", "See How to renew Facebook access token using its C SDK http : stackoverflow.com questions 11068538 how-to-renew-facebook-access-token-using-its-c-sharp-sdk .", "To be more specific I already have an application that is using Facebook C SDK http : csharpsdk.org and it works fine .", "This question has been answered here http : stackoverflow.com questions 6023908 facebook-logout-c-sdk the suggestion is to use the url below to logout since facebook is apparently skipping the next parameter", "I had the same issue and solved it for facebook APIs v2.4 here : stackoverflow.com questions 31932675 http : stackoverflow.com questions 31932675 how-to-send-appsecret-proof-using-facebook-c-sharp-sdk 31933544 31933544", "Similar question here - stackoverflow.com questions 4674669 http : stackoverflow.com questions 4674669 facebook-c-sdk-net-3-5-dynamic-objects", "I m working on asp.net-mvc-4 application which uses Facebook C SDK 6.0.10.0 and Newtonsoft.Json 4.5.0.0 .", "Please share some concrete documentation links as Facebook C SDK lacks proper documentation I will take it from there :", "It appears the Facebook C SDK is throwing the error but is it the SDK s fault or the fact I had to change to 4.0 framework", "as you say using Facebook C SDK then here is path and some code for canvas application : .. . .. . 1- Create your web application from visual-studio .. . 2- install nuget and get by nuget Facebook C SDK .. . 3- from https : developers.facebook.com apps create and configure your app .", "The implementation is done with Facebook C SKD", "I want to get some data title description image using url to page and Facebook SDK for .NET library .", "So the SDK Facebook knows when to ask the user for permision to do something by what you pass into the Perms setting .", "This is the snippet from winforms sample https : github.com facebook-csharp-sdk facebook-winforms-sample which will work in wp7 with some modifications .", "That way I can still have all the nice features in Facebook C SDK and also use the built-in authentication system in Mobile Services for Azure .", "nuget install facebook", "This is a known bug in Facebook.Client fixed in this revision in their GitHub repository : .. . .. . https : github.com facebook-csharp-sdk facebook-winclient-sdk commit 93f4c6498f32792d52fdb46d80d0c68435744c47 .. . .. . To get rid of this bug build Facebook.Client from most recent sources instead of downloading it via NuGet .", "I want to implement logout from facebook using facebook C sdk in my windows-phone app .. . .. . My primary question is how do we logout using Facebook C SDK in WP7 .. . .. . I found this article in search .. . .. . Article link http : claudiufarcas.blogspot.in 2011 06 wp7-webbrowser-caching-and-facebook.html .. . .. . there he is trying to find the logout url using regex but that did not working in my app .. . .. . when i try that the browser navigated event is going into infinite-loop .. . .. . you can share any samples posts related to facebook logout in windows-phone-7 .", "First I open Facebook Developers page and I create new App .", "Now that the current version 6 of the c sdk recommends using the facebook-javascript-sdk to call the open graph and check that the user likes a page and then pass it to the code-behind i was wanting to know what actually is the best practice for building facebook fan page tab apps", "I have installed facebook sdk .. . .. . Now i am able to post to wall like this with below code .. . .. .", "See this blog post http : blog.prabir.me post Facebook-CSharp-SDK-Logout.aspx .. . .. . Get the logout url using FacebookOAuthClient send a http-request to the url. .", "MY GOAL : To read facebook-timeline of user from a desktop application .", "I need to post company s news from .NET desktop application to company s Facebook page .", "I ve created Facebook page .", "facebook does not pass the querystring to your page .", "I think I ve read just about everything out there on the topic of logging out of Facebook inside of a Desktop application .", "You can also create a facade object around the IDictionary as explained here http : stackoverflow.com questions 4674669 facebook-c-sdk-net-3-5-dynamic-objects 5516576 5516576 .", "Turns out it was the fact I had the project targeting .net-4.5 when I added the Facebook C SDK reference and later changed the project to target 4.0 .", "I should mention that I have successfully been able to run the DemoApp facebook-ios-sdk test program on my iPhone .", "Once the login is completed using the Facebook SDK the token is returned in the fragment with that name so that s what the Azure Mobile Service expects .", "I am also using the Facebook .net SDK however this does not have much in documentation and does not seem to strike on anything to do with automation server-side operations etc .", "UPD2 : I ve created Facebook Application .", "@Microsoft using the Facebook Graph API .", "These architectures are explained in the Facebook developer page .", "I created a facebook app using Facebook.Rest.Api API .", "I have used the below successfully with Facebook", "See the following links for more information : .. . .. . handleOpenUrl and TabBar Application http : stackoverflow.com questions 5998384 facebook-ios-handleopenurl-tabbar-application .. . .. . Facebook SDK : Call from multiple viewControllers http : stackoverflow.com questions 5340375 facebook-ios-sdk-iphone-call-from-multiple-viewcontroller .. . .. . Cocoa with Love : Singletons http : cocoawithlove.com 2008 11 singletons-appdelegates-and-top-level.html", "The Code Request and Response from the exception are below.. . .. . .. . Code .. . .. . Request .. . .. . Response .. . .. . If I remove the Facebook client access and leverage the MobileServiceClient.LoginAsync provider method instead the Facebook authentication is successful but I want to have access to the Client SDK on the phone so I m sure I ve missed something .", "Figured this out a couple of days ago and have started to build a Facebook Chat API based chat in C .", "You will get information on how to create a facebook app or link your website to facebook on https : developers.facebook.com ref pf .", "using the facebook connect to authenticate users .. . .. . .. . .. . My application is secured and the access done is also authenticated regardless of facebook BUT", "developers.facebook.com docs facebook-login https : developers.facebook.com docs facebook-login security tokenhijacking", "developers.facebook.com docs facebook-login access-tokens debug https : developers.facebook.com docs facebook-login access-tokens debug", "Will the Facebook API allow me to find all these Facebook users between User A and User B", "Will the Facebook API allow me to find all these Facebook users between User A and User B no it won t .", "Here is a link on how to login using Facebook account http : a4academics.com blog 381-login-using-facebook-account-fbconnect .", "So my plan was log on with Facebook C SDK as I already do today get the authentication token and pass it to the MobileServiceClient.LoginAsync http : msdn.microsoft.com en-us library jj553650.aspx - function .", "The logout attempt returns the Facebook mobile page m.facebook.com and the user is still logged in .", "How do i get app data querystring from a Facebook webforms app", "if not then download from this url packages.nuget.org api v1 package facebook http : packages.nuget.org api v1 package facebook then use your favorite zip program to extract it", "However with the Facebook app installed after the user authenticates your app the Facebook app redirects to your app using a URL handler .", "Should I create a new Facebook Application", "Ok I ve created new Facebook Application .", "The inner-exception is a Facebook Wrap Exception Wrapper .", "Thanks but user has already looged into Facebook .", "With the current limitations in Facebook API v2.0 and above this will not be possible .", "How can I post as the Facebook page", "Get Querystring from facebook tab app using asp.net http : www.bpulse.co.uk blog using-asp-net-to-read-the-facebook-signed request-object-passed-to-iframe-tabs .. . .. . Also this post http : stackoverflow.com questions 3433252 how-to-decode-oauth-2-0-for-canvas-signed-request-in-c was helpfull .. . .. . just be shure to add the direct page in facebook app settings ex .", "If I try separately without connecting to facebook for checking permission it works fine .", "This would imply Facebook validates the appsecret proof with multiple variations of the algorithm .", "I am having trouble with facebook-authentication for Mobile Services in Azure .", "I am using a Facebook app to show facebook statuses and images from a Facebook page to my windows-8 application but I am getting a Target Invocation Exception each time and although I have a try-catch I do not know how to get rid of this exception .", "Does any one know the version of Facebook API that the NuGet Facebook 7.0.6 and Facebook.Client 1.0.4 are using", "I have a Facebook application that users can add to their Facebook business Page s as a Page Tab app .", "I m setting up facebook-canvas payments and I m using dynamic pricing so I have a callback setup to send the price to facebook .", "developers.facebook.com docs facebook-login access-tokens https : developers.facebook.com docs facebook-login access-tokens You need to pass it as an additional parameter named access token .", "Consider the following in .NET 3.5 using the Bin Net35 Facebook .dll assemblies : .. . .. . .. . in the absence of the C 4.0 dynamic keyword this provides only generic object members .", "What I expected and what occurs correctly in my simulator is that a smaller Facebook subview window would appear in my application view after clicking the Facebook Button and I would be given the option to publish to my Facebook Wall .", "The current flow : The user sets up his post clicks a button we prompt them to auth our app log into facebook via the javascript sdk .", "Looking for a little help with a simple task...the syntax for a facebook multi-query where you d pass in the query as a parameter .", "Login with the token from access providers Facebook Microsoft is still not supported in the .NET backend .", "Are you using the JavaScript SDK or the C SDK or neither", "Facebook will certainly upgrade it when v2.0 expires .. . .. .", "Solution is to build a chat using the facebook-chat api and you should use it as a chat not a messaging system but it will leve messages .", "4- Your web-config for facebook integration : .. . .. . By using sdk you can parse signed request or cookie written by facebook js sdk .. . .. . Here you can have friend count by : .. . .. . For the client-side : .. . .. . For login asking permission from javascript .. . .. . I prefer in my project to client-side login thus not yet registered user have landing page if for example submit form then I call code block above .", "Facebook requires that I create a appsecret proof : https : developers.facebook.com docs graph-api securing-requests .. . .. . And I have done this using the following code : .. . .. . Everything looks fine for me however facebook says that the appsecret proof is invalid .", "However when I test the the same code on my iPhone v4.3.3 it appears as though my Facebook Button now exits out of my application and opens the Facebook App ." ] }
{ "confidence": [ 62.412200927734375, 57.73486328125, 57.176998138427734, 57.02348327636719, 56.997642517089844, 56.98664093017578, 56.72966766357422, 56.027217864990234, 54.64541244506836, 54.58431625366211, 54.405330657958984, 54.395355224609375, 54.21054458618164, 54.00224304199219, 53.57823944091797, 53.5511360168457, 51.856136322021484, 50.75130844116211, 50.575843811035156, 49.46433639526367 ], "content": [ "Question : null .. . Answer : I just started a projects that need to be created with C Desktop Application using Visual Studio 2008 .NET 3.5 . Now I really don t understand where I have to start . I just start to googling and found that there tools C FACEBOOK SDK . But after I read more now it s not supported from Facebook . So please anyone can help me . MY GOAL : To read facebook-timeline of user from a desktop application . Can I user any other SDK that supported Or maybe can I use Facebook PHP SDK Your help really appreciated . Thankyou Comment : An SDK does not have to be officially endorsed by Facebook . And basically you don t need any SDK at all because all you need to communicate with the API is the ability to make HTTP requests . But of course SDKs usually make this easier .", "Question : I think I ve read just about everything out there on the topic of logging out of Facebook inside of a Desktop application . Nothing so far works . Specifically I would like to log the user out so that they can switch identities e.g . People sharing a computer at home could then use the software with their own Facebook accounts but with no chance to switch accounts it s quite messy . Have not yet tested switching Windows users accounts as that is simply far too much to ask of the end user and should not be necessary . Now I should say that I have set the application to use these permissions : .. . .. . So offline access is included there . I do not know if this does should affect logging out or not . Again my purpose for logging out is merely to switch users . If there s a better approach please let me know . The purported solutions seem to be : .. . .. . Use the JavaScript SDK FB.logout .. . Use m.facebook.com instead .. . Create your own URL and possibly use m.facebook.com .. . Create your own URL and use the session variable in ASP.NET .. . .. . The first is kind of silly . Why resort to JavaScript when you re using C It s kind of a step backwards and has a lot of additional overhead in a desktop application . I have not tried this as it s simply disgustingly messy to do this in a desktop application . If anyone can confirm that this is the only working method please do so . I m desperately trying to avoid it . The second doesn t work . Perhaps it worked in the past but my umpteen attempts to get it to work have all failed . The third doesn t work . I ve tried umpteen dozen variations with zero success . The last option there doesn t work for a desktop application because it s not ASP.NET and you don t have a session variable to work with . The Facebook C SDK logout also no longer works . i.e . I remember it working in the past but it no longer works now . Which truly puzzles me.. . .. . .. . It instead now directs the user to the Facebook mobile page where the user must manually logout . Now I could do browser automation to automatically click the logout link for the user however this is prone to breaking if Facebook updates the mobile UI . It is also messy and possibly a worse solution than trying to use the JavaScript SDK FB.logout method though not by much . I have searched for some kind of documentation however I cannot find anything in the Facebook developer documentation that illustrates how to logout an application . Has anyone solved this problem or seen any documentation that can be ported to work with the Facebook C SDK I am certainly open to using a WebClient or HttpClient Response if anyone can point to some documentation that could work with it . I simply have not been able to find any low-level documentation that shows how this approach could work . Thank you in advance for any advice pointers or links . .. . Answer : had the same problem with missing log out button and found via google this hint the other day : .. . .. . open https : developers.facebook.com ref pf called facebook developers site and there you can find the usual log in out button again . dont ask me how it works and why it works I only followed the instructions I found myself and it was working for me .. . .. . good luck best wishes", "Question : Consider the following in .NET 3.5 using the Bin Net35 Facebook .dll assemblies : .. . .. . .. . in the absence of the C 4.0 dynamic keyword this provides only generic object members . How best should I access the facebook properties of this result-object .. . .. . Are there helper or utility methods or stronger types in the facebook C SDK or should I use standard .NET reflection techniques Comment : Similar question here - stackoverflow.com questions 4674669 http : stackoverflow.com questions 4674669 facebook-c-sdk-net-3-5-dynamic-objects .. . Answer : You can also create a facade object around the IDictionary as explained here http : stackoverflow.com questions 4674669 facebook-c-sdk-net-3-5-dynamic-objects 5516576 5516576 .", "Question : I think I ve read just about everything out there on the topic of logging out of Facebook inside of a Desktop application . Nothing so far works . Specifically I would like to log the user out so that they can switch identities e.g . People sharing a computer at home could then use the software with their own Facebook accounts but with no chance to switch accounts it s quite messy . Have not yet tested switching Windows users accounts as that is simply far too much to ask of the end user and should not be necessary . Now I should say that I have set the application to use these permissions : .. . .. . So offline access is included there . I do not know if this does should affect logging out or not . Again my purpose for logging out is merely to switch users . If there s a better approach please let me know . The purported solutions seem to be : .. . .. . Use the JavaScript SDK FB.logout .. . Use m.facebook.com instead .. . Create your own URL and possibly use m.facebook.com .. . Create your own URL and use the session variable in ASP.NET .. . .. . The first is kind of silly . Why resort to JavaScript when you re using C It s kind of a step backwards and has a lot of additional overhead in a desktop application . I have not tried this as it s simply disgustingly messy to do this in a desktop application . If anyone can confirm that this is the only working method please do so . I m desperately trying to avoid it . The second doesn t work . Perhaps it worked in the past but my umpteen attempts to get it to work have all failed . The third doesn t work . I ve tried umpteen dozen variations with zero success . The last option there doesn t work for a desktop application because it s not ASP.NET and you don t have a session variable to work with . The Facebook C SDK logout also no longer works . i.e . I remember it working in the past but it no longer works now . Which truly puzzles me.. . .. . .. . It instead now directs the user to the Facebook mobile page where the user must manually logout . Now I could do browser automation to automatically click the logout link for the user however this is prone to breaking if Facebook updates the mobile UI . It is also messy and possibly a worse solution than trying to use the JavaScript SDK FB.logout method though not by much . I have searched for some kind of documentation however I cannot find anything in the Facebook developer documentation that illustrates how to logout an application . Has anyone solved this problem or seen any documentation that can be ported to work with the Facebook C SDK I am certainly open to using a WebClient or HttpClient Response if anyone can point to some documentation that could work with it . I simply have not been able to find any low-level documentation that shows how this approach could work . Thank you in advance for any advice pointers or links . .. . Answer : This question has been answered here http : stackoverflow.com questions 6023908 facebook-logout-c-sdk the suggestion is to use the url below to logout since facebook is apparently skipping the next parameter", "Question : For a given profile ID I need to post a message from my site . I created a facebook app using Facebook.Rest.Api API . I was successful in posting but for IDs which are not authorised I want to redirect to the authorise login page . I am checking whether the user already gave permission using Facebook Connect and then using above code to show login page in case the profile ID is not still permitted . So I expect login page but instead it bypasses that and shows the redirect url . If I try separately without connecting to facebook for checking permission it works fine . Does anyone know of a solution .. . Answer : So the SDK Facebook knows when to ask the user for permision to do something by what you pass into the Perms setting . If you need to post to there feed add the permission publish stream to the CanvasAuthorizer like this . Then is is just a matter of checking if the user authorized that access . Comment : Thanks for your reply but still I could not do Comment : Still I am not able to solve Comment : I want asp.net-2.0 visual-studio-2005 based sample code for this . I am able to do it using twitter API each user will be provided with access token and access secret and i could ask user only one time authorization of twitting and successfully posted to his twitter . Same way how could i do it with respect to facebook - means only one time authorization and sending post next time onwards Can I have a sample code also . I know so many articles documentation forums but i am missing something somewhere Could you kindly help me Comment : As far as i know the Facebook C SDK requires Net Framework 3.5 or greater . Per the CodePlex site.System Requirements For Use .Net Framework 3.5 .Net Framework 3.5 Client Profile .Net Framework 4.0 .Net Framework 4.0 Client Profile Silverlight 4 Windows Phone 7 For Development Visual Studio 2010", "Question : I want to implement logout from facebook using facebook C sdk in my windows-phone app .. . .. . My primary question is how do we logout using Facebook C SDK in WP7 .. . .. . I found this article in search .. . .. . Article link http : claudiufarcas.blogspot.in 2011 06 wp7-webbrowser-caching-and-facebook.html .. . .. . there he is trying to find the logout url using regex but that did not working in my app .. . .. . when i try that the browser navigated event is going into infinite-loop .. . .. . you can share any samples posts related to facebook logout in windows-phone-7 . I want logout should happen with out user intervention after he clicks on a button he should looged out from facebook and from next time he should see the login page .. . .. . I tried following posts blogs also but no use . LINK 1 http : stackoverflow.com questions 6240468 logging-out-of-facebook-c-sharp-sdk-on-wp7 .. . .. . LINK 2 http : stackoverflow.com questions 6240468 logging-out-of-facebook-c-sharp-sdk-on-wp7 this giving error while splitting the accesstoken .. . .. . UPDATE .. . .. . LogOutButtonCode .. . .. . Navigated Event CODE .. . .. . e.Uri.AbsoluteUri returns https : www.facebook.com home.php .. . .. . Logout URL i am getting from the server https : www.facebook.com logout.php next https : www.facebook.com connect login success.html .. . Answer : Use FacebookClient.Logout to generate the logout url . This is the snippet from winforms sample https : github.com facebook-csharp-sdk facebook-winforms-sample which will work in wp7 with some modifications . Make sure to persist the access token somewhere when you login as it is required to logout . Comment : i am redirected to this url after navigate facebook.com home.php quot https : www.facebook.com home.php quot Comment : I updated the code according to your changes but not working I updated my question with new code Comment : GetLogoutUrl requires access token in parameter . It will not auto include access token passed in ctor or AccessToken property . that is why your code is failing .", "Question : I think I ve read just about everything out there on the topic of logging out of Facebook inside of a Desktop application . Nothing so far works . Specifically I would like to log the user out so that they can switch identities e.g . People sharing a computer at home could then use the software with their own Facebook accounts but with no chance to switch accounts it s quite messy . Have not yet tested switching Windows users accounts as that is simply far too much to ask of the end user and should not be necessary . Now I should say that I have set the application to use these permissions : .. . .. . So offline access is included there . I do not know if this does should affect logging out or not . Again my purpose for logging out is merely to switch users . If there s a better approach please let me know . The purported solutions seem to be : .. . .. . Use the JavaScript SDK FB.logout .. . Use m.facebook.com instead .. . Create your own URL and possibly use m.facebook.com .. . Create your own URL and use the session variable in ASP.NET .. . .. . The first is kind of silly . Why resort to JavaScript when you re using C It s kind of a step backwards and has a lot of additional overhead in a desktop application . I have not tried this as it s simply disgustingly messy to do this in a desktop application . If anyone can confirm that this is the only working method please do so . I m desperately trying to avoid it . The second doesn t work . Perhaps it worked in the past but my umpteen attempts to get it to work have all failed . The third doesn t work . I ve tried umpteen dozen variations with zero success . The last option there doesn t work for a desktop application because it s not ASP.NET and you don t have a session variable to work with . The Facebook C SDK logout also no longer works . i.e . I remember it working in the past but it no longer works now . Which truly puzzles me.. . .. . .. . It instead now directs the user to the Facebook mobile page where the user must manually logout . Now I could do browser automation to automatically click the logout link for the user however this is prone to breaking if Facebook updates the mobile UI . It is also messy and possibly a worse solution than trying to use the JavaScript SDK FB.logout method though not by much . I have searched for some kind of documentation however I cannot find anything in the Facebook developer documentation that illustrates how to logout an application . Has anyone solved this problem or seen any documentation that can be ported to work with the Facebook C SDK I am certainly open to using a WebClient or HttpClient Response if anyone can point to some documentation that could work with it . I simply have not been able to find any low-level documentation that shows how this approach could work . Thank you in advance for any advice pointers or links . .. . Answer : See this blog post http : blog.prabir.me post Facebook-CSharp-SDK-Logout.aspx .. . .. . Get the logout url using FacebookOAuthClient send a http-request to the url. . Comment : Thanks . I ll give that a shot Comment : Sorry -- that isn t working . It does the same thing i.e . The logout attempt returns the Facebook mobile page m.facebook.com and the user is still logged in .", "Question : I m following the post at http : ntotten.com 2013 03 14 using-windows-azure-mobile-services-with-the-facebook-sdk-for-windows-phone and I can successfully get a Facebook access token . However when I submit the access token as a JObject to the MobileServiceClient.LoginAsync provider token method I get an IvalidOperationException Unauthorized . The Code Request and Response from the exception are below.. . .. . .. . Code .. . .. . Request .. . .. . Response .. . .. . If I remove the Facebook client access and leverage the MobileServiceClient.LoginAsync provider method instead the Facebook authentication is successful but I want to have access to the Client SDK on the phone so I m sure I ve missed something . Unfortunately all my debugging and searching has left me stumped . Comment : Is the FacebookSessionClient object created with the same application id as you have configured in your service Comment : Just double checked.. . yes the Identity in the management portal is the same as the FacebookSessionClient constructor . Thanks for helping me with this. . Comment : I ve been troubleshooting this issue all night with Microsoft Account as well . .. . Answer : Based on the WWW-Authenticate header in the response I m assuming you re using the .NET backend for the mobile service . Login with the token from access providers Facebook Microsoft is still not supported in the .NET backend . If you use a mobile service with the node.js backend then you should be able to use that code on the client-side to login to the mobile service . Support for client-side login for those providers should come in the near future for the mobile services .NET backend . Comment : Thanks for confirming that Carlos . I am using the .NET backend for this project . I ve used the node.js backend in another project and has access to the getIdentities function for server-side access to the token.. . is this token information passed to the TableController somewhere Comment : I worked out the answer to my follow up and posted as a full answer in case others are looking for this info . Comment : Update : the .NET backend now supports authentication with token from login providers . Check the post at azure.microsoft.com blog 2014 10 27 http : azure.microsoft.com blog 2014 10 27 logging-in-with-google-microsoft-and-facebook-sdks-to-azure-mobile-services for more information .", "Question : I ve created Facebook page . I have no application secret and no access token . I want to post to this page from my .NET desktop application . How can I do it Can anyone help please where can I get access token for this Should I create a new Facebook Application If yes how can I grant permissions to this application to post on page s wall UPD1 : I have no website . I need to post company s news from .NET desktop application to company s Facebook page . All I have is Login Password for Facebook Page Account . UPD2 : I ve created Facebook Application . With AppID SecretKey . I can get access token . But.. . How can I grant permissions to post to page s wall OAuthException 200 The user hasn t authorized the application to perform this action Comment : did you tried Facebook SDK .. . Answer : You will get information on how to create a facebook app or link your website to facebook on https : developers.facebook.com ref pf . You will be able to download facebook sdk at http : facebooksdk.codeplex.com . There are some good example given in the document section of the site . Comment : Ok I ve created new Facebook Application . How can I grant permissions to this app Comment : Hey check this out developers.facebook.com docs reference rest comments.add https : developers.facebook.com docs reference rest comments.add Facebook has REST API to add comments.I hope this would be useful in your scenario Comment : sorry what comment I don t need it . I want to publish message with picture and description to page s wall from desktop app . Comment : Using the sdk is a good starting point but a good link or example of some code would help for sure .", "Question : Consider the following in .NET 3.5 using the Bin Net35 Facebook .dll assemblies : .. . .. . .. . in the absence of the C 4.0 dynamic keyword this provides only generic object members . How best should I access the facebook properties of this result-object .. . .. . Are there helper or utility methods or stronger types in the facebook C SDK or should I use standard .NET reflection techniques Comment : Similar question here - stackoverflow.com questions 4674669 http : stackoverflow.com questions 4674669 facebook-c-sdk-net-3-5-dynamic-objects .. . Answer : This code sample http : facebooksdk.codeplex.com wikipage title Code 20Examples referringTitle Documentation shows 3.5 usage without needing the C dynamic keyword : Comment : For anyone else who just copied that and wondered why it doesn t compile the correct spelling is IDictionary : o Comment : @Marc : Fixed the typo thanks .", "Question : I think I ve read just about everything out there on the topic of logging out of Facebook inside of a Desktop application . Nothing so far works . Specifically I would like to log the user out so that they can switch identities e.g . People sharing a computer at home could then use the software with their own Facebook accounts but with no chance to switch accounts it s quite messy . Have not yet tested switching Windows users accounts as that is simply far too much to ask of the end user and should not be necessary . Now I should say that I have set the application to use these permissions : .. . .. . So offline access is included there . I do not know if this does should affect logging out or not . Again my purpose for logging out is merely to switch users . If there s a better approach please let me know . The purported solutions seem to be : .. . .. . Use the JavaScript SDK FB.logout .. . Use m.facebook.com instead .. . Create your own URL and possibly use m.facebook.com .. . Create your own URL and use the session variable in ASP.NET .. . .. . The first is kind of silly . Why resort to JavaScript when you re using C It s kind of a step backwards and has a lot of additional overhead in a desktop application . I have not tried this as it s simply disgustingly messy to do this in a desktop application . If anyone can confirm that this is the only working method please do so . I m desperately trying to avoid it . The second doesn t work . Perhaps it worked in the past but my umpteen attempts to get it to work have all failed . The third doesn t work . I ve tried umpteen dozen variations with zero success . The last option there doesn t work for a desktop application because it s not ASP.NET and you don t have a session variable to work with . The Facebook C SDK logout also no longer works . i.e . I remember it working in the past but it no longer works now . Which truly puzzles me.. . .. . .. . It instead now directs the user to the Facebook mobile page where the user must manually logout . Now I could do browser automation to automatically click the logout link for the user however this is prone to breaking if Facebook updates the mobile UI . It is also messy and possibly a worse solution than trying to use the JavaScript SDK FB.logout method though not by much . I have searched for some kind of documentation however I cannot find anything in the Facebook developer documentation that illustrates how to logout an application . Has anyone solved this problem or seen any documentation that can be ported to work with the Facebook C SDK I am certainly open to using a WebClient or HttpClient Response if anyone can point to some documentation that could work with it . I simply have not been able to find any low-level documentation that shows how this approach could work . Thank you in advance for any advice pointers or links . .. . Answer : I m guessing you want to log the user out so you can log another account in . In which case I would suggest this approach using the WebAuthenticationBroker : .. . .. . After quite a while experimenting and having no luck with any of the examples above I have worked out that submitting a logout request with the redirect url to your login url works perfectly . Here s the code I used to chain the requests together : .. . .. . Now every time you direct the user to the WebAuthenticationBroker the user will be redirected to the sign in page .", "Question : the above code generated error..... . .. . .. . Could not load file or assembly Microsoft.Contracts Version 1.0.0.0 Culture neutral PublicKeyToken 736440c9b414ea16 or one of its dependencies . The system cannot find the file specified . my web.config section is as follows Comment : download the latest version of the fb c sdk . it doesn t require code-contracts Comment : Thanks @prabir ...But i am using c 2008 . my c sdk version is 5.2.1.0..How can i download the latest version from github . Is the issue due to framework 3.5 and sdk version is targetted on 4.0 Please help me.Thanks in advance Comment : use nuget.exe command-line . nuget install facebook Comment : hello prabir nuget.exe require framework version 4.0 in my system.Which is not possible in my current environment . Is there any other solution Comment : cant u install only the .net framework without vs if not then download from this url packages.nuget.org api v1 package facebook http : packages.nuget.org api v1 package facebook then use your favorite zip program to extract it .. . Answer : You are using an old version of the Facebook C SDK . Download the current release which does not depend on Code Contracts . Comment : nuget exe need framework 4.0 in my system . any other solution", "Question : I m following the post at http : ntotten.com 2013 03 14 using-windows-azure-mobile-services-with-the-facebook-sdk-for-windows-phone and I can successfully get a Facebook access token . However when I submit the access token as a JObject to the MobileServiceClient.LoginAsync provider token method I get an IvalidOperationException Unauthorized . The Code Request and Response from the exception are below.. . .. . .. . Code .. . .. . Request .. . .. . Response .. . .. . If I remove the Facebook client access and leverage the MobileServiceClient.LoginAsync provider method instead the Facebook authentication is successful but I want to have access to the Client SDK on the phone so I m sure I ve missed something . Unfortunately all my debugging and searching has left me stumped . Comment : Is the FacebookSessionClient object created with the same application id as you have configured in your service Comment : Just double checked.. . yes the Identity in the management portal is the same as the FacebookSessionClient constructor . Thanks for helping me with this. . Comment : I ve been troubleshooting this issue all night with Microsoft Account as well . .. . Answer : To solve my issue I added a User table to my DB including a column called FacebookToken . I can then capture the Facebook access token from the Claim when a new user is being added to the table or from any other operation on the Controller . My PostUser method now looks like the following", "Question : I ve seen a lot of documentation about integration between ASP .NET web sites and Facebook but I haven t found a simple working example even using Facebook C SDK . All I want is a login with Facebook example and to get basic user information such as name email and photo . Can you guys help me please Thanks a lot Comment : Although this seems like some repeat basic question it s very true even while I was developing something I couldn t find any decent examples and I saw all kinds of different code all over a few blog posts . .. . Answer : as you say using Facebook C SDK then here is path and some code for canvas application : .. . .. . 1- Create your web application from visual-studio .. . 2- install nuget and get by nuget Facebook C SDK .. . 3- from https : developers.facebook.com apps create and configure your app . 4- Your web-config for facebook integration : .. . .. . By using sdk you can parse signed request or cookie written by facebook js sdk .. . .. . Here you can have friend count by : .. . .. . For the client-side : .. . .. . For login asking permission from javascript .. . .. . I prefer in my project to client-side login thus not yet registered user have landing page if for example submit form then I call code block above . Note : you have to set P3P header for Internet explorer to read-write cookie depending of your server . for IIS global.asax : .. . .. . Voli Comment : Worked perfectly Thanks a lot", "Question : My WPF application i am using facebook C SDK http : www.nuget.org packages facebook to upload videos to facebook-wall . From last two days when i upload video through my application SDK returns OAuthException - 1 An unknown error has occurred . exception but my video file uploaded to my facebook-wall . I tried the following way to resolve this problem .. . 1 Created new appliction for new AppID and AppSecretID . 2 Change authentication permissions current permissions provided user about me read stream publish stream user photos .. . 3 Clear the existing application permission in my facebook account .. . 4 Creating new facebook application and upload a video file . But nothing helps me . Here is the code i used to upload video .. . .. . .. . Any help it will would be appreciated . Thanks in advanced . .. . Answer : Check that https : developers.facebook.com x bugs 247807142061930 Appears to be a known bug", "Question : I am using a Facebook app to show facebook statuses and images from a Facebook page to my windows-8 application but I am getting a Target Invocation Exception each time and although I have a try-catch I do not know how to get rid of this exception . The inner-exception is a Facebook Wrap Exception Wrapper . Any ideas Here is my call stack : .. . Answer : This is a known bug in Facebook.Client fixed in this revision in their GitHub repository : .. . .. . https : github.com facebook-csharp-sdk facebook-winclient-sdk commit 93f4c6498f32792d52fdb46d80d0c68435744c47 .. . .. . To get rid of this bug build Facebook.Client from most recent sources instead of downloading it via NuGet . You may also try contacting guys at http : facebooksdk.net and asking them to update NuGet version of Facebook.Client . Comment : This worked for me.Thanks .", "Question : I m developing an ASP.NET MVC 4 RC website runs great on my local dev box . Deploying to my host DiscountASP required me to change compilation targetFramework 4.5 to compilation targetFramework 4.0 even though I bin deployed it . The site operates fine until someone who is logged into Facebook or attempts to connect to my site using their Facebook account which is nearly all my membership system uses Facebook primarily it throws an error : .. . .. . Could not load type System.Reflection.IntrospectionExtensions from assembly mscorlib Version 4.0.0.0 Culture neutral PublicKeyToken b77a5c561934e089 . Since it s beta I m not worried about leaving the error online at this time you should be able to re-create the error on my site here http : www.atmybase.com . It appears the Facebook C SDK is throwing the error but is it the SDK s fault or the fact I had to change to 4.0 framework How could I resolve this Update .. . .. . From what I gather the System.Reflection.IntrospectionExtensions are new to .net-4.5 which is not on my host . However my project targets the .net-4.0 framework and is bin deployed as such . On my development system it runs fine on host it errors . .. . Answer : Turns out it was the fact I had the project targeting .net-4.5 when I added the Facebook C SDK reference and later changed the project to target 4.0 . I removed the reference ensured my project was set to .net-4.0 and used Nuget to re-install the Facebook C SDK . Resolved the problem immediately .", "Question : It seems that Facebook now wants us to call versioned endpoints https : developers.facebook.com docs apps upgrading v1tov2 of the Graph API . E.g . https : graph.facebook.com v2.0 me .. . Does the Facebook SDK for .NET http : facebooksdk.net make versioned calls Do I can I do something to specify the version Comment : Yes it is . Look at the following commit : github.com facebook-csharp-sdk facebook-csharp-sdk commit https : github.com facebook-csharp-sdk facebook-csharp-sdk commit c984c635af1bc5cbdb65f2221cff9d735d394912 . This is present in the v7.0.1-alpha version of the nuget install-package Facebook -pre . .. . Answer : Sanjeev got it there is a parameter you can add to specify version : .. . .. . If you are not specifying a version it ll default to the oldest supported version : https : developers.facebook.com docs apps versions unversioned calls .. . .. . Facebook will warn you that you are nearing end of support for that version . Don t take any chances that the auto-upgrade to newer version will work better to develop test and deliver with the latest version .", "Question : I am having trouble with facebook-authentication for Mobile Services in Azure . To be more specific I already have an application that is using Facebook C SDK http : csharpsdk.org and it works fine . I can log on fetch list of my friends and so . I want to keep using this SDK but I also want to authenticate for Azure Mobile Service . So my plan was log on with Facebook C SDK as I already do today get the authentication token and pass it to the MobileServiceClient.LoginAsync http : msdn.microsoft.com en-us library jj553650.aspx - function . That way I can still have all the nice features in Facebook C SDK and also use the built-in authentication system in Mobile Services for Azure . When load is complete followin is executed : .. . .. . However I get this exception when I call the last line of code above : MobileServiceInvalidOperationException Error : The POST Facebook login request must specify the access token in the body of the request . I cannot find any information on how to format the accesstoken I have tried a lot of different keys instead of authenticationToken as you see in my sample . I also have tried just to pass the accesstoken string but nothing seem to work . Also if I use the MobileServiceClient.LoginAsync for making a brand new login it works just fine but it seem silly to force users to log on twice . Any help is greatly appreciated .. . Answer : The format expected for the object is access token the-actual-access-token . Once the login is completed using the Facebook SDK the token is returned in the fragment with that name so that s what the Azure Mobile Service expects . BTW this is a code which I wrote based on your snippet which works . It should handle failed cases better though but for the token format this should be enough", "Question : I think I ve read just about everything out there on the topic of logging out of Facebook inside of a Desktop application . Nothing so far works . Specifically I would like to log the user out so that they can switch identities e.g . People sharing a computer at home could then use the software with their own Facebook accounts but with no chance to switch accounts it s quite messy . Have not yet tested switching Windows users accounts as that is simply far too much to ask of the end user and should not be necessary . Now I should say that I have set the application to use these permissions : .. . .. . So offline access is included there . I do not know if this does should affect logging out or not . Again my purpose for logging out is merely to switch users . If there s a better approach please let me know . The purported solutions seem to be : .. . .. . Use the JavaScript SDK FB.logout .. . Use m.facebook.com instead .. . Create your own URL and possibly use m.facebook.com .. . Create your own URL and use the session variable in ASP.NET .. . .. . The first is kind of silly . Why resort to JavaScript when you re using C It s kind of a step backwards and has a lot of additional overhead in a desktop application . I have not tried this as it s simply disgustingly messy to do this in a desktop application . If anyone can confirm that this is the only working method please do so . I m desperately trying to avoid it . The second doesn t work . Perhaps it worked in the past but my umpteen attempts to get it to work have all failed . The third doesn t work . I ve tried umpteen dozen variations with zero success . The last option there doesn t work for a desktop application because it s not ASP.NET and you don t have a session variable to work with . The Facebook C SDK logout also no longer works . i.e . I remember it working in the past but it no longer works now . Which truly puzzles me.. . .. . .. . It instead now directs the user to the Facebook mobile page where the user must manually logout . Now I could do browser automation to automatically click the logout link for the user however this is prone to breaking if Facebook updates the mobile UI . It is also messy and possibly a worse solution than trying to use the JavaScript SDK FB.logout method though not by much . I have searched for some kind of documentation however I cannot find anything in the Facebook developer documentation that illustrates how to logout an application . Has anyone solved this problem or seen any documentation that can be ported to work with the Facebook C SDK I am certainly open to using a WebClient or HttpClient Response if anyone can point to some documentation that could work with it . I simply have not been able to find any low-level documentation that shows how this approach could work . Thank you in advance for any advice pointers or links . .. . Answer : Well I ve turned up nothing that works so I ve resorted to a nasty hack . The FacebookOAuthClient.GetLogoutUrl method URL does not log me out however it does return an m.facebook.com URL e.g . : .. . .. . http : m.facebook.com logout.php next http : www.facebook.com dialog oauth response type token display popup scope user about me 252coffline access client id 123456789012345 redirect uri http 253a 252f 252fwww.facebook.com 252fconnect 252flogin success.html confirm 1 http : m.facebook.com logout.php next http : www.facebook.com dialog oauth response type token display popup scope user about me 252coffline access client id 123456789012345 redirect uri http 253a 252f 252fwww.facebook.com 252fconnect 252flogin success.html confirm 1 .. . .. . The mobile page has a Logout link at the bottom of the page . Trying to catch the anchor tag : .. . .. . In the Navigated WebBrowser event is unpredictable and unreliable . The actual method of catching it isn t relevant . e.g . This does not work either : .. . .. . However it can be caught reliably in the DocumentCompleted event handler . The problem is that it is now loading 2 pages instead of 1 and it s still a bit messy . However it works ." ] }
[ "yes-answer-long", "yes-answer-short" ]
web
UNK_RELATION
liveconnect@mozilla@59
liveconnect -- liveconnect allows ecmascript code running @placeholder s rhino interpreter to access java code in a transparent way .
{ "confidence": [ 42.58577346801758, 21.70480728149414, 21.253631591796875, 21.202707290649414, 19.779617309570312, 19.741718292236328, 19.23749351501465, 18.741235733032227, 18.220149993896484, 18.220149993896484, 17.86823844909668, 17.704362869262695, 17.704362869262695, 17.105224609375, 16.879886627197266, 16.879886627197266, 16.77776336669922, 16.77776336669922, 16.663097381591797, 16.628040313720703, 16.628040313720703, 16.581850051879883, 16.41350746154785, 16.328784942626953, 16.328784942626953, 16.058225631713867, 15.998180389404297, 15.948532104492188, 15.849599838256836, 15.778919219970703, 15.6854248046875, 15.540149688720703, 15.540149688720703, 15.486909866333008, 15.205865859985352, 14.971664428710938, 14.781661987304688, 14.433273315429688, 14.088411331176758, 14.088411331176758, 14.088411331176758, 14.088411331176758, 13.963296890258789, 13.923601150512695, 13.768021583557129, 13.768021583557129, 13.535804748535156, 13.051538467407227, 13.051538467407227, 12.777318000793457, 12.777318000793457, 12.777318000793457, 12.777318000793457, 12.777318000793457, 12.777318000793457, 12.777318000793457, 12.777318000793457, 12.777318000793457, 12.777318000793457, 12.777318000793457, 12.777318000793457, 12.777318000793457, 12.777318000793457, 12.777318000793457, 12.777318000793457, 12.777318000793457, 12.777318000793457, 12.777318000793457, 12.777318000793457, 12.777318000793457, 12.777318000793457, 12.777318000793457, 12.777318000793457, 12.777318000793457, 12.749361038208008, 12.70539665222168, 12.178178787231445, 12.121524810791016, 11.70618724822998, 11.70618724822998, 11.669092178344727, 11.656076431274414, 11.651375770568848, 11.48646354675293, 11.48646354675293, 11.48646354675293, 11.48646354675293, 11.48646354675293, 11.48646354675293, 11.48646354675293, 11.48646354675293, 11.48646354675293, 11.48646354675293, 11.48646354675293, 11.48646354675293, 11.48646354675293, 11.48646354675293, 11.48646354675293, 11.48646354675293, 11.48646354675293 ], "content": [ "The PlugIn s LiveConnect enforces this policy for localhost only .", "I m having trouble getting a Java Applet to communicate with the Javascript code on the page the applet is hosted on .", "I m running Java 6 Update 17 and it still doesn t work .", "The problem is that Java applet code called from JavaScript has only permissions that are the intersection of the JavaScript s code and your applet code - and somehow the JavaScript s permissions are seen as less which results in this Exception .", "Is there another more stable way of communicating between Java and Javascript that I should be using", "I have a Java Applet inserted on a simple HTML page located at http : localhost : 8080 index.html : .. . .. . The Java Applet has a method that looks similar to the code below : .. . .. . When I execute the applet code from JavaScript like so : .. . .. . I get the following error : .. . .. . access denied java.net.SocketPermission 127.0.0.1 : 8080 connect resolve .. . .. . It seems like the Java code resolves the domain localhost to its equivalent IP address and therefore raises a cross-domain security restrain .", "http : www.oracle.com technetwork java javase 6u22releasenotes-176121.html .. . .. . The fix for CVE-2010-3560 could cause certain Java applets running in the new Java Plug-in to stop working if they are embedded in web pages which contain JavaScript that calls into Java in order to perform actions which require network security permissions .", "Often it works but sometimes it does not using the same exact code .", "Does this mean that if I deploy this code to production e.g .", "www.productiondomain.com the code will work and not resolve to the IP address", "We finally modified smack code in a hacky way just to handle see-other-host until smack oficially supports it .", "Here is the code I am using : .. . .. . Here is the exception I get on the line marked XXX .", "Some times it works some times it does not simply reloading the page not changing any code .", "Then after that requesting for access token using this replay authorization code was going through smoothly .", "plugin2 also defines a new way of interacting with the browser .", "My bad...the new way is for DOM manipulation only .", "Googled plugin2 interesting wonder if their new plugin architecture introduced in java 1.6.10 has some bugs .", "If you set separate jvm to true this has very bad effect on performance since new Java VM is instantiated for every applet .", "The Java applet tried to download the crossdomain file failed and did not even bother to display an error in the java console debug level 5 .", "He then logged in Live Connect OAuth2 server returned to the callback endpoint with the code xxx state yyy...user A then used this authorization code to obtain the access token.. . .. . .. . 2 .", "Again exactly the same code but Google OAuth2 server returned bad request when authorization code is reused but LiveId returned the old access token of the previous user .", "Here is what I did : assume you have a function innocentFunc that throws the java.net.SocketPermission exception so your code is something like so : .. . .. . Now what you can do is to change it to something like so : .. . .. . This AccessController call basically states to the Java Virtual Machine that the code it runs should not obey to the permissions from the call chain but rather only the caller s permissions in its own .", "It works fine when I execute the same code from http : 127.0.0.1 : 8080 index.html .", "I encountered the same problem after installing Java 6 Update 22 .", ".. . .. . If Java does not resolve the originating system to localhost then the applet will not be able to open sockets .", "When I try to play the audio it fails to play and I get : access denied java.net.SocketPermission 1.2.3.4 : 80 connect resolve .. . .. . Looking at the access logs I get a request for crossdomain.xml right before this happens .", "I don t think is possible to made the crossdomain.xml file more restrictive at current time Java applets only support the domain .. . .. . see here http : www.oracle.com technetwork java javase index-135519.html CROSSDOMAINXML", "The client requests an access token from the authorization server s token endpoint by using its client credentials for authentication and includes the authorization code that was received in the previous step .", "For example : ...Callback.htm code AUTHORIZATION CODE .", "Of course you should do something like this only after making sure that this innocentFunc call can t do anything bad even if invoked by malicious code .", "It works sometimes but othertimes it throws an obscure exception that googling for has not turned up any useful information besides a few Java bug reports that were never resolved thanks Sun .", "IIRC the JavaScript same-origin policy prevents access to same-host different-port .", "I had access denied java.net.SocketPermission server ip : server port connect resolve from an applet in a web application .", "Their suggestion is to add a special crazy just-for-Java A record to the DNS like : .. . .. . .. . 10.11.12.13 foo.bar.com.auth.13.12.11.10.in-addr.arpa .. .", "But the catch is that Java isn t asking for a crossdomain.xml from mydomain.example.com crossdomain.xml ...but instead from 1.2.3.4 crossdomain.xml .. . .. . The workaround that seems to work for me is to set up a virtual host that responds for the IP address 1.2.3.4 and give it a crossdomain.xml so that Java can find the crossdomain.xml in the wrong place that it s looking for it .", "Java tried to download the file from the ip adress of my domain http : ip-address crossdomain.xml and not the root of my website http : domain-name crossdomain.xml .", "Based on Sample Java Codes that uses SAMCK there are two problems : .. . .. . 1 .", "I added crossdomain.xml with .. . .. . xml version 1.0 cross-domain-policy allow-access-from domain cross-domain-policy .. . .. . to tomcat-home webapps and checked that it is accessible with http : server name : server port crossdomain.xml", "Let s take a look at the Authorization code grant flow from the above article .", "The client includes the redirection URI that was used to obtain the authorization code for verification .", "And the code flow or exactly the implementation for Google login LiveId login are exactly the same .", "So maybe an authorization code is already used once in this instance server but not in others .", "The registered connection listeners don t receive notification of the exception .. . 2 . there s no way to access the text element of a stream error from XMPPException .. . .. . Handling the redirection internally would be the friendliest solution but notifying the client of the new server would at least allow clients to make a new connection without user intervention .", "Live Connect OAuth2 server now return with code kkk state ggg .. . .. . If I this time use some tools like Webscarab to capture the response request then change the return from OAuth2 server to code xxx state ggg the old authorization code was given to user A not B .", "I then discovered that the java applet did not work with the crossdomain files i use with flash : .. . .. . I had to remove the site-control and allow-http-request-headers-from nodes from the xml file in order to make the applet work .", "I am not sure this is a defect for the Java plug-in.. . .. . .. . For example when I used the URL like http : localhost : 9080 app-id appletPage the problem occurred but when I use the URL by using the actual IP or host name the problem did not occur .", ".. . .. . Right after the step 4 Live Connect OAuth2 server returns to my callback endpoint with the authorization code state like the following : .. . .. . https : ssss.myapp.com : 443 liveid consume.idp code 406dd558-0cda-50cc-bd37-d964ec29fbb3 state uvygsnd3gba0jwi315kdyccs https : ssss.myapp.com : 443 liveid consume.idp code 406dd558-0cda-50cc-bd37-d964ec29fbb3 state uvygsnd3gba0jwi315kdyccs .. . .. . Problem is that authorization code could be used more than once .", "The user-agent calls the client with the redirection URI which includes an authorization code and any local state that was provided by the client .", "About your solution that using cache to store the already-used authorization code for checking later .", "Note that it is intermittent .", "Reloading the page repeatedly will produce the error pretty quickly .", "--- More info --- .. . .. . I m using the deployJava.js script as provided by Sun to embed the applet on the fly .", "I made sure MAYSCRIPT is enabled .", "I know it s not a problem with MAYSCRIPT because the communication works some of the time .", "Are you using the applet tag to embed it", "Make sure you have MAYSCRIPT in your applet tag .", "Yes it s there .", "MAYSCRIPT shouldn t be the problem anyway because the exception is intermittent .", "If MAYSCRIPT were the problem it would block the communication 100 of the time .", "I think MAYSCRIPT is ignored in PlugIn2 .", "It never worked across all browsers correctly anyway .", "Maybe I should use that maybe it is more stable", "You use the exact same method for calling javascript via the JSObject class .", "Internally it has been rewritten but you use the same API .", "I think I ve solved the problem by setting classloader cache false and separate jvm true ...once I set both of those the intermittent obscure errors stopped happening .", "Hopefully this solves the problem for good .", "Unfortunately this solution cause applet is totally stateless .", "All static-variables are cleared after page reloading or refreshing .", "If you have multiple applets on the page 30+ this is pretty slow .", "I wonder if there is any other solution for this issue .", "E.g . we have multiple applets across multiple tabs .", "When the first tab with applets is opened all applets are shown correctly with no problems .", "But switch to any other tab results with the error for no registered plugin .", "In IE this error does not occur because in IE all applets are instantiated immediately as they are added to DOM .", "I finally found a solution for this issue by changing hostname from messenger.live.com to 64.4.61.217 in ConnectionConfiguration constructor as shown in the code below : .. . .. . I got this IP by executing nslookup messenger.live.com in Dos Command Prompt then I got an Address which I have used in the ConnectionConfiguration .", "The OAuth 2 spec is quite clear here https : tools.ietf.org html rfc6749 section-4.1.2 : .. . .. . If an authorization code is used more than once the authorization server MUST deny the request and SHOULD revoke when possible all tokens previously issued based on that authorization code .", "I follows this and using DotNetOpenAuth to implement integrate LiveId authentication authorization for our federated-identity access management system .", "@alscu would you mind providing us with the hacky way you mentioned in your comment as we may benefit from it and discuss it and help others cope up with this SMACK BUG .. .", "Please be noticed that applying the same replay attacking like above for Google OAuth2 server I received bad request error from the server Google OAuth2 authorization code never could be used more than once .", "Note thate this could also produce false positives in the occasion that the provider randomly generated the same code for two different users which might be quite unlikely depending on the implementation .", "Imagine that we have the application running on many servers which doesn t share anything to each other no central session or cache database....nothing shared .", "I received again the ACCESS TOKEN which was given to user A before...and finally user B can logging into my application as user A .", "When I try to connect to xmpp.messenger.live.com I get .. . .. . stream : error see-other-host at org.jivesoftware.smack.PacketReader.parsePackets PacketReader.java : 260 at org.jivesoftware.smack.PacketReader.access 000 PacketReader.java : 43 at org.jivesoftware.smack.PacketReader 1.run PacketReader.java : 70 .. . .. . I m debugging and I can see the raw received packets .. . .. . But I m unable to find a way in order to intercept and handle that redirect .", "The lib.jar file is signed .", "Is there anyway to avoid this", "Try signing lib.jar and all other external jar files you are using", "Do not use localhost", "I will explain also why : there is no guarantee localhost is 127.0.0.1 at all .", "Also use getCodeBase always from applets do not use hard-coded locations .", "My applet has been online for several years with no reported errors .", "When I downgrade to version 6 Update 21 everything works perfect .", "My applet is not signed .", "SOLUTION : It took me ha while to find the cause of the problem .", "Actually in my case there were several factors causing the security error .", "The problem was solved by the crossdomain.xml file .", "I guess it is better for the security aspect", "I then had to configure the webserver to expose the crossdomainfile on the IP address .", "In my case I have removed the default website in ISS for security reasons and had to create a new website .", "I think I m too late but anyways.. . Guys you cannot believe how easy a solution this problem has .", "I just wanted to reply with a similar solution ." ] }
{ "confidence": [ 37.85035705566406, 20.672103881835938, 20.29271125793457, 20.11275863647461, 20.03502655029297, 19.968616485595703, 19.545560836791992, 19.464370727539062, 18.24853515625, 18.22466468811035, 18.058134078979492, 17.775110244750977, 17.775110244750977, 17.4952392578125, 15.310505867004395, 14.845283508300781, 12.377138137817383, 12.28972339630127 ], "content": [ "Question : I have a Java Applet inserted on a simple HTML page located at http : localhost : 8080 index.html : .. . .. . The Java Applet has a method that looks similar to the code below : .. . .. . When I execute the applet code from JavaScript like so : .. . .. . I get the following error : .. . .. . access denied java.net.SocketPermission 127.0.0.1 : 8080 connect resolve .. . .. . It seems like the Java code resolves the domain localhost to its equivalent IP address and therefore raises a cross-domain security restrain . It works fine when I execute the same code from http : 127.0.0.1 : 8080 index.html . The lib.jar file is signed . Is there anyway to avoid this Comment : Try signing lib.jar and all other external jar files you are using Comment : Do not use localhost I will explain also why : there is no guarantee localhost is 127.0.0.1 at all . Also use getCodeBase always from applets do not use hard-coded locations . .. . Answer : IIRC the JavaScript same-origin policy prevents access to same-host different-port . The PlugIn s LiveConnect enforces this policy for localhost only . Comment : I m not sure what thies means Does this mean that if I deploy this code to production e.g . www.productiondomain.com the code will work and not resolve to the IP address Comment : It should do . Unless that host name resolves to localhost of course . Comment : you can connect to any port at the same host from an applet", "Question : I have a Java Applet inserted on a simple HTML page located at http : localhost : 8080 index.html : .. . .. . The Java Applet has a method that looks similar to the code below : .. . .. . When I execute the applet code from JavaScript like so : .. . .. . I get the following error : .. . .. . access denied java.net.SocketPermission 127.0.0.1 : 8080 connect resolve .. . .. . It seems like the Java code resolves the domain localhost to its equivalent IP address and therefore raises a cross-domain security restrain . It works fine when I execute the same code from http : 127.0.0.1 : 8080 index.html . The lib.jar file is signed . Is there anyway to avoid this Comment : Try signing lib.jar and all other external jar files you are using Comment : Do not use localhost I will explain also why : there is no guarantee localhost is 127.0.0.1 at all . Also use getCodeBase always from applets do not use hard-coded locations . .. . Answer : I m getting the same thing with Update 22 and not Update 21 . I m using the TinyPlayer http : www.javazoom.net applets tinyplayer tinyplayer.html applet which I m controlling via JavaScript . I m loading audio files from the same domain mydomain.example.com IP 1.2.3.4 as the page the applet is loading on - everything is referenced using relative URLs . When I try to play the audio it fails to play and I get : access denied java.net.SocketPermission 1.2.3.4 : 80 connect resolve .. . .. . Looking at the access logs I get a request for crossdomain.xml right before this happens . But the catch is that Java isn t asking for a crossdomain.xml from mydomain.example.com crossdomain.xml ...but instead from 1.2.3.4 crossdomain.xml .. . .. . The workaround that seems to work for me is to set up a virtual host that responds for the IP address 1.2.3.4 and give it a crossdomain.xml so that Java can find the crossdomain.xml in the wrong place that it s looking for it . I just tested with the contents : .. . .. . ...but it s probably possible to make this more restrictive . With that in there the audio plays correctly .", "Question : I m having trouble getting a Java Applet to communicate with the Javascript code on the page the applet is hosted on . It works sometimes but othertimes it throws an obscure exception that googling for has not turned up any useful information besides a few Java bug reports that were never resolved thanks Sun . Here is the code I am using : .. . .. . Here is the exception I get on the line marked XXX . Note that it is intermittent . Often it works but sometimes it does not using the same exact code . Reloading the page repeatedly will produce the error pretty quickly . Is there another more stable way of communicating between Java and Javascript that I should be using --- More info --- .. . .. . I m using the deployJava.js script as provided by Sun to embed the applet on the fly . I made sure MAYSCRIPT is enabled . I know it s not a problem with MAYSCRIPT because the communication works some of the time . Comment : Are you using the applet tag to embed it .. . Answer : Make sure you have MAYSCRIPT in your applet tag . Comment : Yes it s there . MAYSCRIPT shouldn t be the problem anyway because the exception is intermittent . Some times it works some times it does not simply reloading the page not changing any code . If MAYSCRIPT were the problem it would block the communication 100 of the time . Comment : I think MAYSCRIPT is ignored in PlugIn2 . It never worked across all browsers correctly anyway . Comment : Googled plugin2 interesting wonder if their new plugin architecture introduced in java 1.6.10 has some bugs . Comment : plugin2 also defines a new way of interacting with the browser . Maybe I should use that maybe it is more stable Comment : My bad...the new way is for DOM manipulation only . You use the exact same method for calling javascript via the JSObject class . Internally it has been rewritten but you use the same API .", "Question : I have a Java Applet inserted on a simple HTML page located at http : localhost : 8080 index.html : .. . .. . The Java Applet has a method that looks similar to the code below : .. . .. . When I execute the applet code from JavaScript like so : .. . .. . I get the following error : .. . .. . access denied java.net.SocketPermission 127.0.0.1 : 8080 connect resolve .. . .. . It seems like the Java code resolves the domain localhost to its equivalent IP address and therefore raises a cross-domain security restrain . It works fine when I execute the same code from http : 127.0.0.1 : 8080 index.html . The lib.jar file is signed . Is there anyway to avoid this Comment : Try signing lib.jar and all other external jar files you are using Comment : Do not use localhost I will explain also why : there is no guarantee localhost is 127.0.0.1 at all . Also use getCodeBase always from applets do not use hard-coded locations . .. . Answer : Update from @Kristian above saved my day . I had access denied java.net.SocketPermission server ip : server port connect resolve from an applet in a web application . There had been change in our DNS such that the IP of the load-balancer of the application server was not resolving to a name with domain . Therefore the suspected cross-domain connection from applet back to server was blocked . I added crossdomain.xml with .. . .. . xml version 1.0 cross-domain-policy allow-access-from domain cross-domain-policy .. . .. . to tomcat-home webapps and checked that it is accessible with http : server name : server port crossdomain.xml", "Question : I have a Java Applet inserted on a simple HTML page located at http : localhost : 8080 index.html : .. . .. . The Java Applet has a method that looks similar to the code below : .. . .. . When I execute the applet code from JavaScript like so : .. . .. . I get the following error : .. . .. . access denied java.net.SocketPermission 127.0.0.1 : 8080 connect resolve .. . .. . It seems like the Java code resolves the domain localhost to its equivalent IP address and therefore raises a cross-domain security restrain . It works fine when I execute the same code from http : 127.0.0.1 : 8080 index.html . The lib.jar file is signed . Is there anyway to avoid this Comment : Try signing lib.jar and all other external jar files you are using Comment : Do not use localhost I will explain also why : there is no guarantee localhost is 127.0.0.1 at all . Also use getCodeBase always from applets do not use hard-coded locations . .. . Answer : Just to add there s some stuff here which exactly matches the issue I ve been getting - it specifically mentions controlling an applet with JavaScript . http : www.oracle.com technetwork java javase 6u22releasenotes-176121.html .. . .. . The fix for CVE-2010-3560 could cause certain Java applets running in the new Java Plug-in to stop working if they are embedded in web pages which contain JavaScript that calls into Java in order to perform actions which require network security permissions . These applets may fail with a network security exception under some circumstances if the name service which resolved the original web page URL host name does not return a matching name as the result-of a reverse address lookup . Their suggestion is to add a special crazy just-for-Java A record to the DNS like : .. . .. . .. . 10.11.12.13 foo.bar.com.auth.13.12.11.10.in-addr.arpa .. . Comment : this fixed my problem", "Question : I m having trouble getting a Java Applet to communicate with the Javascript code on the page the applet is hosted on . It works sometimes but othertimes it throws an obscure exception that googling for has not turned up any useful information besides a few Java bug reports that were never resolved thanks Sun . Here is the code I am using : .. . .. . Here is the exception I get on the line marked XXX . Note that it is intermittent . Often it works but sometimes it does not using the same exact code . Reloading the page repeatedly will produce the error pretty quickly . Is there another more stable way of communicating between Java and Javascript that I should be using --- More info --- .. . .. . I m using the deployJava.js script as provided by Sun to embed the applet on the fly . I made sure MAYSCRIPT is enabled . I know it s not a problem with MAYSCRIPT because the communication works some of the time . Comment : Are you using the applet tag to embed it .. . Answer : I think I ve solved the problem by setting classloader cache false and separate jvm true ...once I set both of those the intermittent obscure errors stopped happening . Hopefully this solves the problem for good . Comment : Unfortunately this solution cause applet is totally stateless . All static-variables are cleared after page reloading or refreshing .", "Question : I have a Java Applet inserted on a simple HTML page located at http : localhost : 8080 index.html : .. . .. . The Java Applet has a method that looks similar to the code below : .. . .. . When I execute the applet code from JavaScript like so : .. . .. . I get the following error : .. . .. . access denied java.net.SocketPermission 127.0.0.1 : 8080 connect resolve .. . .. . It seems like the Java code resolves the domain localhost to its equivalent IP address and therefore raises a cross-domain security restrain . It works fine when I execute the same code from http : 127.0.0.1 : 8080 index.html . The lib.jar file is signed . Is there anyway to avoid this Comment : Try signing lib.jar and all other external jar files you are using Comment : Do not use localhost I will explain also why : there is no guarantee localhost is 127.0.0.1 at all . Also use getCodeBase always from applets do not use hard-coded locations . .. . Answer : I encountered the same problem after installing Java 6 Update 22 . My applet has been online for several years with no reported errors . When I downgrade to version 6 Update 21 everything works perfect . My applet is not signed . SOLUTION : It took me ha while to find the cause of the problem . Actually in my case there were several factors causing the security error . The problem was solved by the crossdomain.xml file . The Java applet tried to download the crossdomain file failed and did not even bother to display an error in the java console debug level 5 . Java tried to download the file from the ip adress of my domain http : ip-address crossdomain.xml and not the root of my website http : domain-name crossdomain.xml . I guess it is better for the security aspect I then had to configure the webserver to expose the crossdomainfile on the IP address . In my case I have removed the default website in ISS for security reasons and had to create a new website . I then discovered that the java applet did not work with the crossdomain files i use with flash : .. . .. . I had to remove the site-control and allow-http-request-headers-from nodes from the xml file in order to make the applet work . Comment : I m running Java 6 Update 17 and it still doesn t work .", "Question : I m having trouble getting a Java Applet to communicate with the Javascript code on the page the applet is hosted on . It works sometimes but othertimes it throws an obscure exception that googling for has not turned up any useful information besides a few Java bug reports that were never resolved thanks Sun . Here is the code I am using : .. . .. . Here is the exception I get on the line marked XXX . Note that it is intermittent . Often it works but sometimes it does not using the same exact code . Reloading the page repeatedly will produce the error pretty quickly . Is there another more stable way of communicating between Java and Javascript that I should be using --- More info --- .. . .. . I m using the deployJava.js script as provided by Sun to embed the applet on the fly . I made sure MAYSCRIPT is enabled . I know it s not a problem with MAYSCRIPT because the communication works some of the time . Comment : Are you using the applet tag to embed it .. . Answer : If you set separate jvm to true this has very bad effect on performance since new Java VM is instantiated for every applet . If you have multiple applets on the page 30+ this is pretty slow . I wonder if there is any other solution for this issue . E.g . we have multiple applets across multiple tabs . When the first tab with applets is opened all applets are shown correctly with no problems . But switch to any other tab results with the error for no registered plugin . In IE this error does not occur because in IE all applets are instantiated immediately as they are added to DOM .", "Question : I have a Java Applet inserted on a simple HTML page located at http : localhost : 8080 index.html : .. . .. . The Java Applet has a method that looks similar to the code below : .. . .. . When I execute the applet code from JavaScript like so : .. . .. . I get the following error : .. . .. . access denied java.net.SocketPermission 127.0.0.1 : 8080 connect resolve .. . .. . It seems like the Java code resolves the domain localhost to its equivalent IP address and therefore raises a cross-domain security restrain . It works fine when I execute the same code from http : 127.0.0.1 : 8080 index.html . The lib.jar file is signed . Is there anyway to avoid this Comment : Try signing lib.jar and all other external jar files you are using Comment : Do not use localhost I will explain also why : there is no guarantee localhost is 127.0.0.1 at all . Also use getCodeBase always from applets do not use hard-coded locations . .. . Answer : I don t think is possible to made the crossdomain.xml file more restrictive at current time Java applets only support the domain .. . .. . see here http : www.oracle.com technetwork java javase index-135519.html CROSSDOMAINXML", "Question : I have a Java Applet inserted on a simple HTML page located at http : localhost : 8080 index.html : .. . .. . The Java Applet has a method that looks similar to the code below : .. . .. . When I execute the applet code from JavaScript like so : .. . .. . I get the following error : .. . .. . access denied java.net.SocketPermission 127.0.0.1 : 8080 connect resolve .. . .. . It seems like the Java code resolves the domain localhost to its equivalent IP address and therefore raises a cross-domain security restrain . It works fine when I execute the same code from http : 127.0.0.1 : 8080 index.html . The lib.jar file is signed . Is there anyway to avoid this Comment : Try signing lib.jar and all other external jar files you are using Comment : Do not use localhost I will explain also why : there is no guarantee localhost is 127.0.0.1 at all . Also use getCodeBase always from applets do not use hard-coded locations . .. . Answer : I think I m too late but anyways.. . Guys you cannot believe how easy a solution this problem has . The problem is that Java applet code called from JavaScript has only permissions that are the intersection of the JavaScript s code and your applet code - and somehow the JavaScript s permissions are seen as less which results in this Exception . Here is what I did : assume you have a function innocentFunc that throws the java.net.SocketPermission exception so your code is something like so : .. . .. . Now what you can do is to change it to something like so : .. . .. . This AccessController call basically states to the Java Virtual Machine that the code it runs should not obey to the permissions from the call chain but rather only the caller s permissions in its own . Of course you should do something like this only after making sure that this innocentFunc call can t do anything bad even if invoked by malicious code . Comment : I just wanted to reply with a similar solution . Seeing your s I instead took the liberty to edit it adding some explanation .", "Question : I have a Java Applet inserted on a simple HTML page located at http : localhost : 8080 index.html : .. . .. . The Java Applet has a method that looks similar to the code below : .. . .. . When I execute the applet code from JavaScript like so : .. . .. . I get the following error : .. . .. . access denied java.net.SocketPermission 127.0.0.1 : 8080 connect resolve .. . .. . It seems like the Java code resolves the domain localhost to its equivalent IP address and therefore raises a cross-domain security restrain . It works fine when I execute the same code from http : 127.0.0.1 : 8080 index.html . The lib.jar file is signed . Is there anyway to avoid this Comment : Try signing lib.jar and all other external jar files you are using Comment : Do not use localhost I will explain also why : there is no guarantee localhost is 127.0.0.1 at all . Also use getCodeBase always from applets do not use hard-coded locations . .. . Answer : See : http : download.oracle.com javase tutorial deployment applet security.html .. . .. . Unsigned applets can perform the following operations : .. . .. . They can make network connections to the host they came from . .. . .. . If Java does not resolve the originating system to localhost then the applet will not be able to open sockets .", "Question : I have a Java Applet inserted on a simple HTML page located at http : localhost : 8080 index.html : .. . .. . The Java Applet has a method that looks similar to the code below : .. . .. . When I execute the applet code from JavaScript like so : .. . .. . I get the following error : .. . .. . access denied java.net.SocketPermission 127.0.0.1 : 8080 connect resolve .. . .. . It seems like the Java code resolves the domain localhost to its equivalent IP address and therefore raises a cross-domain security restrain . It works fine when I execute the same code from http : 127.0.0.1 : 8080 index.html . The lib.jar file is signed . Is there anyway to avoid this Comment : Try signing lib.jar and all other external jar files you are using Comment : Do not use localhost I will explain also why : there is no guarantee localhost is 127.0.0.1 at all . Also use getCodeBase always from applets do not use hard-coded locations . .. . Answer : You should check your virtual-directory permissions .", "Question : I have a Java Applet inserted on a simple HTML page located at http : localhost : 8080 index.html : .. . .. . The Java Applet has a method that looks similar to the code below : .. . .. . When I execute the applet code from JavaScript like so : .. . .. . I get the following error : .. . .. . access denied java.net.SocketPermission 127.0.0.1 : 8080 connect resolve .. . .. . It seems like the Java code resolves the domain localhost to its equivalent IP address and therefore raises a cross-domain security restrain . It works fine when I execute the same code from http : 127.0.0.1 : 8080 index.html . The lib.jar file is signed . Is there anyway to avoid this Comment : Try signing lib.jar and all other external jar files you are using Comment : Do not use localhost I will explain also why : there is no guarantee localhost is 127.0.0.1 at all . Also use getCodeBase always from applets do not use hard-coded locations . .. . Answer : Just self sign the jar .. . .. . follow this link-to sign the jar http : wiki . processing.org w Sign an Applet remove spaces .. . .. . and add mayscript to the applet .. . .. . or follow simple instructions from the following link http : java.sun.com products plugin 1.3 docs jsobject.html", "Question : I have a Java Applet inserted on a simple HTML page located at http : localhost : 8080 index.html : .. . .. . The Java Applet has a method that looks similar to the code below : .. . .. . When I execute the applet code from JavaScript like so : .. . .. . I get the following error : .. . .. . access denied java.net.SocketPermission 127.0.0.1 : 8080 connect resolve .. . .. . It seems like the Java code resolves the domain localhost to its equivalent IP address and therefore raises a cross-domain security restrain . It works fine when I execute the same code from http : 127.0.0.1 : 8080 index.html . The lib.jar file is signed . Is there anyway to avoid this Comment : Try signing lib.jar and all other external jar files you are using Comment : Do not use localhost I will explain also why : there is no guarantee localhost is 127.0.0.1 at all . Also use getCodeBase always from applets do not use hard-coded locations . .. . Answer : I had the similar issue and it only occurs when I use the localhost as a part of the URL for the page with the applet . When I used the URL with the actual host name or IP address as a part of the URL the problem didn t happen . I am not sure this is a defect for the Java plug-in.. . .. . .. . For example when I used the URL like http : localhost : 9080 app-id appletPage the problem occurred but when I use the URL by using the actual IP or host name the problem did not occur .", "Question : I m trying to use smack in order to connect to Microsoft s Xmpp Msn api . Last april they made a change in their implementation which forces clients to implement the see-other-host xmpp specification . When I try to connect to xmpp.messenger.live.com I get .. . .. . stream : error see-other-host at org.jivesoftware.smack.PacketReader.parsePackets PacketReader.java : 260 at org.jivesoftware.smack.PacketReader.access 000 PacketReader.java : 43 at org.jivesoftware.smack.PacketReader 1.run PacketReader.java : 70 .. . .. . I m debugging and I can see the raw received packets .. . .. . But I m unable to find a way in order to intercept and handle that redirect . Has anybody done this Any help would be appreciated . Thanks . BTW I ve already post this on smack forums but got no reply hope this is isn t considered cross-posting . .. . Answer : This background may help in fixing the problem .. . .. . The see-other-host stream error redirects a client to another server . In the case of Messenger it s intended to allow clients to cleanly switch to another server should their current server go out of service or to connect to another server for load-balancing purposes . Based on Sample Java Codes that uses SAMCK there are two problems : .. . .. . 1 . The registered connection listeners don t receive notification of the exception .. . 2 . there s no way to access the text element of a stream error from XMPPException .. . .. . Handling the redirection internally would be the friendliest solution but notifying the client of the new server would at least allow clients to make a new connection without user intervention . Comment : @alscu would you mind providing us with the hacky way you mentioned in your comment as we may benefit from it and discuss it and help others cope up with this SMACK BUG .. . Thanks", "Question : Firstly thanks for your time . I have a serious concern about Live Connect s OAuth2 API . I follows this and using DotNetOpenAuth to implement integrate LiveId authentication authorization for our federated-identity access management system . http : msdn.microsoft.com en-us library live hh243647.aspx authcodegrant .. . .. . Everything is working fine for quite a long time . But now I m having a serious trouble when fixing the replay attack issue for LiveId login module . Let s take a look at the Authorization code grant flow from the above article . 4 . The user-agent calls the client with the redirection URI which includes an authorization code and any local state that was provided by the client . For example : ...Callback.htm code AUTHORIZATION CODE . 5 . The client requests an access token from the authorization server s token endpoint by using its client credentials for authentication and includes the authorization code that was received in the previous step . The client includes the redirection URI that was used to obtain the authorization code for verification . .. . .. . Right after the step 4 Live Connect OAuth2 server returns to my callback endpoint with the authorization code state like the following : .. . .. . https : ssss.myapp.com : 443 liveid consume.idp code 406dd558-0cda-50cc-bd37-d964ec29fbb3 state uvygsnd3gba0jwi315kdyccs https : ssss.myapp.com : 443 liveid consume.idp code 406dd558-0cda-50cc-bd37-d964ec29fbb3 state uvygsnd3gba0jwi315kdyccs .. . .. . Problem is that authorization code could be used more than once . So it leads to the serious replay attack issue like the following scenario : .. . .. . 1 . User A when logging in to my application chose LiveId to sign-in then he s redirected to LiveId login page . He then logged in Live Connect OAuth2 server returned to the callback endpoint with the code xxx state yyy...user A then used this authorization code to obtain the access token.. . .. . .. . 2 . User B when logging in to my application chose LiveId to sign-in he then logged in at LiveId s login page . Live Connect OAuth2 server now return with code kkk state ggg .. . .. . If I this time use some tools like Webscarab to capture the response request then change the return from OAuth2 server to code xxx state ggg the old authorization code was given to user A not B . Then after that requesting for access token using this replay authorization code was going through smoothly . And guess what I received again the ACCESS TOKEN which was given to user A before...and finally user B can logging into my application as user A . Please be noticed that applying the same replay attacking like above for Google OAuth2 server I received bad request error from the server Google OAuth2 authorization code never could be used more than once . And the code flow or exactly the implementation for Google login LiveId login are exactly the same . I used DotNetOpenAuth.OAuth2.WebServerClient to implement the OAuth2 authenticating flow for both of Google LiveId . Again exactly the same code but Google OAuth2 server returned bad request when authorization code is reused but LiveId returned the old access token of the previous user . This is a serious security problem . Hope you guys have some ideas on this . Or hopefully I m wrong on some points . Please point it out . Thanks very much in advance Phuc Le . .. . Answer : The OAuth 2 spec is quite clear here https : tools.ietf.org html rfc6749 section-4.1.2 : .. . .. . If an authorization code is used more than once the authorization server MUST deny the request and SHOULD revoke when possible all tokens previously issued based on that authorization code . This is for the exact reasons https : tools.ietf.org html rfc6819 section-5.1.5.4 you mentioned above . In your case you should notify your provider http : technet.microsoft.com en-us security ff852094.aspx of this issue . Meanwhile you could implement a cache of used authorization codes on client-side and check for already issued codes . Note thate this could also produce false positives in the occasion that the provider randomly generated the same code for two different users which might be quite unlikely depending on the implementation . Comment : Thanks Gerlinger for the response Comment : Back to the issue . As specified in your link @ tools.ietf.org html rfc6819 section-5.1.5.4 https : tools.ietf.org html rfc6819 section-5.1.5.4 5.1.5.4 . Limit Number of Usages or One-Time Usage The authorization server may restrict the number of requests OR operations that can be performed with a certain token . This mechanism can be used to mitigate the following threats.. . As specified above I think the Live Connect OAuth 2.0 server chose the approach to limit the number of usage NOT one time usage . I will try to ask again in Live Connect forum to see if it s . Comment : About your solution that using cache to store the already-used authorization code for checking later . IMO that does not work for my case actually . Imagine that we have the application running on many servers which doesn t share anything to each other no central session or cache database....nothing shared . So maybe an authorization code is already used once in this instance server but not in others . Now hacker uses it for replay attacking another server instance there s actually no way to check . Please share you ideas Thanks a lot . Comment : @PhucLe As is specified in the spec it is not allowed to use authorization codes more than once . The sentence in the Threat Model spec aims for other tokens that could be prone to replay attacks . I just posted it to prove that limiting the usage or using one-time tokens is the recommended way to deal with replay attacks . In your scenario there s not much you can do about it than waiting for your provider to fix this issue or holding a common store for your servers . Comment : @Gerlinger : thanks that s what I thought too . It seems this need to be fixed by Live Connect OAuth 2.0 server team . Thanks again", "Question : I m trying to use smack in order to connect to Microsoft s Xmpp Msn api . Last april they made a change in their implementation which forces clients to implement the see-other-host xmpp specification . When I try to connect to xmpp.messenger.live.com I get .. . .. . stream : error see-other-host at org.jivesoftware.smack.PacketReader.parsePackets PacketReader.java : 260 at org.jivesoftware.smack.PacketReader.access 000 PacketReader.java : 43 at org.jivesoftware.smack.PacketReader 1.run PacketReader.java : 70 .. . .. . I m debugging and I can see the raw received packets .. . .. . But I m unable to find a way in order to intercept and handle that redirect . Has anybody done this Any help would be appreciated . Thanks . BTW I ve already post this on smack forums but got no reply hope this is isn t considered cross-posting . .. . Answer : I finally found a solution for this issue by changing hostname from messenger.live.com to 64.4.61.217 in ConnectionConfiguration constructor as shown in the code below : .. . .. . I got this IP by executing nslookup messenger.live.com in Dos Command Prompt then I got an Address which I have used in the ConnectionConfiguration . Hope this would help", "Question : I m trying to use smack in order to connect to Microsoft s Xmpp Msn api . Last april they made a change in their implementation which forces clients to implement the see-other-host xmpp specification . When I try to connect to xmpp.messenger.live.com I get .. . .. . stream : error see-other-host at org.jivesoftware.smack.PacketReader.parsePackets PacketReader.java : 260 at org.jivesoftware.smack.PacketReader.access 000 PacketReader.java : 43 at org.jivesoftware.smack.PacketReader 1.run PacketReader.java : 70 .. . .. . I m debugging and I can see the raw received packets .. . .. . But I m unable to find a way in order to intercept and handle that redirect . Has anybody done this Any help would be appreciated . Thanks . BTW I ve already post this on smack forums but got no reply hope this is isn t considered cross-posting . .. . Answer : I added see-other-host support to SMACK API for try . Now i can get see-other-host address as an Exception . For Example when i try to connect to messenger.live.com address i m successfully getting see-other-host : BAYMSG1020118.gateway.messenger.live.com . Then i try to connect BAYMSG1020118.gateway.messenger.live.com i m getting see-other-host again with different address : BY2MSG4010610.gateway.messenger.live.com Finally when i try to connect BY2MSG4010610.gateway.messenger.live.com i m getting this exception : .. . .. . I ll share this result with Smack guys also . If you want I can send to you the capture of our xmpp traffic via email . Best Regards Alper Ozdamar Comment : We finally modified smack code in a hacky way just to handle see-other-host until smack oficially supports it . Thanks for your response ." ] }
[ "yes-answer-long", "yes-answer-short" ]
mozilla
UNK_RELATION
jackson@java@126
jackson -- jackson is a java library for handling tasks like reading and writing parsing generating and data-binding to from @placeholder objects .
{ "confidence": [ 46.888031005859375, 44.94280242919922, 44.53619384765625, 43.36125946044922, 42.30353927612305, 41.89833068847656, 41.165916442871094, 41.12199783325195, 40.87459182739258, 40.46548080444336, 40.272281646728516, 40.038177490234375, 39.967926025390625, 39.87530517578125, 38.9561767578125, 38.86983871459961, 38.198875427246094, 38.190547943115234, 38.097694396972656, 37.892616271972656, 37.853111267089844, 37.74443435668945, 37.056007385253906, 36.60227966308594, 36.529808044433594, 36.41399002075195, 36.385108947753906, 36.3715705871582, 36.239479064941406, 36.168296813964844, 36.05331039428711, 35.95294189453125, 35.90825271606445, 35.71405792236328, 35.63441848754883, 35.453433990478516, 35.36454391479492, 35.31526565551758, 35.24810028076172, 35.22180938720703, 35.09177017211914, 35.0343132019043, 35.02770233154297, 34.95024490356445, 34.95024490356445, 34.905555725097656, 34.896240234375, 34.82859420776367, 34.783050537109375, 34.67805099487305, 34.59358215332031, 34.50438690185547, 34.27811050415039, 34.00968551635742, 33.99579620361328, 33.94644546508789, 33.884490966796875, 33.80797576904297, 33.80797576904297, 33.80797576904297, 33.76754379272461, 33.76754379272461, 33.734249114990234, 33.734249114990234, 33.64081954956055, 33.57002639770508, 33.57002639770508, 33.535743713378906, 33.535743713378906, 33.53002166748047, 33.53002166748047, 33.53002166748047, 33.53002166748047, 33.48603439331055, 33.44150161743164, 33.40419006347656, 33.39385986328125, 33.27095413208008, 33.24750518798828, 33.24750518798828, 33.24750518798828, 33.18839645385742, 33.086891174316406, 33.086891174316406, 33.06970977783203, 32.98600769042969, 32.94612121582031, 32.9193115234375, 32.865299224853516, 32.82347106933594, 32.82347106933594, 32.805885314941406, 32.744415283203125, 32.744415283203125, 32.744415283203125, 32.744415283203125, 32.741966247558594 ], "content": [ "I m using the jackson library to map JSON into objects .", "Seems like a nice companion for Jackson data-binding", "And Jackson will then bind JSON Objects as Maps .", "This java object is FeatureCollection from geojson-jackson library .", "I am using restTemplate for consuming json data from remote-server and then parsing the json in my java objects using jackson .", "Please help with the configuration parameters for JACKSON to convert JSON into JAVA Objects", "These crazy messages are generated by Jackson https : github.com FasterXML jackson-jr blob master jr-objects src main java com fasterxml jackson jr ob JSONObjectException.java L318-L329 not by Spray .", "I d like to use Jackson to deserialize JSON strings from client requests to Java objects and use FlexJson to serialize Java objects to response .", "Here are the objects : .. . .. . And the controller : .. . .. . There is a way to tell Jackson to not serialize the unfetched objects", "We de serialize with POJO objects using jackson using mongodb-jackson-mapper .", "So Jackson is generating a string from what it was provided .", "Then I use jackson library to transform it into java object .", "Actually i am trying to convert the JSON into Objects by using Jackson Mixins .", "it uses jackson to convert objects JSON format .", "I m using Jackson to deserialize network responses containing arrays of custom objects .", "I have to extend an existing RestService using Jackson Json data-binding .", "Jackson is arguably the standard Java Library for processing JSON .", "You can use jackson-datatype-jts from this link https : github.com bedatadriven jackson-datatype-jts reading-and-writing-geometry-types .", "Avoid Jackson serialization on non fetched lazy objects http : stackoverflow.com questions 21708339 avoid-jackson-serialization-on-non-fetched-lazy-objects", "But this is not case jackson ends reaching this point through continuous serialization of the parent objects .", "I am using Jackson library .", "The solution as of writing this answer appears to be moving on from Jerkson and using the Jackson-module-scala or Json4s with the Jackson backend .", "I have to modify Jackson to serialize Grails objects now .", "It is a depency issue with Jackson library .", "I m using Jackson JSON library to convert some JSON objects to POJO classes on an android application .", "Basically something like Jackson or OrmLite for binary-data .", "I am using Jackson for JSON handling .", "Currently I was written code for writing Avro-encoded data by using Jackson 2 https : github.com FasterXML jackson-dataformat-avro .", "Jongo uses Jackson to serialize deserialize objects in order to save and read them from MongoDB .", "Using Jackson https : github.com FasterXML jackson-databind objects can be un marshalled the same way : .. . .. . Fortunately the library bson4jackson https : github.com michel-kraemer bson4jackson allows objects to be un marshalled with Jackson without the need of JSON.parse String : .. . .. . But unfortunately this technique do not seems to work with queries .", "I m working on a project using Hibernate and Jackson to serialize my objects .", "Are you using the Jackson CSV library", "Simply make sure you are saving the java collections rather than Jackson-objects .", "Or can Jackson do customized parsing to achieve this", "This resulted in mismatched versions of Kotlin and Jackson-Kotlin library .", "As already mentioned Jackson-Datatype-JSR310 https : github.com FasterXML jackson-datatype-jsr310 provides support for Java 8 Time .", "Internally it uses Jackson .", "what is the actual JSON being sent to Jackson .. . .. . is this error from MongoDB in the stacktrace or is Jackson involved for sure did it preprocess and determine an error before calling Jackson", "This link has a reply apparently by the Jackson founder and it essentially says that Jackson doesn t implement the JSR : http : jackson-users.ning.com forum topics future-of-jackson-java-8-jsr-353 .. . .. . Google didn t couldn t", "I am newbie to the Jackson .", "Add the output of mvn dependency : tree and make sure there are no jackson 1 dependencies left also see which version of the google library supports jackson 2 and not jackson 1 or how to configure it to use jackson 2 .", "Related but different question : Ignoring new fields on JSON objects using Jackson http : stackoverflow.com questions 5455014 ignoring-new-fields-on-json-objects-using-jackson", "You cannot use Jackson like this .", "You can use Jackson library .", "Actually it is a requirement to use Jackson Library .", "How must I bind bidirectional the following json snippet to the Java objects below with Jackson", "Since these come from difference jars jackson-mapper-asl vs jackson-core-asl it is likely that somehow one is missing .", "Use jackson-datatype-jsr310 https : github.com FasterXML jackson-datatype-jsr310 : .. . .. . Datatype module to make Jackson recognize Java 8 Date Time API data types JSR-310 .", "Jackson moved from org.codehaus to com.fasterxml", "The following tutorial might help : mkyong.com java how-to-convert-java-object-to-from-json-jackson http : www.mkyong.com java how-to-convert-java-object-to-from-json-jackson", "I m using the latest branch for Jackson module - jackson-module-jsonSchema i.e .", "Like I said Jackson will call your getXxx methods to serialize you objects .", "FasterXML is Jackson .", "It looks like you re using an old version of Jackson .", "I am trying to parse CSV http : en.wikipedia.org wiki Comma-separated values file using Jackson https : github.com FasterXML jackson s CSV data format module https : github.com FasterXML jackson-dataformat-csv .", "The actionBean.posts object is coming from Jackson .", "The one you need is jackson-datatype-joda from https : github.com FasterXML jackson-datatype-joda .", "Is there a way to provide a Jackson object mapper to ODB so that we can retrieve plain scala objects out", "On the console : .. . .. . How can I do to make sure jackson returns Track objects instead of HashMap", "I m using jackson-module-scala 2.4 successfully with the wrapper below to serialize and deserialize various complex objects .", "For Jackson 2.5 use :", "Jackson 2.x+ use", "So .. . the jackson library use the MapSerializer to serialize maps .. .", "Jackson is a wonderful library with myriad of customization possibilities .", "what library could be trying to import the old jackson module", "Along with upgrading to Jackson 2.7.4 .", "Where is Jackson involved here", "I am porting jackson 1.6 code to jackson 2 and stumbled upon a deprecated code .", "What i did in jackson 1.6 is : .. . .. . Anyone knows how to do it in jackson 2", "The JavaType class is in the jackson-core JAR and the ObjectMapper class is in jackson-mapper .", "The jackson 1 source code is available at https : github.com FasterXML jackson-1 .", "fasterxml.com http : fasterxml.com github.com fasterxml jackson https : github.com fasterxml jackson", "Info on jackson-datafotmat.csv https : github.com FasterXML jackson-dataformat-csv", "After some investigation I found out that Jackson was included in Glassfish 3 through Jersey and after removing jackson-core-asl.jar jackson-jaxrs.jar jackson-mapper-asl.jar and jackson-xc.jar everything worked beautifully .", "This is Jackson 2.2.2 .", "I am in the process of migrating JSON Objects to Jackson JSON objects and I was wondering which would fit my project better .", "I expect the library to work with a code like that : .. . .. . This is what is provided in Java with Gson Jackson and other tools like that .", "Jackson 2 is completely incompatible with Jackson 1 http : wiki.fasterxml.com JacksonRelease20 and JsonSerializableWithType Now deprecated and unusable is an interface from Jackson 1 which led to the presence of serializeWithType in Jackson 2 .", "I m trying to serialize maps with arbitrary key types best effort using jackson and jackson-module-scala .", "github.com FasterXML jackson-module-scala https : github.com FasterXML jackson-module-scala", "Using jackson with the jackson-dataformat-xml module I am able to serialize POJO to both json and xml .", "Is it possible to do something like this with jackson", "Using Jackson ObjectMapper.readValue to read a JSON String into a java object .", "I am using jackson API for converting Java to JSON and vice-versa .", "It s seem like this object was ignored by Jackson from Fasterxml .", "I don t think there s deserializer for such format for Jackson in jackson-datatypes-collections - looks like some specific use-case .", "Looks like Spring 4.2.4 and Jackson 2.6.5 are compatible .", "The service itself works fine but I d like to improve it by having the Jackson mapper automagically serialize deserialize date and date-times to JodaTime objects .", "After you could pass data to jackson", "JSR310Module https : github.com FasterXML jackson-datatype-jsr310 blob master src main java com fasterxml jackson datatype jsr310 JSR310Module.java for details .", "JavaTimeModule Source at GitHub https : github.com FasterXML jackson-datatype-jsr310 blob master src main java com fasterxml jackson datatype jsr310 JavaTimeModule.java", "Now : if the idea is to take arbitrary content that alleges to be JSON you could use Jackson in streaming mode for reading and then writing content .", "I recommend you to use Jackson parser for server-side manipulation of JSON objects", "I am having difficulty getting Spring Jackson to respect the @DateTimeFormat annotation with java.time jsr310 objects such as LocalDateTime .", "It appears that the problem lies not in the jackson libraries but in the package I am using to generate the class objects .", "I need to be able to support multiple API versions at the same time using Jackson to serialize deserialize objects .", "I have below Serializer for JodaTime handling : .. . .. . Then on each model objects I do this : .. . .. . With above settings @ResponseBody and Jackson Mapper sure works ." ] }
{ "confidence": [ 59.49991989135742, 52.9915885925293, 51.17205047607422, 50.382911682128906, 48.711605072021484, 47.74085998535156, 47.59729766845703, 47.5225830078125, 47.46439743041992, 47.26906967163086, 47.26906967163086, 47.26906967163086, 46.903568267822266, 46.87411880493164, 46.76295471191406, 46.69466018676758, 46.68821716308594, 46.590633392333984, 46.27045440673828, 46.17977523803711 ], "content": [ "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 : The jackson data-binding documentation http : jackson.codehaus.org DataBindingDeepDive indicates that Jackson supports deserialising Arrays of all supported types but I can t figure out the exact syntax for this . For a single object I would do this : .. . .. . Now for an array I want to do this : .. . .. . Anyone know if there is a magic missing command If not then what is the solution Many thanks . Comment : I prefer Google s GSON library for dealing with JSON . It is worth checking out if you haven t tryed it yet.. . makes working with it very easy and intuitive . Comment : FWIW The possible solutions to this specific problem with Gson are almost identical to what s possible with Jackson s Data Binding API . Comment : Gweebz -- maybe you would like to explain why you feel GSON is a better choice compared to Jackson .. . Answer : From Eugene Tskhovrebov http : stackoverflow.com questions 6349421 how-to-use-jackson-to-deserialise-an-array-of-objects 28982591 comment37099398 6349488 .. . .. . This solution seems to be the best for me", "Question : Does JSON Jackson Library have JSON Sanitizing capability like the OWASP JSON Sanitizer https : www.owasp.org index.php OWASP JSON Sanitizer I went through Jackson documentation but couldn t find any reference about it . It only talks about Streaming Traversing and Binding of JSON data and nothing about sanitizing or similar functionality . Could someone please confirm . I need a library that can check the JSON data for any malicious or vulnerable content code . .. . Answer : What does such sanitization mean Page you linked to does not actually explain what it is supposed to do . But I am guessing it would be used to verify that input is valid JSON and not something that just resembles JSON such as Javascript code . Now : if the idea is to take arbitrary content that alleges to be JSON you could use Jackson in streaming mode for reading and then writing content . Since Jackson : .. . .. . 1 . Only accepts valid JSON and not for example executable Javascript AND .. . 2 . Only produces well-formed valid JSON .. . .. . combination of reading+writing should sanitize input . You could do something like : .. . .. . which is a very fast method of ensuring that invalid content does not get through system . Comment : something that just resembles JSON such as Javascript code - Could you give an example please Comment : I should have said serialized Javascript values . Content that looks a bit like JSON but isn t . Javascript objects for example serialize to something that may or may not be JSON at least if not serialized using method library that explicitly enforces it will be JSON .", "Question : I m using Jackson JSON library to convert some JSON objects to POJO classes on an android application . The problem is the JSON objects might change and have new fields added while the application is published but currently it will break even when a simple String field is added which can safely be ignored . Is there any way to tell Jackson to ignore newly added fields e.g . non-existing on the POJO objects A global ignore would be great . .. . Answer : Make sure that you place the @JsonIgnoreProperties ignoreUnknown true annotation to the parent POJO class which you want to populate as a result-of parsing the JSON response and not the class where the conversion from JSON to Java Object is taking place . Comment : Saved me here . Thank you Comment : Any particular reason for this behavior", "Question : I d like to use Jackson to deserialize JSON strings from client requests to Java objects and use FlexJson to serialize Java objects to response . In the nutshell the issue is : how to setup the Spring to use Jackson ONLY for request handling and not for response In servlet-context.xml I have : .. . .. . And in the controller : .. . .. . But this way Jackson also converts to JSON the response already converted by FlexJSON that I don t want . Is there any solution Thanks . .. . Answer : You should be able to build a custom MappingJackson2HttpMessageConverter bean where you plug in Jackson for the serialization methods and FlexJSON for the deserialization methods . Comment : Yes that could work however I have already found the better way . Spring has a number of default HttpRequestConverter instances pre-enabled and uses convenient one depending on the request Content-Type . So in my case it was just enough to add Jackson dependency in the project and send request with application json content-type . That causes Jackson to read data from the request body and deserialize to object . And response is not processed by Jackson . Comment : same here just added the jackson2 jars and you get to do things like at RequestBody YourDomainObject yourDomainObject and jackson does its thing . I imagine if you tried to return yourDomainObject the reverse would kick into effect with at ResponseBody but if you re using flexjson then you re most likely returning a ResponseEntity String which doesnt seem to trigger any jackson processing", "Question : I m using Jackson JSON library to convert some JSON objects to POJO classes on an android application . The problem is the JSON objects might change and have new fields added while the application is published but currently it will break even when a simple String field is added which can safely be ignored . Is there any way to tell Jackson to ignore newly added fields e.g . non-existing on the POJO objects A global ignore would be great . .. . Answer : Up to-date and complete answer with Jackson 2 .. . .. . .. . .. . Using Annotation .. . .. . See JsonIgnoreProperties http : jackson.codehaus.org 1.4.0 javadoc org codehaus jackson annotate JsonIgnoreProperties.html on Jackson online documentation . Using Configuration .. . .. . Less intrusive than annotation . See FAIL ON UNKNOWN PROPERTIES http : fasterxml.github.io jackson-databind javadoc 2.0.0 com fasterxml jackson databind DeserializationFeature.html FAIL ON UNKNOWN PROPERTIES on Jackson online documentation .", "Question : Reading this discussion http : stackoverflow.com questions 11773649 java-xml-parser-performance-sun-java-streaming-xml-parser-sjsxp-vs-woodsto .. . .. . Aalto is by far fastest of the three especially for parsing . It is commonly 50 - 100 faster than either Woodstox or SJSXP . One downside is that it does not handle DTDs and thereby not external entities it handles pre-defined and character entities . it seems that Aalto is the recommended way to read-write xml with jackson . However on jackson-dataformat-xml https : github.com FasterXML jackson-dataformat-xml maven-dependency page it recommends using Woodstox which has not been updated for some time . So what is the best way forward Woodstox or Aalto Comment : One small note on Woodstox releases : part of reason for few releases is that it is very mature complete and bug-free . If it ain t broke don t fix it . But there has been a new release 4.3.0 to add one feature that was missing ability to limit expansion of parsed entities needed to protect against certain forms of denial-of-service attacks using XML parsed entities .. . Answer : I think that Woodstox is the safest choice for correct operation given its wide functionality and being de facto Stax standard implementation -- most Java XML Soap frameworks use Woodstox . So if you just want least hassle all around it is a good choice . But Aalto is significantly faster and its features set is perfectly fine for Jackson XML module : DTD processing is not needed for JAXB-style data-binding . So I would say that this comes back to how much you value performance Aalto and how much simple no-hassle it just works with no problems whatsoever Woodstox . That is how I would choose myself if I was developing system myself . Besides switching from one to the other is trivially easy : so one possibility is to try Aalto and only if you face an issue FWIW there are no reported issue with Aalto Jackson as per issue tracker -- these are hypothetical issues .", "Question : null .. . Answer : The following JSON I am getting from a third party API and I am trying to deserialize the description object : whats worse I need to append all those strings together .. . .. . These following pages give fairly good examples but it doesn t handle the nested objects as strings . Deserialize JSON Array containing different types using Jackson http : stackoverflow.com questions 18765237 deserialize-json-array-containing-different-types-using-jackson .. . .. . Jackson JSON how to deserialize date from object-array http : stackoverflow.com questions 21392994 jackson-json-how-to-deserialize-date-from-object-array .. . .. . converting json into java object for a array with mixed types http : stackoverflow.com questions 31421173 converting-json-into-java-object-for-a-array-with-mixed-types .. . .. . Is this possible with Jackson Any help is greatly appreciated . Comment : perhaps this answer http : stackoverflow.com questions 19760138 parsing-json-in-java-without-knowing-json-format will help", "Question : I need to convert a certain JSON string to a Java object . I am using Jackson for JSON handling . I have no control over the input JSON I read from a web service . This is my input JSON : .. . .. . Here is a simplified use-case : .. . .. . My entity class is : .. . .. . My Wrapper class is basically a container object to get my list of students : .. . .. . I keep getting this error and wrapper returns null . I am not sure what s missing . Can someone help please Comment : I found this useful to avoid creating a wrapper class : Map dummy String Student myClientResponse.getEntity new GenericType Map String Student and then Student myStudent dummy.get wrapper Comment : JSON should looks like : String jsonStr students : id : 13 name : Fred if you are expecting Wrapper object in your REST POST request Comment : Related but different question : Ignoring new fields on JSON objects using Jackson http : stackoverflow.com questions 5455014 ignoring-new-fields-on-json-objects-using-jackson Comment : And incidentally most answers to this question actually answer a different question namely one similar to the one I linke above . .. . Answer : The new Firebase Android introduced some huge changes below the copy of the doc : .. . .. . https : firebase.google.com support guides firebase-android https : firebase.google.com support guides firebase-android 5D : .. . .. . Update your Java model objects .. . .. . As with the 2.x SDK Firebase Database will automatically convert Java objects that you pass to DatabaseReference.setValue into JSON and can read JSON into Java objects using DataSnapshot.getValue . In the new SDK when reading JSON into a Java object with DataSnapshot.getValue unknown properties in the JSON are now ignored by default so you no longer need @JsonIgnoreExtraProperties ignoreUnknown true . To exclude fields getters when writing a Java object to JSON the annotation is now called @Exclude instead of @JsonIgnore . .. . .. . .. . .. . If there is an extra property in your JSON that is not in your Java class you will see this warning in the log files : .. . .. . You can get rid of this warning by putting an @IgnoreExtraProperties annotation on your class . If you want Firebase Database to behave as it did in the 2.x SDK and throw an exception if there are unknown properties you can put a @ThrowOnExtraProperties annotation on your class .", "Question : I need to convert a certain JSON string to a Java object . I am using Jackson for JSON handling . I have no control over the input JSON I read from a web service . This is my input JSON : .. . .. . Here is a simplified use-case : .. . .. . My entity class is : .. . .. . My Wrapper class is basically a container object to get my list of students : .. . .. . I keep getting this error and wrapper returns null . I am not sure what s missing . Can someone help please Comment : I found this useful to avoid creating a wrapper class : Map dummy String Student myClientResponse.getEntity new GenericType Map String Student and then Student myStudent dummy.get wrapper Comment : JSON should looks like : String jsonStr students : id : 13 name : Fred if you are expecting Wrapper object in your REST POST request Comment : Related but different question : Ignoring new fields on JSON objects using Jackson http : stackoverflow.com questions 5455014 ignoring-new-fields-on-json-objects-using-jackson Comment : And incidentally most answers to this question actually answer a different question namely one similar to the one I linke above . .. . Answer : If you are using Jackson 2.0", "Question : I need to convert a certain JSON string to a Java object . I am using Jackson for JSON handling . I have no control over the input JSON I read from a web service . This is my input JSON : .. . .. . Here is a simplified use-case : .. . .. . My entity class is : .. . .. . My Wrapper class is basically a container object to get my list of students : .. . .. . I keep getting this error and wrapper returns null . I am not sure what s missing . Can someone help please Comment : I found this useful to avoid creating a wrapper class : Map dummy String Student myClientResponse.getEntity new GenericType Map String Student and then Student myStudent dummy.get wrapper Comment : JSON should looks like : String jsonStr students : id : 13 name : Fred if you are expecting Wrapper object in your REST POST request Comment : Related but different question : Ignoring new fields on JSON objects using Jackson http : stackoverflow.com questions 5455014 ignoring-new-fields-on-json-objects-using-jackson Comment : And incidentally most answers to this question actually answer a different question namely one similar to the one I linke above . .. . Answer : using Jackson 2.6.0 this worked for me : .. . .. . and with setting :", "Question : I need to convert a certain JSON string to a Java object . I am using Jackson for JSON handling . I have no control over the input JSON I read from a web service . This is my input JSON : .. . .. . Here is a simplified use-case : .. . .. . My entity class is : .. . .. . My Wrapper class is basically a container object to get my list of students : .. . .. . I keep getting this error and wrapper returns null . I am not sure what s missing . Can someone help please Comment : I found this useful to avoid creating a wrapper class : Map dummy String Student myClientResponse.getEntity new GenericType Map String Student and then Student myStudent dummy.get wrapper Comment : JSON should looks like : String jsonStr students : id : 13 name : Fred if you are expecting Wrapper object in your REST POST request Comment : Related but different question : Ignoring new fields on JSON objects using Jackson http : stackoverflow.com questions 5455014 ignoring-new-fields-on-json-objects-using-jackson Comment : And incidentally most answers to this question actually answer a different question namely one similar to the one I linke above . .. . Answer : For my part the only line .. . .. . @JsonIgnoreProperties ignoreUnknown true .. . .. . didn t work too . Just add .. . .. . Jackson 2.4.0", "Question : I have a entity class looks like this . And I m using following dependency for JSON generation . When I tried with following code which referred from Generating JSON Schemas with Jackson http : wiki.fasterxml.com JacksonJsonSchemaGeneration .. . .. . Server complains with following error message .. . .. . How can I fix this Comment : FYI - We are currently adding this support to MOXy s JSON-binding . You can track this work using the following link : bugs.eclipse.org 404452 http : bugs.eclipse.org 404452 .. . Answer : Have you tried configuring your ObjectMapper to include jaxb introspector We use spring mvc3 for implementing REST services and use the same model objects to serialize into xml json . EDIT : Here is the output I get from jackson : .. . .. . Hope this helps Comment : Thanks this helped a lot Btw a small edit is made to your answer . Comment : I believe this is actually incorrect JSON Schema . The correct output should not include required and should show the third type as type : string null i.e . a nullable type . Can Jackson be configured to produce this", "Question : I have an object say Response.java that looks like the following : .. . .. . I need to convert a List of these objects into csv so my end goal is something like : .. . .. . I tried to use two libraries - jackson csv dataformat org.json JsonArray but i couldn t get the desired result . This is my jackson csv code : .. . .. . With Jackson i am getting .. . .. . Is there a way to convert the composite object into csv in the way i need just the fields without the json like grouping Comment : Are you using the Jackson CSV library If not details are here on how to implement : github.com FasterXML jackson-dataformat-csv https : github.com FasterXML jackson-dataformat-csv Comment : Did you try overridng the toString method of Response class I think by using it you can get the desired result . Comment : We don t really need to see the bean class . We need to see how you re using Jackson to perform the serialization . It s producing JSON not CSV . Comment : @jgitter - I ve updated my question with my jackson code and jackson error message The json output was necause i also tried to do shemaFor json Comment : @ColimMc - yes i am using jackson csv library .. . Answer : So I ran similar code that you are using in a test project and it looks like you will need to use @JsonUnwrapped on all your objects User Address and OrderInfo . Jackson CSV doesn t support objects as properties which is why you got that exception . Here is the issue on Github : Jackson CSV Object properties issue http : github.com FasterXML jackson-dataformat-csv issues 9 .. . .. . Here is sample code I used to verify this : .. . .. . Output from the above code was the following : Comment : Thanks for pointing me to the issue it worked with @JsonUnwrapped .", "Question : I need to convert a certain JSON string to a Java object . I am using Jackson for JSON handling . I have no control over the input JSON I read from a web service . This is my input JSON : .. . .. . Here is a simplified use-case : .. . .. . My entity class is : .. . .. . My Wrapper class is basically a container object to get my list of students : .. . .. . I keep getting this error and wrapper returns null . I am not sure what s missing . Can someone help please Comment : I found this useful to avoid creating a wrapper class : Map dummy String Student myClientResponse.getEntity new GenericType Map String Student and then Student myStudent dummy.get wrapper Comment : JSON should looks like : String jsonStr students : id : 13 name : Fred if you are expecting Wrapper object in your REST POST request Comment : Related but different question : Ignoring new fields on JSON objects using Jackson http : stackoverflow.com questions 5455014 ignoring-new-fields-on-json-objects-using-jackson Comment : And incidentally most answers to this question actually answer a different question namely one similar to the one I linke above . .. . Answer : I have tried the below method and it works for such JSON format reading with Jackson . Use the already suggested solution of : annotating getter with @JsonProperty wrapper .. . .. . Your wrapper class .. . .. . My Suggestion of wrapper class .. . .. . This would however give you the output of the format : .. . .. . Also for more information refer to https : github.com FasterXML jackson-annotations .. . .. . Hope this helps Comment : Welcome to stackoverflow . Tip you can use the symbols in the tool bar to format your code-snippets .", "Question : I need to convert a certain JSON string to a Java object . I am using Jackson for JSON handling . I have no control over the input JSON I read from a web service . This is my input JSON : .. . .. . Here is a simplified use-case : .. . .. . My entity class is : .. . .. . My Wrapper class is basically a container object to get my list of students : .. . .. . I keep getting this error and wrapper returns null . I am not sure what s missing . Can someone help please Comment : I found this useful to avoid creating a wrapper class : Map dummy String Student myClientResponse.getEntity new GenericType Map String Student and then Student myStudent dummy.get wrapper Comment : JSON should looks like : String jsonStr students : id : 13 name : Fred if you are expecting Wrapper object in your REST POST request Comment : Related but different question : Ignoring new fields on JSON objects using Jackson http : stackoverflow.com questions 5455014 ignoring-new-fields-on-json-objects-using-jackson Comment : And incidentally most answers to this question actually answer a different question namely one similar to the one I linke above . .. . Answer : Jackson is complaining because it can t find a field in your class Wrapper that s called wrapper . It s doing this because your JSON object has a property called wrapper . I think the fix is to rename your Wrapper class s field to wrapper instead of students . Comment : Thanks Jim . I tried that and it did not fix the problem . I am wondering if I am missing some annotation. . Comment : Hmm what happens when you create the equivalent data in Java and then use Jackson to write it out in JSON . Any difference between that JSON and the JSON above should be a clue to what s going wrong . Comment : This answer worked for me with the example from the question .", "Question : I want to serialize a Map with Jackson . The Date should be serialized as a timestamp like all my other dates . The following code renders the keys in the form Tue Mar 11 00 : 00 : 00 CET 1952 which is Date.toString instead of the timestamp . I assume this is because of type-erasure and jackson doesn t know at runtime that the key is a Date . But I didn t find a way to pass a TypeReference to any writeValue method . Is there a simple way to achieve my desired behaviour or are all keys always rendered as Strings by jackson Thanks for any hint . Comment : JSON maps are just JSON objects with element name value pairs . A JSON element name must be a string . So Jackson is generating a string from what it was provided . .. . Answer : Since Jackson 2.0 maybe 1.9 too WRITE DATE KEYS AS TIMESTAMPS can be used to change this particular behavior . Usage example for ObjectMapper : .. . .. . and for ObjectWriter :", "Question : I am using Jackson library . I have number of java objects which are nothing but the wrapper for jsonNode . So want to convert these list of jsonNodes into single jsonNode . how can i do that . i tried this .. . .. . this is not working . ithere any other way .. . Answer : If each of your objects can be serialized then you should also be able to serialize a list of them to combine them into a json list : .. . .. . You can also ask Jackson to simply convert the objList to an ArrayNode instead : .. . .. . But if you actually had a method in Base to allow conversion to a JsonNode you could simply build ArrayNode yourself : .. . .. . This would avoid round-tripping via a JSON representation .", "Question : I have created a simple test case that shows the error . Please let me know if I ve missed something . I have a simple interface that declares a single accessor : .. . .. . When I run this unit test Jackson fails on parsing the json string : .. . .. . As you can see from the stacktrace Jackson correctly extracts the contextMap token from the json but it fails to continue tokenizing the string . As far as I know the json string correctly represents a map . Thanks Robin . Comment : What concrete class should Jackson use to unmarshall the JSON to the EventWithMap interface Moreover a Map containing foo as a key and bar as a value is normally represented in JSON as foo : bar Comment : I am using the MrBeanModule mapper.registerModule new MrBeanModule which is responsible for materializing POJO beans from interfaces . And a map is an array of objects in json i.e . . This JSON string was also created by Jackson so I expect it s valid and should be parseable by Jackson . Comment : That must be another side effect of this module because this code https : gist.github.com jnizet 9c7c991d0f92f6362ce7 produces json contextMap : processedAt : Thu Dec 31 14 : 30 : 51 EST 2015 . Maybe you should post a complete example containing the marshalling code as well that produces the JSON . Comment : Very interesting indeed . So there s no array token in the ObjectMapper serializer in your case . Mine was actually not created with MrBeanModule as far as I know it was created with log4j2 which uses Jackson for its JSONLayout appender . I will investigate whether this is a bug in that implementation . Thanks . Comment : According to the log4j2-dev group this representation was done purposely to make writing XML and JSON consistent : mail-archives.apache.org mod mbox logging-log4j-dev 201601.mbox http : mail-archives.apache.org mod mbox logging-log4j-dev 201601.mbox 3CCAOC1H uwW9SfoD5CKpqOqEvYNw 2B 3DFtPNbdWWA8Qqtv567VpFxw 40mail.gmail.com 3E .. . Answer : As others pointed out the problem is that JSON in question is structurally incompatible with the POJO : there is that unnecessary extra Array wrapper . But there is a way to handle this particular case : if you enable DeserializationFeature.UNWRAP SINGLE VALUE ARRAYS you should be able to get conversion for the specific case where array has one AND EXACTLY ONE value in it .", "Question : null .. . Answer : I m trying to serialize maps with arbitrary key types best effort using jackson and jackson-module-scala . I did plenty of searching of course I ve found cases for custom key deserializers but they won t do here - and I m also trying to avoid writing a custom map de serializer if possible . My basic idea is to serialize map as an array of entries entries being pairs length 2 arrays of objects - I know this is not quite map semantics but I think this is the closest I can get without converting keys to strings and then parsing them back to objects on a per-type basis . When learning about jackson s converters I was delighted thinking I could get away with writing just a pair of them - since jackson-module-scala happily de serializes both Seqs and Tuples I thought it could be this simple : .. . .. . All that was left is applying this as a global setting I did that via a mixin side question : is there a better way for this The serialization side works nicely the json output is exactly as described above however on deserialization results in a weird phenomenon : it does not fail but the insides of the map are of the wrong type . So serializing a Map MyType1 MyType2 works ok but then deserializing the result I get something that s more like a Map String Any the value being a simple type or another map for the entries . I suspect there is some type information lost in the process so I also tried to specializing all the type paramteres in the code replacing every with MyType1 MyType2 in the above effectively and interestingly it seemed to work ok obviously this solution is not generic .. . .. . So my question is : is there a way to make this work or any other way to achieve the same I feel like it s reasonable close but I can t seem to figure it out" ] }
[ "yes-answer-long", "yes-answer-short" ]
java
UNK_RELATION
mallard@user@67
mallard -- mallard is a markup language that makes easier writing @placeholder help and documentation for software .
{ "confidence": [ 57.75172424316406, 55.686729431152344, 51.821624755859375, 46.4537353515625, 44.95021057128906, 44.95021057128906, 25.851951599121094, 22.847923278808594, 21.645483016967773, 21.581418991088867, 20.905620574951172, 20.905620574951172, 20.49138832092285, 20.380905151367188, 19.069894790649414, 18.591785430908203, 18.591785430908203, 18.367753982543945, 17.92441749572754, 17.92441749572754, 17.82259178161621, 17.088260650634766, 17.088260650634766, 16.743301391601562, 16.63883399963379, 15.669753074645996, 15.669753074645996, 15.669753074645996, 15.669753074645996, 15.669753074645996, 15.669753074645996, 15.669753074645996, 15.669753074645996, 15.669753074645996, 15.669753074645996, 15.669753074645996, 15.669753074645996, 15.669753074645996, 15.669753074645996, 15.669753074645996, 13.598846435546875, 13.598846435546875, 13.598846435546875, 13.598846435546875, 13.598846435546875, 13.598846435546875, 13.598846435546875, 13.598846435546875, 13.598846435546875, 13.598846435546875, 13.598846435546875, 13.598846435546875, 13.598846435546875, 13.598846435546875, 13.598846435546875, 13.598846435546875, 13.598846435546875, 13.598846435546875, 13.598846435546875, 13.598846435546875, 13.598846435546875, 13.598846435546875, 13.598846435546875, 13.598846435546875, 13.598846435546875, 13.598846435546875, 13.598846435546875, 13.598846435546875, 13.598846435546875, 13.598846435546875, 13.598846435546875, 13.598846435546875, 13.598846435546875, 13.598846435546875, 13.598846435546875, 13.598846435546875, 13.598846435546875, 13.598846435546875, 13.598846435546875, 13.598846435546875 ], "content": [ "They have started to define their own markup named Mallard .", "But rather how to integrate mallard into my gtk3 help .", "By .page files you mean Mallard", "However I do not know how to code such that when the help menu item is clicked the help mallard is shown .", "I like to use mallard to display some help about how to use my application .", "Please note I am not asking how to create help files using mallard .", "Static webpages are documentation not help .", "But I find Sphinx very convenient for writing application documentation as well thanks to the reStructured Text format .", "Then when the user clicks Help Contents they open the URI help : gedit or help : gedit link id with gtk show uri see here http : git.gnome.org browse gedit tree gedit gedit-app.c in the functions gedit app show help impl and gedit app help link id impl The files are then presumably automatically fetched by the desktop help system translated into the proper language and displayed in Yelp .", "I m viewing the Rhythmbox documentation using Yelp .", "There doesn t seem to be a way to find that out using the Yelp documentation viewer .", "Backstory : I m viewing documentation generated using g-ir-doc-tool .", "First look here http : git.gnome.org browse gedit tree help at how they organize their help files : .. . .. . In help Makefile.am they use @YELP HELP RULES@ to install the files which is set up by YELP HELP INIT in configure.ac .", "Such documentation tools are a dime a dozen .", "Help is integrated with an application .", "The help consists of .page files https : github.com umpirsky revision-monitor tree master help C .", "I would like to export this help to HTML CSS and publish it as online help on app website .", "I will write help for my PyGTK app .", "For example you can use Sphinx http : sphinx-doc.org to write beautiful documentation with a full-text search support", "we produce documentation for different products from one 80 common source base .", "Most of them are more suitable to SDK docs than application help though .", "The CHM based help solved that allowing for one set of routines to access helpdata on all systems .", "4 . indexing and toc are Btree based and can be easily merged runtime from independently produced help sets .", "The reasons to avoid loose static html were mostly : .. . .. . 1 . the 60000 lemma static documentation took too long to install on lighter systems or systems with specialist filesystems .", "And it would not offer any kind of fulltext searching separated bookmarks and even the simple fact of not opening a new tab for each help call .", "I am trying to create my own gtk3 application .", "I have the .page files already ready .", "Good question .", "In cases like this I always look on git.gnome.org to see how Gedit does it .", "That s an excellent example application .", "It s useful but a few things are missing .", "Sometimes I want to view all subclasses of a particular class .", "Eg .", "RB.Source has children RB.AutoPlaylistSource RB.BrowserSource RB.MediaPlayerSource RB.PlaylistSource .", "Is there a way to view such information", "It s not so much an issue with Yelp .", "Yelp just shows the pages that were generated with g-ir-doc-tool which unfortunately do not include known subclasses at this time .", "g-ir-doc-tool is still very much a work in progress .", "You should file an enhancement request at bugzilla.gnome.org product glib component introspection .", "https : bugzilla.gnome.org enter bug.cgi product glib component introspection https : bugzilla.gnome.org enter bug.cgi product glib component introspection", "Is there a tool which can export it to HTML CSS or some other standard format", "Use yelp-build like so :", "On windows CHM is a very good option .", "Is there anything other then delivering a static set of HTML pages and using a primitive call to a webbrowser which is even a problem itself on linux .", "What about man pages", "en.wikipedia.org wiki Man page http : en.wikipedia.org wiki Man page", "man pages for a GUI program .", "Sorry .", "And delivering troff man pages is even worse then HTML .", "Yes i m old enough to know troff .", "The Gnome yelp http : projects.gnome.org yelp program is what is used for GTK Gnome applications .", "It supports a number of formats but not CHM directly .", "But I don t know what is the status of that .", "I d still recommend static HTML as the best option and of course man pages .", "I prefer latex with a tex4ht and some minor DOM based postprocessing .", "But for me PDF is the main target format .", "That s true .", "Moreover Sphinx has LaTeX PDF Man pages CHM ePub and many more builders beside the HTML document builder .", "I m looking for a solution for an application manual .", "While I like reStructed Text i have a lot more requirements .", "Like conditional-compilation .", "We have our home made XML processor so the question is just about delivery .", "There are CHM viewers available on Linux though frankly as a Linux user I d prefer to get static HTML pages .", "Some examples are chmsee and kchmviewer .", "Afaik there is no universal system .", "Depending on your desktop system gnome kde there might be helpsystems but they are usually based on loose files and use full-blown browsers .", "usually webkit based .. . .. . For Lazarus http : lazarus.freepascal.org a CHM based helpsystem and embedded-browser was created including CHM write support .", "2 .", "CHM removes slack and adds compression .", "3 . we also support non posix and OS X systems and little filesystem related problems charsets encoding separators path depth etc and case insenstive filesystems on nix caused a lot of grief .", "In general integrating independently produced helpfiles is a underappreciated aspect of helpfiles in general while key to open platforms .", "5 . native fulltext search .", "An own viewer also has the ability to take advantage of extra features on top of the base system .", "I m not mentioning the Lazarus system in the hope you adapt it since it is at the moment too much a development system SDK oriented system the viewer is not even available as a separate package .", "I mainly mention it to illustrate the problems of loose html .", "I haven t investigate KDE Gnome Eclipse what they use as helpsystem for a while though .", "If I would have to restart from scratch that s where I would look first .", "If I had to create something myself quickly I would use zipped static html and a single gziped file with metadata indexes and the lightest browser Konquerer", "I could find .", "Not ideal not like Windows but apparently the best Linux can offer ." ] }
{ "confidence": [ 65.3368911743164, 51.04012680053711, 50.8175163269043, 21.874881744384766, 19.89307403564453, 18.984294891357422, 17.30859375 ], "content": [ "Question : I am trying to create my own gtk3 application . I like to use mallard to display some help about how to use my application . However I do not know how to code such that when the help menu item is clicked the help mallard is shown . I have the .page files already ready . Please note I am not asking how to create help files using mallard . But rather how to integrate mallard into my gtk3 help . .. . Answer : Good question . In cases like this I always look on git.gnome.org to see how Gedit does it . That s an excellent example application . First look here http : git.gnome.org browse gedit tree help at how they organize their help files : .. . .. . In help Makefile.am they use @YELP HELP RULES@ to install the files which is set up by YELP HELP INIT in configure.ac . Then when the user clicks Help Contents they open the URI help : gedit or help : gedit link id with gtk show uri see here http : git.gnome.org browse gedit tree gedit gedit-app.c in the functions gedit app show help impl and gedit app help link id impl The files are then presumably automatically fetched by the desktop help system translated into the proper language and displayed in Yelp .", "Question : On windows CHM is a very good option . Is there anything other then delivering a static set of HTML pages and using a primitive call to a webbrowser which is even a problem itself on linux . And it would not offer any kind of fulltext searching separated bookmarks and even the simple fact of not opening a new tab for each help call . Comment : What about man pages en.wikipedia.org wiki Man page http : en.wikipedia.org wiki Man page Comment : man pages for a GUI program . Sorry . And delivering troff man pages is even worse then HTML . Yes i m old enough to know troff . .. . Answer : The Gnome yelp http : projects.gnome.org yelp program is what is used for GTK Gnome applications . It supports a number of formats but not CHM directly . They have started to define their own markup named Mallard . But I don t know what is the status of that .", "Question : I will write help for my PyGTK app . The help consists of .page files https : github.com umpirsky revision-monitor tree master help C . I would like to export this help to HTML CSS and publish it as online help on app website . Is there a tool which can export it to HTML CSS or some other standard format .. . Answer : By .page files you mean Mallard Use yelp-build like so :", "Question : On windows CHM is a very good option . Is there anything other then delivering a static set of HTML pages and using a primitive call to a webbrowser which is even a problem itself on linux . And it would not offer any kind of fulltext searching separated bookmarks and even the simple fact of not opening a new tab for each help call . Comment : What about man pages en.wikipedia.org wiki Man page http : en.wikipedia.org wiki Man page Comment : man pages for a GUI program . Sorry . And delivering troff man pages is even worse then HTML . Yes i m old enough to know troff . .. . Answer : I d still recommend static HTML as the best option and of course man pages . For example you can use Sphinx http : sphinx-doc.org to write beautiful documentation with a full-text search support Comment : Such documentation tools are a dime a dozen . Most of them are more suitable to SDK docs than application help though . I prefer latex with a tex4ht and some minor DOM based postprocessing . But for me PDF is the main target format . Comment : That s true . But I find Sphinx very convenient for writing application documentation as well thanks to the reStructured Text format . Moreover Sphinx has LaTeX PDF Man pages CHM ePub and many more builders beside the HTML document builder . Comment : I m looking for a solution for an application manual . While I like reStructed Text i have a lot more requirements . Like conditional-compilation . we produce documentation for different products from one 80 common source base . We have our home made XML processor so the question is just about delivery .", "Question : I m viewing the Rhythmbox documentation using Yelp . It s useful but a few things are missing . Sometimes I want to view all subclasses of a particular class . There doesn t seem to be a way to find that out using the Yelp documentation viewer . Eg . RB.Source has children RB.AutoPlaylistSource RB.BrowserSource RB.MediaPlayerSource RB.PlaylistSource . Is there a way to view such information Backstory : I m viewing documentation generated using g-ir-doc-tool . .. . Answer : It s not so much an issue with Yelp . Yelp just shows the pages that were generated with g-ir-doc-tool which unfortunately do not include known subclasses at this time . g-ir-doc-tool is still very much a work in progress . You should file an enhancement request at bugzilla.gnome.org product glib component introspection . https : bugzilla.gnome.org enter bug.cgi product glib component introspection https : bugzilla.gnome.org enter bug.cgi product glib component introspection", "Question : On windows CHM is a very good option . Is there anything other then delivering a static set of HTML pages and using a primitive call to a webbrowser which is even a problem itself on linux . And it would not offer any kind of fulltext searching separated bookmarks and even the simple fact of not opening a new tab for each help call . Comment : What about man pages en.wikipedia.org wiki Man page http : en.wikipedia.org wiki Man page Comment : man pages for a GUI program . Sorry . And delivering troff man pages is even worse then HTML . Yes i m old enough to know troff . .. . Answer : There are CHM viewers available on Linux though frankly as a Linux user I d prefer to get static HTML pages . Some examples are chmsee and kchmviewer . Comment : Static webpages are documentation not help . Help is integrated with an application .", "Question : On windows CHM is a very good option . Is there anything other then delivering a static set of HTML pages and using a primitive call to a webbrowser which is even a problem itself on linux . And it would not offer any kind of fulltext searching separated bookmarks and even the simple fact of not opening a new tab for each help call . Comment : What about man pages en.wikipedia.org wiki Man page http : en.wikipedia.org wiki Man page Comment : man pages for a GUI program . Sorry . And delivering troff man pages is even worse then HTML . Yes i m old enough to know troff . .. . Answer : Afaik there is no universal system . Depending on your desktop system gnome kde there might be helpsystems but they are usually based on loose files and use full-blown browsers . usually webkit based .. . .. . For Lazarus http : lazarus.freepascal.org a CHM based helpsystem and embedded-browser was created including CHM write support . The reasons to avoid loose static html were mostly : .. . .. . 1 . the 60000 lemma static documentation took too long to install on lighter systems or systems with specialist filesystems . 2 . CHM removes slack and adds compression . 3 . we also support non posix and OS X systems and little filesystem related problems charsets encoding separators path depth etc and case insenstive filesystems on nix caused a lot of grief . The CHM based help solved that allowing for one set of routines to access helpdata on all systems . 4 . indexing and toc are Btree based and can be easily merged runtime from independently produced help sets . In general integrating independently produced helpfiles is a underappreciated aspect of helpfiles in general while key to open platforms . 5 . native fulltext search . An own viewer also has the ability to take advantage of extra features on top of the base system . I m not mentioning the Lazarus system in the hope you adapt it since it is at the moment too much a development system SDK oriented system the viewer is not even available as a separate package . I mainly mention it to illustrate the problems of loose html . I haven t investigate KDE Gnome Eclipse what they use as helpsystem for a while though . If I would have to restart from scratch that s where I would look first . If I had to create something myself quickly I would use zipped static html and a single gziped file with metadata indexes and the lightest browser Konquerer I could find . Not ideal not like Windows but apparently the best Linux can offer ." ] }
[ "yes-answer-long", "yes-answer-short" ]
user
UNK_RELATION
iccube@javascript@87
iccube -- a java in-memory olap mdx server coupled with a modern web tablet reporting @placeholder solution .
{ "confidence": [ 44.898990631103516, 41.315216064453125, 38.822998046875, 38.21942138671875, 38.026607513427734, 37.961971282958984, 37.2683219909668, 37.231361389160156, 36.73395538330078, 36.24237060546875, 35.80756378173828, 34.38763427734375, 34.28643798828125, 34.27804183959961, 34.159637451171875, 33.89716720581055, 33.443946838378906, 33.24102783203125, 33.09130859375, 32.17702102661133, 32.090797424316406, 31.819499969482422, 31.559894561767578, 31.54823875427246, 31.41440200805664, 31.372215270996094, 30.994430541992188, 30.994430541992188, 30.793548583984375, 30.533945083618164, 30.474201202392578, 30.274253845214844, 30.154258728027344, 30.154258728027344, 30.154258728027344, 30.13552474975586, 30.13552474975586, 30.096416473388672, 30.005901336669922, 29.76291275024414, 29.726360321044922, 29.520679473876953, 29.268157958984375, 29.268157958984375, 29.268157958984375, 29.268157958984375, 29.268157958984375, 29.268157958984375, 29.268157958984375, 28.90129280090332, 28.89037322998047, 28.89037322998047, 28.79833221435547, 28.63015365600586, 28.5756893157959, 28.5357608795166, 28.508346557617188, 28.508344650268555, 28.003276824951172, 27.81389617919922, 27.799270629882812, 27.706745147705078, 27.706745147705078, 27.634504318237305, 27.634504318237305, 27.634504318237305, 27.634504318237305, 27.634504318237305, 27.585281372070312, 27.585281372070312, 27.52120018005371, 27.52120018005371, 27.2567195892334, 27.2567195892334, 27.2567195892334, 27.2567195892334, 27.2567195892334, 27.2567195892334, 27.254493713378906, 27.248432159423828, 27.064464569091797, 26.80658721923828, 26.770360946655273, 26.68667984008789, 26.68667984008789, 26.68667984008789, 26.68667984008789, 26.538352966308594, 26.230770111083984, 26.230770111083984, 26.2165584564209, 26.156328201293945, 26.1422061920166, 25.90560531616211, 25.881000518798828, 25.815711975097656, 25.815711975097656, 25.682727813720703, 25.581647872924805, 25.46540069580078 ], "content": [ "My icCube version : icCube Web Reporting : 5.1.1 6 : 2229", "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 .", "How can i do that in icCube OLAP .", "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", "Follow-up question to this http : stackoverflow.com questions 33824150 iccube-how-to-do-authentication-for-iccube-using-an-apache-web-server .", "I would try the request in the icCube MDX editor .", "Note 2 your Web App will contain the icCube Web Reporting application as well .", "Follow-up question to this http : stackoverflow.com questions 33824150 iccube-how-to-do-authentication-for-iccube-using-an-apache-web-server .", "Is there any way to add a JAR to icCube install to make it available to MDX JAVA integration JDBC data source etc.. .", "I am using icCube 5.0 Reporting .. . 2 .", "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", "But then IcCube does not load because .. . .. . When doing so however the level pk office appears on the treeview of the MDX designer .", "The Application page is hosted on a server different to the IcCube-server .", "In the icCube.4.0 folder is all the information stored of the IcCube server .", "The Postgresql server it loads from is not running any query for the icCube server .", "is your olap server free", "First third and forth solutions are suitable for non-embedded iccube-reporting .", "As icCube is using jQuery here is a possible solution using the when done feature of jQuery .", "Logging into my icCube interface solves the errors as that authorizes my browser session to get data from my icCube server .", "Working with an amchart bubble in iccube reporting If I leave the default balloon behavior I get", "To change this you need to modify icCube.xml and restart icCube Server .", "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 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.. .", "configuration and let non-authenticated requests reaching the icCube server .", "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.. .", "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 .", "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 .", "example enclosed you need to activate javascript 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 .", "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", "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 .", "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 .", "Ok so I must buy icCube server to have this service", "This is currently not possible on the server-side with the MDX request .", "Is the MDX statement row axis the products", "Sorry I am such an MDX rookie .", "We are using icCube 5.1.8 and are having problems with loads that seem to freeze .", "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", "Apache Configuration Overview : If I set these proxy parameters in my server config what exactly is forwarded to IcCube", "This means that my WebApp is not authorized to fetch the .css and similar resources from the icCube-server .", "I want to create a cube Data Source based on an existing OLAP Database in SQL server analysis services .", "I want to Access SSAS Database wich contain OLAP cubes with iceCube not accessing an SQL Server tables", "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 want to get selected items from iccube-dropdown-widget with javascript .", "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 .", "When I use the WebApp passing login information for a user the function GetAllReportNames fetches all available reports from our icCube server .", "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 .", "icCube server is deployed on a secured server so I could do without its integrated authentication process as well if that makes things easier .", "Now I want to filter the category-tree by status is online true .. . .. . My current MDX is : .. . .. . I get this error : .. . .. . Does anyone know a solution", "It s the easiest solution .", "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 .", "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 .", "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 .", "I wonder if there is a solution for this situation because on each time I update or change the data base I must go to icCube server and clicked on .. . .. . Rafraichir les tables de la source de donn es .. . .. . I want to fix a p riode or have a solution to refresh the data source automatically ." ] }
{ "confidence": [ 57.75678253173828, 55.236366271972656, 51.7961311340332, 50.2259407043457, 50.2259407043457, 48.07819366455078, 47.70917510986328, 47.62395477294922, 46.27116012573242, 45.9598388671875, 45.62886428833008, 45.104248046875, 44.31281280517578, 44.25517272949219, 43.929443359375, 43.444732666015625, 43.30354309082031, 41.60032653808594, 41.426963806152344, 41.27003479003906 ], "content": [ "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 : 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 : 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 : 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 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 : 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 : 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 : 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 : 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 : 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 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 : In the icCube.4.0 folder is all the information stored of the IcCube server . If I change a icc-schema file the changes will take effect after the next restart of the server . Is it possible to do some changes on files in this folder which take immediate effect or is there a function I can use on the shell to put those changes into the server Also is there a similar option for reports .. . Answer : There are two different scenarios when changing a file directly from the file system : .. . .. . If you changed the files in cubes then the latest file version will be used when the schema is loaded . To see the latest version in the UI you can refresh the panel as described below . If you changed the files in builder and you re using the IDE you ve to refresh manually the SCHEMA MANAGER panel it s the little wheel in the right . enter image description here http : i.stack.imgur.com 99uV8.png Comment : Thank you for your quick answer . Is there something similar for Reports so can I somehow find the reports in icCube.4.0 somewhere or do I have to Export the report via Browser modify and import again Comment : @ic3 - mdx tag has been proposed for documentation - can you add your vote please as we need several votes to create the documentation for this tag : stackoverflow.com documentation mdx Comment : @Ulrich : this is currently not possible reports are saved into a JCR repository .", "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 : 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 .", "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 : I want to filter a dimension on its properties . My Dimension consists of various categories with parent Leaf-categories . Each Category has an online status true or false . Within the dimension I define the property is online . Now I want to filter the category-tree by status is online true .. . .. . My current MDX is : .. . .. . I get this error : .. . .. . Does anyone know a solution My Version of IcCube is V 5.1.6 .. . .. . Dimension Property definition http : i.stack.imgur.com ItsyW.png .. . Answer : A member of Categories .allmembers is missing the property is online . My educated guess would be the All member that if default has no user defined properties . Maybe something like : .. . .. . We ll improve the error message in the following version issues http : issues.iccube.com issue ic3pub-217 Comment : here too . I get the same Error : the property is not found Comment : you ve a debugger in icCube have you tried to used it" ] }
[ "yes-answer-long", "yes-answer-short" ]
javascript
UNK_RELATION
app42@backend@65
app42 -- app42 is an api for the platform as a service paas and @placeholder as a service baas offering of shephertz .
{ "confidence": [ 55.919002532958984, 55.14304733276367, 53.90446472167969, 52.516807556152344, 50.75920104980469, 50.35338592529297, 49.00223159790039, 47.751251220703125, 47.751251220703125, 47.63286590576172, 46.35957717895508, 45.5178337097168, 44.49612808227539, 42.413780212402344, 41.435455322265625, 41.435455322265625, 39.72779846191406, 39.47870635986328, 38.32986831665039, 37.7039909362793, 36.84539794921875, 36.687652587890625, 36.687652587890625, 34.820648193359375, 34.820648193359375, 34.315032958984375, 33.58206558227539, 33.58206558227539, 32.64234161376953, 32.09759521484375, 32.09759521484375, 32.09759521484375, 30.676311492919922, 30.30091094970703, 29.191837310791016, 28.66033935546875, 28.66033935546875, 26.237382888793945, 22.63734245300293, 21.69368553161621, 21.58670425415039, 21.076793670654297, 20.190349578857422, 18.35373878479004, 17.054014205932617, 16.9179630279541, 16.9179630279541, 16.9179630279541, 16.9179630279541, 16.9179630279541, 16.9179630279541, 16.9179630279541, 16.9179630279541, 16.9179630279541, 16.9179630279541, 16.9179630279541, 16.9179630279541, 16.9179630279541, 16.9179630279541, 16.9179630279541, 16.9179630279541, 16.9179630279541, 16.9179630279541, 16.9179630279541, 16.9179630279541, 16.9179630279541, 16.9179630279541, 16.9179630279541, 16.9179630279541, 16.9179630279541, 16.220521926879883, 16.220521926879883, 16.220521926879883, 16.049821853637695, 15.710405349731445, 14.471824645996094, 14.471824645996094, 14.126906394958496, 14.126906394958496, 14.126906394958496, 14.126906394958496, 14.126906394958496, 14.126906394958496, 14.126906394958496, 14.126906394958496, 14.126906394958496, 13.877264022827148, 13.877264022827148, 13.28016471862793, 12.259902000427246, 12.259902000427246, 12.259902000427246, 12.259902000427246, 12.259902000427246, 12.259902000427246, 12.259902000427246, 12.259902000427246, 12.259902000427246, 12.259902000427246, 12.259902000427246 ], "content": [ "api.shephertz.com app42-docs user-management-service http : api.shephertz.com app42-docs user-management-service sdk android initialize", "I m implementing a leaderboard service with App42 Unity SDK .", "I m using the Push Notification service of Shephertz s App42 .", "So I ve created test application to test app42 BaaS .", "Through dashboard its not possible however you can write a custom script in which you can pic the files make a chunk of 50 or 100 to upload your files on App42 server using App42 File Upload API http : api.shephertz.com app42-docs file-upload-service .", "unfortunately cant add the tag for app42 .", "I m trying to integrate App42 Leaderboard Service to my Cocos2D-X Game .", "I am using App42 for my mobile backend .", "I think App42 does not support this for uploads .", "App42 was initialized in TestApplication.java .", "You have to initialize the App42 API instance first to call the method of User Service .", "I have been trying to connect my web app to BaaS called app42-apphq.shephertz.com .. . .. . Is there a guide on how to do it", "I am giving a try with the app42 PaaS solution from Shephertz http : api.shephertz.com app42-dev.php and especially its CustomCode feature http : api.shephertz.com tutorial Server-Side-Custom-Code index customcode wrd to deploy Java server-side code .", "The problem occur here and I got this error : .. . .. . Fatal error : Uncaught exception com shephertz app42 paas sdk php App42NotFoundException in home vhosts www.kanpot2002.com 1.2 RestClient.class.php : 324 Stack trace : .. . .. . 0 home vhosts www.kanpot2002.com 1.2 PushNotificationService.php 239 : com shephertz app42 paas sdk php connection RestClient : : post https : api.she .. . Array NULL NULL application jso.. . application jso.. . app42 : push.. . .. . .. . 1 home vhosts www.kanpot2002.com PushNotificationManager.php 34 : com shephertz app42 paas sdk php push PushNotificationService- sendPushMessageToUser 563043561 FIRST NAME has .. . .. . .. . 2 home vhosts www.kanpot2002.com addbestscore.php 85 : PushNotificationManager- SendMessageToUser 563043561 FIRST NAME has .. . .. . .. . 3 main thrown in home vhosts www.kanpot2002.com 1.2 RestClient.class.php on line 324 .. . .. . .. . Then I try using this .. . .. . try pushNotification pushNotificationService- sendPushMessageToUser user message catch Exception e .. . .. . The result is better .", "I m using app42 to sand and receive push notifications .", "Actually I didn t find any proguard settings for App42 .. .", "Is it possible to deactive an app all requests will get a error answer from the app42 service for a while or even better for all except one special user update the database and after everything is valid again reactivate the app again", "I am posting an Android sample code for date search in App42 json storage .", "Player1 also register facebook id as userId of App42 Push Notification .", "I am trying to Link Facebook User With App42 I can login to facebook and that works however I cant link the user with app42 I get an exception .", "Seems App42 doesn t connect to APNS but I have no idea why .", "If you are using App42 Phone Gap Sample https : github.com VishnuGShephertz Android-Push-Notification-in-PhoneGap-application .", ": it contains .. . .. . registerForPush GCMRegId function is written in index.html file its not the part of app42.js .", "I m using App42 Custom-Code feature I want to know how objects are instantiated i.e .", "The regular URL is too long for using in App42 private messages so it is a blocking issue .", "What I do : .. . I follow this guide http : api.shephertz.com tutorial Push-Notification-iOS index pn-ios : .. . .. . -make App42 compatible .p12 certificates using .p12- .pem- .p12 transformation .. . - upload this certificates on App42 they are highlighted in green on the server .. . - download and install the latest App42 SDK ver.2.1 for Cocos2d-x .. . - register push notifications in Appcontroller.mm : .. . .. . -bind App42 with APNS in my singleton App42Methods : .. . .. . So registration process is fine .", "In documentation of App42 if you don t start from the Getting Started you miss a lot of things .", "The core functionality Sending Scores to Server and retrieving them just the way shown on the App42 site.. . is working fine .", "in logs on the server App42 Cloud API - Unified Notifications - Push Users I can see the created user with the correct device token .", "Context : .. . I m trying to migrate my cocos2d-x v.3.8.1 application from Parse to App42 .", "I can try App42 SDK for iOS also but this would lead to rewrite the whole App42Methods class .", "If you still face the issue then you can write at support@shephertz.com or App42 community forum http : forum.shephertz.com for quick resolution .", "enter image description here http : i.stack.imgur.com eYLh8.png .. . .. . .. . .. . - or from the App42 management console POST is successful but returns failure message", "App42 jar has dependency on some external jars like commons-logging-1.1.1 commons-logging-api-1.1.1 httpclient-4.1 httpcore-4.1 json-org .", "Please make sure that your p12 file password is correct that you have used to store it on App42 server through management console .", "I m trying to deploy my custom code in App42 and keep getting the following error message : .. . .. . what does that error means if my class violates any restrictions of the java sandbox shouldn t the message be clearer", "I m using the App42 Unity SDK for uploading binary files it used to work just fine but now I ve started to get null when retrieving the tiny url by calling fileList i .GetTinyUrl just as a documentation shows .", "blogs.shephertz.com 2014 10 17 http : blogs.shephertz.com 2014 10 17 migrating-data-from-other-baas-providers more-9084", "Sometimes when tiny url service is not available it might return null however you can convert it by your own by calling tiny url service from your app.See this tutorial for the same http : www.codeforest.net how-to-shorten-url-using-tinyurl-service", "Create a new instance of service when ever you call method of it Like this :", "I get Push notification service registered", "I am currently working on implementing a login-system using app42api s user service .", "I managed to correctly deploy one version of my server-side CustomCode jar using ant deploy command like in the provided sample https : github.com shephertz App42 CustomCode Sample .", "How can I unsubscribe unregister from my device and or from server apns service", "As you are using us.authenticate usr pw network API on main UI Thread .", "I need to put date field in my JSON that I am saving and further do a query on it for date search .", "I am not able to find it in document .", "Can anybody please let me know what is the required date-format to do this", "You are not mentioned that which SDK you are using .", "Is this possible", "Or do I have to upload one document after another", "Which needs very long if you want to upload thousends of documents.. . As with downloading bulking together 100 documents would be quite nice.. . .. . .. . Is this somehow possible", "Naresh", "You mean writing a function that uploads 100 files one after another", "I can t find anything better than that.. . And I would like to upload json documents.. .", "But not one after another but an array of objects or so.. .", "Because uploading one after another takes quite a lot of time.. .", "Although the data is not much... .", "Uploading a JSON array is not a recommended way to do because if you upload the JSON array you will not able to find a specific key in that array .", "Also when you fetch the document it will always download the whole data which also impact on the network bandwidth .", "I know.. .", "But it would be technically possible to send an array to the server just for fast transmittment and the response could be an array as well.. .", "I want SEPERATE documents on the server I just want to send a bunch of documents at once.. .", "Btw in my case I am creating 1500 documents this needs about 30 min or so just estimated.. .", "You can import your data from AppHQ Management Console through .json file .", "Have a look at this blog post let me know if it helps .", "You can easily deactivate your app through dashboard .", "Follow just simple steps : .. . .. . Login to your AppHQ Management Console .. . Click on View Apps under App Manager section .. . Click on Disable to deactivate your app .. . .. . Same you can follow when you have to activate click on enable .", "Let me know if it helps .", "this seems to be the only possibility.. . not what I wanted but the only solution. . thanks though", "The length should be less than 25 and the following characters are not allowed .. . .. . .. . .. . See the API reference .", "http : appwarp.shephertz.com game-development-center csharp-api-reference connect .. . .. . Hope it helps .", "I added in the following jars : httpcore-4.1.jar httpcore-1.1.1.jar commons.logging-1.1.1 commons-logging-api-1.1.1 .", "Please have a look at below link-to get the code snippet to initialize the App42API instance Put your access credentials which you have received after the success of App Creation and put this code snippet before calling createUser method of User Service .", "Just a little mess of storing and reading it back with kind of a limited API I ve got to work with SQLite in Unity but not more than a couple of hours .", "I m totally new in this anyway I have downloaded the sample file for unity and I have passed the API key and secret-key in constant file .", "I want a sample unity file that contain all the code required to do that the only thing I have to modify is the secret and API key .", "When I try to register use using the JS function registerForPush called via JAVA this message shows in LOG : .. . .. . CordovaLog 3108 : : Line 1 : Uncaught ReferenceError : registerForPush is not defined .. . .. . Please help .", "Regards", "So if you want to customize it in your own app you can use below code in Html file .", "var push new App42Push push.storeDeviceToken Your userName GCMRegId ANDROID", "I create a query to check if there exists new data .", "I compile my app in debug mode run it and everything works fine .", "If I compile it in release-mode I get a NullPointerException .. . .. . .. . Can this be related to proguard", "I use version 3.0.1.. .", "Following proguard setting seems to work : .. . .. . There may be a better solution but I could not find any documentation.. .", "2015-05-22 17 : 55 : 19 - Dex Loader Unable to execute dex : Multiple dex files define Lorg apache-commons-logging Log 2015-05-22 17 : 55 : 19 - wurfle-gdx-android Conversion to Dalvik format failed : Unable to execute dex : Multiple dex files define Lorg apache-commons-logging Log .. . .. . I can run my app on desktop but I have not initialized the app42api connection so desktop will not run the api .", "I would like to suggest you to use our async API .. . .. . UserService userService App42API.buildUserService .. . userService.authenticate userName pwd new App42CallBack .. . public void onSuccess Object response .. . .. . User user User response .. . System.out.println userName is + user.getUserName .. . System.out.println sessionId is + user.getSessionId .. . .. . public void onException Exception ex .. . .. . System.out.println Exception Message : +ex.getMessage .. . .. . .. . Once you will get the response use runOnUIThread to update on UI Thread .", "When I run my game after putting the required text in the text fields the input used for account creation I get the following error : .. . .. . I am guessing that it isn t connecting properly to AppWarp s api but I am not sure on how to fix it .", "I m creating an Android Application and I want to use the offline storage .", "App must save the information in offline storage information about Tonya in JSON string and when Internet connection is available it must send this information to the online DB .", "Well according to the log Tonya was written offline but it does not appear when I use findAllDocuments .", "And when the internet-connection became available it didn t synchronize with the online DB .", "I ve tried to use different Android and SDK versions it didn t help .", "What am I doing wrong", "This is AndroidManifest.xml : .. . .. . This is TestApplication.java : .. . .. . This is MainActivity.java :", "is there a single instance of my class that implements Executer and the function execute is called for every request or a new instance is instantiated for every request .", "When request arrives at server new instance is created for that request and execute method is called on the same .", "Also Executor class get unloaded after processing your request .", "Are you using any internal class in your code" ] }
{ "confidence": [ 81.74076843261719, 72.24797821044922, 67.79804992675781, 60.917625427246094, 58.9189453125, 57.2373046875, 55.924659729003906, 55.89534378051758, 55.77153015136719, 51.820350646972656, 50.23371887207031, 48.57718276977539, 48.0067138671875, 44.12598419189453, 44.1234130859375, 43.437042236328125, 42.23907470703125, 35.18894958496094, 32.84653091430664, 26.898881912231445 ], "content": [ "Question : I m using the Push Notification service of Shephertz s App42 . I m trying to send the push-notification to a user whenever another player beat his score . What I m doing is player1 register his score and facebook id to mySQL server . Player1 also register facebook id as userId of App42 Push Notification . Then player2 do the same but with score more than player1 . Then the PHP code that manage user score will check that player2 s score is more than player1 s . So I use this PHP code to send Push Notification to player1 .. . .. . pushNotification pushNotificationService- sendPushMessageToUser user message .. . .. . If player1 has registered his userId with AppHQ then it s working very fine . But in some case including the test player1 haven t registered to AppHQ just yet maybe he didn t want to allow push-notification . The problem occur here and I got this error : .. . .. . Fatal error : Uncaught exception com shephertz app42 paas sdk php App42NotFoundException in home vhosts www.kanpot2002.com 1.2 RestClient.class.php : 324 Stack trace : .. . .. . 0 home vhosts www.kanpot2002.com 1.2 PushNotificationService.php 239 : com shephertz app42 paas sdk php connection RestClient : : post https : api.she .. . Array NULL NULL application jso.. . application jso.. . app42 : push.. . .. . .. . 1 home vhosts www.kanpot2002.com PushNotificationManager.php 34 : com shephertz app42 paas sdk php push PushNotificationService- sendPushMessageToUser 563043561 FIRST NAME has .. . .. . .. . 2 home vhosts www.kanpot2002.com addbestscore.php 85 : PushNotificationManager- SendMessageToUser 563043561 FIRST NAME has .. . .. . .. . 3 main thrown in home vhosts www.kanpot2002.com 1.2 RestClient.class.php on line 324 .. . .. . .. . Then I try using this .. . .. . try pushNotification pushNotificationService- sendPushMessageToUser user message catch Exception e .. . .. . The result is better . The first user with no userId is catched and has no error . But the second user gave me this error as-if it ignore the try-catch statement .. . .. . Fatal error : Call to a member function get on a non-object in home vhosts www.kanpot2002.com 1.2 PushNotificationResponseBuilder.php on line 23 .. . .. . .. . I m really stucked at this . Please help Thanks .. . .. . kanpot2002 Comment : I think this solution will work. . .. . Answer : Create a new instance of service when ever you call method of it Like this : Comment : Thanks I ll try out .", "Question : I am giving a try with the app42 PaaS solution from Shephertz http : api.shephertz.com app42-dev.php and especially its CustomCode feature http : api.shephertz.com tutorial Server-Side-Custom-Code index customcode wrd to deploy Java server-side code . I managed to correctly deploy one version of my server-side CustomCode jar using ant deploy command like in the provided sample https : github.com shephertz App42 CustomCode Sample . The problem is that I can t undeploy it .. . .. . either from the ant undeploy command cf . this error .. . .. . enter image description here http : i.stack.imgur.com ylS0d.png the html returned looking like this enter image description here http : i.stack.imgur.com eYLh8.png .. . .. . .. . .. . - or from the App42 management console POST is successful but returns failure message enter image description here http : i.stack.imgur.com IBRvz.png .. . .. . .. . .. . Obviously this prevents me to deploy a new version of this jar cf . this error enter image description here http : i.stack.imgur.com dQe7L.png .. . Answer : It has been answered at our forum here . See this http : forum.shephertz.com index.php 57 impossible-undeploy-customcode-therefore-impossible-version show 57 q57", "Question : Is this possible Or do I have to upload one document after another Which needs very long if you want to upload thousends of documents.. . As with downloading bulking together 100 documents would be quite nice.. . .. . .. . Is this somehow possible .. . Answer : Through dashboard its not possible however you can write a custom script in which you can pic the files make a chunk of 50 or 100 to upload your files on App42 server using App42 File Upload API http : api.shephertz.com app42-docs file-upload-service . Naresh Comment : You mean writing a function that uploads 100 files one after another I can t find anything better than that.. . And I would like to upload json documents.. . But not one after another but an array of objects or so.. . Comment : Because uploading one after another takes quite a lot of time.. . Although the data is not much... . Comment : Uploading a JSON array is not a recommended way to do because if you upload the JSON array you will not able to find a specific key in that array . Also when you fetch the document it will always download the whole data which also impact on the network bandwidth . Comment : I know.. . But it would be technically possible to send an array to the server just for fast transmittment and the response could be an array as well.. . I want SEPERATE documents on the server I just want to send a bunch of documents at once.. . I think App42 does not support this for uploads . Btw in my case I am creating 1500 documents this needs about 30 min or so just estimated.. . Comment : You can import your data from AppHQ Management Console through .json file . Have a look at this blog post let me know if it helps . blogs.shephertz.com 2014 10 17 http : blogs.shephertz.com 2014 10 17 migrating-data-from-other-baas-providers more-9084", "Question : null .. . Answer : I m creating an Android Application and I want to use the offline storage . So I ve created test application to test app42 BaaS . App42 was initialized in TestApplication.java . App must save the information in offline storage information about Tonya in JSON string and when Internet connection is available it must send this information to the online DB . Well according to the log Tonya was written offline but it does not appear when I use findAllDocuments . And when the internet-connection became available it didn t synchronize with the online DB . I ve tried to use different Android and SDK versions it didn t help . What am I doing wrong This is AndroidManifest.xml : .. . .. . This is TestApplication.java : .. . .. . This is MainActivity.java :", "Question : I m using the App42 Unity SDK for uploading binary files it used to work just fine but now I ve started to get null when retrieving the tiny url by calling fileList i .GetTinyUrl just as a documentation shows . The file is uploaded succesfully and only the tiny URL seems to be broken . The regular URL is too long for using in App42 private messages so it is a blocking issue . Any ideas .. . Answer : Sometimes when tiny url service is not available it might return null however you can convert it by your own by calling tiny url service from your app.See this tutorial for the same http : www.codeforest.net how-to-shorten-url-using-tinyurl-service", "Question : I am using App42 for my mobile backend . I need to put date field in my JSON that I am saving and further do a query on it for date search . I am not able to find it in document . Can anybody please let me know what is the required date-format to do this Comment : unfortunately cant add the tag for app42 . .. . Answer : You are not mentioned that which SDK you are using . I am posting an Android sample code for date search in App42 json storage .", "Question : I have been trying to connect my web app to BaaS called app42-apphq.shephertz.com .. . .. . Is there a guide on how to do it I have tried to read the documentation and I have connected but the problem is displaying the json response to my view because the response is looped through two arrays . This is my controller function .. . .. . And this is my view .. . Answer : I hope this may help you .. . .. . Controller .. . .. . View", "Question : I am currently developing a 2d side scroller for android and desktop using android libgdx tiled maps and AppWarp s multiplayer API s . I am trying to implement App42API s User system from which I can connect their api s to my game enabling multiplayer functionality . I have written a register script that should be registering a users account and sending it to AppWarp s Cloud DB but it s not . When I run my game after putting the required text in the text fields the input used for account creation I get the following error : .. . .. . I am guessing that it isn t connecting properly to AppWarp s api but I am not sure on how to fix it . Below is the code for my android-launcher class and my register class . I read that you had to initialize the app42api sdk by calling it in your program . .. . .. . Android Launcher : .. . .. . Register.java : .. . .. . So I hope I explained this well . I am just trying to create an account and send it to App42API s cloud . If someone could give me a hand or point me in the right direction that d be great . There isn t enough documentation on this even though it s quite powerful from what i ve seen so far . Thanks Devon .. . Answer : App42 jar has dependency on some external jars like commons-logging-1.1.1 commons-logging-api-1.1.1 httpclient-4.1 httpcore-4.1 json-org . These jars are available under lib folder of downloaded JAVA SDK zip . Please add all these jar files in your project reference . It will resolve this issue . Let us know if it helps . Comment : Thanks for the help Adding the json.org jar file fixed that error : I now have the following error when trying to register . - Error : - Exception : com.shephertz.app42.paas.sdk.android.App42Exception : java.lang.IllegalArgumentException : Empty key Exception Message : java.lang.IllegalArgumentException : Empty key Comment : You have to initialize the App42 API instance first to call the method of User Service . Please have a look at below link-to get the code snippet to initialize the App42API instance Put your access credentials which you have received after the success of App Creation and put this code snippet before calling createUser method of User Service . api.shephertz.com app42-docs user-management-service http : api.shephertz.com app42-docs user-management-service sdk android initialize", "Question : Context : .. . I m trying to migrate my cocos2d-x v.3.8.1 application from Parse to App42 . Everything is fine except the push notifications . What I do : .. . I follow this guide http : api.shephertz.com tutorial Push-Notification-iOS index pn-ios : .. . .. . -make App42 compatible .p12 certificates using .p12- .pem- .p12 transformation .. . - upload this certificates on App42 they are highlighted in green on the server .. . - download and install the latest App42 SDK ver.2.1 for Cocos2d-x .. . - register push notifications in Appcontroller.mm : .. . .. . -bind App42 with APNS in my singleton App42Methods : .. . .. . So registration process is fine . I get Push notification service registered in logs on the server App42 Cloud API - Unified Notifications - Push Users I can see the created user with the correct device token . I select it on the server and push him notification this notification is displayed as sent . But I can receive any notification on my device . I was trying to do : .. . I tried to use Push Notification Plugin https : github.com RajeevRShephertz App42Cocos2dxPushSample for Cocos2d-x with the same result . Also I used APN Tester it logs Failure performing handshake error-code -9806 . I can try App42 SDK for iOS also but this would lead to rewrite the whole App42Methods class . I would like to avoid this . Push notifications worked fine on the Parse.com . Please tell me what am I doing wrong Seems App42 doesn t connect to APNS but I have no idea why . Any help will be appreciated . .. . Answer : Handshake issue generally comes due to problem in p12 file . You can refer this post http : stackoverflow.com questions 12585858 cannot-send-push-notifications-using-javapns-javaapns-ssl-handshake-failure for the same . I will suggest you to recreate your .p12 file following the same tutorial and try . If you still face the issue then you can write at support@shephertz.com or App42 community forum http : forum.shephertz.com for quick resolution . Comment : Thank you very much for response It was due to missing apple WWDR intermediate certificate . I deleted the old certificate added new and remade .p12 files and now everything works", "Question : I m using app42 to sand and receive push notifications . When I try to register use using the JS function registerForPush called via JAVA this message shows in LOG : .. . .. . CordovaLog 3108 : : Line 1 : Uncaught ReferenceError : registerForPush is not defined .. . .. . Please help . Regards .. . Answer : If you are using App42 Phone Gap Sample https : github.com VishnuGShephertz Android-Push-Notification-in-PhoneGap-application . : it contains .. . .. . registerForPush GCMRegId function is written in index.html file its not the part of app42.js . So if you want to customize it in your own app you can use below code in Html file . var push new App42Push push.storeDeviceToken Your userName GCMRegId ANDROID", "Question : Is it possible to deactive an app all requests will get a error answer from the app42 service for a while or even better for all except one special user update the database and after everything is valid again reactivate the app again .. . Answer : You can easily deactivate your app through dashboard . Follow just simple steps : .. . .. . Login to your AppHQ Management Console .. . Click on View Apps under App Manager section .. . Click on Disable to deactivate your app .. . .. . Same you can follow when you have to activate click on enable . Let me know if it helps . Comment : this seems to be the only possibility.. . not what I wanted but the only solution. . thanks though", "Question : I m trying to integrate App42 Leaderboard Service to my Cocos2D-X Game . The core functionality Sending Scores to Server and retrieving them just the way shown on the App42 site.. . is working fine . Now i want to visualize my leaderboard data using a CCTableView . So I got a Leaderboard class inherited from CCLayer and am doing something like this : .. . .. . So as you see I am waiting for onGetTopNRankings to get called because the data for my TableView would be empty else . But what happens is that the I can t get back to init when onGetTopNRankings returns it gets stuck . So anybody got an idea why i can t return to Leaderboard : : init or got any good idea to solve this in any other way I am open for each suggestion .. . Answer : This blocks the thread endless loop . You need to fill your table view in the callback method when you have actual data . It will be empty until then . That s something your app s design has to deal with . For instance you could display a loading animation in the meantime with a cancel-button on it .", "Question : I am trying to Link Facebook User With App42 I can login to facebook and that works however I cant link the user with app42 I get an exception . I am using the following code : .. . .. . I am getting the following : .. . Answer : After go through with the code I would like to suggest you .. . .. . 1 . Create socialService object after initializing the App42API like .. . .. . App42API.initialize getApplicationContext MY API KEY MY SECRET KEY SocialService socialService App42API.buildSocialService .. . .. . 2 . The below exception occurs if you are creating SocialService before Initializing the SDK . Messagejava.lang.IllegalArgumentException : key.length 0 Comment : Thanks that works", "Question : I create a query to check if there exists new data . I compile my app in debug mode run it and everything works fine . If I compile it in release-mode I get a NullPointerException .. . .. . .. . Can this be related to proguard Actually I didn t find any proguard settings for App42 .. . I use version 3.0.1.. . .. . Answer : Following proguard setting seems to work : .. . .. . There may be a better solution but I could not find any documentation.. .", "Question : I m implementing a leaderboard service with App42 Unity SDK . The basic workflow is to save user s score first time get the returned score id as described in tutorials http : api.shephertz.com tutorial Managing-Leaderboard store it in the device local SQLite DB and then update the user score with that score id periodically . The issue is that score id returned as a string which may contain SQLite invalid characters . 0QE9+50fILUfGERTTRIxLvmRRH8 is one of such . How would you deal with the issue Comment : Could you store the string value as a binary value Comment : You can use your own custom encoding to replace + with some string and decode the same after fetching . Comment : See this stackoverflow.com questions 12615113 http : stackoverflow.com questions 12615113 how-to-escape-special-characters-like-in-sqlite-in-android Comment : Well storing it as a binary blob was the easiest way . Just a little mess of storing and reading it back with kind of a limited API I ve got to work with SQLite in Unity but not more than a couple of hours . .. . Answer : You can save your score ID in PlayerPrefs as string instead of SQLite", "Question : I m trying to integrate App42 Leaderboard Service to my Cocos2D-X Game . The core functionality Sending Scores to Server and retrieving them just the way shown on the App42 site.. . is working fine . Now i want to visualize my leaderboard data using a CCTableView . So I got a Leaderboard class inherited from CCLayer and am doing something like this : .. . .. . So as you see I am waiting for onGetTopNRankings to get called because the data for my TableView would be empty else . But what happens is that the I can t get back to init when onGetTopNRankings returns it gets stuck . So anybody got an idea why i can t return to Leaderboard : : init or got any good idea to solve this in any other way I am open for each suggestion .. . Answer : I tested your code and it is working fine in my App42Cocos2dXSample https : github.com RajeevRShephertz App42Cocos2dXSampple . The only possible reason for the issue you are getting is the owner class name of callback method in your code snippet . scoreBoardService- GetTopNRankers gameName MAX SCORES this app42callfuncND selector Leaderboard : : onGetTopNRankings .. . .. . In the above statement onGetTopNRankings belong to the class Leaderboard but while defining the callback method it belongs-to the class Helloworld : .. . .. . void HelloWorld : : onGetTopNRankings App42CallBack sender void response .. . .. . So try changing the class name from Helloworld to Leaderboard in the above statement . I hope it will work .", "Question : I m using App42 Custom-Code feature I want to know how objects are instantiated i.e . is there a single instance of my class that implements Executer and the function execute is called for every request or a new instance is instantiated for every request . .. . Answer : When request arrives at server new instance is created for that request and execute method is called on the same . Also Executor class get unloaded after processing your request .", "Question : null .. . Answer : I m trying to deploy my custom code in App42 and keep getting the following error message : .. . .. . what does that error means if my class violates any restrictions of the java sandbox shouldn t the message be clearer Comment : Are you using any internal class in your code Internal classes are not allowed to be used inside custom code . If you still think it is really needed for you and you can not proceed without that send your code to us for review and we will update your further on that . Comment : @ajay no i was just using an enum i got rid of it and everything went fine the message doesn t give any information about what s wrong plus no enums really I can always work without enums but WHY P.S . I have internal classes and I didn t have any problem with that . Comment : Sorry for confusion...We removed internal class usage restriction earlier . For enum usage I have logged the issue and will update you once it is available for use .", "Question : I m totally new in this anyway I have downloaded the sample file for unity and I have passed the API key and secret-key in constant file . when I run the file in the unity editor I got many buttons I tried to click create user but I got this error .. . .. . App42Exception : EmailAddress is Not Valid com.shephertz.app42.paas.sdk.csharp.util.Util.ThrowExceptionIfEmailNotValid System.Object obj System.String name com.shephertz.app42.paas.sdk.csharp.user.UserService.CreateUser System.String uName System.String pwd System.String emailAddress App42CallBack callBack UserTest.OnGUI at Assets scripts UserTest.cs : 49 .. . .. . .. . .. . I have change .. . .. . public string emailId EmailId for the user creation .. . .. . constant.cs script file .. . .. . and this should work without error . well I tried this and I still gets the same error . .. . .. . Do you know where can I find a sample file to create a user that contain three input field to put an email user and password and a button to create a user . I want a sample unity file that contain all the code required to do that the only thing I have to modify is the secret and API key . I just want to know how this works I found sample file that came with the SDK complicated . So I want a sample file that have create user to use it in Unity C . I m trying to create a simple 2D game in unity that required the user to create an account username email password but I didn t find enough tutorials and instructions to do that . I m new in programming so please bear with me . .. . Answer : In documentation of App42 if you don t start from the Getting Started you miss a lot of things . If you want to create user firstly you should import .. . .. . then there is a simple code that I used Comment : Thank you very much for replaying to me . I got this error Assets c pass.cs 39 27 : error CS1525 : Unexpected symbol userService Comment : Can you cross check if declaration initialization is missing for userService It will be easy to provide a fix if you can share your code-snippets . Comment : if you share your code-snippets we could help you . I think you missed a or", "Question : null .. . Answer : I m still new to iOS dev . And I m very very new to whole APNS idea . I followed many tutorials and didn t go so well . I d like to ask some questions . 1 . Can I use same .certSigningRequest file for dev dist apns certificates Does it matter if some of this certificates from this .certSigningRequest have been revoked 2 . When I export my key in keychain to .p12 file can I use this one for both dev distribute version 3 . If my server open port 2195 by giving .pem generated from above cer my server should be able to send push message right 4 . How can I unsubscribe unregister from my device and or from server apns service I mean when I need to remove and try to build run the code again . 4.1 How does .. . UIApplication sharedApplication unregisterForRemoteNotifications .. . really work Does it tell apns not to send message just turn it off How can my server provider know if device need to unsubscribe I find this tutorial really useful : http : www.raywenderlich.com 32960 apple-push-notification-services-in-ios-6-tutorial-part-1 .. . And here some questions I have about what I encountered . 1 . The sample app from the tutorial worked fine using both my laptop my server to send a message . But after a few days it doesn t . the response is still Connected to APNS Message successfully delivered but the message never reach my device .. . What could be the cause My friend have revoked a dev cert I shared acc . w my friends Or I reinstall the app I also tried method unregisterForRemoteNotifications register again but nothing happens . 2 . I also tried https : apphq.shephertz.com for a provider . This one requires .p12 key file in their format . link http : blogs.shephertz.com 2013 07 03 configure-send-push-notification-on-ios-device I have another project this one is unity register apns thru the app . It seems fine since I can see device token user store in the web . But when I tried to send message I got an error like .. . iOS KeystoreException Device ID : my-device-token : Invalid keystore password Verify settings for connecting to Apple.. . Does anyone know what this mean Sorry for my poor English . Comment : Please make sure that your p12 file password is correct that you have used to store it on App42 server through management console . Comment : @ajay I did upload it said IOS Key Submitted successfully . But I didn t know if it work or where I can see a list of my key details . Comment : You have to remember your password by your own . There is no way you can find it from somewhere . Alternatively recreate a new p12 file with new password and upload it again . Comment : @ajay OK . Thank you ." ] }
[ "yes-answer-long", "yes-answer-short" ]
backend
UNK_RELATION
moma@portability@62
moma -- the mono migration analyzer moma tool helps identify @placeholder issues for .net applications under mono .
{ "confidence": [ 39.95325469970703, 36.138519287109375, 36.138519287109375, 29.614822387695312, 25.459518432617188, 22.789642333984375, 17.305809020996094, 17.261781692504883, 17.261781692504883, 16.001190185546875, 15.969182968139648, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223 ], "content": [ "You misunderstand I need to know why MoMA is telling me that a particular line in my code will cause a NotImplementedException or why the Mono code that I m calling is tagged MonoTodo .", "I ve run MoMA and there are some places it has identified that I m calling that could throw a NotImplementedException or are tagged MonoTodo .", "For instance I m calling the ReceivedBytesThreshold setter on SerialPort and MoMA tells me that this could throw a NotImplementedException .", "I m new to Mono and plan to port my application over if possible .", "Well In my applications I just need to Add a reference to DocumentFormat.OpenXml under .Net tab and both references DocumentFormat.OpenXml and WindowsBase are always added automatically .", "So i am using Mono 2.10 as a cross compiler.While running unexpectedly my Application is terminated by saying the error message like .. . .. . Error : Could not open the selected folder .", "I am using C .net Windows Desktop Application.I want to run these application with other platform also .", "select DocumentFormat.OpenXml under references view it s properties and set the Copy Local option to True so that it copies it to the output folder .", "So when the Application is published to an external server I always place DocumentFormat.OpenXml.dll under the Bin folder manually .", "i have set a reference of the WindowsBase in C .Net 4.0 through project explorer window.But till i am not able to solve that issue...what i do next", "When I read more about MoMA s results it tells me that NotImplementedException may mean that the method is not implemented at all or under certain circumstances it may throw this exception .", "Is there anywhere I can get more information on these specific instances it s flagging down", "Therefore I need to be able to read more about this case to see if and how to modify my code .", "Typically the MonoTODO attribute includes a string that gives details about what specifically is left to do .", "In the particular case of the ReceivedBytesThreshold the only details are Not implemented .", "You can see see the details by either using some tricky reflection or by browsing the class lib source code : .. . .. . SerialPort.cs from SVN http : anonsvn.mono-project.com viewvc trunk mcs class System System.IO.Ports SerialPort.cs view log", "It looks like I m going to have to do that .", "Thanks", "The documentation at http : www.go-mono.com docs index.aspx link T 3ASystem.NotImplementedException states that : .. . .. . A number of the types and constructs specified elsewhere in this Standard are not required of CLI implementations that conform only to the Kernel Profile .", "For example the floating-point feature set consists of the floating-point data types floatand double .", "If support for these is omitted from an implementation any attempt to reference a signature that includes the floating-point data types results in an exception of type NotImplementedException .", ".. . Could not load a file or assembly DocumentFormat.OpenXml.dll version 2.0.5022.0 culture neutral PublicKeyToken 31bf3856ad364e35 or one of its dependencies .", ".. . .. . I don t know what is problem here...I have installed openxml sdk2.0 on c : program files open xml sdk v2 lib DocumentFormat.OpenXml.dll .", "and also put my application eXe on on the same place for testing purpose.. .", "Please guide me to solve this issue.. .", "You should also ensure you set a reference to WindowsBase .", "This is required to use the SDK as it handles System.IO.Packaging which is used for unzipping and opening the compressed .docx .xlsx .pptx as an OPC document .", "I Still getting the same error message.. .", "if you have more projects than one within solution try to include to others too .", "may be you are including to wrong one", "Thanks .", "I didn t have System.IO.Packaging specified", "Being new to this myself here s what I did : .. . .. . I m using MS Visual Studio 2010 Pro .", "1 .", "Download and install the OpenXML SDK .. . 2 .", "Within my project in Visual Studio select Project then Add Reference .. . 3 .", "Select the Browse tab .. . 4 .", "In the Look in : pull down navigate to : C : Program Files x86 Open XML SDK V2.0 lib and select the DocumentFormat.OpenXml.dll .. . 5 .", "Hit OK .. . 6 .", "In the Solution Explorer on the right for me the References folder now shows the DocumentFormat.OpenXML library .", "7 .", "Right-click on it and select Properties .. . 8 .", "In the Properties panel change Copy Local to True .", "You should be off and running now using the DocumentFormat classes .", "That worked for me .", "What worked for me : .. . .. . 1 .", "Add a folder to the project call it ThirdParty .", "2 .", "Add in the ThirdParty folder both DocumentFormat.OpenXML.dll and WindowsBase.dll .. . 3 .", "Make sure the the project uses the ThirdParty dir as reference for both the DLLs .. . 4 .", "Build and published to an external server .", "Goto Nuget Package manager and search for openxml .", "And install DocumentFormat.OpenXml", "You need to have DocumentFormat.OpenXML.dll in the same folder as your application - or in the bin path if you are developing an ASP.NET application .", "However I m not certain that the OpenXML SDK is supported on non-Windows operating systems - you may need to look into a third-party solution .", "Yes this answer is right the only difference is that you copy your .dll into bin folder of the project .", "After viewing and changed the properties to DocumentFormat.OpenXml I also had to change the Specific Version to false .", "But They are not included within the Bin folder .", "Or set the reference Copy Local property to true ." ] }
{ "confidence": [ 68.47062683105469, 59.56882095336914, 36.860679626464844, 33.39020919799805, 29.941959381103516, 29.941959381103516, 28.964263916015625, 27.803497314453125, 27.803497314453125, 24.946552276611328 ], "content": [ "Question : I m new to Mono and plan to port my application over if possible . I ve run MoMA and there are some places it has identified that I m calling that could throw a NotImplementedException or are tagged MonoTodo . Is there anywhere I can get more information on these specific instances it s flagging down For instance I m calling the ReceivedBytesThreshold setter on SerialPort and MoMA tells me that this could throw a NotImplementedException . When I read more about MoMA s results it tells me that NotImplementedException may mean that the method is not implemented at all or under certain circumstances it may throw this exception . Therefore I need to be able to read more about this case to see if and how to modify my code . .. . Answer : The documentation at http : www.go-mono.com docs index.aspx link T 3ASystem.NotImplementedException states that : .. . .. . A number of the types and constructs specified elsewhere in this Standard are not required of CLI implementations that conform only to the Kernel Profile . For example the floating-point feature set consists of the floating-point data types floatand double . If support for these is omitted from an implementation any attempt to reference a signature that includes the floating-point data types results in an exception of type NotImplementedException . Comment : You misunderstand I need to know why MoMA is telling me that a particular line in my code will cause a NotImplementedException or why the Mono code that I m calling is tagged MonoTodo .", "Question : I m new to Mono and plan to port my application over if possible . I ve run MoMA and there are some places it has identified that I m calling that could throw a NotImplementedException or are tagged MonoTodo . Is there anywhere I can get more information on these specific instances it s flagging down For instance I m calling the ReceivedBytesThreshold setter on SerialPort and MoMA tells me that this could throw a NotImplementedException . When I read more about MoMA s results it tells me that NotImplementedException may mean that the method is not implemented at all or under certain circumstances it may throw this exception . Therefore I need to be able to read more about this case to see if and how to modify my code . .. . Answer : Typically the MonoTODO attribute includes a string that gives details about what specifically is left to do . In the particular case of the ReceivedBytesThreshold the only details are Not implemented . You can see see the details by either using some tricky reflection or by browsing the class lib source code : .. . .. . SerialPort.cs from SVN http : anonsvn.mono-project.com viewvc trunk mcs class System System.IO.Ports SerialPort.cs view log Comment : It looks like I m going to have to do that . Thanks", "Question : I am using C .net Windows Desktop Application.I want to run these application with other platform also . So i am using Mono 2.10 as a cross compiler.While running unexpectedly my Application is terminated by saying the error message like .. . .. . Error : Could not open the selected folder . .. . Could not load a file or assembly DocumentFormat.OpenXml.dll version 2.0.5022.0 culture neutral PublicKeyToken 31bf3856ad364e35 or one of its dependencies . .. . .. . I don t know what is problem here...I have installed openxml sdk2.0 on c : program files open xml sdk v2 lib DocumentFormat.OpenXml.dll . and also put my application eXe on on the same place for testing purpose.. . Please guide me to solve this issue.. . .. . Answer : Well In my applications I just need to Add a reference to DocumentFormat.OpenXml under .Net tab and both references DocumentFormat.OpenXml and WindowsBase are always added automatically . But They are not included within the Bin folder . So when the Application is published to an external server I always place DocumentFormat.OpenXml.dll under the Bin folder manually . Or set the reference Copy Local property to true .", "Question : I am using C .net Windows Desktop Application.I want to run these application with other platform also . So i am using Mono 2.10 as a cross compiler.While running unexpectedly my Application is terminated by saying the error message like .. . .. . Error : Could not open the selected folder . .. . Could not load a file or assembly DocumentFormat.OpenXml.dll version 2.0.5022.0 culture neutral PublicKeyToken 31bf3856ad364e35 or one of its dependencies . .. . .. . I don t know what is problem here...I have installed openxml sdk2.0 on c : program files open xml sdk v2 lib DocumentFormat.OpenXml.dll . and also put my application eXe on on the same place for testing purpose.. . Please guide me to solve this issue.. . .. . Answer : select DocumentFormat.OpenXml under references view it s properties and set the Copy Local option to True so that it copies it to the output folder . That worked for me .", "Question : I am using C .net Windows Desktop Application.I want to run these application with other platform also . So i am using Mono 2.10 as a cross compiler.While running unexpectedly my Application is terminated by saying the error message like .. . .. . Error : Could not open the selected folder . .. . Could not load a file or assembly DocumentFormat.OpenXml.dll version 2.0.5022.0 culture neutral PublicKeyToken 31bf3856ad364e35 or one of its dependencies . .. . .. . I don t know what is problem here...I have installed openxml sdk2.0 on c : program files open xml sdk v2 lib DocumentFormat.OpenXml.dll . and also put my application eXe on on the same place for testing purpose.. . Please guide me to solve this issue.. . .. . Answer : Goto Nuget Package manager and search for openxml . And install DocumentFormat.OpenXml", "Question : I am using C .net Windows Desktop Application.I want to run these application with other platform also . So i am using Mono 2.10 as a cross compiler.While running unexpectedly my Application is terminated by saying the error message like .. . .. . Error : Could not open the selected folder . .. . Could not load a file or assembly DocumentFormat.OpenXml.dll version 2.0.5022.0 culture neutral PublicKeyToken 31bf3856ad364e35 or one of its dependencies . .. . .. . I don t know what is problem here...I have installed openxml sdk2.0 on c : program files open xml sdk v2 lib DocumentFormat.OpenXml.dll . and also put my application eXe on on the same place for testing purpose.. . Please guide me to solve this issue.. . .. . Answer : After viewing and changed the properties to DocumentFormat.OpenXml I also had to change the Specific Version to false .", "Question : I am using C .net Windows Desktop Application.I want to run these application with other platform also . So i am using Mono 2.10 as a cross compiler.While running unexpectedly my Application is terminated by saying the error message like .. . .. . Error : Could not open the selected folder . .. . Could not load a file or assembly DocumentFormat.OpenXml.dll version 2.0.5022.0 culture neutral PublicKeyToken 31bf3856ad364e35 or one of its dependencies . .. . .. . I don t know what is problem here...I have installed openxml sdk2.0 on c : program files open xml sdk v2 lib DocumentFormat.OpenXml.dll . and also put my application eXe on on the same place for testing purpose.. . Please guide me to solve this issue.. . .. . Answer : You should also ensure you set a reference to WindowsBase . This is required to use the SDK as it handles System.IO.Packaging which is used for unzipping and opening the compressed .docx .xlsx .pptx as an OPC document . Comment : I Still getting the same error message.. . Comment : i have set a reference of the WindowsBase in C .Net 4.0 through project explorer window.But till i am not able to solve that issue...what i do next Comment : if you have more projects than one within solution try to include to others too . may be you are including to wrong one Comment : Thanks . I didn t have System.IO.Packaging specified", "Question : I am using C .net Windows Desktop Application.I want to run these application with other platform also . So i am using Mono 2.10 as a cross compiler.While running unexpectedly my Application is terminated by saying the error message like .. . .. . Error : Could not open the selected folder . .. . Could not load a file or assembly DocumentFormat.OpenXml.dll version 2.0.5022.0 culture neutral PublicKeyToken 31bf3856ad364e35 or one of its dependencies . .. . .. . I don t know what is problem here...I have installed openxml sdk2.0 on c : program files open xml sdk v2 lib DocumentFormat.OpenXml.dll . and also put my application eXe on on the same place for testing purpose.. . Please guide me to solve this issue.. . .. . Answer : What worked for me : .. . .. . 1 . Add a folder to the project call it ThirdParty . 2 . Add in the ThirdParty folder both DocumentFormat.OpenXML.dll and WindowsBase.dll .. . 3 . Make sure the the project uses the ThirdParty dir as reference for both the DLLs .. . 4 . Build and published to an external server .", "Question : I am using C .net Windows Desktop Application.I want to run these application with other platform also . So i am using Mono 2.10 as a cross compiler.While running unexpectedly my Application is terminated by saying the error message like .. . .. . Error : Could not open the selected folder . .. . Could not load a file or assembly DocumentFormat.OpenXml.dll version 2.0.5022.0 culture neutral PublicKeyToken 31bf3856ad364e35 or one of its dependencies . .. . .. . I don t know what is problem here...I have installed openxml sdk2.0 on c : program files open xml sdk v2 lib DocumentFormat.OpenXml.dll . and also put my application eXe on on the same place for testing purpose.. . Please guide me to solve this issue.. . .. . Answer : You need to have DocumentFormat.OpenXML.dll in the same folder as your application - or in the bin path if you are developing an ASP.NET application . However I m not certain that the OpenXML SDK is supported on non-Windows operating systems - you may need to look into a third-party solution . Yes this answer is right the only difference is that you copy your .dll into bin folder of the project .", "Question : I am using C .net Windows Desktop Application.I want to run these application with other platform also . So i am using Mono 2.10 as a cross compiler.While running unexpectedly my Application is terminated by saying the error message like .. . .. . Error : Could not open the selected folder . .. . Could not load a file or assembly DocumentFormat.OpenXml.dll version 2.0.5022.0 culture neutral PublicKeyToken 31bf3856ad364e35 or one of its dependencies . .. . .. . I don t know what is problem here...I have installed openxml sdk2.0 on c : program files open xml sdk v2 lib DocumentFormat.OpenXml.dll . and also put my application eXe on on the same place for testing purpose.. . Please guide me to solve this issue.. . .. . Answer : Being new to this myself here s what I did : .. . .. . I m using MS Visual Studio 2010 Pro . 1 . Download and install the OpenXML SDK .. . 2 . Within my project in Visual Studio select Project then Add Reference .. . 3 . Select the Browse tab .. . 4 . In the Look in : pull down navigate to : C : Program Files x86 Open XML SDK V2.0 lib and select the DocumentFormat.OpenXml.dll .. . 5 . Hit OK .. . 6 . In the Solution Explorer on the right for me the References folder now shows the DocumentFormat.OpenXML library . 7 . Right-click on it and select Properties .. . 8 . In the Properties panel change Copy Local to True . You should be off and running now using the DocumentFormat classes ." ] }
[ "yes-answer-long", "yes-answer-short" ]
portability
UNK_RELATION
navteq@provider@48
navteq -- navteq was an american chicago-based @placeholder of geographic information systems data and a major provider of base electronic navigable maps .
{ "confidence": [ 49.451622009277344, 45.93433380126953, 17.562150955200195, 13.553889274597168, 13.553889274597168, 13.553889274597168, 13.553889274597168, 13.553889274597168, 11.728302001953125, 11.728302001953125, 11.728302001953125, 11.728302001953125, 11.728302001953125, 11.728302001953125, 11.728302001953125, 11.728302001953125, 11.728302001953125, 11.728302001953125, 11.728302001953125, 11.728302001953125 ], "content": [ "I am using Nokia maps Navteq postgis DB .", "I am not familiar with Navteq data but know Postgis well .", "For each link there is information about the name of the road .", "How can I use here.com s REST api in order to get an image of a route calculation", "I know I can do this using the Javascript API but I cannot let the user see the waypoints exact coordinates .", "If i understood correctly you can achieve what you are looking for using the Map Image API following link illustrates an example .. . .. . https : developer.here.com api-explorer rest map-image map-image-with-routes", "i was able to solve this. .", "Turns out you have to get the points first and then plot the route on a map image yourself .", "Given a link I want to get all the links which belong to a bounding-box that map-match the same highway route .", "How can I do this using DB queries Postgis", "I don t completely understand the question .", "What do you mean by map-match the same highway route", "OK .", "I have some coordinates x y which are at a highway or a route not a city street .", "I want to find a set of links let say 20Km ahead of the given point and 20Km before the given point .", "All the links must belong to the same route highway .", "How are the routes defined with an id of some sort for underlying road segments .", "Thanks for your help .", "Road segments are represented by links .", "Each link has a starting node and an end node ." ] }
{ "confidence": [ 55.108177185058594, 13.093746185302734 ], "content": [ "Question : null .. . Answer : I am using Nokia maps Navteq postgis DB . Given a link I want to get all the links which belong to a bounding-box that map-match the same highway route . How can I do this using DB queries Postgis Comment : I don t completely understand the question . What do you mean by map-match the same highway route Comment : OK . I have some coordinates x y which are at a highway or a route not a city street . I want to find a set of links let say 20Km ahead of the given point and 20Km before the given point . All the links must belong to the same route highway . Comment : How are the routes defined with an id of some sort for underlying road segments . I am not familiar with Navteq data but know Postgis well . Comment : Thanks for your help . Road segments are represented by links . Each link has a starting node and an end node . For each link there is information about the name of the road .", "Question : How can I use here.com s REST api in order to get an image of a route calculation I know I can do this using the Javascript API but I cannot let the user see the waypoints exact coordinates . .. . Answer : If i understood correctly you can achieve what you are looking for using the Map Image API following link illustrates an example .. . .. . https : developer.here.com api-explorer rest map-image map-image-with-routes Comment : i was able to solve this. . Turns out you have to get the points first and then plot the route on a map image yourself ." ] }
[ "yes-answer-long", "yes-answer-short" ]
provider
UNK_RELATION
yolk@python@49
yolk -- command-line tool for querying pypi and @placeholder packages installed on your system .
{ "confidence": [ 37.23774337768555, 37.23774337768555, 36.26316452026367, 35.72414016723633, 35.13938522338867, 34.635215759277344, 34.345436096191406, 34.3415641784668, 34.3415641784668, 34.3415641784668, 34.23263931274414, 32.64205551147461, 32.15451431274414, 31.991931915283203, 31.855064392089844, 31.689369201660156, 31.58443832397461, 31.480792999267578, 31.149688720703125, 30.411285400390625, 30.194175720214844, 29.79962921142578, 29.198894500732422, 29.17599105834961, 28.70409393310547, 28.168399810791016, 28.14725112915039, 28.038028717041016, 27.832792282104492, 27.638776779174805, 27.564037322998047, 27.27277374267578, 27.189594268798828, 26.957374572753906, 26.486709594726562, 26.326520919799805, 25.577281951904297, 25.33730697631836, 25.295440673828125, 25.05661392211914, 24.47740936279297, 24.08124542236328, 24.08124542236328, 23.19513702392578, 23.19513702392578, 23.19513702392578, 22.724693298339844, 22.662830352783203, 22.56100845336914, 22.00808334350586, 22.00808334350586, 21.888370513916016, 21.03766441345215, 20.708637237548828, 19.772659301757812, 19.626815795898438, 19.401634216308594, 19.379566192626953, 18.585960388183594, 18.463359832763672, 18.463359832763672, 17.938186645507812, 17.666593551635742, 17.031063079833984, 17.031063079833984, 16.953767776489258, 16.455183029174805, 16.455183029174805, 16.40096664428711, 16.087888717651367, 16.003387451171875, 16.003387451171875, 16.003387451171875, 16.003387451171875, 15.750389099121094, 15.65260124206543, 15.467047691345215, 15.180093765258789, 15.064821243286133, 14.632634162902832, 12.93481731414795, 12.93481731414795, 12.93481731414795, 12.93481731414795, 12.93481731414795, 12.93481731414795, 12.93481731414795, 12.93481731414795, 12.93481731414795, 12.93481731414795, 12.93481731414795, 12.93481731414795, 12.93481731414795, 12.93481731414795, 12.93481731414795, 12.93481731414795, 12.93481731414795, 12.93481731414795 ], "content": [ "You installed flask and yolk onto the system python .. . 3 .", "I realised I had yolk and flask installed onto the system python .", "If you have yolk installed globally however the only yolk binary on your PATH is usr local bin yolk or some such activating the virtualenv doesn t change this because there s no yolk script in your virtualenv bin dir .", "Should I use yolk to list the packages", "If I installed flask and yolk onto the system python then running which yolk and which flask would yield the path to the file in bin .", "I have installed yolk 0.4.3 using pip .", "And the usr local bin yolk script naturally has your system Python interpreter in its shebang line .", "yolk -l gives me information that I ve got 114 packages installed on my Ubuntu 10.04 .", "Looking through yolk source I found this : .. . .. . The following options show information about installed Python packages .", "But when I tried yolk -l to display all installed packages it showed a syntax-error", "Yolk https : pypi.python.org pypi yolk3k 0.8.7 0.8.7 reports and encoding error when printing information about packages .", "This is why installing yolk into the virtualenv fixes the problem because it adds a yolk script in your virtualenv bin dir that has the virtualenv s python in its shebang line .", "I installed Flask and yolk using venv and everything was working fine .", "I m using virtualenv for sandboxing my Python environment pip to install uninstall packages and yolk to list the packages .", "If you want to use yolk within a --no-site-packages virtualenv really your only choice is to install it there .", "Not familiar with yolk .", "If I need to list out all the installed packages in my virtual environment can I use yolk -l to do so", "I know I can do this by keeping yolk installed inside the environment but is this also possible by keeping yolk outside the environment i.e .", "found in http : trac.assembla.com yolk browser trunk yolk cli.py", "Activate the virtualenv and then install yolk .", "@thefourtheye Fortunately apparently I can list the installed packages in the virtualenv virt0 using the normal pip3 with the following command : pip3 list if you someone could help me also with yolk it would be great .", "This won t work with a --no-site-packages virtualenv though because the script wrapper then won t be able to find the actual yolk packages it needs to import", "Some newer Python packages store their package metadata in a different file than expected by yolk yolk3k https : pypi.python.org pypi yolk3k will knows how to handle that though .", "I think yolk is just looking at what s registered on pypi but pip is looking all over the place for the most up to-date versions it can find .", "It seems like a bug that Yolk would crash just because there s a Greek character or mathematical symbol in the PyPi page for a package .", "Installing yolk in the virtual environment helped.. . quite strange .", "Try installing yolk3k instead of yolk .", "As an alternative try which yolk --if it s in yourvirtualenv bin then try closing your terminal and reopening it activating your virtualenv and try yolk -l one more time .", "To fix your problem make sure your version of yolk works with your version of Python .", "When I tried to install yolk in the virt0 the output was the following : .. . .. . In Users user Desktop virt env virt0 bin I have this : .. . .. . which confirms that yolk was installed but how can I update it also to yolk3k in virt0", "If you don t want to install yolk in each virtualenv you could also just copy the yolk script-wrapper from usr local bin or wherever it is into your virtualenv s bin dir and manually change the shebang line to point to your virtualenv s python .", "After creating new virtualenv directory using .. . .. . virtualenv virt env virt1 --no-site-packages --clear .. . .. . I switched to that my prompt changed and then yolk -l gives me again the same 114 packages .", "After setting up a simple virtualenv and installing a few packages when I yolk -l I get .. . .. . What does has no metadata mean for pip and setuptools both I believe installed when the virtualenv is created", ".. . .. . and for activated : List activated packages installed by distutils or setuptools .", "yolk only search trough PyPI XMLRPC API as far as I know while pip crawls the web looking for the best package that fits - the seed page is http : pypi.python.org simple PACKAGE NAME .", "If you re using virtualenvwrapper which I highly recommend add pip install yolk to your postmkvirtualenv file .", "Non-activated packages need pkg resources.require before they can be imported such as packages installed with easy install --multi-version .", "I have just started using virtualenv from this tutorial http : simononsoftware.com virtualenv-tutorial where it uses yolk to list the packages installed in the virtualenv but yolk by default is for Python 2 so I decided to upgrade with an extension for Python 3 my current version with the following command : .. . .. . pip3 install --upgrade yolk3k .. . .. . It works when I am not in the virtualenv that I called virt0 but if I am on it it gives me the error it was giving me before upgrading it to the Python 3 version .", ": https : python3wos.appspot.com know that yolk is compatible with Python 3 .", "You have Python 2.x syntax with print when you are using Python 3.x notice the Python32 in C : Python32 Lib site-packages yolk cli.py .", "I need some help understanding how pip and yolk work .. . .. . I ran pip install pymssql which installed pymssql version 2.0.0b1-dev-20111019 but then decided that I d like to revert to an older version .", "I ran yolk -V pymssql to check which versions I have available but it only returns pymssql 1.0.2 .", "I restarted my computer and when I activated virtualenv again flask and yolk were no longer recognised .", "I believe Development means the package is not installed inside site-packages but it has a link-to another location e.g .", "Paste 0.9 .. . .. . for non activated i found : List non-activated packages installed by distutils or setuptools .", "Does venv remove any installed packages once the computer has been restarted", "Activated packages are normal packages on sys.path that can be imported .", "For whatever reason my build-system isn t installing one of my packages properly .", "Recreate the virtual env using the command-line you posted .", "Searching pypi through the website reveals that 1.0.2 is the only version available .", "Does this mean pip is using sources other than pypi", "I just uninstalled and re-installed a bunch of packages and now many more have no metadata .", "When I use yolk from within a virtualenv I get the following : .. . .. . How exactly does a package go from active development to non-active development", "As long as you re sourcing the virtualenv correctly and installing the packages correctly your virtualenv should not be affected by a reboot .", "This is a bug which manifests only in Python 2.x fixed in versions 0.8.8 see fc842a3 https : github.com myint yolk commit fc842a30236b9d5cfda07028150f97e42afa5a1d .", "Yeah look at the pip.log file to see where it s searching for packages .", "Shouldn t the version that I installed appear too", "This means that when you run python it runs the virtualenv s copy of the Python binary instead of your global system python .", "Modify your .bashrc with these statements : .. . .. . export WORKON HOME HOME .virtualenvs export VIRTUALENVWRAPPER VIRTUALENV ARGS --no-site-packages --python python2.6 .. . source usr local bin virtualenvwrapper.sh .. . .. . Then you can create delete modify and change between virtualenvs easily .", "Within a virtualenv add new packages .. . .. . I recommend you look into virtualenvwrapper http : www.doughellmann.com projects virtualenvwrapper .", "I just use pip freeze and then I get a requirements file that lists all the packages for recreating my environment .", "In ubuntu lucid I have python 2.6.5 by default.I compiled python3.3.1 and set up virtualenv and wrapper such that workon envpy331 gets me to work on python3.3.1.Then I installed yolk using pip .. . .. . Now when I run .. . .. . it lists all python libraries installed even in python2.6.5 as below and finally throws an IOError .. . .. . Any idea why this happens", "I only have one virtualenv installed so that also takes point 1 out", "Should do a release to PyPI it seems that the latest code in GitHub works with Python 3 but the last released version on PyPI 0.4.3 released 2012-02-06 doesn t work with Python 3 . .. . .. . so use the github release instead", "For example when I .. . .. . I get .. . .. . UnicodeEncodeError : ascii codec can t encode character u u03b2 in position 2322 : ordinal not in range 128 .. . .. . because the PyPi page for the package https : pypi.python.org pypi crypto-enigma has a in it .", "I can install packages to my virtual environment by using pip install package name -e environment name and I guess I don t need to have pip inside my virtual environment .", "Here is your workflow : .. . .. . 1 .", "So for your questions : .. . .. . 1 .", "If the problem isnt relating to your path I suppose it is delete your lib and scripts folder in your project directory to clear out the virtualenv settings .", "The reason being is I ran pip with sudo because I am getting a error : could not create Library Python 2.7 site-packages flask : Permission denied once I run pip install flask when virtualenv is activated .", ".. . .. . Hope that satisfies your needs or atleast helps you .", "Add virtualenv and pip to your global environment .", "Download and install virtualenvwrapper in your global environment .. . 2 .", "My suggestion would be to remove your virtualenv .", "That s not the intended way of using a virtualenv - a virtualenv should be tied to one particular Python version e.g . 2.7 or 3.4 with all dependencies installed for that version .", "There are one of three possibilities that I can think of that explains your issues : .. . .. . 1 .", "This can be done automatically each time you create a venv with a bootstrap script : virtualenv.org en latest creating-your-own-bootstrap-scripts http : www.virtualenv.org en latest creating-your-own-bootstrap-scripts", "Activating a virtualenv works by changing your shell PATH so the virtualenv s bin directory is first .", "I d just add that the command to upgrade is sudo pip install --upgrade yolk3k", "If I try to install yolk3k with the following command : .. . .. . inside Users user Desktop virt env virt0 bin it outputs : .. . .. . but it still gives me the error I cited above .", "What is going on there", "This is all it does .", "doughellmann.com docs virtualenvwrapper http : www.doughellmann.com docs virtualenvwrapper scripts.html scripts-postmkvirtualenv", "Fixed it for me", "Probably means the package is no longer in active development", "@Bartek - Well sure .", "But what does non-active development mean", ": -", "Have you found an answer to this Jason .", "I m quite curious as well .", "Labels active non-active and development are unrelated and refer to different things .", "an egg-link file .", "PKG SPEC can be either a package name or package name and version e.g .", "Use PKG SPEC to narrow results .", "There seem to be very little documentation on this online .", "Am i correct", "the global Python installation .", "Thanks ." ] }
{ "confidence": [ 52.710140228271484, 51.28390121459961, 50.966835021972656, 50.835018157958984, 47.51375961303711, 47.39329147338867, 46.45930099487305, 45.82085037231445, 45.388755798339844, 44.12137985229492, 43.52434539794922, 43.185890197753906, 43.16268539428711, 40.68730545043945, 12.592921257019043, 10.799399375915527 ], "content": [ "Question : yolk -l gives me information that I ve got 114 packages installed on my Ubuntu 10.04 . After creating new virtualenv directory using .. . .. . virtualenv virt env virt1 --no-site-packages --clear .. . .. . I switched to that my prompt changed and then yolk -l gives me again the same 114 packages . What is going on there Comment : Installing yolk in the virtual environment helped.. . quite strange . .. . Answer : Activating a virtualenv works by changing your shell PATH so the virtualenv s bin directory is first . This is all it does . This means that when you run python it runs the virtualenv s copy of the Python binary instead of your global system python . If you have yolk installed globally however the only yolk binary on your PATH is usr local bin yolk or some such activating the virtualenv doesn t change this because there s no yolk script in your virtualenv bin dir . And the usr local bin yolk script naturally has your system Python interpreter in its shebang line . This is why installing yolk into the virtualenv fixes the problem because it adds a yolk script in your virtualenv bin dir that has the virtualenv s python in its shebang line . If you don t want to install yolk in each virtualenv you could also just copy the yolk script-wrapper from usr local bin or wherever it is into your virtualenv s bin dir and manually change the shebang line to point to your virtualenv s python . This won t work with a --no-site-packages virtualenv though because the script wrapper then won t be able to find the actual yolk packages it needs to import If you want to use yolk within a --no-site-packages virtualenv really your only choice is to install it there . Comment : This can be done automatically each time you create a venv with a bootstrap script : virtualenv.org en latest creating-your-own-bootstrap-scripts http : www.virtualenv.org en latest creating-your-own-bootstrap-scripts Comment : If you re using virtualenvwrapper which I highly recommend add pip install yolk to your postmkvirtualenv file . doughellmann.com docs virtualenvwrapper http : www.doughellmann.com docs virtualenvwrapper scripts.html scripts-postmkvirtualenv", "Question : I need some help understanding how pip and yolk work .. . .. . I ran pip install pymssql which installed pymssql version 2.0.0b1-dev-20111019 but then decided that I d like to revert to an older version . I ran yolk -V pymssql to check which versions I have available but it only returns pymssql 1.0.2 . Shouldn t the version that I installed appear too Searching pypi through the website reveals that 1.0.2 is the only version available . Does this mean pip is using sources other than pypi .. . Answer : Yeah look at the pip.log file to see where it s searching for packages . I think yolk is just looking at what s registered on pypi but pip is looking all over the place for the most up to-date versions it can find .", "Question : yolk -l gives me information that I ve got 114 packages installed on my Ubuntu 10.04 . After creating new virtualenv directory using .. . .. . virtualenv virt env virt1 --no-site-packages --clear .. . .. . I switched to that my prompt changed and then yolk -l gives me again the same 114 packages . What is going on there Comment : Installing yolk in the virtual environment helped.. . quite strange . .. . Answer : If the problem isnt relating to your path I suppose it is delete your lib and scripts folder in your project directory to clear out the virtualenv settings . Recreate the virtual env using the command-line you posted . Activate the virtualenv and then install yolk . Comment : As an alternative try which yolk --if it s in yourvirtualenv bin then try closing your terminal and reopening it activating your virtualenv and try yolk -l one more time . Fixed it for me", "Question : After setting up a simple virtualenv and installing a few packages when I yolk -l I get .. . .. . What does has no metadata mean for pip and setuptools both I believe installed when the virtualenv is created Can I do something e.g . with pip to fix this .. . Answer : Some newer Python packages store their package metadata in a different file than expected by yolk yolk3k https : pypi.python.org pypi yolk3k will knows how to handle that though . Just Comment : This seems to be getting worse . I just uninstalled and re-installed a bunch of packages and now many more have no metadata . Is this expected Comment : Try installing yolk3k instead of yolk .", "Question : I just started learning Flask and as a result getting into virtualenv as well . I followed a tutorial on Flask s documentation and created a small application . I installed Flask and yolk using venv and everything was working fine . I restarted my computer and when I activated virtualenv again flask and yolk were no longer recognised . I had to reinstall them via easy install . Does venv remove any installed packages once the computer has been restarted What happened here Is there anything I need to do from my side Comment : Does it happens with only one virtualenv or all of them Comment : I only created one virtualenv and restarted . .. . Answer : As long as you re sourcing the virtualenv correctly and installing the packages correctly your virtualenv should not be affected by a reboot . It s completely independent of that . There are one of three possibilities that I can think of that explains your issues : .. . .. . 1 . The incorrect virtualenv was sourced .. . 2 . You installed flask and yolk onto the system python .. . 3 . You used some kind of ephemeral storage .. . .. . The third is the least likely Comment : If I installed flask and yolk onto the system python then running which yolk and which flask would yield the path to the file in bin . I got nothing as a result . I only have one virtualenv installed so that also takes point 1 out Comment : Did you make sure to source that virtualenv Comment : Yeah I did source it . Comment : I realised I had yolk and flask installed onto the system python . The reason being is I ran pip with sudo because I am getting a error : could not create Library Python 2.7 site-packages flask : Permission denied once I run pip install flask when virtualenv is activated . How can I overcome this Comment : My suggestion would be to remove your virtualenv . So if you re on unix or linux just rm -rf path to your virtualenv . Rebuild the virtualenv do not use sudo and then it should work .", "Question : Yolk https : pypi.python.org pypi yolk3k 0.8.7 0.8.7 reports and encoding error when printing information about packages . For example when I .. . .. . I get .. . .. . UnicodeEncodeError : ascii codec can t encode character u u03b2 in position 2322 : ordinal not in range 128 .. . .. . because the PyPi page for the package https : pypi.python.org pypi crypto-enigma has a in it . Or if I try .. . .. . I get .. . .. . UnicodeEncodeError : ascii codec can t encode characters in position 3291-3292 : ordinal not in range 128 .. . .. . Is there a way to avoid this error It seems like a bug that Yolk would crash just because there s a Greek character or mathematical symbol in the PyPi page for a package . .. . Answer : This is a bug which manifests only in Python 2.x fixed in versions 0.8.8 see fc842a3 https : github.com myint yolk commit fc842a30236b9d5cfda07028150f97e42afa5a1d . Comment : I d just add that the command to upgrade is sudo pip install --upgrade yolk3k", "Question : I need some help understanding how pip and yolk work .. . .. . I ran pip install pymssql which installed pymssql version 2.0.0b1-dev-20111019 but then decided that I d like to revert to an older version . I ran yolk -V pymssql to check which versions I have available but it only returns pymssql 1.0.2 . Shouldn t the version that I installed appear too Searching pypi through the website reveals that 1.0.2 is the only version available . Does this mean pip is using sources other than pypi .. . Answer : yolk only search trough PyPI XMLRPC API as far as I know while pip crawls the web looking for the best package that fits - the seed page is http : pypi.python.org simple PACKAGE NAME .", "Question : I have installed yolk 0.4.3 using pip . But when I tried yolk -l to display all installed packages it showed a syntax-error Comment : What Python version are you on .. . Answer : You have Python 2.x syntax with print when you are using Python 3.x notice the Python32 in C : Python32 Lib site-packages yolk cli.py . Below is an example written in Python 3.x : .. . .. . As you can see you need to use Python 3.x syntax namely treat print as a built-in not a keyword . To fix your problem make sure your version of yolk works with your version of Python .", "Question : For whatever reason my build-system isn t installing one of my packages properly . When I use yolk from within a virtualenv I get the following : .. . .. . How exactly does a package go from active development to non-active development Comment : Probably means the package is no longer in active development Comment : @Bartek - Well sure . But what does non-active development mean : - Comment : Have you found an answer to this Jason . I m quite curious as well . Comment : Labels active non-active and development are unrelated and refer to different things . I believe Development means the package is not installed inside site-packages but it has a link-to another location e.g . an egg-link file . .. . Answer : Looking through yolk source I found this : .. . .. . The following options show information about installed Python packages . Activated packages are normal packages on sys.path that can be imported . Non-activated packages need pkg resources.require before they can be imported such as packages installed with easy install --multi-version . PKG SPEC can be either a package name or package name and version e.g . Paste 0.9 .. . .. . for non activated i found : List non-activated packages installed by distutils or setuptools . Use PKG SPEC to narrow results . .. . .. . and for activated : List activated packages installed by distutils or setuptools . Use PKG SPEC to narrow results . .. . .. . Hope that satisfies your needs or atleast helps you . There seem to be very little documentation on this online . found in http : trac.assembla.com yolk browser trunk yolk cli.py", "Question : I m using virtualenv for sandboxing my Python environment pip to install uninstall packages and yolk to list the packages . I can install packages to my virtual environment by using pip install package name -e environment name and I guess I don t need to have pip inside my virtual environment . Am i correct If I need to list out all the installed packages in my virtual environment can I use yolk -l to do so I know I can do this by keeping yolk installed inside the environment but is this also possible by keeping yolk outside the environment i.e . the global Python installation . Thanks . .. . Answer : Here is your workflow : .. . .. . 1 . Add virtualenv and pip to your global environment . 2 . Create virtualenvs .. . 3 . Within a virtualenv add new packages .. . .. . I recommend you look into virtualenvwrapper http : www.doughellmann.com projects virtualenvwrapper . It makes the maintenance of virtualenvs way easier . 1 . Download and install virtualenvwrapper in your global environment .. . 2 . Create directory .virtualenvs .. . 3 . Modify your .bashrc with these statements : .. . .. . export WORKON HOME HOME .virtualenvs export VIRTUALENVWRAPPER VIRTUALENV ARGS --no-site-packages --python python2.6 .. . source usr local bin virtualenvwrapper.sh .. . .. . Then you can create delete modify and change between virtualenvs easily . So for your questions : .. . .. . 1 . Should I put pip inside my virtualenv No do not do that . 2 . Should I use yolk to list the packages Not familiar with yolk . I just use pip freeze and then I get a requirements file that lists all the packages for recreating my environment .", "Question : I need some help understanding how pip and yolk work .. . .. . I ran pip install pymssql which installed pymssql version 2.0.0b1-dev-20111019 but then decided that I d like to revert to an older version . I ran yolk -V pymssql to check which versions I have available but it only returns pymssql 1.0.2 . Shouldn t the version that I installed appear too Searching pypi through the website reveals that 1.0.2 is the only version available . Does this mean pip is using sources other than pypi .. . Answer : i m usually running pip with the -vv -flag double-verbose or very verbose .. . .. . in htis case that produces : .. . .. . pip install -v -v --no-install pymssql .. . .. . this way you can clearly see where its downloading from .", "Question : I have installed yolk 0.4.3 using pip . But when I tried yolk -l to display all installed packages it showed a syntax-error Comment : What Python version are you on .. . Answer : It looks like you are running a python 2 library with python 3 the versions need to match .", "Question : I have just started using virtualenv from this tutorial http : simononsoftware.com virtualenv-tutorial where it uses yolk to list the packages installed in the virtualenv but yolk by default is for Python 2 so I decided to upgrade with an extension for Python 3 my current version with the following command : .. . .. . pip3 install --upgrade yolk3k .. . .. . It works when I am not in the virtualenv that I called virt0 but if I am on it it gives me the error it was giving me before upgrading it to the Python 3 version . When I tried to install yolk in the virt0 the output was the following : .. . .. . In Users user Desktop virt env virt0 bin I have this : .. . .. . which confirms that yolk was installed but how can I update it also to yolk3k in virt0 If I try to install yolk3k with the following command : .. . .. . inside Users user Desktop virt env virt0 bin it outputs : .. . .. . but it still gives me the error I cited above . Comment : Has the virtual environment been activated Comment : @thefourtheye Yes I have activated.. . and actually that is the actual problem where I am on the vitualenv virt0 : D Comment : Can you please show the actual list of commands you executed and their outputs Comment : Please include all these information in the question itself . Comment : @thefourtheye Fortunately apparently I can list the installed packages in the virtualenv virt0 using the normal pip3 with the following command : pip3 list if you someone could help me also with yolk it would be great . .. . Answer : Delete the virtualenv recreate it with Python 3 as the interpreter and install all dependencies for Python 3 such as yolk3k . The problem seems to come from the fact that you re going from a 2.x to a 3.x environment even though the virtualenv originally wasn t . That s not the intended way of using a virtualenv - a virtualenv should be tied to one particular Python version e.g . 2.7 or 3.4 with all dependencies installed for that version . So you should throw away the virtualenv and rebuild it entirely using 3.x dependencies . That should resolve any conflicting language issues .", "Question : In ubuntu lucid I have python 2.6.5 by default.I compiled python3.3.1 and set up virtualenv and wrapper such that workon envpy331 gets me to work on python3.3.1.Then I installed yolk using pip .. . .. . Now when I run .. . .. . it lists all python libraries installed even in python2.6.5 as below and finally throws an IOError .. . .. . Any idea why this happens Do I need to compile python3 again and set up virtualenv .. . Answer : Found the answer in a pull request on github .. . .. . This will let people and tools e.g . : https : python3wos.appspot.com know that yolk is compatible with Python 3 . Should do a release to PyPI it seems that the latest code in GitHub works with Python 3 but the last released version on PyPI 0.4.3 released 2012-02-06 doesn t work with Python 3 . .. . .. . so use the github release instead", "Question : I would like something like : .. . .. . which would return a version number . Thanks .. . Answer : Here is a function that will return the latest version number of a package or None if there is no such package .", "Question : I was setting up Android studio on windows-7 for the first time and I got this error : .. . Answer : Try to delete the .gradle folder in your project and restart Android Studio . Comment : thanks it succeeded :" ] }
[ "yes-answer-long", "yes-answer-short" ]
python
UNK_RELATION
skype-bots@sdk@50
skype-bots -- questions regarding the skype-bots @placeholder c or node.js .
{ "confidence": [ 63.32762145996094, 60.75464630126953, 56.2950439453125, 55.83905792236328, 48.294837951660156, 46.55339050292969, 45.643585205078125, 44.134727478027344, 42.46405792236328, 41.52765655517578, 41.16108322143555, 40.392555236816406, 40.14752960205078, 40.14752960205078, 39.32797622680664, 39.32797622680664, 39.32797622680664, 39.325767517089844, 38.29401397705078, 38.29401397705078, 38.29401397705078, 38.29401397705078, 37.12609100341797, 36.3596076965332, 36.094337463378906, 35.7833251953125, 34.23675537109375, 34.23675537109375, 34.23675537109375, 34.23675537109375, 34.23675537109375, 33.583648681640625, 33.514015197753906, 32.40143585205078, 32.40143585205078, 32.40143585205078, 32.40143585205078, 32.16696548461914, 31.003324508666992, 31.003324508666992, 31.003324508666992, 30.331649780273438, 30.201759338378906, 30.201759338378906, 30.201759338378906, 30.201759338378906, 30.201759338378906, 30.201759338378906, 30.201759338378906, 30.201759338378906, 30.201759338378906, 30.201759338378906, 29.457551956176758, 28.131973266601562, 27.331825256347656, 25.813735961914062, 25.496509552001953, 25.422557830810547, 23.233413696289062, 20.06609344482422, 18.166601181030273, 18.166601181030273, 18.166601181030273, 18.166601181030273, 18.166601181030273, 18.166601181030273, 18.166601181030273, 18.166601181030273, 18.166601181030273, 18.166601181030273, 18.166601181030273, 18.166601181030273, 18.166601181030273, 18.166601181030273, 18.166601181030273, 18.166601181030273, 18.166601181030273, 18.166601181030273, 18.166601181030273, 18.166601181030273, 18.166601181030273, 18.166601181030273, 18.166601181030273, 18.166601181030273, 18.166601181030273, 18.166601181030273, 18.166601181030273, 18.166601181030273, 18.166601181030273, 18.166601181030273, 18.166601181030273, 18.166601181030273, 16.33128547668457, 16.33128547668457, 16.33128547668457, 16.33128547668457, 16.33128547668457, 16.33128547668457, 16.33128547668457 ], "content": [ "check this post - stackoverflow.com questions 36360321 skype-bots-do-not-work http : stackoverflow.com questions 36360321 skype-bots-do-not-work", "developer.microsoft.com en-us skype-bots https : developer.microsoft.com en-us skype-bots followed this documentation", "Solution : go to My bots https : developer.microsoft.com en-us skype-bots manage - click on the name of your bot - click the Add bot to Skype link .", "Please check the status of your bot on Skype Developer Portal https : developer.microsoft.com en-us skype-bots manage .", "I m trying to get a Skype bot up and running based off of the echo example https : developer.microsoft.com en-us skype-bots docs tutorials simple-nodejs but I m struggling to make a successful POST to my app .", "Follow this https : developer.microsoft.com en-us skype-bots docs tutorials simple-nodejs tutorial you need to add your callback to your bot details .", "I ve started with just a very simple skype bot using Node.js .", "Is it possible to develop enterprise bots that run on Skype for Business using Microsoft bot Cognitive service tools framework", "I want to create a skype bot and am referring to https : developer.microsoft.com en-us skype-bots docs api chat for authorization the doc refers to https : azure.microsoft.com en-us documentation articles active-directory-v2-protocols-oauth-code but it is unclear about the scope to be mentioned for using skype bot apis .", "I configured it with slack and skype .", "Right now the Skype Bot API exposes additional functionality of Skype such as audio that aren t included in the Bot Framework .", "I ve added my Skype bot in preview mode to my Skype account .", "Skype Integration tested ok .. . 4 .", "@kienct89 try to update your skype .", "Skype v7.21.0.100 does not work .", "Skype v7.21.85.100 does work .", "Skype v7.22.85.107 does work .", "Do not Publish your Skype bot in that case your Skype bot will be in Preview state and it will start working immediately .", "Is there anyway I can debug the skype chatbot", "It s about the behavior of skype bot integrating with botframework .", "In slack Images are displaying but in Skype nothing coming .", "But If I mention like above skype not able to understand .", "I ve written a Skype bot using the new Skype Bot SDK https : www.skype.com en developer .", "Further going thru the Build 2016 videos and Microsoft support site reveals Skype bot programming is limited to consumer skype and not for Skype for Business .", "i am trying to build skype bot .", "Thanks .. . .. . .. . .. . UPDATE : Web embedded bot is working but Skype bot doesn t .", "If you don t have one you need to generate a password in your Skype application page .", "From what I could understand Microsoft Bot Framework appears to be a superset of Skype Bot Framework .", "As in you can develop Bot Applications using MS Bot Framework with Skype as the client .", "You can use either one though to build a text images only Skype bot .", "Under the covers the Bot Framework uses the Skype Bot Framework SDK just as you might if you coded to it directly .", "I followed documentation given by skype but failed to create it using that .", "I ve seen examples of Bot Programming that works with Skype .", "As you seen in my question all my testings are passed only the skype part is broken .", "@CodeCaster : I believe this question is answerable for someone who successfully build a bot for Skype .", "I tried to update Skype on both Desktop Mobile version it still doesn t work .", "If I reply with just link like below skype able to understand and displaying links .", "Via Papertrail I see skype-sdk.messagingHandler Received request receiving data . - but nothing from console.log Tried the full URL in the server.post command but no change .", "Skype for Business is not yet supported by Bot Framework https : dev.botframework.com .", "It seems microsoft has future plans to bring this to Skype for Business", "This also requires some knowledge of the server that your Skype for Business is running through .", "I believe that you hit Publish when you created your Skype bot and your bot has status Pending Review .", "I ve uploaded my WebAPI-based bot on Azure and added the bot application in the Skype bot dashboard .", "However there is no information on how to add the bot to my local Skype account in order to communicate with the bot .", "The Skype bot seems to be properly configured as he respons to the OnContactAddedAsync event properly by replying a pre-defined message .", "If so how to add somebody to the bot s contact-list using the Skype Bot SDK", "You need to forcefully update your Skype client to the lastet version in order to make it work .", "So can anybody tell me how to obtain authorization token for making skype bot rest api calls .", "I want to open Skype Android app and redirect user to the bot conversation screen of XYZ Bot .", "As it happens while redirecting user to a chat conversation with particular Skype user through below URI .", "Try out this tutorial https : medium.com @littlelostify how-to-build-skype-bot-with-nodejs-ddec8372114c .cmll9o3tt .", "In debug mode I see skype-sdk.azure-utils Request not received over HTTPS redirecting to HTTPS endpoint", "http : docs.botframework.com builder node guides core-concepts https : www.luis.ai this is the code i have to use to make a skype bot now i want to integrate my skype bot with microsoft lui api to train my bot automatically so it can do certain works automatically any help would be greatly appreciated", "However I cannot further test the OnPersonalChatMessageReceivedAsync handler as I m not able to message my bot i.e . Skype shows me the following : .. . .. .", "So after running the program it only returns this .. . .. . code : ResourceNotFound message : does not exist .. . .. . In the Echo example in the Skype Bot Webpage it says .. . .. . We ll assume the bot s URL for messaging was set to https : echobot.azurewebsites.net v1 chat during registration .", "I ve read that I can publish the bot and afterwards add it to the global Skype directory however this should be done only after the bot has been thoroughly tested .", "Bot added to contact-list ok .. . .. . But when I tried to chat with bot it does not respond anything .. . .. . And when I debugged on server-side no requests made from skype to my api endpoint . .. . .. . What did I do wrong", "In the example provided the bot isn t connecting to a skype server due to wrong server specified : .. . .. . You have to specify a valid skype server : .. . .. . You also specifying wrong API uri in the server.post well actualy that depends on your webhook settings but they weren t provided so I m assuming default : .. . .. . You have to use v1 chat for messaging .", "Skype for Business does use UCWA Unified Communications Web API though the documentation is pretty dated it is possible to have a user account for the bot and use the API calls for direct messaging .", "Please read How to Ask http : stackoverflow.com questions how-to-ask and provide some context .", "When I send a post to v1 chat I get back a status of 201 successful creation and nothing in the body .", "My console.log does not print anything either which leads me to believe that the botService.on personalMessage .. . function is not being run .", "Does anyone have any insight into how these POST requests should be formatted", "I cannot seem to find anything in the documentation .", "My code :", "I have https : mydomain .com v1 chat set up as the Messaging Webhook in the bot s Details .", "The requests to my chat API are being received by my server but the bot services are not being run .", "Did you fill out the proper bot ID appId and appSecret segments in const botService", "Yes all of that information seems to check out .", "Final Edit Solution : I think the problem caused by Heroku somehow it could be something with their free tier 1 dyno .", "After some effort I uploaded the program to Azure and it is now working perfectly .", ".. . .. . Potential Solution : You need to change the server address in the server.post command .", "If you run your program in https : www.yourwebsite.com v1 chat you need to modify this .. . .. . to this .. . .. . Of course don t forget to specify your app-id bot id and app secret .", ".. . .. . I have the exact problem with the OP .", "I followed the tutorial and it doesn t specify how to modify our code to comply with our server .", "It s possible that this could be an issue on Skype s end .", "I recently had 2 messages echoed by my bot and then it stopped working once again .", "I m deployed on Heroku by the way but that should not make a difference given that the bot is just looking for api endpoints .", "@polskais1 Mine is deployed to Heroku too .", "Just fyi", "Hmm good to know .", "I ll be sure to post a comment if I have any luck getting this thing working stably", "Any luck with getting your bot to work on Heroku", "Seeing the same issues myself - testing locally with ngrok works fine .", "Switching the messaging webhook to Heroku results in the same as the OP .", "My last resort is trying Azure but just curious if anyone s successfully deployed to Heroku .", "So where does the difference lie", "I would like that my bot echoes user message .", "Here is my server.js code : .. . .. . For testing this I use Bot Framework Emulator .", "When I type a message the bot responds me only with Hello World message and nothing else .", "Looks like it doesn t catch on message event .", "What s wrong here", "1 .", "Bot Emulator tested ok .. . 2 .", "Bot Framework Chat Box tested ok .. . 3 .", ".. . .. . UPDATE 2 April 13 : For anyone seeking for a solution .", "I cloned my original bot A to new one B .", "When I tested them the behavior was weird .", "I sent message to B but I received message from A while B didn t respond .. . 2 ." ] }
{ "confidence": [ 63.84468460083008, 62.022300720214844, 61.03294372558594, 59.29425048828125, 58.89431381225586, 58.02429962158203, 57.78066635131836, 56.862648010253906, 56.69048309326172, 51.05293273925781, 45.84108352661133, 44.399627685546875, 41.772037506103516, 41.731964111328125, 40.52607727050781, 39.50868606567383 ], "content": [ "Question : I ve written a Skype bot using the new Skype Bot SDK https : www.skype.com en developer . I ve uploaded my WebAPI-based bot on Azure and added the bot application in the Skype bot dashboard . However there is no information on how to add the bot to my local Skype account in order to communicate with the bot . I ve read that I can publish the bot and afterwards add it to the global Skype directory however this should be done only after the bot has been thoroughly tested . So how to test it beforehand .. . Answer : Solution : go to My bots https : developer.microsoft.com en-us skype-bots manage - click on the name of your bot - click the Add bot to Skype link .", "Question : 1 . Bot Emulator tested ok .. . 2 . Bot Framework Chat Box tested ok .. . 3 . Skype Integration tested ok .. . 4 . Bot added to contact-list ok .. . .. . But when I tried to chat with bot it does not respond anything .. . .. . And when I debugged on server-side no requests made from skype to my api endpoint . .. . .. . What did I do wrong Is there anyway I can debug the skype chatbot Thanks .. . .. . .. . .. . UPDATE : Web embedded bot is working but Skype bot doesn t . .. . .. . UPDATE 2 April 13 : For anyone seeking for a solution . I cloned my original bot A to new one B . When I tested them the behavior was weird . 1 . I sent message to B but I received message from A while B didn t respond .. . 2 . I sent message to A nothing happens on both A and B .. . .. . So I ended up with deleting A and B is working mysteriously . Thanks for all the help . Comment : @Prix : The code is working fine my question is not about the code . It s about the behavior of skype bot integrating with botframework . As you seen in my question all my testings are passed only the skype part is broken . I m sorry to say this but your comment is not constructive at all . Comment : Don t blame @Prix this question in its current form is unanswerable . Please read How to Ask http : stackoverflow.com questions how-to-ask and provide some context . Comment : @CodeCaster : I believe this question is answerable for someone who successfully build a bot for Skype . Maybe I was too naive for trying out my luck . The botframework just released out for a few days and not a lot of people have time to try it out . Thanks for your comment . .. . Answer : Please check the status of your bot on Skype Developer Portal https : developer.microsoft.com en-us skype-bots manage . I believe that you hit Publish when you created your Skype bot and your bot has status Pending Review . It looks like that bot will not work while the status is Pending Review . Do not Publish your Skype bot in that case your Skype bot will be in Preview state and it will start working immediately . Check this screenshot http : screencast.com t 5SSSo6V5 . I had the same issue when I published my bot . You cannot un-publish bot but you can delete it and create a new one . Please try it . Comment : thanks I just checked my bot status it s Preview and I did not try to publish the bot . Tried to create another bot too it s still not working Comment : @kienct89 try to update your skype . check this post - stackoverflow.com questions 36360321 skype-bots-do-not-work http : stackoverflow.com questions 36360321 skype-bots-do-not-work Comment : I tried to update Skype on both Desktop Mobile version it still doesn t work . Comment : I finally made it work please see my updated question . It s very weird though .", "Question : I m trying to get a Skype bot up and running based off of the echo example https : developer.microsoft.com en-us skype-bots docs tutorials simple-nodejs but I m struggling to make a successful POST to my app . When I send a post to v1 chat I get back a status of 201 successful creation and nothing in the body . My console.log does not print anything either which leads me to believe that the botService.on personalMessage .. . function is not being run . Does anyone have any insight into how these POST requests should be formatted I cannot seem to find anything in the documentation . My code : .. . Answer : Follow this https : developer.microsoft.com en-us skype-bots docs tutorials simple-nodejs tutorial you need to add your callback to your bot details . Comment : I have https : mydomain .com v1 chat set up as the Messaging Webhook in the bot s Details . The requests to my chat API are being received by my server but the bot services are not being run .", "Question : I ve seen examples of Bot Programming that works with Skype . Is it possible to develop enterprise bots that run on Skype for Business using Microsoft bot Cognitive service tools framework .. . Answer : Further going thru the Build 2016 videos and Microsoft support site reveals Skype bot programming is limited to consumer skype and not for Skype for Business . It seems microsoft has future plans to bring this to Skype for Business", "Question : I want to create a skype bot and am referring to https : developer.microsoft.com en-us skype-bots docs api chat for authorization the doc refers to https : azure.microsoft.com en-us documentation articles active-directory-v2-protocols-oauth-code but it is unclear about the scope to be mentioned for using skype bot apis . So can anybody tell me how to obtain authorization token for making skype bot rest api calls . .. . Answer : try this Comment : Woohoo Thank you so much for sharing this . It is not at all clear from their docs .", "Question : I ve seen examples of Bot Programming that works with Skype . Is it possible to develop enterprise bots that run on Skype for Business using Microsoft bot Cognitive service tools framework .. . Answer : Skype for Business does use UCWA Unified Communications Web API though the documentation is pretty dated it is possible to have a user account for the bot and use the API calls for direct messaging . This also requires some knowledge of the server that your Skype for Business is running through .", "Question : i am trying to build skype bot . I followed documentation given by skype but failed to create it using that . Can not get reply from bot . Thanks Comment : What have you tried so far Comment : developer.microsoft.com en-us skype-bots https : developer.microsoft.com en-us skype-bots followed this documentation Comment : Seems like decent tutorials . What makes you think answers here would be better Comment : I mean why did you fail following the tutorial What was wrong with the tutorial what answers should we give to you Comment : can not get reply from bot .. . Answer : In the example provided the bot isn t connecting to a skype server due to wrong server specified : .. . .. . You have to specify a valid skype server : .. . .. . You also specifying wrong API uri in the server.post well actualy that depends on your webhook settings but they weren t provided so I m assuming default : .. . .. . You have to use v1 chat for messaging . Try out this tutorial https : medium.com @littlelostify how-to-build-skype-bot-with-nodejs-ddec8372114c .cmll9o3tt . Comment : Is appid and botid are same what about appSecret is it the password or privatekey . . In debug mode I see skype-sdk.azure-utils Request not received over HTTPS redirecting to HTTPS endpoint Comment : it is working for me with ngrok but not working with https alone i have apache server running . Is that causing a problem Comment : Apache server For what purpose What do you mean not working what happens exactly Comment : I suggest you to isolate the problem and post a new question about it . Try to be more specific and describe all the details . What you are asking now is I did something but it is not working tell me why .", "Question : I ve seen examples of Bot Programming that works with Skype . Is it possible to develop enterprise bots that run on Skype for Business using Microsoft bot Cognitive service tools framework .. . Answer : Skype for Business is not yet supported by Bot Framework https : dev.botframework.com . To find all the messaging channels that are supported visit the Bot Framework s documentation site http : docs.botframework.com .", "Question : I m trying to get a Skype bot up and running based off of the echo example https : developer.microsoft.com en-us skype-bots docs tutorials simple-nodejs but I m struggling to make a successful POST to my app . When I send a post to v1 chat I get back a status of 201 successful creation and nothing in the body . My console.log does not print anything either which leads me to believe that the botService.on personalMessage .. . function is not being run . Does anyone have any insight into how these POST requests should be formatted I cannot seem to find anything in the documentation . My code : .. . Answer : Did you fill out the proper bot ID appId and appSecret segments in const botService Comment : Yes all of that information seems to check out .", "Question : I m trying to get a Skype bot up and running based off of the echo example https : developer.microsoft.com en-us skype-bots docs tutorials simple-nodejs but I m struggling to make a successful POST to my app . When I send a post to v1 chat I get back a status of 201 successful creation and nothing in the body . My console.log does not print anything either which leads me to believe that the botService.on personalMessage .. . function is not being run . Does anyone have any insight into how these POST requests should be formatted I cannot seem to find anything in the documentation . My code : .. . Answer : Final Edit Solution : I think the problem caused by Heroku somehow it could be something with their free tier 1 dyno . After some effort I uploaded the program to Azure and it is now working perfectly . .. . .. . Potential Solution : You need to change the server address in the server.post command . If you run your program in https : www.yourwebsite.com v1 chat you need to modify this .. . .. . to this .. . .. . Of course don t forget to specify your app-id bot id and app secret . If you don t have one you need to generate a password in your Skype application page . .. . .. . I have the exact problem with the OP . I followed the tutorial and it doesn t specify how to modify our code to comply with our server . So after running the program it only returns this .. . .. . code : ResourceNotFound message : does not exist .. . .. . In the Echo example in the Skype Bot Webpage it says .. . .. . We ll assume the bot s URL for messaging was set to https : echobot.azurewebsites.net v1 chat during registration . Comment : It s possible that this could be an issue on Skype s end . I recently had 2 messages echoed by my bot and then it stopped working once again . I m deployed on Heroku by the way but that should not make a difference given that the bot is just looking for api endpoints . Comment : @polskais1 Mine is deployed to Heroku too . Just fyi Comment : Hmm good to know . I ll be sure to post a comment if I have any luck getting this thing working stably Comment : Any luck with getting your bot to work on Heroku Seeing the same issues myself - testing locally with ngrok works fine . Switching the messaging webhook to Heroku results in the same as the OP . Via Papertrail I see skype-sdk.messagingHandler Received request receiving data . - but nothing from console.log Tried the full URL in the server.post command but no change . My last resort is trying Azure but just curious if anyone s successfully deployed to Heroku .", "Question : From what I could understand Microsoft Bot Framework appears to be a superset of Skype Bot Framework . As in you can develop Bot Applications using MS Bot Framework with Skype as the client . So where does the difference lie .. . Answer : Right now the Skype Bot API exposes additional functionality of Skype such as audio that aren t included in the Bot Framework . You can use either one though to build a text images only Skype bot . Under the covers the Bot Framework uses the Skype Bot Framework SDK just as you might if you coded to it directly .", "Question : null .. . Answer : I ve started with just a very simple skype bot using Node.js . I would like that my bot echoes user message . Here is my server.js code : .. . .. . For testing this I use Bot Framework Emulator . When I type a message the bot responds me only with Hello World message and nothing else . Looks like it doesn t catch on message event . What s wrong here", "Question : null .. . Answer : http : docs.botframework.com builder node guides core-concepts https : www.luis.ai this is the code i have to use to make a skype bot now i want to integrate my skype bot with microsoft lui api to train my bot automatically so it can do certain works automatically any help would be greatly appreciated", "Question : I ve added my Skype bot in preview mode to my Skype account . The Skype bot seems to be properly configured as he respons to the OnContactAddedAsync event properly by replying a pre-defined message . However I cannot further test the OnPersonalChatMessageReceivedAsync handler as I m not able to message my bot i.e . Skype shows me the following : .. . .. . Screenshot of the conversation with my bot http : i.stack.imgur.com KVWC2.png .. . .. . Is it because I m not added to the bot s contact-list If so how to add somebody to the bot s contact-list using the Skype Bot SDK I have not found any way to do so in the OnContactAddedAsync handler . Is it because of some other reason .. . Answer : You need to forcefully update your Skype client to the lastet version in order to make it work . Skype v7.21.0.100 does not work . Skype v7.21.85.100 does work . Skype v7.22.85.107 does work . When you add the bot to your contact-list in the latter version it automatically accepts the request and you are able to message the bot .", "Question : I am developing a Bot using Microsoft Bot Framework In that bot will respond with sending some images to the user . I configured it with slack and skype . In slack Images are displaying but in Skype nothing coming . To send pictures I used the following syntax .. . .. . Reference dev.botfrmaework.com http : docs.botframework.com connector message-content navtitle The Text property is Markdown section clearly mention how to link an image to reply message . If I reply with just link like below skype able to understand and displaying links . But If I mention like above skype not able to understand . .. . Answer : Each channel has it s own peculiarities . Slack happens to be able to process images sent in-line as you ve shown above . However this will not work generically across all channels . To send images generically add them as attachments : Comment : Using attachments is good but in my case I am using Form Builder and in the middle of the conversation depends on user choice bot will display some information along with images . Example Bot will display list of pizzas with images for each pizza . The output would be like below 1 . PizzaA image of PizzaA 2 . PizzaB image of PizzaB . . . etc .", "Question : null .. . Answer : I want to open Skype Android app and redirect user to the bot conversation screen of XYZ Bot . As it happens while redirecting user to a chat conversation with particular Skype user through below URI ." ] }
[ "yes-answer-long", "yes-answer-short" ]
sdk
UNK_RELATION
codeigniter-form-helper@codeigniter@108
codeigniter-form-helper -- form helper is a set of functions that help the user when working with forms in @placeholder .
{ "confidence": [ 49.24056625366211, 44.94886016845703, 43.422447204589844, 33.077354431152344, 29.206871032714844, 29.206871032714844, 28.978458404541016, 26.177135467529297, 24.595600128173828, 23.40312385559082, 23.06694984436035, 22.757862091064453, 22.757862091064453, 22.757862091064453, 19.829004287719727, 19.829004287719727, 19.829004287719727, 19.829004287719727, 19.829004287719727, 19.829004287719727, 19.829004287719727, 19.829004287719727, 19.65723419189453, 18.103496551513672, 17.514671325683594, 16.460451126098633, 16.01535987854004, 14.025257110595703, 14.025257110595703, 14.025257110595703, 14.025257110595703, 14.025257110595703, 14.025257110595703, 14.025257110595703, 14.025257110595703, 14.025257110595703 ], "content": [ "try to use form open and form close .. . .. . all form helper functions that will help .", "However I can t work out how to make the Codeigniter form helper render parameters other than ID and Value in each option .", "You would need to extend CI s Form Helper and modify form dropdown to accept other attributes like ID s .. . .. . you will have to extend the helper .", "to extend the native Form Helper you ll create a file named application helpers MY form helper.php and add or override functions : .. . .. . if you want to override function form dropdown .. . .. . simply write the function the way you want in MY form helper.php .. . .. . here is the base function .. . .. . you have to edit this part .. . .. . as you can see only the option s value attribute is set by the function you can edit this code and do the thing you want .. . .. . try it if you could not do it tell me i ll help you but first give it a try :", "I need to modify a site that was written in Codeigniter but I m no expert .", "The current code looks like : .. . .. . This renders as .. . .. . Is there a way for me to make Codeigniter render", "You can use text helper character limiter string 100", "One thing I d like to do is modify a select control in a form to use ms-dropdown http : www.marghoobsuleman.com jquery-image-dropdown for a drop-down list including pictures .", "Presumably because the token is not being received the postJson call is not submitting the existing form .", "CodeIgniter gives an error The action you have requested is not allowed .", "I ve found that I can work around this problem by setting a form field to contain the result-of ko.utils.stringifyJson self.pages but to get that working I needed to reference json2.js .", "As I understand it this means the POST is missing the hidden token from the form that proves that an attack is not being done .", "Is there a way to either submit the required token along with the JSON data or submit the JSON data with the existing form", "Could you post your form HTML and controller code so I can have a look at them", "In this case to make ms-dropdown work it would need to also render data-image .. . in each option .", "You can t .", "Consider doing something like this : .. . .. . dropdown filepath would use the option value as keys and store the filepath as the value .", "Then you can simply access filepath this .val upon change event .", "Example output : .. . .. . As much as I love using data- attributes one must not forget other ways to achieve their goals .", "In case it helps anyone I found a work-around using JQuery .", "I made a javascript function that applied the data-image attribute to each option field once the page was ready then called the msDropdown function afterwards .", "This seems to have worked so now I just need someone to solve the same problem as this guy http : stackoverflow.com questions 17965864 msdropdown-child-shown-only-by-3px-on-the-first-click .. .", "I m build a website application in Codeigniter latest version and I want to use exception function to cut or limit my text in case don t allow that text to break my web layout .", "when it fails the check for CSRF .", "Now My problem is solved by my coding as below .. . .. . It might can help to someone who want it", "I m not sure what you mean about there being no POST action defined on my controller there is a test to see if POST is set with an associated action if that s what you mean .", "But I want to create a function to break or cut by characters or length of whole string .. . .. . Example : if I have 2000 character of string-length but I want to show only 100 characters of string-length count bother spaces and special character .. . .. . How could I do with this function Please help .. . .. . Thanks you in advance", "This below I will break my text to show only short word by using space between one word to another word .", "The token is generated automatically with a call to the CI form open function .", "In my case I m using Knockout to post the contents of a ViewModel for saving like this : .. . .. . I ve found solutions elsewhere that simply turn off the CSRF setting for the specific page but that doesn t seem like a good solution .", "In general this warning message indicates you are trying to access your controller with a POST HTTP verb while there s no POST action defined on your controller .", "Could you check this", "Also have you confirmed setting of the CSRF solves your problem", "@Anzeo I can confirm that turning off CSRF fixes the issue and the value of POST is ok in that case .", "It isn t elegant and I wish I knew a better way of doing it .", "or : I think it s from time zone difference as the Security class depends on time for hashing ." ] }
{ "confidence": [ 62.093406677246094, 50.36480712890625, 47.67451477050781, 44.4433479309082, 34.80938720703125 ], "content": [ "Question : I need to modify a site that was written in Codeigniter but I m no expert . One thing I d like to do is modify a select control in a form to use ms-dropdown http : www.marghoobsuleman.com jquery-image-dropdown for a drop-down list including pictures . However I can t work out how to make the Codeigniter form helper render parameters other than ID and Value in each option . In this case to make ms-dropdown work it would need to also render data-image .. . in each option . The current code looks like : .. . .. . This renders as .. . .. . Is there a way for me to make Codeigniter render .. . Answer : You can t . You would need to extend CI s Form Helper and modify form dropdown to accept other attributes like ID s .. . .. . you will have to extend the helper . to extend the native Form Helper you ll create a file named application helpers MY form helper.php and add or override functions : .. . .. . if you want to override function form dropdown .. . .. . simply write the function the way you want in MY form helper.php .. . .. . here is the base function .. . .. . you have to edit this part .. . .. . as you can see only the option s value attribute is set by the function you can edit this code and do the thing you want .. . .. . try it if you could not do it tell me i ll help you but first give it a try :", "Question : I need to modify a site that was written in Codeigniter but I m no expert . One thing I d like to do is modify a select control in a form to use ms-dropdown http : www.marghoobsuleman.com jquery-image-dropdown for a drop-down list including pictures . However I can t work out how to make the Codeigniter form helper render parameters other than ID and Value in each option . In this case to make ms-dropdown work it would need to also render data-image .. . in each option . The current code looks like : .. . .. . This renders as .. . .. . Is there a way for me to make Codeigniter render .. . Answer : Consider doing something like this : .. . .. . dropdown filepath would use the option value as keys and store the filepath as the value . Then you can simply access filepath this .val upon change event . Example output : .. . .. . As much as I love using data- attributes one must not forget other ways to achieve their goals .", "Question : I need to modify a site that was written in Codeigniter but I m no expert . One thing I d like to do is modify a select control in a form to use ms-dropdown http : www.marghoobsuleman.com jquery-image-dropdown for a drop-down list including pictures . However I can t work out how to make the Codeigniter form helper render parameters other than ID and Value in each option . In this case to make ms-dropdown work it would need to also render data-image .. . in each option . The current code looks like : .. . .. . This renders as .. . .. . Is there a way for me to make Codeigniter render .. . Answer : In case it helps anyone I found a work-around using JQuery . I made a javascript function that applied the data-image attribute to each option field once the page was ready then called the msDropdown function afterwards . This seems to have worked so now I just need someone to solve the same problem as this guy http : stackoverflow.com questions 17965864 msdropdown-child-shown-only-by-3px-on-the-first-click .. .", "Question : CodeIgniter gives an error The action you have requested is not allowed . when it fails the check for CSRF . As I understand it this means the POST is missing the hidden token from the form that proves that an attack is not being done . The token is generated automatically with a call to the CI form open function . In my case I m using Knockout to post the contents of a ViewModel for saving like this : .. . .. . I ve found solutions elsewhere that simply turn off the CSRF setting for the specific page but that doesn t seem like a good solution . Presumably because the token is not being received the postJson call is not submitting the existing form . Is there a way to either submit the required token along with the JSON data or submit the JSON data with the existing form Comment : In general this warning message indicates you are trying to access your controller with a POST HTTP verb while there s no POST action defined on your controller . Could you check this Also have you confirmed setting of the CSRF solves your problem Comment : @Anzeo I can confirm that turning off CSRF fixes the issue and the value of POST is ok in that case . I m not sure what you mean about there being no POST action defined on my controller there is a test to see if POST is set with an associated action if that s what you mean . Comment : I ve found that I can work around this problem by setting a form field to contain the result-of ko.utils.stringifyJson self.pages but to get that working I needed to reference json2.js . It isn t elegant and I wish I knew a better way of doing it . Comment : Could you post your form HTML and controller code so I can have a look at them .. . Answer : try to use form open and form close .. . .. . all form helper functions that will help . or : I think it s from time zone difference as the Security class depends on time for hashing .", "Question : I m build a website application in Codeigniter latest version and I want to use exception function to cut or limit my text in case don t allow that text to break my web layout . This below I will break my text to show only short word by using space between one word to another word . But I want to create a function to break or cut by characters or length of whole string .. . .. . Example : if I have 2000 character of string-length but I want to show only 100 characters of string-length count bother spaces and special character .. . .. . How could I do with this function Please help .. . .. . Thanks you in advance Comment : You can use text helper character limiter string 100 .. . Answer : Now My problem is solved by my coding as below .. . .. . It might can help to someone who want it" ] }
[ "yes-answer-long", "yes-answer-short" ]
codeigniter
UNK_RELATION
wsdualhttpbinding@wcf-binding@49
wsdualhttpbinding -- a secure and interoperable @placeholder that is designed for use with duplex service contracts that allows both services and clients to send and receive messages .
{ "confidence": [ 44.19065475463867, 39.02214431762695, 37.88862991333008, 37.66872787475586, 32.97882080078125, 32.3568115234375, 32.025108337402344, 31.517745971679688, 30.392578125, 30.331520080566406, 30.101276397705078, 29.586105346679688, 29.187931060791016, 29.187931060791016, 29.044036865234375, 28.888336181640625, 28.44426727294922, 28.264148712158203, 27.961013793945312, 27.74573516845703, 27.65048599243164, 27.606426239013672, 27.606426239013672, 27.452239990234375, 27.4134521484375, 27.269283294677734, 27.188865661621094, 27.086368560791016, 27.045948028564453, 26.704334259033203, 26.689956665039062, 26.481258392333984, 26.327072143554688, 26.270462036132812, 26.17177963256836, 26.16720199584961, 26.152362823486328, 26.097501754760742, 26.049686431884766, 26.036388397216797, 25.54779815673828, 25.523635864257812, 25.492816925048828, 25.492816925048828, 25.39011001586914, 24.996318817138672, 24.924522399902344, 24.76081657409668, 24.5792236328125, 24.467618942260742, 24.367652893066406, 24.367652893066406, 24.367652893066406, 24.367652893066406, 24.309268951416016, 24.144245147705078, 24.129016876220703, 23.986003875732422, 23.851749420166016, 23.851749420166016, 23.851749420166016, 23.851749420166016, 23.810218811035156, 23.744953155517578, 23.60439109802246, 23.069442749023438, 23.01910972595215, 23.01910972595215, 23.01910972595215, 23.003849029541016, 22.860836029052734, 22.860836029052734, 22.726585388183594, 22.726585388183594, 22.726585388183594, 22.726585388183594, 22.61978530883789, 22.563980102539062, 22.562700271606445, 22.407928466796875, 22.398603439331055, 22.336952209472656, 22.170780181884766, 22.127962112426758, 22.116056442260742, 22.116056442260742, 22.114076614379883, 21.65530776977539, 21.64124298095703, 21.64124298095703, 21.64124298095703, 21.64124298095703, 21.614477157592773, 21.51229476928711, 21.51229476928711, 21.51229476928711, 21.354808807373047, 21.043792724609375, 20.990890502929688 ], "content": [ "MSDN : .. . .. . The WSDualHttpBinding provides the same support for Web Service protocols as the WSHttpBinding but for use with duplex contracts .", "Is there a way to send multiple messages per poll in wsDualHttpBinding", "I am using a duplex communication over wsDualHttpBinding .", "wsDualHttpBinding doesn t use polling - in fact the only duplex binding that does is PollingDuplex .", "I need to use wsDualHttpBinding .", "WSDualHttpBinding aka duplex binding requires session to work correctly .", "netTcpBinding is better for duplex communication communication with callbacks and it s more performant than WSDualHttpBinding which is the preferred binding for duplex communication over HTTP .", "I have a WsDualHttpBinding to call a service from a client .", "I am using WCF WSDualHttpBinding Service .", "But not wsDualHttpBinding .", "UPDATE : check this link https : blogs.oracle.com arungupta entry wshttpdualbinding a non interoperable binding to read why WSDualHttpBinding is not interoperable with Java", "This has been so frustrating thinking that my only implementation for Duplex is using wsDualHttpBinding .", "Runtime Context : a WCF service used WSDualHttpBinding running on Linux by Mono .", "I have build a simple WCF service using wsDualHttpBinding .", "I successfully implemented a WCF service with wsDualHttpBinding in MVC .", "I m not sure dual binding is interoperable with clients other than WCF .", "The Polling duplex binding supports multiple messages per poll .", "I m using the same channel all to time either to receive the callbacks messages or to send out new requests .", "PS : Is there any way to configure WsDualHttpBinding in an absolutely non secure way that would not ask any credential at all", "I am trying to upload a large object 300 MB from client to service using wsDualHttpBinding .", "I have a number of clients communicating using WCF wsDualHttpBinding that are accessing a host asking for information .", "I have a question on wsDualHttpBinding .", "This is done using WSDualHttpBinding .", "I have implemented wcf service with duplex binding and it is working fine .", "In general for duplex communication over the internet you have the WSDualHttpBinding http : msdn.microsoft.com en-us library system.servicemodel.wsdualhttpbinding.aspx and if you have a Silverlight client Silverlight doesn t support WSDualHttpBinding you can use PollingDuplexHttpBinding http : msdn.microsoft.com en-us library system.servicemodel.pollingduplexhttpbinding 28v vs.95 29.aspx .", "I am trying to configure my wcf service to use a wsDualHttpBinding over https .", "my case is that I m using wsDualHttpBinding as a binding .", "I known my Service works because I have logger - but my clients don t receive callbacks .", "We would like to send messages to all connected clients when weight changed .", "wsDualHttpBinding doesn t support transport security .", "So I have to use wsDualHttpBinding with my WPF client .", "This connection is based on WSDualHTTPBinding .", "I am writing a WCF service that requires a duplex channel .", "All of the other duplex bindings send the message directly to the client - they work slightly differently to eachother wsDualHttpBinding has a second connection from the server to the client whereas NetTcpBinding uses a single connection from client to service and the service sends messages back along this same connection .. . .. . If you want to batch up notifications in the server for less round trips then you would have to write that batching", "I have a wcf service which use wsDualHttpBinding i get that error when i try to connect to it using a different pc in the same domain .", ".. . wsDualHttpBinding .. . binding name wsDualBinding .. . security mode Message .. . message clientCredentialType Windows .. . security .. . binding .. . wsDualHttpBinding .. . .. . .. . I think this is the issue .", "to make long story as short as possible I made a duplex WCF service using wsdualhttpbinding tested it on my local machine using Visual Stuido and using IIS7 thigs are working fine i had to use windows-authentication on IIS7 to make it work thu .", "The client needs to get database data so the WCF service returns Linq-to-SQL entities System.Data.Linq.Mapping.TableAttribute .. . .. . To implement a push communication from server to client we are going to implement duplex contract with WSDualHttpBinding .", "I ve created a Windows Service server and a WPF client that uses WCFs wsdualhttpbinding callback functionality .", "In this case you may need to have the client poll for messages instead of receiving them via the callback ie client pulls messages instead of having them pushed via a callback .. . .. . See this http : stackoverflow.com questions 59677 wsdualhttpbinding-for-duplex-callbacks post for more .", "But using wsDualHttpBinding I able to upload 28 MB only .", "With one weighbridge can be connected only one client so I have developed WCF which communicate with clients by wsDualHttpBinding and callbacks .", "wsDualHttpBinding never work with windows-authentication at IIS .", "please be advised that im using wsDualHttpBinding not basic or wsHttpBinding .", "I have a WCF Service Library Project for Duplex Communication and a Windows Forms Application for testing with service-reference to WCF Project .", "EDIT : .. . .. . To change that example to use netTcpBinding just change the bindings in the config file to use netTcpBinding instead of wsDualHttpBinding .", "The strange thing is when I set the service configuration from net.tcp to wsdualhttpbinding it works perfect .", "Because my Web Service is separated in three smaller services one of them is using the WsDualHttpBinding I needed to tell iis that this one doesn t requires the ssl-certificate for transport .", "WCF Duplex not working under Azure .", "Since you are using wsDualHttpBinding then both your server and your client need to be reachable on the ports specified in your config .", "Does wsDualHttpBinding need special permissions or something", "I am using wsDualHttpBinding server is self hosted .", "I am not really sure if soapUI is supprting WSDualHttpBinding .", "can t the chat application be implemented through wcf wsdualhttpbinding", "Your WCF clients are accessing the WCF service over the Internet and messages may be routed through intermediate systems .", "The methods in ChatService are what clients call on the server and the methods in IChatServiceCallback is what the service invokes on the clients .", "At this point I would like to ask : Has anyone ever had a WCF wsDualHttpBinding service actually working in a remote host such as Azure", "I m not confident that you ll be able to use WsDualHttpBinding with a non-.NET client but others may have a way to do that .", "I able to setup everything for wsDualHttpBinding with IIS is allowed for IIS anonymous .", "That means problem with reliable messaging session which is used by WSDualHttpBinding .", "The structure was I have a selfhost wcf with tcp and WSDualHttpBinding protocols .", "I found WCF WsDualHttpBinding accept http however https is not acceptable .", "I knew this wsDualHttpBinding didn t pass the smell test ... . From Juval Lowy s book Programming WCF Services : Mastering WCF and the Azure AppFabric Service Bus : .. . .. . ...the WSDualHttpBinding is mostly unusable since it is practically impossible to tunnel through various communication barriers separating the service from the client and the need to find a specific web-server machine makes this impractical .", "I can not change the code of the WCF service and it only offers NetTcpBinding or wsDualHttpBinding .. . .. . One work-around would be to create a C communication channel to manage the communication between the service and the client .", "If your client can easily be reached by adding a firewall or port forwarding rule then wsDualHttpBinding may still be suitable - otherwise using wsDualHttpBinding is probably not ideal .", "If your service is something simple and you don t expect to do heavy processing with it by the looks of it you re just trying to get the list of clients connected to it then stick with wsDualHTTPBinding since the HTTP protocol will work in any environment and you don t have to worry about firewalls as you would with netTcpBinding .", "WsDualHttpBinding is .NET only it can t be even consumed by Silverlight .", "As stated WSDualHttpBinding does not support security at the Transport level .", "I think it has something to do with the nature of the wsDualHttpBinding .", "I can connect to a service from WcfTestClient as well so it s there unfortunatelly WcfTestClient doesn t allow calling the methods because it doesn t support WsDualHttpBinding .", "I realized why it would be more difficult to use the wsDualHttpBinding and I would be better off going with NetTcpBinding .", "You ll need to either use WsDualHttpBinding which may force you out of REST or look at some sort of polling option .", "WSDualHttpBinding only supports SOAP security and requires reliable messaging .", "I have a third-party WCF webservice which works with WSDualHttpBinding .", "I have problem with using WCF WSDualHttpBinding only in WPF application .", "Is there any different between net.tcp and wsdualhttpbinding that can cause this strange problem", "My current config looks like this : .. . .. . Service .. . .. . Binding .. . .. . Behavior .. . .. . When i call the service in my browser it says : No baseaddress for schema http found with the the endpoint binding WSDualHttpBinding .", "I use app.config create a EndPoint used WSDualHttpBinding .. . .. . app.config for service partial .. . .. . The service Code : .. . .. . Exception : The default-value for property textEncoding has a different type than the one of the property itself : expected System.Text.Encoding but was System.String About the detail info please take a look at the snapshot of exception", "Are both service and client running under domain accounts", "After reading that article .NET Meanderings - WCF Duplex.. .", "Having said that I have used it a couple of times for my services and my clients have been able to consume the service over the internet without any problems-after I forwarded the ports on both the client and server ends .", "Thanks In Advance .. . .. . Murugan .. . .. . Here is the configuration I am using : .. . .. . And contracts", "It throws System.OutofMemory and Failed to allocate memory exceptions when the service tries to send the data to more than 3 clients concurrently .", "But how can the service host access the client to send the correct answer", "Is there a reason that the out-of-the box WCF duplex communication can not work", "I know duplex binding is problematic because of the server callback but... .", "i create a web service in vs 2010 with dot net framework 4.0 and publish it to IIS 7.0 in windows-7 i use the WSdualhttpbinding for duplex binding as below : .. . .. . and i create a client application that use this service when i m work in same machine every thing is ok so i should use this application in intranet the point problem is here : when i create a client application in my friend s machine and add service-reference the reference appeare and i can use it but in run time i have time out error from server", "Below is my web.config file .. . .. . As I have already specify a wsDualHttpBinding it still give this exception when I try to update service-reference .", "I seemed to have fixed this but all I have done is change the binding from WSDualHTTPBinding to NetTcpBindng .", "Did you remember clientBaseAddress http : IP : PORT NameService in binding in wsdualhttpbinding on client-side", "So there is this issue with making sure the client is still available when doing a callback in WCF when using WSDualHttpBinding .", "Possible same issue stackoverflow.com questions 19922710 http : stackoverflow.com questions 19922710 wcf-wsdualhttpbinding-binding-on-windows-azure-vm", "I have updated the answer with a link that explains why this binding is not interoperable with java .", "Our client app is a desktop WPF app and we use wsdualhttpbinding protocol to communicate with the server .", "When using WSDUALHTTPBINDING with message security is it recommended to use Transport security also i.e SSL", "Per the original question : .. . .. . When using WSDUALHTTPBINDING with message security is it recommended to use Transport security also i.e SSL", "http : stackoverflow.com questions 4679946 how-to-communicate-between-wcf-service-and-host-application .. . .. . Only I can not use the Singleton constructor but have to use the Typeof . . contructor of the host because I can have more clients .", "I m working on an application to administer some stuff in another server such as send an IIS Reset request to the server and I m using wsDualHttpBinding so I can message the user the progress as everything happens through callbacks .", "Keep in mind I have to keep a duplex type of connection ." ] }
{ "confidence": [ 65.70529174804688, 52.78512191772461, 49.22669982910156, 49.18794250488281, 48.78724670410156, 48.36255645751953, 47.493404388427734, 47.38115310668945, 46.96444320678711, 46.44137954711914, 45.953617095947266, 45.78252029418945, 44.11152648925781, 43.59880828857422, 43.235313415527344, 40.92622375488281, 39.3032112121582, 39.12238311767578, 36.680335998535156, 36.61335754394531 ], "content": [ "Question : The Polling duplex binding supports multiple messages per poll . However pollingDuplex is not supported for non-silverlight clients . So I have to use wsDualHttpBinding with my WPF client . Is there a way to send multiple messages per poll in wsDualHttpBinding .. . Answer : wsDualHttpBinding doesn t use polling - in fact the only duplex binding that does is PollingDuplex . All of the other duplex bindings send the message directly to the client - they work slightly differently to eachother wsDualHttpBinding has a second connection from the server to the client whereas NetTcpBinding uses a single connection from client to service and the service sends messages back along this same connection .. . .. . If you want to batch up notifications in the server for less round trips then you would have to write that batching", "Question : I currently develop several services WCF to work with TFS 2010 . Some of them use the event subscription tool while others are consumed through the sharepoint portal small wpf applications etc . I m working on an application to administer some stuff in another server such as send an IIS Reset request to the server and I m using wsDualHttpBinding so I can message the user the progress as everything happens through callbacks . But I can t even call the method in the service because whenever the channel tries to open I get timeout exceptions no matter what my OpenTimeout is . This is my config client-side .. . .. . Server-side : .. . .. . Contracts : .. . .. . Service Not posting the code since the problem happens before it s reached : .. . .. . In fiddler I get this on client-side : .. . .. . 7 202 HTTP tfsserver : 8080 DeployService ResetService.svc 0 private resetman.vshost : 9000 .. . .. . I get 202 several times then time passes and the timeout occurs .. . .. . Running fiddle on the server I get absolutely nothing . What may be happening EDIT : Weird localhost works . Does wsDualHttpBinding need special permissions or something Didn t find anything on the internets Comment : Did you resolve this Comment : @wal No I ended up using wsHttpBinding and polling the server for the status from time to time . .. . Answer : Since you are using wsDualHttpBinding then both your server and your client need to be reachable on the ports specified in your config . This is the reason it works on your local machine as you dont have any port issues . The timeout is consistent with a firewall blocking or your server unable to route back to your client . If your client can easily be reached by adding a firewall or port forwarding rule then wsDualHttpBinding may still be suitable - otherwise using wsDualHttpBinding is probably not ideal . In this case you may need to have the client poll for messages instead of receiving them via the callback ie client pulls messages instead of having them pushed via a callback .. . .. . See this http : stackoverflow.com questions 59677 wsdualhttpbinding-for-duplex-callbacks post for more . and also this http : social.msdn.microsoft.com Forums en wcf thread 73a9abb9-29be-4e05-ac6b-57123a52f003 one .", "Question : null .. . Answer : I am developing WCF service which is connected with weighbridge . We would like to send messages to all connected clients when weight changed . With one weighbridge can be connected only one client so I have developed WCF which communicate with clients by wsDualHttpBinding and callbacks . This solution works but after long time 1-2 days WCF service stop sending callbacks . I known my Service works because I have logger - but my clients don t receive callbacks . My service also don t throw exceptions . It is my service pseduo code .. . .. . and config .. . .. . Could you help me what i have done wrong I can t find solution for it .", "Question : I am trying to configure my wcf service to use a wsDualHttpBinding over https . My current config looks like this : .. . .. . Service .. . .. . Binding .. . .. . Behavior .. . .. . When i call the service in my browser it says : No baseaddress for schema http found with the the endpoint binding WSDualHttpBinding . Registered baseaddressschema is https . By googeling the problem I only end up with samples for normal wsHttpBindings but nothing for the dual binding . I already enterd a HttpsGetUrl but ended up with the same error . Have I overseen some value or why is he trying to get the information over http Btw . changing the binding to NetTcp is not an option Hope any of you can help me here . thx .. . Answer : wsDualHttpBinding doesn t support transport security . MSDN : .. . .. . The WSDualHttpBinding provides the same support for Web Service protocols as the WSHttpBinding but for use with duplex contracts . WSDualHttpBinding only supports SOAP security and requires reliable messaging . So you can rely on message security here only . Comment : I am aware that the dual binding doesn t support transport security and I am not trying to achive this . What I try is to use the SSL certificate to sign and crypt my message but when i try to receive the metadata of my service i get the message described in be question . For now I have a valid certificate on my server and all of my wsHttpBindings replay to the request correctly using https .", "Question : When using WSDUALHTTPBINDING with message security is it recommended to use Transport security also i.e SSL Maybe it depends on the scenario . In my case both client and service are located on an intranet . If the service was on a webserver over the internet would the answer be different Update now that i know wsduallhttpbinding does not support transport security is message security as secure or should i use another binding that supports ssl under my scenario .. . Answer : Per the original question : .. . .. . When using WSDUALHTTPBINDING with message security is it recommended to use Transport security also i.e SSL As stated WSDualHttpBinding does not support security at the Transport level . So the original question is sort of defeated . Per the update to the question : .. . .. . Update now that i know wsduallhttpbinding does not support transport security is message security as secure or should i use another binding that supports ssl under my scenario .. . .. . Message level security is actually superior as it provides end-to-end security . Transport level security only provides point-to-point security . Message security directly encrypts and signs the message so even routing the messages through intermediate systems does not break the security . You also get the additional bonus that message security is transport-independent so it can be used with any transport protocol . MSDN actually recommends using message security in internet scenarios : .. . .. . Use message security in the following scenarios : .. . .. . You are sending a message to a WCF service and the message is likely to be forwarded to other WCF services or may be routed through intermediate systems . Your WCF clients are accessing the WCF service over the Internet and messages may be routed through intermediate systems . This Message and Transport Security http : msdn.microsoft.com en-us library ff648863.aspx article on MSDN will be terrifically helpful to you .", "Question : I have been struggling with this problem for more than a week . I have a third-party WCF webservice which works with WSDualHttpBinding . I have wsdl file from them and I am trying to communicate . I used : .. . .. . 1 . Metro which generates Java code . I tried it but it didn t work . There was a problem something like tempuri.org WebServiceName is not a proper name . List of webservices are : .. . .. . 2 . SoapUI - I tried to communicate and I got 202 accepted . I used wireshark and it seems like webservice can t proceed the soap xml properly . I am not really sure if soapUI is supprting WSDualHttpBinding . I really appreciate any hints articles or solutions . .. . Answer : I m not sure dual binding is interoperable with clients other than WCF . I read once that Metro WSIT stack for Java supports it . But the safest will be to use a WCF client . The reason is that the dual binding assumes the client should get messages from the server in a callback endpoint . This is not so standard also in terms of defining this properly in a WSDL file . You might be able to get away with it by setting up a dedicated-server on your client-side waiting for the WCF response . But the wiring will be time consuming . If you own the server you might want to make it more explicit that the client is supposed to have a server endpoint to get callbacks to or you could use some WCF router as an intermediate . UPDATE : check this link https : blogs.oracle.com arungupta entry wshttpdualbinding a non interoperable binding to read why WSDualHttpBinding is not interoperable with Java Comment : The thing is that I can t use WCF client Yeah i have one and it works but the main goal is to communicate via Java Comment : Then I would recommend to either change the server binding or use a WCF proxy router in the middle . Not every WCF configuration can be consumed by Java . I have updated the answer with a link that explains why this binding is not interoperable with java . Comment : Thank you so much for your response : Anyway there is a response for the link you ve updated : link https : weblogs.java.net blog haroldcarr archive 2009 04 metro interoper.html So after reading this I thought there is a way to use both Java and wsDualHttpBinding", "Question : Ithis issue has already been asked over and over but whatever the solution was on people s project it doesn t work for me . I have a WsDualHttpBinding to call a service from a client . My config for the client is this : .. . .. . my clients are defined like this a bit further : .. . .. . this work in local mode on the same machine . When i deploy the service on a server and launch my client i get the following error message after a 1 minute timeout : .. . .. . Unhandled exception : System.ServiceModel.CommunicationException : Security negotiation failed because the remote party did not send back a reply in a timely manner . This may be because the underlying transport connection was aborted . I understand that the problem is either because of the port but here i deployed it especialy on a different one from 80 or security issues . So i tried to insert security attributes to my binding configuration : .. . .. . security mode none .. . .. . and others that i don t remember . I can t get to my service even on the same machine once I deployed it while it worked fine on VS2012 . My services are well hosted i can reach them from a web browser and from distant machines . Thanks in advance . PS : Is there any way to configure WsDualHttpBinding in an absolutely non secure way that would not ask any credential at all .. . Answer : I had the same issue but it was because of my client code . For example :", "Question : I have a number of clients communicating using WCF wsDualHttpBinding that are accessing a host asking for information . This information has be to searched this means that the answer is can not be given back in the same thread . The problem looks the same as in : How to communicate between WCF service and host application http : stackoverflow.com questions 4679946 how-to-communicate-between-wcf-service-and-host-application .. . .. . Only I can not use the Singleton constructor but have to use the Typeof . . contructor of the host because I can have more clients . But how can the service host access the client to send the correct answer Regards .. . .. . Rob .. . Answer : Is there a reason that the out-of-the box WCF duplex communication can not work Here s a definition and example : http : msdn.microsoft.com en-us library ms731064.aspx Comment : Yes all examples I found use the solution that they immediately send an answer back to the server . But in my situation the host passes the message to an other thread to find the answer for the client and when this thread returns the answer the host has to start the callback to the client . But how does this host access the service that is initiating the question", "Question : I have service InstanceContextMode sets to Single mode . I m connecting with many clients to this service getting it s callback channel with OperationContext.Current.GetCallbackChannel IMyService and tring to send some message to each connected client but I get the same message twice in only one client this one which was conneceted later .. . .. . If I have InstanceContexMode PerSession everything works great . What did I missed Because be default I suppose it is possible right .. . Answer : WSDualHttpBinding aka duplex binding requires session to work correctly . The session is used to keep track of the callback channel on a per-client basis IIRC .", "Question : WCF Duplex not working under Azure . Everything works fine under IIS Express . I know duplex binding is problematic because of the server callback but... . I already shut down my firewall . TCPView Sysinternals shows 10 to 12 packets being sent received by the client and then it just dies.. . nothing happens . I set to 10 minutes all timeouts i could . Please see my config files below . SERVER CONFIG : .. . .. . CLIENT CONFIG : Comment : Possible same issue stackoverflow.com questions 19922710 http : stackoverflow.com questions 19922710 wcf-wsdualhttpbinding-binding-on-windows-azure-vm Comment : At this point I would like to ask : Has anyone ever had a WCF wsDualHttpBinding service actually working in a remote host such as Azure I just deployed my CLIENT not the Service still on Azure in an EC2 machine on AWS cloud just to make sure the problem is not with my dev machine and the behavior is exactly the same it just doesn t work... . Has anyone ever gotten wsDualHttpBinding actually working on a remote host Please let me know . It is a YES or NO question . Thank you . .. . Answer : I knew this wsDualHttpBinding didn t pass the smell test ... . From Juval Lowy s book Programming WCF Services : Mastering WCF and the Azure AppFabric Service Bus : .. . .. . ...the WSDualHttpBinding is mostly unusable since it is practically impossible to tunnel through various communication barriers separating the service from the client and the need to find a specific web-server machine makes this impractical . I solved my problem by simply using netTcpBinding instead... . You just need to get IIS to work with TCP protocol . There s plenty of articles out there explaining how to do it . Here s one : http : msdn.microsoft.com en-us library ms731053.aspx .. . .. . Cheers .", "Question : null .. . Answer : I have a question on wsDualHttpBinding . I able to setup everything for wsDualHttpBinding with IIS is allowed for IIS anonymous . But then if I remove the IIS anonymous which to let every session connected to the IIS is forced to authenticate this one will never work out . .. . wsDualHttpBinding .. . binding name wsDualBinding .. . security mode Message .. . message clientCredentialType Windows .. . security .. . binding .. . wsDualHttpBinding .. . .. . .. . I think this is the issue . It only allows for message type security but not the transport security . Am I right Yea I was right . wsDualHttpBinding never work with windows-authentication at IIS . http : social.msdn.microsoft.com forums en-US wcf thread .. . .. . .. . I am thinking to host 2 WCF to IIS one for wsHttpBinding and another is wsDualHttpBinding . Basically file system watcher will be a different process which won t affect my existing work : Comment : Without anonymous does a wsHttpBinding still work Comment : Well wsHttpBinding works great for me in HTTP and HTTPS . But not wsDualHttpBinding . I want to do the real-time File System Watcher and send back to client . wsDualHttpBinding doesn t support transport security . Comment : You re mixing https and anonymous access . Comment : Well basically I just want to have IIS Authentication Level Anonymous turns off and WCF in duplex communication . Comment : Right . Please post as an own answer and accept it someday it may help a googler .", "Question : I m actually developing a client-server application : the client consumes a WCF service . The client needs to get database data so the WCF service returns Linq-to-SQL entities System.Data.Linq.Mapping.TableAttribute .. . .. . To implement a push communication from server to client we are going to implement duplex contract with WSDualHttpBinding . Here is my question : for the future we think about developing mobile client Android iPhone I did research about interoperability but the answers were about using standards like REST that i don t use . Is it possible to use my service entities exchange + WSDual binding Comment : If i want to implement push notifications i need to use a different API for each client type or do you know an universal standart usable by .net .. . Answer : WsDualHttpBinding is .NET only it can t be even consumed by Silverlight . It demands that your client host HTTP endpoint client must act as HTTP server . Push notification are either implemented through some specialized API per client type or client pools the service for notifications . REST services are used because they sends smaller messages and their consuming on mobile-devices is usually easier without need for some additional library .", "Question : my case is that I m using wsDualHttpBinding as a binding . But I ve noticed something kind of unexpected . When I try to send a request to a service operation but my code is handling a callback message I ve put a Thread.Sleep there to simulate then the service call gets stuck and can even get timeouted until the callback message is handled fully . Shouldn t they be independent or the channel can only handle one message at the time doesn t matter if it s a service request or a callback message I m using the same channel all to time either to receive the callbacks messages or to send out new requests . This application runs as a service so there s no UI involved . .. . Answer : Try .. . .. . It is special mode to support callbacks in single-thread configuration . http : msdn.microsoft.com en-us library system.servicemodel.concurrencymode.aspx Comment : Don t forget CallbackBehavior http : msdn.microsoft.com en-us library aa738452.aspx : CallbackBehavior ConcurrencyMode ConcurrencyModel.Reentrant .", "Question : null .. . Answer : I am trying to upload a large object 300 MB from client to service using wsDualHttpBinding . Using basicHttpBinding I able to upload large object 1.5 GB file . I need to use wsDualHttpBinding . But using wsDualHttpBinding I able to upload 28 MB only . If I upload 100 MB object it says Failed to allocate a managed memory buffer .. . .. . .. . Could you tell me how to upload large object 300 MB using wsDualHttpBinding . Thanks In Advance .. . .. . Murugan .. . .. . Here is the configuration I am using : .. . .. . And contracts Comment : Simplify question and improve formatting of code Comment : Thanks David . I will do . Comment : Whoops sorry @Murugan - that comment was supposed be an editing comment eg . I made those changes already", "Question : I want to make duplex communication CHAT like application between two different websites in asp.net . I have seen lot of demos of duplex communication with two windows application nettcpbinding binding . But I want to achieve this with two websites . Can it be achieved .. . Answer : It doesn t make any difference just as you create a winforms app that has a reference to a WCF service you can add a reference to your WCF service from your ASP.NET project as well . However if you want to make a chat like application generally any real-time communication with your web users I recommend taking a look at SignalR http : signalr.net E2 80 8E . Update : .. . If you re insisting on using WCF for implementing this take a look at this CodeProject article http : www.codeproject.com Articles 265695 ASP-Net-chatting-using-WCF-Services-and-JSon which explains exactly what you re trying to achieve . Comment : can t the chat application be implemented through wcf wsdualhttpbinding Comment : What is your architecture Where does your wcf service stand Comment : Planning to create wcf service stands between two different websites . It would have a call back class for both clients and the service after getting invoked from first client would call the callback method of second client...isn t it possible. . I mean I am still in process to create it. . : Comment : You still need some way to call your service methods Or trigger to call them with javascript ajax . See my updated answer with link-to CodeProject article . Comment : thank u for suggesting me these miraculous blogs :", "Question : I followed this tutorial at least based my WCF in this coz I need then to work alike : http : www.eggheadcafe.com tutorials wcf b5ada8df-58c5-492f-b368-457b3a4f137c notify-client-applications-using-wcf-callbacks.aspx .. . .. . It s working very well on my computer but i need to use it over the internet . While trying to do this I heard over the internet that is better to use netTcpBiding . I gonna have a server that is going to be aware of the number of clients online . I wanted a WFC service on my IIS in the server and a windows service consuming it and notifying it . I need the callback coz the server sometime have to be able to execute some commands on the client . I would be very pleased if anyone could help me . Thanks in advance .. . .. . Edit : .. . .. . Making myself clear : I just could not make it work over the internet . Can you guys show me how can i change my configurations Web.config e App.config to use netTcpBinding and work over the internet Thanks again .. . .. . Edit 2 : .. . .. . My Web.config in my WCFServiceApplication is : .. . .. . My App.config in my WindowsService is : .. . .. . Just changing it to netTcpBinding does not work.. . But i would be glad enough to jut be able to run this over the internet.. . I published the WCFService on IIS . Links : .. . .. . https : www2.tcenter.com.br monitor PCWatcherWCFService.svc .. . .. . OR .. . .. . http : www2.tcenter.com.br : 8080 monitor PCWatcherWCFService.svc .. . .. . Just changing the configs its enought to make it work through the internet like i said local it works just fine . I thought that just changing the endpoint address on the client to one of the URL s above it whould work but it did not.. . The example that you linked hosts the service on the WPF . I don t know if it applys to my cenario.. . .. . .. . i Think i m gonna stick with the DualHttpBinding you don t think that port forwarding it s good for my needs i m can have a lot of clients in one intranet and having the router decide wich one he is going to send info for it s no good right or there s a way to make the router respond corretly to each and every machine conecting to my webserver through the same port just asking hehehe .. . .. . Thanks a lot in advance .. . .. . Edit on 21 06 2012 : .. . .. . Thanks for the reading . I was not able to get the service to work with netTcpBinding in LAN . I did a mock sample of my cenario . It s here https : skydrive.live.com cid 217C8EE366E04061 id 217C8EE366E04061 119 . Called DualCommunicationTest . When I started this post i just wanted to know how to make this cenarion runing on internet . Just that . During my time searching for a solution before posting here i readed that netTcpBinding is better . So i asked about it . It was just a side question . So.. . my current needs on the post are : .. . .. . How to use the sample i developed https : skydrive.live.com cid 217C8EE366E04061 id 217C8EE366E04061 119 on the internet . OR .. . .. . How to make the sample i developed https : skydrive.live.com cid 217C8EE366E04061 id 217C8EE366E04061 119 work with netTcpBinding AND then be able to use it on the internet . I m pretty sure Clunky Coder http : stackoverflow.com users 189756 clunky-coder taught me the second part on how to publish a net.tcp on the internet with the IIS and stuff thanks a lot for that but i was not able to test it yet because i couldn t do a netTcp yet . I m sorry if i m not been clear enough my English is not so good . sry and thanks again a lot . .. . Answer : netTcpBinding is better for duplex communication communication with callbacks and it s more performant than WSDualHttpBinding which is the preferred binding for duplex communication over HTTP . But you shouldn t really use netTcpBinding over the internet although you technically can and it might work but the ports that netTcpBinding uses may be and usually are blocked by firewalls on the internet . When you send something across the internet it makes lots of hops and goes through lots of routers and firewalls and there is no guarantee that those routers and firewalls will have all ports open . But if you can open the ports for netTcp it s TCP 808 on both the client and server endpoints usually done by port forwarding on the router it may work but the general advice is not to use netTcpBinding over the internet . Having said that I have used it a couple of times for my services and my clients have been able to consume the service over the internet without any problems-after I forwarded the ports on both the client and server ends . In general for duplex communication over the internet you have the WSDualHttpBinding http : msdn.microsoft.com en-us library system.servicemodel.wsdualhttpbinding.aspx and if you have a Silverlight client Silverlight doesn t support WSDualHttpBinding you can use PollingDuplexHttpBinding http : msdn.microsoft.com en-us library system.servicemodel.pollingduplexhttpbinding 28v vs.95 29.aspx . I also recommend you read this http : www.code-magazine.com article.aspx quickid 0605051 page 3 . EDIT : .. . .. . To change that example to use netTcpBinding just change the bindings in the config file to use netTcpBinding instead of wsDualHttpBinding . Have a look at this article http : www.codeproject.com Articles 25261 A-WCF-WPF-Chat-Application it does what the link you posted does with netTcpBinding and more explanation . EDIT 20 06 2012 : .. . .. . Making myself clear : I just could not make it work over the internet . Can you guys show me how can i change my configurations Web.config e App.config to use netTcpBinding and work over the internet Seems that you were able to get the service to work with netTcpBinding in LAN so your earlier problem is now fixed and you re now having trouble hosting the service in IIS and publishing it online . When your service works in a LAN it will work over the internet once you host it in IIS and forward the appropriate ports on the clients and servers routers this is a common scenario and is documented well online . To do this You must host your service as an application in your IIS website . You need to make sure your service has a .svc file that points to the location of the service then copy the contents of the App.Config Service config file to a new web.config in the same physical directory as your App.config and also remove the host baseAddresses section in the newly created web.config point the physical path of the application to the location of this service on your service host computer . Once that s taken care of just be sure to edit the default website bindings to enable the specific bindings your service uses for netTcpBinding go to : Website - Edit Bindings.. . - Add.. . then choose net.tcp and assign it the ports . Then on your application go to Advanced Settings and enable net.tcp netTcpBinding service will typically have http net.tcp as it s enabled protocols . If you run into teething errors make sure the default app pool or which ever application-pool your website is using has the required permissions to access and read the physical directory on the server in which the service resides . Please read this http : blogs.msdn.com b santhoshonline archive 2010 07 01 howto-nettcpbinding-on-iis-and-things-to-remember.aspx and this http : galratner.com blogs net archive 2010 10 08 setting-up-a-nettcpbinding-enabled-wcf-service-in-iis-7.aspx asking me to elaborate would just be repeating what they re saying . EDIT 21 06 2012 : .. . .. . I just downloaded your service and hosted it in IIS and it s hosted fine since its using HTTP and not nettcp then that means it works perfectly fine on the internet . If your service is something simple and you don t expect to do heavy processing with it by the looks of it you re just trying to get the list of clients connected to it then stick with wsDualHTTPBinding since the HTTP protocol will work in any environment and you don t have to worry about firewalls as you would with netTcpBinding . This is all I did to host the service in IIS and make it available over the internet : .. . .. . 1 . Go to DefaultWebsite in IIS right-click add application under Alias just give your service any name you wish to be able to see in the URL . Select Default App Pool or ASP.NET 4.0 app pool . 2 . Point the physical path to where your .svc file is on your computer for me its : .. . .. . C : Users MyPC Documents DualCommunicationTest.Server WcfServiceApp .. . .. . 1 . Under enabled protocols ensure that you have HTTP on port 80 or any other port for example 8085 but you will need to forward this port on your router to the Service host computer . If your Service host is on IP 192.168.1.4 in your LAN then on your router forward port 80 or whatever port you use-say 8085 to computer 192.168.1.4 . And it s that easy . Comment : Nice reading indeed.. . ok i don t know anymore if i m going for netTcp or wsDual but could you please help me to make it work I m happy just in puting the example implemented in the link above to work.. . Comment : @TanielianBarreira I just looked at the article it seems well written what exactly is the problem It s implementing a simple chat service by the looks of it there are lots of examples on callbacks in WCF . the gist of the idea is that the client calls some operation on the service and the service can in turn call a method on the client this is the callback so the client will temporarily be like a server itself . The methods in ChatService are what clients call on the server and the methods in IChatServiceCallback is what the service invokes on the clients . Comment : @TanielianBarreira look at my update . Comment : look at my update . Comment : Could you please try to answer On my update i just ask how can i change my configs to be able to connect over the internet . The way they are now changing the server url on the client i just get timeout errors .", "Question : I currently develop several services WCF to work with TFS 2010 . Some of them use the event subscription tool while others are consumed through the sharepoint portal small wpf applications etc . I m working on an application to administer some stuff in another server such as send an IIS Reset request to the server and I m using wsDualHttpBinding so I can message the user the progress as everything happens through callbacks . But I can t even call the method in the service because whenever the channel tries to open I get timeout exceptions no matter what my OpenTimeout is . This is my config client-side .. . .. . Server-side : .. . .. . Contracts : .. . .. . Service Not posting the code since the problem happens before it s reached : .. . .. . In fiddler I get this on client-side : .. . .. . 7 202 HTTP tfsserver : 8080 DeployService ResetService.svc 0 private resetman.vshost : 9000 .. . .. . I get 202 several times then time passes and the timeout occurs .. . .. . Running fiddle on the server I get absolutely nothing . What may be happening EDIT : Weird localhost works . Does wsDualHttpBinding need special permissions or something Didn t find anything on the internets Comment : Did you resolve this Comment : @wal No I ended up using wsHttpBinding and polling the server for the status from time to time . .. . Answer : Try .. . .. . ConcurrencyMode ConcurrencyMode.Reentrant .. . InstanceContextMode InstanceContextMode.Single .. . remove SessionMode.Required .. . .. . on your service behaviour Comment : Sorry did not work . Same error . Comment : Sorry have editted my answer . Comment : The error persists . :", "Question : When using WSDUALHTTPBINDING with message security is it recommended to use Transport security also i.e SSL Maybe it depends on the scenario . In my case both client and service are located on an intranet . If the service was on a webserver over the internet would the answer be different Update now that i know wsduallhttpbinding does not support transport security is message security as secure or should i use another binding that supports ssl under my scenario .. . Answer : The wsDualHttpBinding doesn t support Transport security as explained here : http : msdn.microsoft.com en-us library ff648589.aspx .. . .. . Binding limitations : Transport security does not work with wsDualHttpBinding . You can rely on Message security . It uses WS-Security to protect each message . UPDATE : As I said you can rely on Message security it provides end-to-end security . You can find here the detailled explaination : http : msdn.microsoft.com en-us library ff648863.aspx .. . .. . The downside of Message security is mainly that it is a bit slower as every message as to be encrypted but don t worry it is secure enough you don t need to change bindings .", "Question : I have to find a way to connect a WCF service to a Java client . I can not change the code of the WCF service and it only offers NetTcpBinding or wsDualHttpBinding .. . .. . One work-around would be to create a C communication channel to manage the communication between the service and the client . However I have no experience with C and I m sure this will take a long time . What would be the best way to deal with this Are there any available communication channels and offer this already Thank you in advance Comment : Did you ever find a resolution to this .. . Answer : The problem you have is neither of the bindings offered support non-wcf clients . I can t see any way you can communicate with this service without as you say put an intermediary service in between . The perfect candidate for this is WCF Routing protocol bridging http : msdn.microsoft.com en-us vs2010trainingcourse whatsnewinwcf4 topic17.aspx - which is exactly what it sounds like - translation of one protocol to another . In this case you are not going between protocols but WCF bindings . Your solution would have to use basicHttpBinding which ships with WCF and exposes services over soap 1.1 . Comment : @zzirna any reason you un-accepted this answer Thanks", "Question : null .. . Answer : to make long story as short as possible I made a duplex WCF service using wsdualhttpbinding tested it on my local machine using Visual Stuido and using IIS7 thigs are working fine i had to use windows-authentication on IIS7 to make it work thu . Any way I published the duplex service on my company network LAN network windows domain IIS 6 which i used to for many WCF services basic and ws http bindings and worked fine and the problem is I can not get the service to work I tried all possible configurations to the app.config and to the web.config files still i can not make it work. . The problem is when the client start calling the duplex service It hangs and no error message or whatsoever and after few minutes it gives me a timeout error. . there is no error at server-side i have checked the even viewer . There is not error about port 80 or access privileges . Is there anything i am missing anything i should take care of and i forgot i have been awake for 20 hours trying to find a solution because i have a time line to follow or my boss will Dispose Me. . .. . .. . i have tried the following : .. . 1- I set the IsOneWay true. . .. . 2- I run the program as admin . 3- I i set the base address to another port. . same result. . .. . 4- I used windows auth none.. . same result. . .. . 5- i have tried another machine to test the client. . same result. . it hangs with no reponse . 6- I also tried running the client on windows-vista 7 and xp.. . same result. . .. . 7- I have played with all kind of configurations in config files and i made sure its the same on both files app.config and web.config . . .. . 8- I have added a static-constructor in the service side to see if the service was ever reached by the client i added few lines to add a value in the db. . and nothing was written to db. . so it was never reached. . .. . 9- Yes when i access the service SVC page i see the page and it worked fine. . I could access the metadata as well. . .. . 10- restarting the server restarting IIS server Recycling AppPool...etc. . I tried all of that and many other solutions and tricks. . same result when the app is on IIS. . the strange thing is there is no error at server side. . and i only get TimeOut error if i get it . . While If i tried the service on the IIS installed locally it works fine. . change the config file to point to the company IIS server no luck Is there anything i am missing could be something simple but i just missed it. . Comment : Have you run fiddler on the web server machine to see if the request is ever being received by the web server Comment : Suggestions : 1 get some sleep . 2 Install the service on a local IIS server similar to how it s running in production . Comment : @competent tech I tried fiddler just now. . It sends a request SOAP envelope . . so i guess the request is sent. . something is wrong from the server side. . but why there is not reply from the server. . nothing in the event viewer.. . something is strange here. . suggestions Comment : @JohnSaunders I will try installing IIS6 on a pc and test there. . and i will sleep for sure now. . hoping for answers by the time i wake up Comment : Only two things I can think of : 1 You have a blocking condition in your code on the server infinite-loop deadlock waiting on a resource that isn t available 2 The response is sent back on a different port that is blocked by a firewall or routed to a different address for some reason fiddler should be able to catch the outbound response if any ." ] }
[ "yes-answer-long", "yes-answer-short" ]
wcf-binding
UNK_RELATION
synchronized@keyword@116
synchronized -- a block or method is said to be synchronized if entry to it is controlled by the java synchronized @placeholder .
{ "confidence": [ 58.29447937011719, 56.33582305908203, 54.053466796875, 52.79242706298828, 51.6274299621582, 51.60600280761719, 51.1375617980957, 50.58916473388672, 50.468807220458984, 50.27029037475586, 49.92416000366211, 49.38417053222656, 49.07063674926758, 49.03185272216797, 48.41520309448242, 48.2227668762207, 48.14856719970703, 48.14856719970703, 48.14856719970703, 48.14856719970703, 47.997188568115234, 47.928131103515625, 47.928131103515625, 47.92621994018555, 47.92621994018555, 47.92621994018555, 47.92621994018555, 47.92621994018555, 47.92621994018555, 47.92621994018555, 47.400665283203125, 47.262447357177734, 47.10405731201172, 47.04838180541992, 47.04201126098633, 47.04201126098633, 47.001953125, 46.97284698486328, 46.739891052246094, 46.69620895385742, 46.64371871948242, 46.64371871948242, 46.432891845703125, 46.28010559082031, 46.28010559082031, 46.20602798461914, 46.20040512084961, 46.19837188720703, 46.1158332824707, 46.070899963378906, 46.070899963378906, 46.04902648925781, 45.978057861328125, 45.96684265136719, 45.96684265136719, 45.83606719970703, 45.83606719970703, 45.83606719970703, 45.78331756591797, 45.78331756591797, 45.78331756591797, 45.3875732421875, 45.338069915771484, 45.31844711303711, 45.31844711303711, 45.30218505859375, 45.251068115234375, 45.09717559814453, 45.09717559814453, 44.99962615966797, 44.99962615966797, 44.99962615966797, 44.944393157958984, 44.944393157958984, 44.944393157958984, 44.944393157958984, 44.944393157958984, 44.944393157958984, 44.944393157958984, 44.944393157958984, 44.944393157958984, 44.944393157958984, 44.944393157958984, 44.944393157958984, 44.905921936035156, 44.905921936035156, 44.905921936035156, 44.905921936035156, 44.819766998291016, 44.819766998291016, 44.695556640625, 44.61015319824219, 44.5062370300293, 44.5062370300293, 44.443721771240234, 44.443721771240234, 44.391754150390625, 44.23853302001953, 44.23853302001953, 44.175289154052734 ], "content": [ "here is a duplicate of it synchronized block vs synchronized method", "I know the difference between synchronized method and synchronized block but I am not sure about the synchronized block part .", "http : stackoverflow.com questions 574240 synchronized-block-vs-synchronized-method", "Can any one tell me the advantage of synchronized method over synchronized block with an example Thanks . .. . .. . There is not a clear advantage of using synchronized method over block .", "Synchronized method .. . .. . Synchronized methods have two effects .", "The synchronized block is locked .", "Using non-static synchronized block : .. . .. . Using static synchronized block :", "This is hilarious well .. . the equivalent of the above JAVA synchronized in Java is ... . synchronized", "Synchronized + HashMap or Synchronized + ConcurrentHashMap .", "or unrelated to the entire synchronized block .", "In Java if a synchronized method contains a call to a non-synchronized can another method still access the non-synchronized method at the same time", "With synchronized this the block is guarded by the instance .", "Could explain why static synchronized block works with synchronized String.class", "Is it identical to synchronized Inner.this or synchronized Outer.this", "This shows calls to generate both a synchronized method and a synchronized block : .. . .. . The synchronizedMethodGet method generates the following byte code : .. . .. . And here s the byte code from the synchronizedBlockGet method : .. . .. . .. . .. . One significant difference between synchronized method and block is that Synchronized block generally reduce scope of lock .", "They are not synchronized .", "If you call the synchronized method of the super class this will of course be a synchronized call .", "your Overriden method will no longer be synchronized if you Override it and remove the synchronized .", "Methods are synchronized when you add synchronized to method definition or declaration .", "Synchronized Method .. . .. . Pros : .. . .. . Your IDE can indicate the synchronized methods .", "This is where the synchronized block of code will go .", "Synchronized method synchronizes on this object .", "synchronized is not part of the method-signature .", "Possible dupplicate http : stackoverflow.com questions 1149928 what-is-the-difference-between-a-synchronized-method-and-synchronized-block-in-j", "Likewise wait has to be in a synchronized block or method in order to be useful such as being inside a spinlock where the test has to be synchronized anyway .", "The most obvious difference is that a synchronized this block compiles to bytecode that is longer than a synchronized method .", "Can any one tell me the advantage of synchronized method over synchronized block with an example", "If we look at bytecode synchronized method bytecode is more compact and simple so why its not faster that synchronized block", "Synchronized method is used for lock all the objects Synchronized block is used to lock specific object", "Declaring a an instance method synchronized is just syntactic-sugar that s equivalent to having a synchronized this block .", "A thread in the blocked state is waiting for a monitor lock to enter a synchronized block method or reenter a synchronized block method after calling Object.wait . .. . .. . Sample code : .. . .. . Output :", "If you are in a synchronized method then calls to other methods that are also synchronized are locked .", "I want to access a method from within an synchronized block .", "Anyway implicit synchronized method or explicit synchronized this is used a lot also in the Java libraries .", "How to make method synchronized", "Just make the method synchronized .", "Note : The keyword synchronized alone is equivalent to synchronized this .", "If the block B is a block of code within method like this then yes.. . it will be synchronized .", "Making this a synchronized function or a synchronized block still allows for multiple threads since different threads are accessing it within the class .", "This is somewhat of a duplicate of Avoid synchronized this in Java", "I was thinking to add a value on the map before the synchronized block and remove it after the synchronized block has finished .", "possible duplicate of Synchronized block lock object question http : stackoverflow.com questions 3369287 synchronized-block-lock-object-question", "what is synchronized", "The code you have provided is a synchronized block .", "There is nothing wrong with returning inside a synchronized block .", "If it s another method like the following then no : .. . .. . Unless methodB is also marked synchronized or called from another synchronized method eg public synchronized methodC or another synchronization mechanism is used then methodB is not synchronized .", "synchronized method generates different bytecode than synchronized object .", "It has nothing to do with synchronized try or try synchronized but everything to do with synchronized catch or synchronized catch .", "Synchronized is at most simple : you write synchronized and that s it .", "The run is not in a synchronized block because it is run on another thread .", "I tried using a synchronized block after run", "The inner synchronized block is completely meaningless .", "Synchronized methods are a shorthand for a method which behaves as-if the entire body is enclosed in a synchronized block whose lock object is the receiver .", "Synchronized methods : .. . .. . Adding synchronized keyword to a method definition is equal to the entire method body being wrapped in a synchronized code block with the lock object being this for instance methods and ClassInQuestion.getClass for class methods .", ".. . .. . Here some example .. . .. . Method Level .. . .. . Block Level .. . .. . Edit .. . .. . For Collection like Vector and Hashtable they are synchronized when ArrayList or HashMap are not and you need set synchronized keyword or invoke Collections synchronized method :", "If t1 access the m1 method synchronized method could t2 thread access m2 method synchronized method simultaneously", "If t1 access the m1 method synchronized method could t2 thread access m2 method synchronized method simultaneously", "If t1 access the m1 method synchronized method could t2 thread access m2 method synchronized method simultaneously", "System.out.println .. . is a synchronized method so that is fine .", "synchronized void method .. . .. . .. . Synchronizes on the this Object .", "I have synchronized the run method .", "There are several ways of achieving synchronization including synchronized methods and synchronized blocks .", "The point I m not getting is that the way setLocation method is declared it is already synchronized and again calling the synchronized this block within the same method why this", "To complete @NPE s answer - .. . .. . a synchronized method is actually a method that is synchronized on the object the method belongs-to .", "That s the point of my answer - a synchronized method is actually a method that is synchronized on the object the method belongs-to .", "But you are asking two different things in your question : .. . .. . In Java if a synchronized method contains a call to a non-synchronized can another method still access the non-synchronized method at the same time", "As already said here synchronized block can use user-defined variable as lock object when synchronized function uses only this .", "This is not possible with synchronized .", "synchronized var .", "Is it that monitor in java does not restrict access to instance-variables and only to the methods which are declared synchronized or code in synchronized statements", "Is it that the monitor in Java does not restrict access to instance-variables and only to the methods which are declared synchronized or code in synchronized statements", "Is it that monitor in java does not restrict access to instance-variables and only to the methods which are declared synchronized or code in synchronized statements", "Is it valid to update a reference in an synchronized block of that reference", "How often do they enter the synchronized block", "Do your database operations inside the synchronized block .", "Note that I am using synchronized block .", "What purpose does a hashmap with synchronized block solve", "why variable in synchronized block must declare final", "Is that what you meant by variable in synchronized block", "It is harder to move code outside the synchronized block .", "If I have a parent block of codes called A A is synchronized .", "The synchronized block in its body is correct however .", "all usages of the map are surrounded by a synchronized block .", "For notifications the synchronized block around the loop is good .", "This declaration synchronized a part of code block instead of entire method .", "synchronized simple means no two threads can access the block method simultaneously .", "Cross check different outputs with synchronized method block and without synchronization .", "My question is why is the synchronized block in the run method not working", "Vector is supposedly internally synchronized .", "Is it synchronized by each element or as a whole", "In other words everything A did in or prior to a synchronized block is visible to B when it executes a synchronized block guarded by the same lock .", "The only difference : synchronized blocks allows granular locking unlike synchronized method .. . .. . Basically synchronized block or methods have been used to write thread safe code by avoiding memory inconsistency errors .", "possible duplicate of Overriding a synchronized method http : stackoverflow.com questions 10173345 overriding-a-synchronized-method", "A synchronized method can only use this or the corresponding Class instance for a synchronized class-method .", "So my question is why java didn t go for synchronized wait notify methods removing the restriction of calling these methods from synchronized block or methods .", "My understanding of Java synchronized blocks is that if a thread already owns a lock on an object it can enter a different block synchronized on the same object re-entrant synchronization .", "Synchronizing on the method is functionally equivalent to having a synchronized this block around the body of the method .", "But one query is that is synchronized an in-built method or interface or class", "The reading method must also be synchronized for this to be true though .", "When the second thread comes to the monitor entry the start of the synchronized method in this case it will block until the first thread releases the monitor ." ] }
{ "confidence": [ 58.19728088378906, 57.35261535644531, 57.013851165771484, 56.599369049072266, 56.46449279785156, 56.32725524902344, 56.214603424072266, 56.101741790771484, 56.07830047607422, 55.752906799316406, 55.5483283996582, 55.54630661010742, 55.34656524658203, 55.31557846069336, 55.1928825378418, 55.1614875793457, 54.95659255981445, 54.93581771850586, 54.93191146850586, 54.79561996459961 ], "content": [ "Question : Can any one tell me the advantage of synchronized method over synchronized block with an example Comment : This is somewhat of a duplicate of Avoid synchronized this in Java http : stackoverflow.com questions 442564 avoid-synchronizedthis-in-java and In Java critical sections what should I synchronize on http : stackoverflow.com questions 416183 in-java-critical-sections-what-should-i-synchronize-on Comment : Exact duplicate of : stackoverflow.com questions 442564 http : stackoverflow.com questions 442564 avoid-synchronizedthis-in-java and stackoverflow.com questions 416183 http : stackoverflow.com questions 416183 in-java-critical-sections-what-should-i-synchronize-on Comment : @cletus this question is entirely different from stackoverflow.com questions 442564 http : stackoverflow.com questions 442564 avoid-synchronizedthis-in-java .. . Answer : When java compiler converts your source code to byte code it handles synchronized methods and synchronized blocks very differently . When the JVM executes a synchronized method the executing thread identifies that the method s method info structure has the ACC SYNCHRONIZED flag set then it automatically acquires the object s lock calls the method and releases the lock . If an exception occurs the thread automatically releases the lock . Synchronizing a method block on the other hand bypasses the JVM s built-in support for acquiring an object s lock and exception-handling and requires that the functionality be explicitly written in byte code . If you read the byte code for a method with a synchronized block you will see more than a dozen additional operations to manage this functionality . This shows calls to generate both a synchronized method and a synchronized block : .. . .. . The synchronizedMethodGet method generates the following byte code : .. . .. . And here s the byte code from the synchronizedBlockGet method : .. . .. . .. . .. . One significant difference between synchronized method and block is that Synchronized block generally reduce scope of lock . As scope of lock is inversely proportional to performance its always better to lock only critical section of code . One of the best example of using synchronized block is double-checked-locking in Singleton pattern http : docs.oracle.com cd E19205-01 820-0619 gedig index.html where instead of locking whole getInstance method we only lock critical section of code which is used to create Singleton instance . This improves performance drastically because locking is only required one or two times . While using synchronized methods you will need to take extra care if you mix both static synchronized and non-static synchronized methods . Comment : If we look at bytecode synchronized method bytecode is more compact and simple so why its not faster that synchronized block", "Question : Is it that monitor in java does not restrict access to instance-variables and only to the methods which are declared synchronized or code in synchronized statements I have created two threads thread y invokes sync method which is declared synchronized while thread r invokes unsync method which is not declared synchronized . Both invoke methods on shared object s . Thread r is able to modify the instance variable of object s while the monitor or lock of that object is still being held by the thread y . Is it that the monitor in Java does not restrict access to instance-variables and only to the methods which are declared synchronized or code in synchronized statements The output of the program is below : .. . Answer : Making methods synchronized has two effects : .. . .. . First it is not possible for two invocations of synchronized methods on the same object to interleave . When one thread is executing a synchronized method for an object all other threads that invoke synchronized methods for the same object block suspend execution until the first thread is done with the object . Second when a synchronized method exits it automatically establishes a happens-before relationship with any subsequent invocation of a synchronized method for the same object . This guarantees that changes to the state of the object are visible to all threads . source : the Java tutorials http : docs.oracle.com javase tutorial essential concurrency syncmeth.html", "Question : Can any one tell me the advantage of synchronized method over synchronized block with an example Comment : This is somewhat of a duplicate of Avoid synchronized this in Java http : stackoverflow.com questions 442564 avoid-synchronizedthis-in-java and In Java critical sections what should I synchronize on http : stackoverflow.com questions 416183 in-java-critical-sections-what-should-i-synchronize-on Comment : Exact duplicate of : stackoverflow.com questions 442564 http : stackoverflow.com questions 442564 avoid-synchronizedthis-in-java and stackoverflow.com questions 416183 http : stackoverflow.com questions 416183 in-java-critical-sections-what-should-i-synchronize-on Comment : @cletus this question is entirely different from stackoverflow.com questions 442564 http : stackoverflow.com questions 442564 avoid-synchronizedthis-in-java .. . Answer : Synchronized method .. . .. . Synchronized methods have two effects . First when one thread is executing a synchronized method for an object all other threads that invoke synchronized methods for the same object block suspend execution until the first thread is done with the object . Second when a synchronized method exits it automatically establishes a happens-before relationship with any subsequent invocation of a synchronized method for the same object . This guarantees that changes to the state of the object are visible to all threads . Note that constructors cannot be synchronized using the synchronized keyword with a constructor is a syntax-error . Synchronizing constructors doesn t make sense because only the thread that creates an object should have access to it while it is being constructed . Synchronized Statement .. . .. . Unlike synchronized methods synchronized statements must specify the object that provides the intrinsic lock : Most often I use this to synchronize access to a list or map but I don t want to block access to all methods of the object . Q : Intrinsic Locks and Synchronization Synchronization is built around an internal entity known as the intrinsic lock or monitor lock . The API specification often refers to this entity simply as a monitor . Intrinsic locks play a role in both aspects of synchronization : enforcing exclusive access to an object s state and establishing happens-before relationships that are essential to visibility . Every object has an intrinsic lock associated with it . By convention a thread that needs exclusive and consistent access to an object s fields has to acquire the object s intrinsic lock before accessing them and then release the intrinsic lock when it s done with them . A thread is said to own the intrinsic lock between the time it has acquired the lock and released the lock . As long as a thread owns an intrinsic lock no other thread can acquire the same lock . The other thread will block when it attempts to acquire the lock . Cross check different outputs with synchronized method block and without synchronization . Comment : +1 for being the only one so far to mention that constructors cannot be synchronized . That is in a constructor you really have only one option : Synchronized blocks . Comment : I tested your code as directed but C is always 0 then -2024260031 and the only thing that changes it the hash code . What behavior should be seen", "Question : in Java whenever we need to call wait notify notifyAll we need to have access to object monitor either through synchronized method or through synchronized block . So my question is why java didn t go for synchronized wait notify methods removing the restriction of calling these methods from synchronized block or methods . In case these are declared as synchronized it would have automatically taken the monitor access . .. . Answer : Someone more experienced with multithreading should feel free to step in but I believe this would remove the versatility of synchonized blocks . The point of using them is to synchronize on a particular object which functions as the monitored resource semaphore . wait notify methods are then used to control execution flow within the synchronized block . Note that synchronized methods are shorthand for synchronizing on this for the duration of the method or the class for static-methods . Synchronizing wait notify methods themselves would remove the point of their use as stop go signals between threads .", "Question : I have some questions regarding the usage and significance of the synchronized keyword . What is the significance of the synchronized keyword When should methods be synchronized What does it mean programmatically and logically Comment : download.oracle.com javase tutorial essential concurrency http : download.oracle.com javase tutorial essential concurrency syncmeth.html Comment : helpful discussion between hashmap and hashtable and synchronization : stackoverflow.com questions 40471 java-hashmap-vs-hashtable http : stackoverflow.com questions 40471 java-hashmap-vs-hashtable .. . Answer : What is the synchronized keyword Threads communicate primarily by sharing access to fields and the objects reference fields refer to . This form of communication is extremely efficient but makes two kinds of errors possible : thread interference and memory consistency errors . The tool needed to prevent these errors is synchronization . Synchronized blocks or methods prevents thread interference and make sure that data is consistent . At any point of time only one thread can access a synchronized block or method critical section by acquiring a lock . Other thread s will wait for release of lock to access critical section . Once the lock is released by current owner thread with notify or notifyAll call one of thread s will acquire the lock to access critical section guarded by synchronized keyword . When are methods synchronized Methods are synchronized when you add synchronized to method definition or declaration . You can also synchronize a particular block of code with-in a method . What does it mean pro grammatically and logically It means that only one thread can access critical section by acquiring a lock . Unless this thread calls notify or notifyAll all other thread s will have to wait to acquire a lock . They don t have access to enter critical section with out acquiring lock . This can t be done with a magic . It s programmer responsibility to identify critical section s in application and guard it accordingly . Java provides a framework to guard your application but where and what all sections to be guarded is the responsibility of programmer . More details from java documentation page https : docs.oracle.com javase tutorial essential concurrency locksync.html .. . .. . Intrinsic Locks and Synchronization : .. . .. . Synchronization is built around an internal entity known as the intrinsic lock or monitor lock . Intrinsic locks play a role in both aspects of synchronization : enforcing exclusive access to an object s state and establishing happens-before relationships that are essential to visibility . Every object has an intrinsic lock associated with it . By convention a thread that needs exclusive and consistent access to an object s fields has to acquire the object s intrinsic lock before accessing them and then release the intrinsic lock when it s done with them . A thread is said to own the intrinsic lock between the time it has acquired the lock and released the lock . As long as a thread owns an intrinsic lock no other thread can acquire the same lock . The other thread will block when it attempts to acquire the lock . When a thread releases an intrinsic lock a happens-before relationship is established between that action and any subsequent acquisition of the same lock . Making methods synchronized has two effects https : docs.oracle.com javase tutorial essential concurrency syncmeth.html : .. . .. . First it is not possible for two invocations of synchronized methods on the same object to interleave . When one thread is executing a synchronized method for an object all other threads that invoke synchronized methods for the same object block suspend execution until the first thread is done with the object . Second when a synchronized method exits it automatically establishes a happens-before relationship with any subsequent invocation of a synchronized method for the same object . This guarantees that changes to the state of the object are visible to all threads . Look for other alternatives to synchronization in : .. . .. . Avoid synchronized this in Java http : stackoverflow.com questions 442564 avoid-synchronizedthis-in-java 36692190 36692190", "Question : in Java whenever we need to call wait notify notifyAll we need to have access to object monitor either through synchronized method or through synchronized block . So my question is why java didn t go for synchronized wait notify methods removing the restriction of calling these methods from synchronized block or methods . In case these are declared as synchronized it would have automatically taken the monitor access . .. . Answer : My guess would be that the reason the synchronized block is required is that the use of wait or notify as the only action in a synchronized block is almost always a bug anyway . Findbugs http : findbugs.sourceforge.net index.html even has a warning for this which it calls a naked notify http : findbugs.sourceforge.net bugDescriptions.html NN NAKED NOTIFY . Comment : The naked notify warning is quite valid - it implies that one ought to be using the plain old mutual exclusion model .", "Question : Can any one tell me the advantage of synchronized method over synchronized block with an example Comment : This is somewhat of a duplicate of Avoid synchronized this in Java http : stackoverflow.com questions 442564 avoid-synchronizedthis-in-java and In Java critical sections what should I synchronize on http : stackoverflow.com questions 416183 in-java-critical-sections-what-should-i-synchronize-on Comment : Exact duplicate of : stackoverflow.com questions 442564 http : stackoverflow.com questions 442564 avoid-synchronizedthis-in-java and stackoverflow.com questions 416183 http : stackoverflow.com questions 416183 in-java-critical-sections-what-should-i-synchronize-on Comment : @cletus this question is entirely different from stackoverflow.com questions 442564 http : stackoverflow.com questions 442564 avoid-synchronizedthis-in-java .. . Answer : Often using a lock on a method level is too rude . Why lock up a piece of code that does not access any shared resources by locking up an entire method . Since each object has a lock you can create dummy objects to implement block level synchronization . The block level is more efficient because it does not lock the whole method . .. . .. . Here some example .. . .. . Method Level .. . .. . Block Level .. . .. . Edit .. . .. . For Collection like Vector and Hashtable they are synchronized when ArrayList or HashMap are not and you need set synchronized keyword or invoke Collections synchronized method :", "Question : Can any one tell me the advantage of synchronized method over synchronized block with an example Comment : This is somewhat of a duplicate of Avoid synchronized this in Java http : stackoverflow.com questions 442564 avoid-synchronizedthis-in-java and In Java critical sections what should I synchronize on http : stackoverflow.com questions 416183 in-java-critical-sections-what-should-i-synchronize-on Comment : Exact duplicate of : stackoverflow.com questions 442564 http : stackoverflow.com questions 442564 avoid-synchronizedthis-in-java and stackoverflow.com questions 416183 http : stackoverflow.com questions 416183 in-java-critical-sections-what-should-i-synchronize-on Comment : @cletus this question is entirely different from stackoverflow.com questions 442564 http : stackoverflow.com questions 442564 avoid-synchronizedthis-in-java .. . Answer : As already said here synchronized block can use user-defined variable as lock object when synchronized function uses only this . And of course you can manipulate with areas of your function which should be synchronized . But everyone says that no difference between synchronized function and block which covers whole function using this as lock object . That is not true difference is in byte code which will be generated in both situations . In case of synchronized block usage should be allocated local variable which holds reference to this . And as result we will have a little bit larger size for function not relevant if you have only few number of functions . More detailed explanation of the difference you can find here : http : www.artima.com insidejvm ed2 threadsynchP.html", "Question : Is it that monitor in java does not restrict access to instance-variables and only to the methods which are declared synchronized or code in synchronized statements I have created two threads thread y invokes sync method which is declared synchronized while thread r invokes unsync method which is not declared synchronized . Both invoke methods on shared object s . Thread r is able to modify the instance variable of object s while the monitor or lock of that object is still being held by the thread y . Is it that the monitor in Java does not restrict access to instance-variables and only to the methods which are declared synchronized or code in synchronized statements The output of the program is below : .. . Answer : Is it that monitor in java does not restrict access to instance-variables and only to the methods which are declared synchronized or code in synchronized statements Yes . Synchronized blocks or methods are among other things mutually exclusive . That does not prevent the object used as a lock the monitor let s call it lock to be used outside those blocks in which case no synchronization will be performed . For example one thread could read or write lock while another thread is within a synchronized block where lock is the monitor . If you want to restrict access to a variable you need to make sure that all accesses are made while holding a lock any lock provided it is the same for each access .", "Question : The following is the code snippet from java concurrency in practice book while discussing open calls . The point I m not getting is that the way setLocation method is declared it is already synchronized and again calling the synchronized this block within the same method why this Is it type mistake The synchronized method already holds the lock on this method then why again for the same object .. . Answer : It s an error in the book . See the errata http : jcip.net.s3-website-us-east-1.amazonaws.com errata.html .. . .. . In Listing 10.6 Taxi.setLocation should not be a synchronized method . The synchronized block in its body is correct however . Comment : Thanks Nizet breaking my head thinking that some hidden meaning for such declaration didn t thought about errata .", "Question : Can any one tell me the advantage of synchronized method over synchronized block with an example Comment : This is somewhat of a duplicate of Avoid synchronized this in Java http : stackoverflow.com questions 442564 avoid-synchronizedthis-in-java and In Java critical sections what should I synchronize on http : stackoverflow.com questions 416183 in-java-critical-sections-what-should-i-synchronize-on Comment : Exact duplicate of : stackoverflow.com questions 442564 http : stackoverflow.com questions 442564 avoid-synchronizedthis-in-java and stackoverflow.com questions 416183 http : stackoverflow.com questions 416183 in-java-critical-sections-what-should-i-synchronize-on Comment : @cletus this question is entirely different from stackoverflow.com questions 442564 http : stackoverflow.com questions 442564 avoid-synchronizedthis-in-java .. . Answer : Synchronized method is used for lock all the objects Synchronized block is used to lock specific object", "Question : Is it that monitor in java does not restrict access to instance-variables and only to the methods which are declared synchronized or code in synchronized statements I have created two threads thread y invokes sync method which is declared synchronized while thread r invokes unsync method which is not declared synchronized . Both invoke methods on shared object s . Thread r is able to modify the instance variable of object s while the monitor or lock of that object is still being held by the thread y . Is it that the monitor in Java does not restrict access to instance-variables and only to the methods which are declared synchronized or code in synchronized statements The output of the program is below : .. . Answer : Yes . Holding the monitor of an object prevents another thread from executing another block of code or synchronized on the same object . If a method is not synchronized any thread can call it at any time whether another thread holds a monitor or not . Every access to a shared stated even read-only accessed must be synchronized if there s a chance that at least one thread modifies this shared state .", "Question : in Java whenever we need to call wait notify notifyAll we need to have access to object monitor either through synchronized method or through synchronized block . So my question is why java didn t go for synchronized wait notify methods removing the restriction of calling these methods from synchronized block or methods . In case these are declared as synchronized it would have automatically taken the monitor access . .. . Answer : Among all the non-buggy codes I ve read and written all the them use wait notify in a bigger synchronization block involving read-write of other conditions .. . .. . If wait notify are themselves synchronized no harm is done to all the correct codes may a small performance penalty it won t do any good either to all the correct codes . However it would have permitted and encouraged a lot more incorrect codes .", "Question : what is the difference between .. . .. . and .. . .. . If I am wrong Ignore this question . Comment : Possible dupplicate http : stackoverflow.com questions 1149928 what-is-the-difference-between-a-synchronized-method-and-synchronized-block-in-j .. . Answer : it the first one only one thread can execute whole method at a time whereas in second one only one thread can execute that synchronized block if not used this as parameter . here is a duplicate of it synchronized block vs synchronized method http : stackoverflow.com questions 574240 synchronized-block-vs-synchronized-method", "Question : Can any one tell me the advantage of synchronized method over synchronized block with an example Comment : This is somewhat of a duplicate of Avoid synchronized this in Java http : stackoverflow.com questions 442564 avoid-synchronizedthis-in-java and In Java critical sections what should I synchronize on http : stackoverflow.com questions 416183 in-java-critical-sections-what-should-i-synchronize-on Comment : Exact duplicate of : stackoverflow.com questions 442564 http : stackoverflow.com questions 442564 avoid-synchronizedthis-in-java and stackoverflow.com questions 416183 http : stackoverflow.com questions 416183 in-java-critical-sections-what-should-i-synchronize-on Comment : @cletus this question is entirely different from stackoverflow.com questions 442564 http : stackoverflow.com questions 442564 avoid-synchronizedthis-in-java .. . Answer : Can any one tell me the advantage of synchronized method over synchronized block with an example Thanks . .. . .. . There is not a clear advantage of using synchronized method over block . Perhaps the only one but I wouldn t call it advantage is you don t need to include the object-reference this . Method : .. . .. . Block : .. . .. . See No advantage at all . Blocks do have advantages over methods most of all in flexibility because you can use other object as lock whereas syncing the method would lock the complete class . Compare : .. . .. . Vs . .. . .. . Also if the method grows you can still keep the synchronized section separated : Comment : +1 Thanks this answer helped me. . Comment : A benefit to the consumer of the API is that using the synchronized keyword in the method declaration also explicitly declares that the method synchronizes on the object instance and is presumably thread-safe . Comment : I know this is an old question but synchronizing on this is considered in some circles to be an anti-pattern . The unintended consequence is that outside of the class someone can lock on an object-reference that is equal to this and prevent other threads from passing the barriers within the class potentially creating a deadlock situation . Creating a private final Object new Object variable purely for locking purposes is the often used solution . Here s another question http : stackoverflow.com questions 442564 avoid-synchronizedthis-in-java lq 1 relating directly to this issue . Comment : whereas syncing the method would lock the complete class . This is not correct . It doesn t lock the complete class but the complete instance . Multiple objects from the same class hold all their own lock . : Greets Comment : Something interesting about this is that using a synchronized method will cause the generated bytecode to have 1 less instruction since methods have a synchronized bit baked into their signature . Since the length of the bytecode is a factor in whether a method gets in-lined moving the block to the method-signature could be the difference in decision . In theory anyway . I wouldn t base a design decision on a single bytecode instruction being saved that seems like a terrible idea . But still it is a difference .", "Question : Can any one tell me the advantage of synchronized method over synchronized block with an example Comment : This is somewhat of a duplicate of Avoid synchronized this in Java http : stackoverflow.com questions 442564 avoid-synchronizedthis-in-java and In Java critical sections what should I synchronize on http : stackoverflow.com questions 416183 in-java-critical-sections-what-should-i-synchronize-on Comment : Exact duplicate of : stackoverflow.com questions 442564 http : stackoverflow.com questions 442564 avoid-synchronizedthis-in-java and stackoverflow.com questions 416183 http : stackoverflow.com questions 416183 in-java-critical-sections-what-should-i-synchronize-on Comment : @cletus this question is entirely different from stackoverflow.com questions 442564 http : stackoverflow.com questions 442564 avoid-synchronizedthis-in-java .. . Answer : The only real difference is that a synchronized block can choose which object it synchronizes on . A synchronized method can only use this or the corresponding Class instance for a synchronized class-method . For example these are semantically equivalent : .. . .. . The latter is more flexible since it can compete for the associated lock of any object often a member variable . It s also more granular because you could have concurrent code executing before and after the block but still within the method . Of course you could just as easily use a synchronized method by refactoring the concurrent code into separate non-synchronized methods . Use whichever makes the code more comprehensible . Comment : The latter can also have merit if not all of the code in foo needs to be synchronised . Comment : This is true but not what Warrior asked : The advantage of synchronized method there is none . Comment : @OscarRyz It saves 2 lines-of-code .", "Question : in Java whenever we need to call wait notify notifyAll we need to have access to object monitor either through synchronized method or through synchronized block . So my question is why java didn t go for synchronized wait notify methods removing the restriction of calling these methods from synchronized block or methods . In case these are declared as synchronized it would have automatically taken the monitor access . .. . Answer : The wait-notify model of synchronization requires that you acquire the monitors on an object first before proceeding to perform any work . It is different from the mutual exclusion model that is used by a synchronized block . The wait-notify or mutual cooperation model is typically used in a producer-consumer scenario where one thread produces events that are consumed by another thread . Well-written implementations will strive to avoid the scenarios where a consumer is starved or the producer overruns the consumer with too many events . To avoid this you would use the wait-notify protocol where .. . .. . the consumer wait s for the producer to produce an event . the producer produces the event and notifies the consumer and then usually goes to sleep until it is notified by the consumer . when the consumer is notified of an event it wakes up processes the event and the notifies the producer that it has finished processing the event . You could have many producers and consumers in this scenario . Acquiring the monitor through the mutual exclusion model on wait notify or notifyAll is bound to destroy this model since the producer and the consumer do not perform the waiting explicitly . The underlying threads will be present in either the wait set used by the wait-notify model or the entry set used by the mutual exclusion model of a monitor . Invoking notify or notifyAll signals thread s to be moved from the wait set to the entry set of the monitor where there may be contention for the monitor among several threads and not just the recently notified one . Now when you want to automatically acquire the monitor on wait notify and notifyAll using the mutual exclusion model it is usually an indication that you do not need to be using the wait-notify model . This is by inference - you would typically signal other threads only after doing some work in one thread i.e . on a change in state . If you are automatically acquiring the monitor and invoking notify or notifyAll you are merely moving threads from the wait set to the entry set without any intermediate state in your program implying that the transition is unnecessary . Quite obviously the authors of the JVM were aware of this and have not declared the methods as synchronized . You can read more about the wait sets and entry sets of monitors in Bill Venner s book - Inside the Java Virtual Machine http : www.artima.com insidejvm ed2 threadsynch.html .", "Question : Can any one tell me the advantage of synchronized method over synchronized block with an example Comment : This is somewhat of a duplicate of Avoid synchronized this in Java http : stackoverflow.com questions 442564 avoid-synchronizedthis-in-java and In Java critical sections what should I synchronize on http : stackoverflow.com questions 416183 in-java-critical-sections-what-should-i-synchronize-on Comment : Exact duplicate of : stackoverflow.com questions 442564 http : stackoverflow.com questions 442564 avoid-synchronizedthis-in-java and stackoverflow.com questions 416183 http : stackoverflow.com questions 416183 in-java-critical-sections-what-should-i-synchronize-on Comment : @cletus this question is entirely different from stackoverflow.com questions 442564 http : stackoverflow.com questions 442564 avoid-synchronizedthis-in-java .. . Answer : In case of synchronized methods lock will be acquired on an Object . But if you go with synchronized block you have an option to specify an object on which the lock will be acquired . Example :", "Question : If I have a parent block of codes called A A is synchronized . And in A I executes a child block of code called B . Am I right to assume that B will be synchronized also If in A I have a timer to delay the execution of B in a certain of t time is there a chance that B gets executed later when A already finished Thank you very much . P S : Sorry the the unclear code this is how it should look like Comment : It is difficult to understand what you mean . Can you illustrate your question with some code Comment : I think Block B would also be synchronous . I believe in java all code is executed synchronously by default . If B is contained in A and A and B are executed synchronously then A will not finish until after B finishes . .. . Answer : Depends . If the block B is a block of code within method like this then yes.. . it will be synchronized . If it s another method like the following then no : .. . .. . Unless methodB is also marked synchronized or called from another synchronized method eg public synchronized methodC or another synchronization mechanism is used then methodB is not synchronized . Those are just the simplest cases . You re better off posting example code since block is not well defined by default and the type of synchronization lock implicit on this via synchronized method vs . explicit object lock makes a difference . But your last line sounds like you re asking about synchronous vs . asynchronous execution of code which while related to threading and synchronized blocks is a different concept . In that case it depends on what happens in block A .. . if new threads are created to execute block B then anything can happen with the timing of code execution . If no threads are created it s safe to assume that block A will not complete before block B . Edit : based on code now posted .. . the synchronized A block will only ensure the Timer threads get created one at a time . But unless there s something special about the Java Timer framework there s nothing there that will prevent two threads from executing the B block in the run method simultaneously .. . so make sure that the contents are thread safe . That is don t assume that just because different instances of Timer are created in a synchronized block with the same delay they won t get into the run method at the same time . If the B block accesses external un-thread-safe code eg . static-methods disk access you could have surprises . As Amm Sokun mentioned in other answer A will return before Block B executes .", "Question : Can any one tell me the advantage of synchronized method over synchronized block with an example Comment : This is somewhat of a duplicate of Avoid synchronized this in Java http : stackoverflow.com questions 442564 avoid-synchronizedthis-in-java and In Java critical sections what should I synchronize on http : stackoverflow.com questions 416183 in-java-critical-sections-what-should-i-synchronize-on Comment : Exact duplicate of : stackoverflow.com questions 442564 http : stackoverflow.com questions 442564 avoid-synchronizedthis-in-java and stackoverflow.com questions 416183 http : stackoverflow.com questions 416183 in-java-critical-sections-what-should-i-synchronize-on Comment : @cletus this question is entirely different from stackoverflow.com questions 442564 http : stackoverflow.com questions 442564 avoid-synchronizedthis-in-java .. . Answer : Synchronized Method .. . .. . Pros : .. . .. . Your IDE can indicate the synchronized methods . The syntax is more compact . Forces to split the synchronized blocks to separate methods . Cons : .. . .. . Synchronizes to this and so makes it possible to outsiders to synchronize to it too . It is harder to move code outside the synchronized block . Synchronized block .. . .. . Pros : .. . .. . Allows using a private variable for the lock and so forcing the lock to stay inside the class . Synchronized blocks can be found by searching references to the variable . Cons : .. . .. . The syntax is more complicated and so makes the code harder to read . .. . .. . Personally I prefer using synchronized methods with classes focused only to the thing needing synchronization . Such class should be as small as possible and so it should be easy to review the synchronization . Others shouldn t need to care about synchronization . Comment : When you say stay inside the class do you mean stay inside the object or am I missing something" ] }
[ "yes-answer-long", "yes-answer-short" ]
keyword
UNK_RELATION
clearos@linux@53
clearos -- clearos formerly named clarkconnect is a @placeholder distribution based on centos and red hat enterprise linux 4 designed for use in small and medium enterprises as a network gateway and network server with a web-based administration interface .
{ "confidence": [ 51.57732009887695, 49.610992431640625, 41.60388946533203, 30.870975494384766, 27.74874496459961, 23.231101989746094, 15.524493217468262, 15.524493217468262, 15.524493217468262, 15.524493217468262, 15.524493217468262, 15.524493217468262, 15.524493217468262 ], "content": [ "The OS I m assigned to is ClearOS 6 Community Edition .", "I am facing a bit of a problem with AddType in Apache web server on my ClearOS 6 .", "For the longest time I have been using a simple transparent proxy for http configuration with a clearOS as router and a FreeBSD+Squid as proxy server .", "I have the following rules in my custom firewall : .. . .. . ClearOS version 1.6.7 Squid : 3.5.12 FreeBSD : 10.2 .. . .. . so far everything works if I specify the proxy on the machines but clearos is not setup to send the proxy configuration via DHCP the manual editing of etc dnsmasq.d dhcp.conf didn t help and does not really working on mobile-devices added a 252 .. . .. . JIC this is my etc dnsmasq.d dhcp.conf : .. . .. . and this is my squid.conf port configuration : .. . .. . UPDATE .. . .. . I updates squid to 3.5.13 and I can now connect but I am getting random squid restarts :", "everything worked correctly until I restarted the proxy server and on the same day the clearOS machine updated perl should not matter. . i think .. . .. . So this is my configuration : .. . .. . Squid : 192.168.1.231 : 3128 : transparent .. . Squid : 192.168.1.232 : 3128 non transparent for manual config .. . router : 192.168.1.1 .. . .. . I have two listening IPs because for some unknown reason if I used only one as transparent nothing was working at all .", "I am just a college student who is working on a task involvong installing a server OS for web-hosting and security-testing .", "The thing is I am trying to host a website for local testing .", "When I hosted it it displayed all the images that I linked on the php homepage file but it didn t apply the css file .", "When I add the ifModule AddType text css .css line for enabling .css file extensions it did apply the css but this time all the images no longer show .", "I have erased the line and restarted Apache but it s still stuck on the images not showing.. . .. . .. . after AddType http : i.stack.imgur.com 0SatT.png .. . .. . I am sorry I couldn t provide you with the one before AddType since the webpage is now stuck at that whatever I tried.. . .. . .. . Could someone please help me with this", "Any suggestions would be appreciated .", "If you need anything please let me know I ll try to provide you with that .", ": D" ] }
{ "confidence": [ 62.92533874511719, 58.30475616455078 ], "content": [ "Question : null .. . Answer : For the longest time I have been using a simple transparent proxy for http configuration with a clearOS as router and a FreeBSD+Squid as proxy server . everything worked correctly until I restarted the proxy server and on the same day the clearOS machine updated perl should not matter. . i think .. . .. . So this is my configuration : .. . .. . Squid : 192.168.1.231 : 3128 : transparent .. . Squid : 192.168.1.232 : 3128 non transparent for manual config .. . router : 192.168.1.1 .. . .. . I have two listening IPs because for some unknown reason if I used only one as transparent nothing was working at all . I have the following rules in my custom firewall : .. . .. . ClearOS version 1.6.7 Squid : 3.5.12 FreeBSD : 10.2 .. . .. . so far everything works if I specify the proxy on the machines but clearos is not setup to send the proxy configuration via DHCP the manual editing of etc dnsmasq.d dhcp.conf didn t help and does not really working on mobile-devices added a 252 .. . .. . JIC this is my etc dnsmasq.d dhcp.conf : .. . .. . and this is my squid.conf port configuration : .. . .. . UPDATE .. . .. . I updates squid to 3.5.13 and I can now connect but I am getting random squid restarts :", "Question : null .. . Answer : I am just a college student who is working on a task involvong installing a server OS for web-hosting and security-testing . The OS I m assigned to is ClearOS 6 Community Edition . I am facing a bit of a problem with AddType in Apache web server on my ClearOS 6 . The thing is I am trying to host a website for local testing . When I hosted it it displayed all the images that I linked on the php homepage file but it didn t apply the css file . When I add the ifModule AddType text css .css line for enabling .css file extensions it did apply the css but this time all the images no longer show . I have erased the line and restarted Apache but it s still stuck on the images not showing.. . .. . .. . after AddType http : i.stack.imgur.com 0SatT.png .. . .. . I am sorry I couldn t provide you with the one before AddType since the webpage is now stuck at that whatever I tried.. . .. . .. . Could someone please help me with this Any suggestions would be appreciated . If you need anything please let me know I ll try to provide you with that . : D" ] }
[ "yes-answer-long", "yes-answer-short" ]
linux
UNK_RELATION
jvmti@virtual-machine@28
jvmti -- jvmti is the java @placeholder tool interface a native api by which authors can write jvm plugins to monitor or modify the execution of a java virtual-machine .
{ "confidence": [ 61.295616149902344, 55.40095138549805, 54.60114288330078, 54.323875427246094, 51.31951141357422, 51.256988525390625, 49.06132507324219, 49.01805877685547, 47.930091857910156, 47.15556716918945, 47.01136016845703, 46.837646484375, 46.82586669921875, 46.237892150878906, 46.04180145263672, 45.128448486328125, 44.77002716064453, 44.614173889160156, 44.591087341308594, 43.254417419433594, 42.98466491699219, 42.98466491699219, 42.717193603515625, 42.717193603515625, 42.61003875732422, 42.19940185546875, 42.042171478271484, 41.98603439331055, 41.884727478027344, 41.81934356689453, 41.62469482421875, 41.39073944091797, 41.15974044799805, 41.138511657714844, 40.98925018310547, 40.969703674316406, 40.809410095214844, 40.693443298339844, 40.56547927856445, 40.284549713134766, 40.269615173339844, 39.92919921875, 39.92919921875, 39.927391052246094, 39.73778533935547, 39.43407440185547, 39.16260528564453, 39.16260528564453, 39.16260528564453, 39.0240478515625, 39.0240478515625, 38.79106140136719, 38.76740264892578, 38.659645080566406, 38.62281036376953, 38.62281036376953, 38.435951232910156, 38.36631393432617, 38.070106506347656, 37.933494567871094, 37.37724304199219, 37.32722473144531, 37.144256591796875, 37.144256591796875, 37.090614318847656, 37.014896392822266, 36.49236297607422, 36.28474426269531, 36.22092056274414, 36.217525482177734, 36.078521728515625, 35.936241149902344, 35.53160858154297, 35.53160858154297, 35.53160858154297, 35.53160858154297, 35.53160858154297, 35.443809509277344, 35.443809509277344, 35.443809509277344, 35.443809509277344, 35.443809509277344, 35.257442474365234, 35.12232971191406, 34.35131072998047, 34.35131072998047, 34.35131072998047, 34.18830871582031, 33.818450927734375, 33.76223373413086, 33.76223373413086, 33.21855163574219, 33.21855163574219, 33.21855163574219, 33.04192352294922, 32.89678192138672, 31.689414978027344, 31.421878814697266, 31.37902069091797, 31.37902069091797 ], "content": [ "For more details read on.. . .. . .. . JVMTI Java Virtual Machine Tool Interface is the successor to JVMDI Java Virtual Machine Debug Interface and JVMPI Java Virtual Machine Profiling Interface .", "I have a native JVMTI agent that I attach with the Java Attach API .", "The JVM Tool Interface JVMTI specification http : java.sun.com javase 6 docs platform jvmti jvmti.html onattach says that the JVMTI agents can be started in the VM during live phase but they havent mentioned how it can be done .", "Yes JNI interface code is needed to use JVMTI API as it is a native API .", "This does not help with JVMTI agents which are native-code .", "I m writing an instrumentation tool for Java applications using JVMTI .", "but JVMTI agent would be a native library.. . how a jar file can contain JVMTI agent", "Our aim is to study JVMTI and write JVMTI agents to get specific detail .", "I was looking for help in implementing the jvmti specifications- writing jvmti agents in C and then using them in monitoring the java applications .", "I m writing a Java agent to interact with JVMTI .", "What is the difference between JDI java debugger interface JWDP javaagent and native agent JVMTI .", "I ve been fiddling with JVMTI API trying to write something useful .", "I am new to JVMTI .", "Since the JVMTI agents are native-code and not Java classes your discussion of class loaders does not apply .", "Is there a way to achieve this with native functions of JNI or JVMTI", "If there is no easy way to achieve this with JNI or JVMTI I will implement the iterating part in Java .", "Are there any other ways to force an agent to unload its self either through a Java API or from within the JVMTI agent", "Detaching from the JVM doesn t cause the JVMTI agent to be unloaded .", "I m writing a native agent to java using the JVMTI libraries and trying to get the capability for accessing local-variables .", "Though we were able to write JVMTI agents and use it to attach to the java application from the command-line .", "I wanted to know how would I communicate with the jvmti agent I attached on a running JVM using attach API .", "How would I communicate with the jvmti agent I attached on a running JVM using attach API .", "using the jvmti is 100 safe .", "No JNI or JVMTI required at all .", "I have the following java code .. . .. . I have a jvmti agent attached to java where I catch function-calls .", "As far as I know it is the only way for a debugger sitting outside the JVM to communicate with it and to interface with the JVMTI .", "Can I get the objects from the heap space using JVMTI", "Can I just use it like this : err jvmti - SetTag jvmti classes i jlong details i", "I m using the attach API to load a JVMTI agent at runtime .", "Also setup a transport mechanism to communicate the data from the jvmti agent to the java front end which would then display the results .", "I m having a problem with JVMTI .", "I was trying to write JVMTI agents in C which would connect to a running Java Application and then send the performance data of the application to another GUI application .", "I d like to use JVMTI http : docs.oracle.com javase 7 docs platform jvmti jvmti.html the C API to generate it in order to evaluate its performance impact on a running JVM .", "Thus I m looking at the following idea : .. . .. . Write a simple JVMTI shared object in C .. . When an exception gets thrown in Java-land trigger a JVMTI function .. . Code in the JVMTI lib suspends the Java thread that threw the exception inspects the stack to pull out the locals stores them somewhere accessible and resumes the Java thread .. . .. . Other than in this one scenario JVMTI would not be used at all .", "I haven t tested this yet but you might try something like this : .. . .. . Add a native method to the class that is supposed to communicate with your JVMTI agent : .. . .. . Then use the JNI to bind this Java method to some method of your JVMTI agent : .. . .. . where cls is a jclass reference to the class containing your native method .", "Is getting jvmti from gdata safe", "JVMTI agents often need to traverse the Java heap and visit each live object precisely once .", "For reasons I won t get into I need to use JVMTI the C interface inside the java process rather than the Java APIs like java.lang.instrument or JDI .", "This depends heavily on the JVM for that reason it is out of JVMTI specification scope .", "Is there any way to write debugging tools for Python that run in-process similar to the JVM Tool Interface APIs http : docs.oracle.com javase 6 docs technotes guides jvmti", "during garbage-collection are visible in a JVMTI environment .", "Just need add capabilities.can get line numbers 1 and call jvmti - GetLineNumberTable jvmti method count location table", "I suppose you are trying VMObjectAlloc http : docs.oracle.com javase 8 docs platform jvmti jvmti.html VMObjectAlloc JVMTI notification .", "JVMTI spec says http : download.oracle.com javase 1.5.0 docs guide jvmti jvmti.html onunload unloading without JVM termination is possible but platform-dependent and out of specification s scope .", "JDI Java Debugger Interface is a client-side debugger-side API which exposes some of the features of JVMTI while making use of JDWP more or less transparently .", "If you re using JVMTI you can identify the threads that are running in the JVM that you have connected to .", "Using the MethodEntry and MethodExit event hooks provided by the JVMTI how would I measure the time of a method executed in Java", "We are developing an application for obtaining the information of a running java application using JDWP and JVMTI .", "So we have a Java application- Front end querying for information from the JVMTI Agents Back-End .", "So the answer to the question is almost certainly that tags set by the JVM itself are not visible in a JVMTI environment .", "I d like to unload the JVMTI agent when my program is done without terminating the JVM the agent is loaded in .", "For performance reasons the JVMTI only supports allocation events for objects that cannot be detected through bytecode instrumentation BCI as explained in the JVMTI VMObjectAlloc event documentation .", "Would a JVMTI agent be capable of analyzing an application within the JVM when it first attempts to load at startup and then preventing its execution if it was not found on our list of applications", "If so which is the appropriate way to compare exceptions through JVMTI or JNI", "How to get exception stack-trace with JVMTI .", "How about using tools like jvmti", "Take a look at SuspendThreadList http : docs.oracle.com javase 6 docs platform jvmti jvmti.html SuspendThreadList or SuspendThread http : docs.oracle.com javase 6 docs platform jvmti jvmti.html SuspendThread in jvmti http : docs.oracle.com javase 6 docs platform jvmti jvmti.html .", "I ve been reading the JVMTI documentation which provides this kind of information http : docs.oracle.com javase 7 docs platform jvmti jvmti.html .", "I would like to debug java applications that are using a jvmti agent I have written .", "Can someone explain what is going on and why JVMTI + JDWP is not a valid setup", "In order to support better profiling data I would like my JVMTI agent to enable a couple of JVM flags .", "You can iterate the heap space using .. . .. . http : docs.oracle.com javase 7 docs platform jvmti jvmti.html IterateThroughHeap", "Alternatively you may use JVMTI GetThreadInfo http : docs.oracle.com javase 8 docs platform jvmti jvmti.html GetThreadInfo function to get thread name as char .", "In the best case with a function described in the JVMTI Documentation http : download.oracle.com javase 1.5.0 docs guide jvmti jvmti.html but I cannot find anything .", "If i don t developed JVMTI agent i can t see follow errors .", "If you look at the attach doc it clearly states that loadAgent is used to load agents that are written in Java while loadAgentLibrary and loadAgentPath are used to load JVMTI agents that are native-code .", "Is there a way to unload a Java agent short of killing the whole Java process either from inside the JVMTI code or from outside the process", "So my question is : in the mainstream JVM implementations ie Oracle what is the overhead of enabling the JVMTI features I need", "I am new in the realm of debuggers instrumentation and JVMTI .", "I mostly use the JVM TM Tool Interface Documentation http : docs.oracle.com javase 8 docs platform jvmti jvmti.html onload if any questions come up .", "I checked Java JVMTI doesn t work alongside -Xdebug -Xrunjdwp http : stackoverflow.com questions 1562979 java-jvmti-doesnt-work-alongside-xdebug-xrunjdwp but the accepted answer does not seem to be correct as it really seems to depend on the enabled capabilities as well .", "At least you always can use RawMonitorEnter https : docs.oracle.com javase 7 docs platform jvmti jvmti.html RawMonitorEnter and RawMonitorExit https : docs.oracle.com javase 7 docs platform jvmti jvmti.html RawMonitorExit with gdata- lock but I don t think it is really necessary until you are going to access gdata- jvmti concurrently .", "But I can t understand how byte code instrumentation can be used with JVMTI .", "So how can we do byte code instrumentation along with JVMTI", "Can static byte code-analysis be used along with JVMTI .", "You can instrument bytecode from JVMTI too but it is much more cumbersome .", "I was just curios if byte code-analysis can be done using JVMTI .", "What I want to do is to run test cases with jvmti agent .", "I found the JVMTI method GetClassFields to get the jfieldID s of the fields of an object .", "I have got the hold of a jthread in particular event in JVMTI agent .", "JVMTI and JDWP do work together in fact they generally must be used together .", "It doesn t state anywhere that JDWP and JVMTI cannot be used together .", "In JVMs that support this aspect of JVMTI you can query for this string using jvmtiError GetSourceDebugExtension jvmtiEnv jclass char http : docs.oracle.com javase 1.5.0 docs guide jvmti jvmti.html GetSourceDebugExtension .", "I am aware of jstack and JMX this question is not generally about getting thread dumps but about using the JVMTI API .", "This seems to only work if the jvmti agent is NOT trying to enable can generate breakpoint events capabilities .", "JVMTI capabilities you mentioned will not prevent from JIT compilation .", "I am currently working with JVMTI very the first time .", "If you want to execute this from within the native JVMTI code you would need to do Bytecode instrumentation .", "my requirement was slightly different- the example above uses the refrence implementation for jvmti jdwp which comes with the jdk .", "However this doesn t really give you much in terms of being able to then connect to a jvmti agent as the other answer points out the jvmti has its own methods for doing the same thing .", "I ve seen that JVMTI detects when an exception has been thrown and when has been caught according to http : docs.oracle.com javase 7 docs platform jvmti jvmti.html Exception .", "Also you can create a thread by means of RunAgentThread https : docs.oracle.com javase 7 docs platform jvmti jvmti.html RunAgentThread .", "You can use the JVMTI to get the type of every field and then call the respective GetField method :", "I take it they re all using JVMTI and more specifically the ForceGarbageCollection notice the Force but how can I try it for myself", "You could certainly use something like soot and also use JVMTI .", "I built a basic java agent allowing to invoke the jvmti ForceGarbageCollection http : docs.oracle.com javase 8 docs platform jvmti jvmti.html ForceGarbageCollection function : .. . .. . This agent is invoked via JNI https : docs.oracle.com javase 8 docs technotes guides jni : .. . .. . .. . .. . To compile the agent on MacOSX : .. . .. . To launch the Garbager : .. . .. . .. . .. . Based on this tutorial : Own your heap : Iterate class instances with JVMTI http : www.javaadvent.com 2014 12 own-your-heap-iterate-class-instances.html", "So if you want to call this API from java you need to write JNI code to interface it .", "When I tried to inspect the java application using JVMTI I found that though I did not create any explicit threads there were lot of them spawned .", "One technique is to call FollowReferences https : docs.oracle.com javase 8 docs platform jvmti jvmti.html FollowReferences and avoid traversing a given object more than once by : .. . .. . Tagging each object visited using SetTag https : docs.oracle.com javase 8 docs platform jvmti jvmti.html SetTag and .. . Filtering out tagged objects e.g .", "The HeapTracker http : hg.openjdk.java.net jdk7 jdk7 jdk file tip src share demo jvmti heapTracker demo illustrates precisely how to intercept all object allocations in a JVMTI agent using java crw demo https : blogs.oracle.com kto entry a short java crw demo in addition to the VMObjectAlloc events ." ] }
{ "confidence": [ 76.96599578857422, 72.74834442138672, 71.4709243774414, 71.07998657226562, 70.42715454101562, 69.00044250488281, 66.82852935791016, 64.54603576660156, 63.96428680419922, 63.76588821411133, 63.763160705566406, 62.388511657714844, 62.11700439453125, 61.51057434082031, 61.318634033203125, 61.19309997558594, 60.76902770996094, 60.29294204711914, 59.313873291015625, 58.91770935058594 ], "content": [ "Question : I spent the last 4 hours trying to set up Eclipse TPTP memory profiling on a Tomcat instance that must be run remotely i.e . not in Eclipse . This should be possible according to the TPTP and Agent Controller docs . I installed the TPTP components 4.6.0 into my Eclipse Galileo workbench along with the Agent Controller according to the instructions on the website . To enable the agent I added the following options to the command-line that starts the Tomcat instance : .. . .. . and added the following directories to the front of the PATH : .. . .. . When attempting to start Tomcat I consistently got the following error message : .. . .. . I did a lot of Googling but found nothing relevant I tried reinstalling TPTP and various versions of the Agent Controller . In the end the problem turned out to be that I was starting Tomcat with the jpda option which catalina.bat translates into .. . .. . Removing the jpda command argument caused JVMTI to start working . SO the question is : I found nothing during any of my searches to indicate that a JVMTI agent is incompatible with debugging . Can someone explain what is going on and why JVMTI + JDWP is not a valid setup .. . Answer : None of the answers so far are correct and this is the first hit that comes up on Google if you query the error mentioned so I feel some clarification is needed . JVMTI and JDWP do work together in fact they generally must be used together . You will get ERROR : JDWP unable to get necessary JVMTI capabilities if -Xrunjdwp and or possibly -agentlib : jdwp is specified more than once on the command-line . To fix it make sure you only have one of -Xrunjdwp or -agentlib : jdwp in your command-line . For more details read on.. . .. . .. . JVMTI Java Virtual Machine Tool Interface is the successor to JVMDI Java Virtual Machine Debug Interface and JVMPI Java Virtual Machine Profiling Interface . It incorporates the functionality of both JVMDI and JVMPI both of which were deprecated in Java 5 and removed in Java 6 . It is the API that exposes the internals of the JVM for the purposes of debugging and profiling . JDWP Java Debug Wire Protocol is a protocol that describes a simple mechanism for transmitting commands and responses . As far as I know it is the only way for a debugger sitting outside the JVM to communicate with it and to interface with the JVMTI . JDI Java Debugger Interface is a client-side debugger-side API which exposes some of the features of JVMTI while making use of JDWP more or less transparently . The bug http : bugs.sun.com bugdatabase view bug.do bug id 6354345 mentioned in Bob Dobbs s answer concerns the misleading error message and the fact that the JVM will try to load JDWP once for every time it is specified on the command-line . It doesn t state anywhere that JDWP and JVMTI cannot be used together . More info here : http : publib.boulder.ibm.com infocenter iseries v5r4 topic rzaha jpdebuga.htm Comment : so is it possible to use remote debugging with profiling simultaneously Comment : @michael I believe so but unless you re trying to mimic some strange conditions in an attempt to reproduce a memory leak or giant CPU spike doesn t profiling while debugging sound like a bad idea Comment : Great answer . Was getting this error . I had to disable debug mode on my ancient Sun App Server before I could get the YourKit profiler configuration to work with it . Thank you", "Question : I m not looking for the usual you can only hint the GC in Java using System.gc answers this is not at all what this question is about . My questions is not subjective and is based on a reality : GC can be forced in Java for a fact . A lot of programs that we use daily do it : IntelliJ IDEA NetBeans VisualVM . They all can force GC to happen . How is it done I take it they re all using JVMTI and more specifically the ForceGarbageCollection notice the Force but how can I try it for myself http : java.sun.com javase 6 docs platform jvmti jvmti.html ForceGarbageCollection .. . .. . Also note that this question is not about why I d want to do this : the why may be curiosity or we re writing a program similar to VisualVM etc . The question is really how do you force a GC using JVMTI s ForceGarbageCollection Does the JVM needs to be launched with any special parameters Is any JNI required If so what code exactly Does it only work on Sun VMs Any complete and compilable example would be most welcome . .. . Answer : Yes JNI interface code is needed to use JVMTI API as it is a native API . native means that you can only call it directly form native understan c or c++ code . So if you want to call this API from java you need to write JNI code to interface it .", "Question : I m writing a Java agent to interact with JVMTI . For reasons I won t get into I need to use JVMTI the C interface inside the java process rather than the Java APIs like java.lang.instrument or JDI . I would like to be able to do a couple of things which appear not to be supported directly . 1 . Is there a way to load an agent after the Java process has already started 2 . Is there a way to unload a Java agent short of killing the whole Java process either from inside the JVMTI code or from outside the process For instance could I safely call dlclose http : man7.org conf lca2006 shared-libraries slide12.html from the JVMTI code if I can find the handle for the dynamically-loaded module If these operations can t be done is there a way to pass data to a Java agent after it s loaded Is there a normal way to do this through some Java command-line utility If not can I safely create a thread and have it listen to a socket using the standard C or C++ library calls within the code for my agent If it helps don t worry about supporting Windows with your answer - I m undertaking this project to extend a Unix-only debugging tool . Note : I ve already seen this http : stackoverflow.com questions 6124855 unloading-a-jvmti-agent-at-runtime but thought there might be some normal way to do it that isn t in the JVMTI standard . .. . Answer : 1 . You can only inject deploy an agent either at start time http : docs.oracle.com javase 7 docs platform jvmti jvmti.html onload of the JVM by passing the argument -agentlib : agent-lib-name options or -agentpath : path-to-agent options . The other way is through Java itself . This depends heavily on the JVM for that reason it is out of JVMTI specification scope . For instance if there is the VirtualMachine http : docs.oracle.com javase 6 docs jdk api attach spec com sun tools attach VirtualMachine.html class through the method loadAgentPath agentPath options http : docs.oracle.com javase 6 docs jdk api attach spec com sun tools attach VirtualMachine.html loadAgentPath 28java.lang.String 20java.lang.String 29 . If you want to execute this from within the native JVMTI code you would need to do Bytecode instrumentation . 2 . I am not sure similar to 1 . you could run the Java unload method through Bytecode instrumentation . If dlclose works I do not see a problem in doing that . As you see you can pass data to the Java agent by using the options . Alternatively if you want to pass data continuously between both instances you can open two sockets and write read between them . I used Protobuf https : code.google.com p protobuf", "Question : I wanted to know how would I communicate with the jvmti agent I attached on a running JVM using attach API . When I say communicate here s what I meant : I want to call native functions located on my jvmti agent theses function will return me data like field values of the running JVM that I infected earlier with the agent . Here s the agent I did not add the native functions yet : .. . Answer : You could try to register native methods using the JNI . I haven t tested this yet but you might try something like this : .. . .. . Add a native method to the class that is supposed to communicate with your JVMTI agent : .. . .. . Then use the JNI to bind this Java method to some method of your JVMTI agent : .. . .. . where cls is a jclass reference to the class containing your native method .", "Question : The JVM Tool Interface JVMTI specification http : java.sun.com javase 6 docs platform jvmti jvmti.html onattach says that the JVMTI agents can be started in the VM during live phase but they havent mentioned how it can be done . Has anyone tried this before or got any hints on how to do it .. . Answer : You can use method .. . .. . from java.home . . lib tools.jar Comment : but JVMTI agent would be a native library.. . how a jar file can contain JVMTI agent Comment : Have no idea . I used this method for tests .", "Question : I m using the attach API to load a JVMTI agent at runtime . I d like to unload the JVMTI agent when my program is done without terminating the JVM the agent is loaded in . According to this documentation http : download.oracle.com javase 6 docs jdk api attach spec com sun tools attach VirtualMachine.html there is no way to do this from the attach API . Are there any other ways to force an agent to unload its self either through a Java API or from within the JVMTI agent Comment : This doesn t mean to be a proper answer but just a suggestion . I ve had a similar problem with JNI I wanted to unload a module . The best solution I ve found is simple as that : spawn a new JVM instance doing the work with the module wait for it to terminate and then when it s terminated then the module is obviously unloaded . I bet you ll end doing this after struggling for a while . I suggest you to skip the struggle phase : P .. . Answer : You have to load JVMTI agent programatically : .. . .. . see doc here http : download.oracle.com javase 6 docs jdk api attach spec com sun tools attach VirtualMachine.html .. . .. . After that you have to use a different classLoad than default : .. . .. . You have to set the system property java.system.class.loader to be the name of your custom class loader for your target JVM . see doc here http : download.oracle.com javase 6 docs api java lang ClassLoader.html getSystemClassLoader 28 29 .. . .. . Java s builtin Class loaders always checks if a class is already loaded before loading it . Reloading the class is therefore not possible using Java s builtin class loaders . To reload a class you will have to implement your own ClassLoader subclass . In your case you have to implement a ClassLoader which has ClassLoader.getSystemClassLoader has parent . Even with a custom subclass of ClassLoader you have a challenge . Every loaded class needs to be linked . This is done using the ClassLoader.resolve method . This method is final and thus cannot be overridden in your ClassLoader subclass . The resolve method will not allow any given ClassLoader instance to link the same class twice . Therefore everytime you want to reload a class you must use a new instance of your ClassLoader subclass . This is not impossible but necessary to know when designing for class reloading . see Dynamic Class Reloading http : tutorials.jenkov.com java-reflection dynamic-class-loading-reloading.html Comment : This does not help with JVMTI agents which are native-code . Detaching from the JVM doesn t cause the JVMTI agent to be unloaded . Comment : I dont say that . The code example is just here to show how to load the agent . Unloading agent from the JVM is the same problem that unloading classes . The only solution is to use your own Class loader . Comment : If you look at the attach doc it clearly states that loadAgent is used to load agents that are written in Java while loadAgentLibrary and loadAgentPath are used to load JVMTI agents that are native-code . Since the JVMTI agents are native-code and not Java classes your discussion of class loaders does not apply . See download.oracle.com javase 6 docs jdk api attach spec http : download.oracle.com javase 6 docs jdk api attach spec index.html Comment : i agree now my solution is only for java agent .", "Question : I am new in the realm of debuggers instrumentation and JVMTI . So I have few questions about them . 1 . What is the difference between JDI java debugger interface JWDP javaagent and native agent JVMTI . and where does the java instrumentation API fit in picture . 2 . I am using JDI to intercept exceptions in target java application . but I found out that JDI is not good enough if we talk about how it impacts the performance of target app . I read that most good applications does this with combining JVMTI with byte code instrumentation . But I can t understand how byte code instrumentation can be used with JVMTI . So how can we do byte code instrumentation along with JVMTI any example will be helpful . 3 . Can we instrument both byte code and machine code in java 4 . Can static byte code-analysis be used along with JVMTI . If yes then how If any question is irrelavent or wrong let me know . .. . Answer : 1 - I think that this site explains the distinction pretty well : http : docs.oracle.com javase 1.5.0 docs guide jpda architecture.html - these are basically 3 layers of abstraction built on top of each other with JVMTI interfacing directly with the running JVM then JDWP being used as a communication protocol then JDI as an interface to that remote JVM . You can use a javaagent to perform bytecode instrumentation orthogonal to the implementation of these 3 things . 2 - I think that the most performant way to do this would be to instrument all code to add a try-catch in each method to handle an exception - when the exception is caught you handle it however you wanted to then re-throw it . The easiest way to do instrumentation is with the javaagent approach then using javaassist or asm or whatever . You can instrument bytecode from JVMTI too but it is much more cumbersome . If you only care about specific exceptions namely those that are explicitly thrown and not those that are thrown internally by the interpreter like NullPointerException ArrayIndexOutOfBoundsException etc then the easiest way to handle these would be to intercept ATHROW instructions the instruction used to throw an exception . I have no specific experience but it might be reasonable to create a JVMTI agent that is registered for the Exception event http : docs.oracle.com javase 7 docs platform jvmti jvmti.html Exception but I am not sure of its performance could be just as slow as your JDI approach could be better . 3 - No : you can only instrument bytecode running in Java . If you wanted to instrument the machine code you could try to do that with something like pin but I think this is probably getting way out of hand for what you are looking for . 4 - Sure : what sort of static-analysis are you interested in You could certainly use something like soot and also use JVMTI . Comment : Thanks a lot for your answer . About the static-analysis My use-case is only that if I can find out pieces of code which can throw any exceptions without actually running the target application . Anyway I am not going to use byte code-analysis in near future . I was just curios if byte code-analysis can be done using JVMTI . If you could point out to some tutorial for this that will be helpful . I already searched google for this but couldn t find anything . Thanks . Comment : If all that you are interested in is the exact site that could throw the exception e.g . throw new MyException then you could use ASM to simply detect the ATHROW instruction and then emit some instrumentation around it . However if your goal is to more broadly find all possible call sites that might call code that might throw an exception then you need to build a static call-graph . And for that I d turn to soot https : sable.github.io soot .", "Question : I m using the attach API to load a JVMTI agent at runtime . I d like to unload the JVMTI agent when my program is done without terminating the JVM the agent is loaded in . According to this documentation http : download.oracle.com javase 6 docs jdk api attach spec com sun tools attach VirtualMachine.html there is no way to do this from the attach API . Are there any other ways to force an agent to unload its self either through a Java API or from within the JVMTI agent Comment : This doesn t mean to be a proper answer but just a suggestion . I ve had a similar problem with JNI I wanted to unload a module . The best solution I ve found is simple as that : spawn a new JVM instance doing the work with the module wait for it to terminate and then when it s terminated then the module is obviously unloaded . I bet you ll end doing this after struggling for a while . I suggest you to skip the struggle phase : P .. . Answer : JVMTI spec says http : download.oracle.com javase 1.5.0 docs guide jvmti jvmti.html onunload unloading without JVM termination is possible but platform-dependent and out of specification s scope .", "Question : There are multiple ways to generate thread dumps in java . I d like to use JVMTI http : docs.oracle.com javase 7 docs platform jvmti jvmti.html the C API to generate it in order to evaluate its performance impact on a running JVM . I am aware of jstack and JMX this question is not generally about getting thread dumps but about using the JVMTI API . I m basing my code off of this blog post http : www.raylikestocode.com 2007 09 create-your-first-java-virtual-machine.html . In there the java agent attaches to the SIGQUIT signal . I d like to avoid that because that is the same signal that the JVM uses in order to write a thread-dump to stdout . I want to avoid that duplicity . In other words I d like to either attach to a different signal or find a way for the agent to generate a thread-dump periodically . Comment : None of the events in jvmtiEventCallbacks look suitable unless you want to use DataDumpRequestion but if you did you wouldn t be asking here : . It looks like you re best off having your agent call GetStackTrace directly . Is there a reason you can t do that Comment : @Paul-Hicks Could you post a link or code on how I would attach to the jvm in this case Comment : You put the agent dll or .so in your jvm s -agentpath or define it as an -agentlib . Have a look at this answer http : stackoverflow.com a 173447 3195526 or IBM s intro page http : publib.boulder.ibm.com infocenter realtime v2r0 index.jsp topic 2Fcom.ibm.rt.doc.20 2Fdiag 2Ftools 2Fjvmti.html . Is this what you wanted to know Should I turn this into an answer Comment : ok so that s pretty much how I ve attached to the jvm so far with minor differences . So I guess that brings me to the next question : How do I get a pointer to a jvmtiEnv in order to call GetStackTrace if not from a callback The point is to call that function periodically . .. . Answer : In there the java agent attaches to the SIGQUIT signal . I d like to avoid that because that is the same signal that the JVM uses in order to write a thread-dump to stdout . I want to avoid that duplicity . Just remove the following snippet from your code .. . .. . I d like to either attach to a different signal .. . .. . Here is http : public.dhe.ibm.com software dw java i-signalhandling-pdf.pdf the paper that is a bit old but the information should be still relevant . Just a sample of how to do a signal handling .. . .. . Of cause you can write completely native signal handler please note that I haven t tested it this is just an idea that should work .. . .. . or find a way for the agent to generate a thread-dump periodically . In your sample there is global gdata .. . .. . .. . so just obtain jvmtiEnv from there at any time you want timer callbacks etc . Comment : Is getting jvmti from gdata safe I m not so sure about that but I can give it a try . Comment : It should be safe . At least you always can use RawMonitorEnter https : docs.oracle.com javase 7 docs platform jvmti jvmti.html RawMonitorEnter and RawMonitorExit https : docs.oracle.com javase 7 docs platform jvmti jvmti.html RawMonitorExit with gdata- lock but I don t think it is really necessary until you are going to access gdata- jvmti concurrently . Comment : Also you can create a thread by means of RunAgentThread https : docs.oracle.com javase 7 docs platform jvmti jvmti.html RunAgentThread . The thread s start function https : docs.oracle.com javase 7 docs platform jvmti jvmti.html jvmtiStartFunction accepts jvmtiEnv as its first param . So you can do periodic thread dumps from within this natively created thread . Comment : using the jvmti is 100 safe . The lifetime is speced to be until the agent unloads . Comment : I would also recommend against using signals - the JVM mucks with a number of them internally and signal chaining is very hard to get right . Find a different triggering mechanism like my answer suggests - eg : socket semaphore etc.. .", "Question : I m working on a simple dynamic language that runs on the JVM . One of the required capabilities is this : only when an exception is thrown I need to be able to query the local-variables for all frames in the call stack at the time the exception is thrown . This capability is not available in standard Java or reflection . Thus I m looking at the following idea : .. . .. . Write a simple JVMTI shared object in C .. . When an exception gets thrown in Java-land trigger a JVMTI function .. . Code in the JVMTI lib suspends the Java thread that threw the exception inspects the stack to pull out the locals stores them somewhere accessible and resumes the Java thread .. . .. . Other than in this one scenario JVMTI would not be used at all . Code could potentially run for days without throwing an exception and I would hope it would run as fast as non-JVMTI enabled code . So my question is : in the mainstream JVM implementations ie Oracle what is the overhead of enabling the JVMTI features I need For example would doing so disable JIT ing My best guess of the JVMTI capabilities I need is : .. . .. . can signal thread .. . can get source file name .. . can get source debug extension .. . can access local-variables .. . Answer : JVMTI capabilities you mentioned will not prevent from JIT compilation . However certain optimizations will be disabled e.g . Escape Analysis and dead locals elimination . Also every thrown exception will cause deoptimization switching to interpreter . Nevertheless overall performance overhead should be negligible . Comment : why do you say every thrown exception will cause a switch to the interpreter Comment : If you are going to handle exceptions by JVMTI function you ll have to set up Exception callback . Whenever exception occurs JVM will deoptimize current frame and call this callback . Or were you planning to do that some other way Comment : no you re absolutely right . I found what seemed to be a more direct way though by creating a dummy function and using JVMTI to set a breakpoint in the dummy function . When I instantiate a particular class of exception its constructor calls the dummy and that triggers JVMTI to walk the stack and decorate the exception with the local-variables info .", "Question : I wanted to know how would I communicate with the jvmti agent I attached on a running JVM using attach API . When I say communicate here s what I meant : I want to call native functions located on my jvmti agent theses function will return me data like field values of the running JVM that I infected earlier with the agent . Here s the agent I did not add the native functions yet : .. . Answer : How would I communicate with the jvmti agent I attached on a running JVM using attach API . If I understand what you are doing here correctly it is entirely up to you how your external application communicates with the agent but it is also up to you to implement it .. . starting with designing or choosing the wire-protocol you are going to use .", "Question : I am currently working with JVMTI very the first time . I mostly use the JVM TM Tool Interface Documentation http : docs.oracle.com javase 8 docs platform jvmti jvmti.html onload if any questions come up . But what I could not find out is : What can the JavaVM-parameter be used to except getting the environment by calling GetEnv .. . on it Is this the only purpose I was not able to find any further documentation neither on the JavaVM class itself nor on this parameter in particular . Probably I was just blind and someone can point me in the right direction Explainations Documentation Tutorials etc . . Here some typical example code on the parameter useage I ve seen so far : .. . Answer : JavaVM structure is a part of Java Invocation API https : docs.oracle.com javase 8 docs technotes guides jni spec invocation.html . It contains the following functions : .. . .. . GetEnv .. . DestroyJavaVM .. . AttachCurrentThread .. . AttachCurrentThreadAsDaemon .. . DetachCurrentThread", "Question : I am looking for potentially a JDI API to pause the JVM at any arbitrary point during its execution . Looking at the BreakPointRequest http : docs.oracle.com javase 1.3 docs guide jpda jdi com sun jdi request EventRequestManager.html createBreakpointRequest 28com.sun.jdi.Location 29 createBreakpointRequest method needs a specific location . Is there any other API that does not need a location or someway to get current Location that could be passed to create a breakpoint . I am basically looking for a way to attach and pause the application then use JVMTI agent to receive callback for the BreakPoint event to perform further processing . Thanks Comment : You want to halt JVM or application if I understand correctly one jvm may host multiple applications . If it is Jvm Virtualmachine class process method may be worth to research on for your req . .. . Answer : Breakpoints only make sense with a location in source . Arbitrary pausing your application is probably best done by suspending all the threads currently running in the JVM . Take a look at SuspendThreadList http : docs.oracle.com javase 6 docs platform jvmti jvmti.html SuspendThreadList or SuspendThread http : docs.oracle.com javase 6 docs platform jvmti jvmti.html SuspendThread in jvmti http : docs.oracle.com javase 6 docs platform jvmti jvmti.html . This mechanism would be the pause you are looking for .", "Question : We are developing an application for obtaining the information of a running java application using JDWP and JVMTI . Sun Java comes with a reference implementation of JDWP so using agentlib -jdwp : will use the reference implementation . Our aim is to study JVMTI and write JVMTI agents to get specific detail . Also creating a Front end using which the user can request for specific information about the running java application . For this we would have to write our implementation for JDWP . Though we were able to write JVMTI agents and use it to attach to the java application from the command-line . But our aim is to send this information to another java process Front End . So we have a Java application- Front end querying for information from the JVMTI Agents Back-End . These agents should be able to attach to the running java application we are going to inspect dynamically . Any ideas on how this can be done Or has anyone tried this before Comment : What kind of information are you trying to grab It sounds like JMX is not enough . Could you elaborate Comment : I was trying to write JVMTI agents in C which would connect to a running Java Application and then send the performance data of the application to another GUI application . I somehow managed to implement this . And its been almost a year since I finished this and was unable to document my work . .. . Answer : The JDK has a built-in Java api for remote local debug com.sun.jdi . http : download.oracle.com javase 6 docs jdk api jpda jdi index.html . To quickly start using the api you can look at examples in JDK DIR demo jpda examples.jar . More details http : download.oracle.com javase 6 docs technotes guides jpda examples.html .. . .. . .. . .. . Since the official examples are not so clear here is reusable example inspired by this blog post http : illegalargumentexception.blogspot.com 2009 03 java-using-jpda-to-write-debugger.html : .. . .. . VMAcquirer.java Connection manager .. . .. . Monitor.java Actual monitoring .. . .. . Required by the application being monitor .. . .. . Informations available through JDWP .. . .. . Tracing method call and return possibly for doing profiling or logging .. . Field value changes .. . VM information see name and description in the example .. . Evaluate expression to execute arbitrary code Comment : thanks a lot for the answer . my requirement was slightly different- the example above uses the refrence implementation for jvmti jdwp which comes with the jdk . I was looking for help in implementing the jvmti specifications- writing jvmti agents in C and then using them in monitoring the java applications . Also setup a transport mechanism to communicate the data from the jvmti agent to the java front end which would then display the results . Comment : I ll keep the answer in case it can help somebody who need something similar . Comment : And a +1 for you Comment : @h3xStream Excellent answer do you have any ideas regarding my question at stackoverflow.com questions 21212895 http : stackoverflow.com questions 21212895 writing-a-java-debugger-with-jdwp Thanks", "Question : I want to iterate over all field values of an object of a given class using JNI . I found the JVMTI method GetClassFields to get the jfieldID s of the fields of an object . In the JNI API I found the methods Get type Field . However to use these methods I first have to know if I m dealing with one of the primitives arrays of a certain type or objects . I found a JNI method ToReflectedField so I could call the Java methods of the reflection API . However this seems overly complicated and error prone . Is there a way to achieve this with native functions of JNI or JVMTI Comment : Why You can do all this directly in Java . No JNI or JVMTI required at all . Comment : I want to copy an object and all its references to the native heap to be invisible for the GC . If there is no easy way to achieve this with JNI or JVMTI I will implement the iterating part in Java . I just thought the code would be easier to understand if I have both the iterating and copying part on the native side . Comment : I would venture to say that no Java code is easier to understand on the native side : Comment : GetClassFields requires jclass . Do you want to drop it and get a new jclass instance from a jfieldID Comment : In my use-case the jclass is the root class from which I want to determine the classes of the potentially referenced objects . .. . Answer : You can use the JVMTI to get the type of every field and then call the respective GetField method :", "Question : There are multiple ways to generate thread dumps in java . I d like to use JVMTI http : docs.oracle.com javase 7 docs platform jvmti jvmti.html the C API to generate it in order to evaluate its performance impact on a running JVM . I am aware of jstack and JMX this question is not generally about getting thread dumps but about using the JVMTI API . I m basing my code off of this blog post http : www.raylikestocode.com 2007 09 create-your-first-java-virtual-machine.html . In there the java agent attaches to the SIGQUIT signal . I d like to avoid that because that is the same signal that the JVM uses in order to write a thread-dump to stdout . I want to avoid that duplicity . In other words I d like to either attach to a different signal or find a way for the agent to generate a thread-dump periodically . Comment : None of the events in jvmtiEventCallbacks look suitable unless you want to use DataDumpRequestion but if you did you wouldn t be asking here : . It looks like you re best off having your agent call GetStackTrace directly . Is there a reason you can t do that Comment : @Paul-Hicks Could you post a link or code on how I would attach to the jvm in this case Comment : You put the agent dll or .so in your jvm s -agentpath or define it as an -agentlib . Have a look at this answer http : stackoverflow.com a 173447 3195526 or IBM s intro page http : publib.boulder.ibm.com infocenter realtime v2r0 index.jsp topic 2Fcom.ibm.rt.doc.20 2Fdiag 2Ftools 2Fjvmti.html . Is this what you wanted to know Should I turn this into an answer Comment : ok so that s pretty much how I ve attached to the jvm so far with minor differences . So I guess that brings me to the next question : How do I get a pointer to a jvmtiEnv in order to call GetStackTrace if not from a callback The point is to call that function periodically . .. . Answer : The blog entry you cite has most of what you need for JVMTI plumbing . You can use the JVMTIenv from gdata . That is legal . Make sure if you re making JNI calls to have a proper JNIenv for your current thread . You now need to add a way to get notified to take your action eg : thread-dump . Spin up a thread that listens on a socket uses inotify http : linux.die.net man 7 inotify named semaphores etc. . - something that you can poke from outside . You can then call dumpThreadInfo from your event handler loop as you see fit .", "Question : There are multiple ways to generate thread dumps in java . I d like to use JVMTI http : docs.oracle.com javase 7 docs platform jvmti jvmti.html the C API to generate it in order to evaluate its performance impact on a running JVM . I am aware of jstack and JMX this question is not generally about getting thread dumps but about using the JVMTI API . I m basing my code off of this blog post http : www.raylikestocode.com 2007 09 create-your-first-java-virtual-machine.html . In there the java agent attaches to the SIGQUIT signal . I d like to avoid that because that is the same signal that the JVM uses in order to write a thread-dump to stdout . I want to avoid that duplicity . In other words I d like to either attach to a different signal or find a way for the agent to generate a thread-dump periodically . Comment : None of the events in jvmtiEventCallbacks look suitable unless you want to use DataDumpRequestion but if you did you wouldn t be asking here : . It looks like you re best off having your agent call GetStackTrace directly . Is there a reason you can t do that Comment : @Paul-Hicks Could you post a link or code on how I would attach to the jvm in this case Comment : You put the agent dll or .so in your jvm s -agentpath or define it as an -agentlib . Have a look at this answer http : stackoverflow.com a 173447 3195526 or IBM s intro page http : publib.boulder.ibm.com infocenter realtime v2r0 index.jsp topic 2Fcom.ibm.rt.doc.20 2Fdiag 2Ftools 2Fjvmti.html . Is this what you wanted to know Should I turn this into an answer Comment : ok so that s pretty much how I ve attached to the jvm so far with minor differences . So I guess that brings me to the next question : How do I get a pointer to a jvmtiEnv in order to call GetStackTrace if not from a callback The point is to call that function periodically . .. . Answer : If your goal is to periodically collect thread-dump you can use Java Flight Recorder that is part of Java Mission Controller http : www.oracle.com technetwork java javaseproducts mission-control java-mission-control-1998576.html .. . .. . Starting with the release of Oracle JDK 7 Update 40 7u40 Java Mission Control is bundled with the HotSpot JVM .", "Question : null .. . Answer : I m interested on knowing when the Garbage Collector starts ends during the execution of a Java application . I ve been reading the JVMTI documentation which provides this kind of information http : docs.oracle.com javase 7 docs platform jvmti jvmti.html . I ve also found an example on how to use these events e.g . http : code.metager.de source xref openjdk jdk8 jdk src share demo jvmti gctest gctest.c . Note that the example creates a new thread which is executed whenever JVMTI EVENT VM INIT occurs - the callback is set in lines 173 178 and 179 and it RunAgentThread lines 120-121 receives this newly created thread . I ve modified it to not create the thread i.e . commented lines 173 178 and 179 and the agent seems to work in the same way . So is it necessary to create this agent thread to monitor the GC activity And if so why", "Question : I would like to identify the current JVM which is run . In the best case with a function described in the JVMTI Documentation http : download.oracle.com javase 1.5.0 docs guide jvmti jvmti.html but I cannot find anything . .. . .. . What I meant is something like this : VirtualMachine.list delivers : .. . .. . But it displays all JVMs not the current one being run . Comment : What do you mean by identify the current JVM which is run Comment : It seems likely you are pursuing a flawed strategy to achieve an unstated goal . What is the goal Comment : @Andrew Thompson : .. . .. . Answer : jps the command-line tool bundled with the JDK will list the currently running Java processes . You could use JMX to find and attach to different running Java processes . http : download.oracle.com javase 1.5.0 docs guide management agent.html .. . .. . You will need to enable monitoring . Finding your current PID is very operating-system dependent . Here is a blog post with some more suggestions : .. . .. . http : blog.igorminar.com 2007 03 how-java-application-can-discover-its.html .. . .. . Here are links with some more info : .. . .. . Process ID in Java http : stackoverflow.com questions 35842 process-id-in-java http : www.google.com search q find+current+java+process+id", "Question : JVMTI agents often need to traverse the Java heap and visit each live object precisely once . One technique is to call FollowReferences https : docs.oracle.com javase 8 docs platform jvmti jvmti.html FollowReferences and avoid traversing a given object more than once by : .. . .. . Tagging each object visited using SetTag https : docs.oracle.com javase 8 docs platform jvmti jvmti.html SetTag and .. . Filtering out tagged objects e.g . by setting JVMTI HEAP FILTER TAGGED in the Heap Filter Flags . There is however a problem in picking a suitable tag value . The documentation https : docs.oracle.com javase 8 docs platform jvmti jvmti.html Heap for object tags states : .. . .. . Tags are local to the environment that is the tags of one environment are not visible in another . Since each JVMTI agent has its own environment this protects one agent from clashing with tags set by another agent . However the documentation doesn t appear to state whether tags set by the JVM itself e.g . during garbage-collection are visible in a JVMTI environment . Are they visible or not If tags set by the JVM itself are visible the agent needs to avoid clashing with any such tags e.g . by clearing all the tags first or by somehow picking a tag that is not already in use . Comment : You may care to explain why the Heap iteration functions https : docs.oracle.com javase 8 docs platform jvmti jvmti.html Heap 1 0 are not suitable . Do some of these visit each object only once Comment : Those are no better actually and I didn t want to distract from the main question . Essentially there are two sets of functions . Those which follow references and therefore can be used to find just the live objects all have similar behaviour to FollowReferences and face the tagging issue . The others find live and dead objects which wasn t what we wanted . .. . Answer : Reading the Hotspot code in jvmtiTagMap.cpp https : github.com openjdk-mirror jdk7u-hotspot blob master src share vm prims jvmtiTagMap.cpp and observing that the corresponding header file https : github.com openjdk-mirror jdk7u-hotspot blob master src share vm prims jvmtiTagMap.hpp is only included in JVMTI code it seems very likely that the garbage collector does not use a tag map for its own tagging . So the answer to the question is almost certainly that tags set by the JVM itself are not visible in a JVMTI environment ." ] }
[ "yes-answer-long", "yes-answer-short" ]
virtual-machine
UNK_RELATION
glut@opengl@67
glut -- the open gl utility toolkit glut is a utility library for @placeholder applications to put the platform-dependent details e.g .
{ "confidence": [ 72.1348876953125, 61.35651779174805, 49.59114074707031, 47.40334701538086, 46.08392333984375, 44.914337158203125, 42.795326232910156, 42.73516845703125, 41.6727180480957, 40.28890609741211, 39.90275192260742, 39.39241027832031, 39.309383392333984, 39.297096252441406, 39.208744049072266, 39.208744049072266, 39.208744049072266, 39.159088134765625, 38.74951934814453, 37.88520812988281, 37.79685592651367, 37.79685592651367, 37.79685592651367, 37.79685592651367, 37.7716064453125, 37.646270751953125, 37.646270751953125, 37.47942352294922, 36.86020278930664, 36.86020278930664, 36.86020278930664, 36.86020278930664, 36.71592712402344, 36.47170639038086, 36.4208869934082, 36.405120849609375, 36.23438262939453, 36.23438262939453, 36.23438262939453, 36.23438262939453, 35.87555694580078, 35.73759841918945, 35.73759841918945, 35.5478515625, 35.5478515625, 35.5478515625, 35.5478515625, 35.5478515625, 35.5478515625, 35.5478515625, 35.304039001464844, 35.304039001464844, 35.2977294921875, 35.2977294921875, 35.2977294921875, 35.2977294921875, 35.2977294921875, 34.93890380859375, 34.42073059082031, 34.41088104248047, 34.36738586425781, 34.36738586425781, 34.36738586425781, 34.17512130737305, 34.17512130737305, 34.135963439941406, 34.135963439941406, 34.135963439941406, 34.135963439941406, 34.135963439941406, 34.135963439941406, 34.135963439941406, 34.135963439941406, 34.135963439941406, 34.135963439941406, 34.135963439941406, 34.135963439941406, 34.135963439941406, 33.8162956237793, 33.8162956237793, 33.581199645996094, 33.199310302734375, 33.199310302734375, 33.199310302734375, 33.199310302734375, 33.199310302734375, 33.199310302734375, 33.199310302734375, 33.199310302734375, 33.03223419189453, 32.81394958496094, 32.81394958496094, 32.81394958496094, 32.81394958496094, 32.81394958496094, 32.70542526245117, 32.70542526245117, 32.22700881958008, 32.09685516357422 ], "content": [ "glutMainLoop is a function from the GL Utility Toolkit GLUT .", "glut : OpenGL Utility Toolkit for Windowing API .", "GLUT Toolkit : .. . .. . GLUT is an OpenGL toolkit and helps with common tasks in OpenGL .", "GL is an API and GLU is an utility library on top of GL .", "GLUT http : en.wikipedia.org wiki OpenGL Utility Toolkit .. . .. . GLUT OpenGL Utility Toolkit is a library of utilities for OpenGL which primarily focuses on window definition window control and monitoring of keyboard and mouse input .", "Or is there another way to activate the gl glu and glut extensions", "Download the GLUT library .", "Precisely it is provided from the open-source freeglut http : docs.nvidia.com gameworks content gameworkslibrary optix optix release notes.htm : .. . .. . GLUT .. . .. . Most OptiX samples use the GLUT toolkit .", "I.e . a different GLUT library .", "Unless you re dependent on GLUT-specific features like sRGB framebuffers and the like .", "Create a child window and put your GLUT stuff there .", "Thereby GLU GLEW GLUT is simply utility libraries for OpenGL which requires OpenGL if not they aren t for much good .", "GLUT is not part of OpenGL it s a 3rd party library .", "Plus GLUT is not supported on the iPhone if you want to target this platform in the future .", "main contains glut functions .", "This sample does use glut", "GLUT and GLUI windows are different", "Remember : GLUT is designed for demo applications and simple test-beds .", "glutBitmapString is an extension implemented on freeglut no present in the old glut GL freeglut.h must be included instead of GL glut.h", "As far as I know there is no platform independent way to maximize windows from glut .", "Is there a way to do this in GLUT OpenGL", "glut is still in use", "Is it possible with free GLUT", "Apple is deprecating GLUT .", "I am using the glut toolkit and working in visual-studio-2015 .", "Glut has scarred me for life", "If not then what is GLUT doing that is not possible without it", "You need to include the opengl library on the command-line as well as the glut library .", "This is GLUT installation instruction .", "The Glut program is in a C++ DLL .", "Closing the window of glut .. . 2 .", "Maybe this is not possible at all with GLUT", "Using opengl and glut together means that you would be writing a glut program that uses opengl commands in the callback functions .", "I found Yampa http : hackage.haskell.org packages Yampa and yampa-glut http : hackage.haskell.org packages yampa-glut which seems to be a good binding to GLUT As it seems GLUT http : hackage.haskell.org packages GLUT is the only graphics lib that runs on both Windows and Linux .", "For example i create a simple glut application from this tutorial lighthouse3d.com tutorials glut-tutorial initialization http : www.lighthouse3d.com tutorials glut-tutorial initialization .", "but the problem is integrating the glut with the existing one. . i downloaded the library from http : www.xmission.com nate glut glut-3.7.6-bin.zip . . and deployed the files into .... . gl and ... . lib win8 um x32 and the dll to system windows folders respectively. . Hope so this will solve the problem.. .", "GLUT is installed by default on Mac OSX .", "glutBitmapString and glutStrokeString are not in the original GLUT implementation .", "Think of your basic GLUT programs .", "Just fooling around with opengl and glut .", "I m programming on OpenGL using the glut library and I ve got a problem with glutMouseFunc .", "gluErrorString isn t a GLUT function .", "You don t need GLUT .", "glutMainLoop enters the GLUT event processing loop .", "This routine should be called at most once in a GLUT program .", "many glut functions need a callback function to be registered .", "Using GLUT will make your code easier to port .", "I started playing around with OpenGL and GLUT .", "This is for a class so I m stuck using GLUT .", "How can I run my glut application", "Not using GLUT as specced http : www.opengl.org resources libraries glut spec3 node49.html .", "It will compile and run as-is without glut and it should work with glut with only minor modification : comment or uncomment the 4 lines marked E .", "You need to link-to glut binary :", "Fortunately GLUT is not the only framework around .", "Also GLU and GLUT are terribly outdated .", "That s the timer we have with GLUT .", "glut is designed to be the game loop .", "to be complete you d need to provide a mingw-compatible glut library too no", "This is glut s fault actually .", "Preventing resize seems impossible in Glut http : stackoverflow.com questions 10691603 is-it-possible-to-create-a-fixed-size-glut-window but GLFW supports it http : stackoverflow.com questions 10691603 is-it-possible-to-create-a-fixed-size-glut-window .", "Possible duplicate of Using the mouse scrollwheel in GLUT http : stackoverflow.com questions 14378 using-the-mouse-scrollwheel-in-glut", "According to the GLUT issue tracker https : github.com haskell-opengl GLUT issues 19 this a GHC bug .", "But since I m using GLUT and other than the problem described on iDevGames do you think this latest implementation is sufficient for GLUT", "I m today using GLUT on OSX .", "I am beginner to GLUT in C++ .", "In my glut application I m simulating a plane with the camera .", "This is the prototype : .. . .. . Register the callback with the Free GLUT function glutMouseWheelFunc .", "You almost certainly don t want GLUT regardless .", "I m using glut and glew on Windows 7 x64 .", "A GLUT installation is required to build samples on Linux .", "bitmap isn t a standard type either in OpenGL or GLUT .", "My GLUT program is behaving very unexpectedly .", "I have an OpenGL application created with glut 3.7.6 .", "Yes you can call glut Func anytime .", "Plus i need to intercept glut glu also .", "I m writing a simple OpenGL application that uses GLUT .", "However the way glut is designed doesn t allow that .", "I have a problem in managing vertices with glut .", "But what I really want to know is if there is a GLUT library available in some form .", "I believe the GLUT library I installed was from the macports version .", "Freeglut is an extended implementation of the SGI GLUT Toolkit and with a few exceptions around obsolete hardware implements the same functions .", "@NicolBolas I am also begineer in GLUT OpenGL .", "I have setup GLUT same as above method .", "I use GLUT which ships with Xcode .", "I m creating a 3D application using GLUT in C++ .", "How to display a glut window inside Windows Form", "The original GLUT has not even been maintained in this century .", "Why are you using GLUT in the first place", "@bahare By the way glutPostRedisplay does NOT belong to OpenGL but to GLUT .", "At GLUT homepage https : www.opengl.org resources libraries glut the third link from the bottom of the article is Pre-compiled Win32 for Intel GLUT 3.7 DLLs for Windows 95 NT https : www.opengl.org resources libraries glut glutdlls37beta.zip and this one is still alive .", "questions 538661 how-do-i-draw-text-with-glut-opengl-in-c 4 answers .. . .. . How can I write text in GLUT and C++", "The yampa-glut source comes with a simple example https : github.com ony yampa-glut blob master example.hs which I have copied to study it .", "I have the glutPostRedisplay function at several glut functions and also I have tried putting it in every glut function but it didn t work .", "I ve also tried Using GLUT bitmap fonts http : stackoverflow.com questions 14318 using-glut-bitmap-fonts but it doesn t work either .", "I m doing an uni project with initially one main GLUT window and will have some sort of login GLUI window that if succeed Draws the glut window .", "It s been a while since I ve worked with GLUT and it is certainly confusing at first .", "You will need a static array associating glut window id s with IO pointers .", "I would recommend to use GLFW http : www.glfw.org it is a great cross-platform library similar to GLUT but as I think better to use .", "Here s a basic and good introduction to how you initialize OpenGL assuming windows without using GLUT : .. . .. . Init OpenGL without GLUT http : nehe.gamedev.net data lessons lesson.asp lesson 01 .. . .. . As Luke said if you dont want to use GLUT you need specific information about the operating-system you are developing on ." ] }
{ "confidence": [ 72.0018310546875, 69.51181030273438, 65.18023681640625, 60.649356842041016, 54.63312911987305, 53.59500503540039, 52.30644989013672, 52.29393768310547, 51.21800994873047, 50.64872360229492, 50.10301208496094, 50.10301208496094, 50.10301208496094, 49.70010757446289, 49.68968963623047, 49.1461296081543, 48.50844955444336, 48.23395919799805, 48.010597229003906, 47.488685607910156 ], "content": [ "Question : So I realize that there are various posts that cover pairs of these but I am having trouble understanding how they all fit together . Explain what each of the following are used for and how they relate to each other : .. . glu .. . glew .. . glut .. . sdl .. . qt .. . openGL .. . webGL .. . Comment : +1 cause you r question produced such a good answer below : - .. . Answer : OpenGL http : en.wikipedia.org wiki OpenGL .. . .. . OpenGL Open Graphics Library is cross-platform API for rendering 2D and 3D graphics . The API mainly tries to focus on using the GPU to achieve hardware-accelerated http : en.wikipedia.org wiki Hardware acceleration rendering . OpenGL-ES http : en.wikipedia.org wiki OpenGL ES .. . .. . OpenGL-ES OpenGL for Embedded Systems is a subset of OpenGL designed for use on embedded systems like smartphones tablets game consoles etc . WebGL http : en.wikipedia.org wiki WebGL .. . .. . WebGL Web Graphics Library is a JavaScript API for rendering 2D and 3D graphics . WebGL also uses the GPU as much as it is possible through the browser . WebGL is based on OpenGL-ES http : en.wikipedia.org wiki OpenGL ES . Take in mind that they might have the same functions though WebGL isn t OpenGL or OpenGL-ES . WebGL is only based on OpenGL-ES . GLU http : en.wikipedia.org wiki OpenGL Utility Library .. . .. . GLU OpenGL Utility Library is a graphics library for OpenGL consisting of utility functions which can be used with OpenGL . The functions mainly focus on primitive rendering and mapping between screen- and world-coordinates etc . GLEW http : en.wikipedia.org wiki OpenGL Extension Wrangler Library .. . .. . GLEW OpenGL Extension Wrangler Library is a cross-platform library helps in querying and loading OpenGL Extensions . GLUT http : en.wikipedia.org wiki OpenGL Utility Toolkit .. . .. . GLUT OpenGL Utility Toolkit is a library of utilities for OpenGL which primarily focuses on window definition window control and monitoring of keyboard and mouse input . SDL http : en.wikipedia.org wiki Simple DirectMedia Layer .. . .. . SDL Simple DirectMedia Layer is a cross-platform development library designed to provide low-level access to audio keyboard mouse joystick and graphics hardware via OpenGL . SDL can also be used for other graphics API s such as DirectX etc . QT http : en.wikipedia.org wiki Qt 28framework 29 .. . .. . QT is a cross-platform application development framework widely used for the development of GUI programs in which case it is known as a widget toolkit and also used for developing non-GUI programs such as console tools and servers . Conclusion .. . .. . OpenGL is an API for rendering 2D and 3D graphics . OpenGL-ES is a subset of OpenGL targeting embedded systems . WebGL is a JavaScript API for rendering 2D and 3D graphics based on OpenGL-ES . GLU is a utility library for OpenGL which mainly contains mapping functions . GLEW is a utility library for OpenGL which can handle loading of OpenGL Extensions . GLUT SDL is a library for handling various things like window keyboard and mouse control as well as listening . QT is a framework mainly for creating GUI . Thereby GLU GLEW GLUT is simply utility libraries for OpenGL which requires OpenGL if not they aren t for much good . SDL doesn t require OpenGL and isn t directly an OpenGL utility library mainly but it can be used with OpenGL but also with other things as well . Comment : Upvoted for mostly correct answer but SDL doesn t really require GL . It may use many different graphics backends . Comment : @keltar thanks for the response I fixed that part of my answer . Comment : You should mention that Qt has functions for using OpenGl . As of Qt 5.1 Qt Quick 2 only uses OpenGl and so now QOpenGL classes are a core part of Qt in QtGui module . Also QtCanvas implements WebGL for non web-applications and Qt3D is a new module for games and other applications that involve pairing 3D content with other functionality .", "Question : I have been working in Optix for my ray tracing project i went through its classes and function I know that all the display function and call backs are handled in glutmainloop and it will never end my question is I cannot find any function or .c file where glutmainloop is defined is it hidden Can anyone help me .. . Answer : glutMainLoop is a function from the GL Utility Toolkit GLUT . On Windows the library gets linked in and thus no source code is provided . Precisely it is provided from the open-source freeglut http : docs.nvidia.com gameworks content gameworkslibrary optix optix release notes.htm : .. . .. . GLUT .. . .. . Most OptiX samples use the GLUT toolkit . Freeglut ships with the Windows OptiX distribution . GLUT is installed by default on Mac OSX . A GLUT installation is required to build samples on Linux . Take a look at github s mirror for its code https : github.com dcnieho FreeGLUT blob 5a6d3b2615d3b4d9629b65b5a0e0539037633963 freeglut freeglut src fg main.c L473 .. . .. . More information here : opengl glutmainloop http : stackoverflow.com q 1862496 1938163", "Question : every introduction and sample that I can find seems to use GLUT or some other framework to initialize OpenGL . Is there a way of initializing OpenGL with just what is available in GL and GLU If not then what is GLUT doing that is not possible without it Comment : which is Windows only . Comment : Yup but it s still instructive . : - Thanks Comment : Emphasis on easy to understand . - but I can t read the code for the comments : Comment : Nobody mentioned EGL http : www.khronos.org egl It s a Khronos standard for interop between operating-system and APIs like OpenGL aimed to unify such things . IDK how wide it s supported today though . Comment : As a GUI complement tiny file dialogs offers several function-calls . It s a single C C++ cross-platform file to add to your project.It has no init and no main loop . .. . Answer : GL is an API and GLU is an utility library on top of GL . It s completely operating-system independent . OpenGL initialization and extension fetching are platform dependent operations . Therefore you can do about nothing with OpenGL alone . GLUT is fast insufficient and terribly poor library and about only it does is that it initializes the opengl context and provides some primitive mouse keyboard input modules to get you ongoing . Win32 provides tools to initialize opengl context as well . For linux you could check out GLX . Also if you want a system independent way of doing it then you could check out SDL . For different programming-languages there may be utilities that provide you a platform independent desktop API .", "Question : I ve build an opengl program with my glu and gl header-files default included in windows-7 professional edition . Now I ve bought a book that describes OpenGL game development . The author of this book said I have to include the glew header into my project . After I ve done this I got some unresolved external symbol errors . So now I m really confused . I ve worked earlier with glBegin and glEnd statements in my program . Now I ve to work with glBindBuffers and glGenBuffer etcetera but I get the unresolved external symbol errors like that : .. . .. . Is anyone here who can explain the difference between this header-files and what I have to do with it I goggled much time but on different sites there are much more confusing words like glee or glut . .. . Answer : gl : This is the base header file for OpenGL version 1.1 . That means if you want to use any functionality beyond version 1.1 you have to add any extension library on this . glew : OpenGL Extension Wrangler Library . This is a cross-platform library for loading OpenGL extended functionality . When you initialize this library it will check your platform and graphic card at run-time to know what functionality can be used in your program . glu : This is OpenGL utilities library which has been not updated for long time . Don t need to use this header file . glut : OpenGL Utility Toolkit for Windowing API . This is good for small to medium size OpenGL program . If you need more sophisticated windowing libraries use native window system toolkits like GTK or Qt for linux machines . glfw : OpenGL Frame Work . Another multi-platform library for creating windows and handling events . FreeGlut can be used as an alternative . glfw is designed for game development . glm : OpenGL Mathematics . It helps implementing vectors and matrices operations . I am very new to OpenGL stuff so please correct me if I m wrong .", "Question : every introduction and sample that I can find seems to use GLUT or some other framework to initialize OpenGL . Is there a way of initializing OpenGL with just what is available in GL and GLU If not then what is GLUT doing that is not possible without it Comment : which is Windows only . Comment : Yup but it s still instructive . : - Thanks Comment : Emphasis on easy to understand . - but I can t read the code for the comments : Comment : Nobody mentioned EGL http : www.khronos.org egl It s a Khronos standard for interop between operating-system and APIs like OpenGL aimed to unify such things . IDK how wide it s supported today though . Comment : As a GUI complement tiny file dialogs offers several function-calls . It s a single C C++ cross-platform file to add to your project.It has no init and no main loop . .. . Answer : GLX example .. . .. . Here is a GLX https : en.wikipedia.org wiki GLX example without GLUT adapted from here https : www.opengl.org discussion boards showthread.php 177999-GCC-OpenGL-without-glut p 1239444 viewfull 1 post1239444 . It draws a triangle to the screen and also deals with user inputs . One could always open up the source of FreeGlut https : github.com dcnieho FreeGLUT to see how it implements each glut function but going lower level than GLX is likely hardcore . Compile with gcc -lGLU -lGL -lX11 .", "Question : every introduction and sample that I can find seems to use GLUT or some other framework to initialize OpenGL . Is there a way of initializing OpenGL with just what is available in GL and GLU If not then what is GLUT doing that is not possible without it Comment : which is Windows only . Comment : Yup but it s still instructive . : - Thanks Comment : Emphasis on easy to understand . - but I can t read the code for the comments : Comment : Nobody mentioned EGL http : www.khronos.org egl It s a Khronos standard for interop between operating-system and APIs like OpenGL aimed to unify such things . IDK how wide it s supported today though . Comment : As a GUI complement tiny file dialogs offers several function-calls . It s a single C C++ cross-platform file to add to your project.It has no init and no main loop . .. . Answer : Here s a basic and good introduction to how you initialize OpenGL assuming windows without using GLUT : .. . .. . Init OpenGL without GLUT http : nehe.gamedev.net data lessons lesson.asp lesson 01 .. . .. . As Luke said if you dont want to use GLUT you need specific information about the operating-system you are developing on . Using GLUT will make your code easier to port . Comment : This sample does use glut", "Question : I just installed Visual Studio 2012 today and I was wondering how can you install GLUT and OpenGL on the platform Comment : OpenGL development files are part of the default installation of Visual Studio . However several usefull third party helper libraries are missing most importantly GLEW . You install them like you install any other development library . Comment : When I installed Visual Studio 2012 I don t think the OpenGL development files were in there . I ll double-check but I m pretty sure OpenGL was not in there . I installed VS 2010 in the meantime so I can get started on my school projects . Comment : Yes they re definitely there . Visual C++ comes with the OpenGL headers in GL gl.h and ships the linker symbol library opengl32.lib .. . Answer : This is GLUT installation instruction . Not free glut .. . .. . First download this 118 KB GLUT package from Here http : www.xmission.com nate glut glut-3.7.6-bin.zip .. . .. . Extract the downloaded ZIP file and make sure you find the following .. . .. . glut.h .. . .. . glut32.lib .. . .. . glut32.dll .. . .. . If you have a 32 bits operating-system place glut32.dll to C : Windows System32 if your operating-system is 64 bits place it to C : Windows SysWOW64 to your system directory .. . .. . Place glut.h C : Program Files Microsoft Visual Studio 12 VC include GL NOTE : 12 here refers to your VS version it may be 8 or 10 .. . .. . If you do not find VC and following directories. . go on create it . Place glut32.lib to C : Program Files Microsoft Visual Studio 12 VC lib .. . .. . Now open visual Studio and .. . .. . 1 . Under Visual C++ select Empty Project or your already existing project .. . 2 . Go to Project - Properties . Select All Configuration from Configuration dropdown menu on top left corner .. . 3 . Select Linker - Input .. . 4 . Now right-click on Additional Dependence found on Right panel and click Edit .. . .. . now type .. . .. . opengl32.lib .. . .. . glu32.lib .. . .. . glut32.lib .. . .. . NOTE : Each .lib in new line .. . .. . That s it.. . You have successfully installed OpenGL. . Go on and run your program . Same installation instructions aplies to freeglut files with the header-files in the GL folder lib in the lib folder and dll in the System32 folder . Comment : Thank you very much especially the link-to the GLUT binary . This answer helped me solve the linker problem that puzzled me many days . Comment : I had to do the program x86 folder instead but it still worked Comment : The binary link gives 404 now.. . any chance it is still online somewhere Comment : Nevermind got a similar binary . At GLUT homepage https : www.opengl.org resources libraries glut the third link from the bottom of the article is Pre-compiled Win32 for Intel GLUT 3.7 DLLs for Windows 95 NT https : www.opengl.org resources libraries glut glutdlls37beta.zip and this one is still alive .", "Question : I have been trying to setup the OpenGL and GLUT libraries in Eclipse with CDT on OS X with not very much success . I cannot seem to get eclipse to actually realize where GLUT is . It is currently giving me the error that I have an unresolved inclusion GL glut.h . Looking around online I found that I should be using the -framework GLUT flag in the gcc linker settings but this seems ineffective . .. . Answer : Depending on which GLUT library you installed in OS X your include might be different . On my system I have to use : .. . .. . To make sure my code is cross-platform I use the following pre-processor statement : .. . .. . That might fix some or your problems . Comment : I meant to say that I did change the includes to state GLUT glut.h but this still seems to have not fixed the issue . I believe the GLUT library I installed was from the macports version . I also did install XCode and have all the libraries from there .", "Question : I just installed Visual Studio 2012 today and I was wondering how can you install GLUT and OpenGL on the platform Comment : OpenGL development files are part of the default installation of Visual Studio . However several usefull third party helper libraries are missing most importantly GLEW . You install them like you install any other development library . Comment : When I installed Visual Studio 2012 I don t think the OpenGL development files were in there . I ll double-check but I m pretty sure OpenGL was not in there . I installed VS 2010 in the meantime so I can get started on my school projects . Comment : Yes they re definitely there . Visual C++ comes with the OpenGL headers in GL gl.h and ships the linker symbol library opengl32.lib .. . Answer : Yes visual-studio-2012 express has built-in opengl library . the headers are in the folder C : Program Files Windows Kits 8.0 Include um gl and the lib files are in folder C : Program Files Windows Kits 8.0 Lib win8 um x86 C : Program Files Windows Kits 8.0 Lib win8 um x64 . but the problem is integrating the glut with the existing one. . i downloaded the library from http : www.xmission.com nate glut glut-3.7.6-bin.zip . . and deployed the files into .... . gl and ... . lib win8 um x32 and the dll to system windows folders respectively. . Hope so this will solve the problem.. .", "Question : I just installed Visual Studio 2012 today and I was wondering how can you install GLUT and OpenGL on the platform Comment : OpenGL development files are part of the default installation of Visual Studio . However several usefull third party helper libraries are missing most importantly GLEW . You install them like you install any other development library . Comment : When I installed Visual Studio 2012 I don t think the OpenGL development files were in there . I ll double-check but I m pretty sure OpenGL was not in there . I installed VS 2010 in the meantime so I can get started on my school projects . Comment : Yes they re definitely there . Visual C++ comes with the OpenGL headers in GL gl.h and ships the linker symbol library opengl32.lib .. . Answer : For an easy and appropriate way of doing this first download a prepackaged release of freeglut from here http : freeglut.sourceforge.net index.php download . Then read its Readme.txt . I copied some important parts of that package http : files.transmissionzero.co.uk software development GLUT freeglut-MSVC.zip here : .. . .. . .. . Create a folder on your PC which is readable by all users for example C : Program Files Common Files MSVC freeglut on a typical Windows system . Copy the lib and include folders from this zip archive to that location .. . freeglut DLL can be placed in the same folder as your application.. . .. . .. . .. . Open up the project properties and select All Configurations this is necessary to ensure our changes are applied for both debug and release builds . Open up the general section under C C++ and configure the include folder you created above as an Additional Include Directory . If you have more than one GLUT package which contains a glut.h file it s important to ensure that the freeglut include folder appears above all other GLUT include folders .. . Open up the general section under Linker and configure the lib folder you created above as an Additional Library Directory .. .", "Question : every introduction and sample that I can find seems to use GLUT or some other framework to initialize OpenGL . Is there a way of initializing OpenGL with just what is available in GL and GLU If not then what is GLUT doing that is not possible without it Comment : which is Windows only . Comment : Yup but it s still instructive . : - Thanks Comment : Emphasis on easy to understand . - but I can t read the code for the comments : Comment : Nobody mentioned EGL http : www.khronos.org egl It s a Khronos standard for interop between operating-system and APIs like OpenGL aimed to unify such things . IDK how wide it s supported today though . Comment : As a GUI complement tiny file dialogs offers several function-calls . It s a single C C++ cross-platform file to add to your project.It has no init and no main loop . .. . Answer : What you re doing is initializing a window with an OpenGL context . This requires some calls to the operating-system . It is not possible to initialize OpenGL with just gl.h and glu.h . GLUT http : www.xmission.com nate glut.html or SDL http : www.libsdl.org SMFL http : www.sfml-dev.org etc does that work for you in a nice platform independent way . You can do the initialization with native calls as well .", "Question : every introduction and sample that I can find seems to use GLUT or some other framework to initialize OpenGL . Is there a way of initializing OpenGL with just what is available in GL and GLU If not then what is GLUT doing that is not possible without it Comment : which is Windows only . Comment : Yup but it s still instructive . : - Thanks Comment : Emphasis on easy to understand . - but I can t read the code for the comments : Comment : Nobody mentioned EGL http : www.khronos.org egl It s a Khronos standard for interop between operating-system and APIs like OpenGL aimed to unify such things . IDK how wide it s supported today though . Comment : As a GUI complement tiny file dialogs offers several function-calls . It s a single C C++ cross-platform file to add to your project.It has no init and no main loop . .. . Answer : You could grab the GLUT source code http : www.xmission.com nate glut.html and see the init code for whatever platform you are concerned with .", "Question : every introduction and sample that I can find seems to use GLUT or some other framework to initialize OpenGL . Is there a way of initializing OpenGL with just what is available in GL and GLU If not then what is GLUT doing that is not possible without it Comment : which is Windows only . Comment : Yup but it s still instructive . : - Thanks Comment : Emphasis on easy to understand . - but I can t read the code for the comments : Comment : Nobody mentioned EGL http : www.khronos.org egl It s a Khronos standard for interop between operating-system and APIs like OpenGL aimed to unify such things . IDK how wide it s supported today though . Comment : As a GUI complement tiny file dialogs offers several function-calls . It s a single C C++ cross-platform file to add to your project.It has no init and no main loop . .. . Answer : You may check out the source of Galaxy Forces V2 http : www.galaxy-forces.com .. . .. . It implements classes for OpenGL without using GLUT or other libraries on Windows Mac and Linux . Using native platform code all public domain .", "Question : I just installed Visual Studio 2012 today and I was wondering how can you install GLUT and OpenGL on the platform Comment : OpenGL development files are part of the default installation of Visual Studio . However several usefull third party helper libraries are missing most importantly GLEW . You install them like you install any other development library . Comment : When I installed Visual Studio 2012 I don t think the OpenGL development files were in there . I ll double-check but I m pretty sure OpenGL was not in there . I installed VS 2010 in the meantime so I can get started on my school projects . Comment : Yes they re definitely there . Visual C++ comes with the OpenGL headers in GL gl.h and ships the linker symbol library opengl32.lib .. . Answer : OpenGL should be present already - it will probably be Freeglut GLUT that is missing . GLUT is very dated now and not actively supported - so you should certainly be using Freeglut instead . You won t have to change your code at all and a few additional features become available . You ll find pre-packaged sets of files from here : http : freeglut.sourceforge.net index.php download If you don t see the lib folder it s because you didn t download the pre-packaged set . Martin Payne s Windows binaries is posted at above link and works on Windows 8.1 with Visual Studio 2013 at the time of this writing . When you download these you ll find that the Freeglut folder has three subfolders : - bin folder : this contains the dll files for runtime - include : the header-files for compilation - lib : contains library files for compilation linking .. . .. . Installation instructions usually suggest moving these files into the visual-studio folder and the Windows system folder : It is best to avoid doing this as it makes your project less portable and makes it much more difficult if you ever need to change which version of the library you are using old projects might suddenly stop working etc . Instead apologies for any inconsistencies I m basing these instructions on VS2010 .. . - put the freeglut folder somewhere else e.g . C : dev - Open your project in Visual Studio - Open project properties - There should be a tab for VC++ Directories here you should add the appropriate include and lib folders e.g . : C : dev freeglut include and C : dev freeglut lib - Almost Final step is to ensure that the opengl lib file is actually linked during compilation . Still in project properties expand the linker menu and open the input tab . For Additional Dependencies add opengl32.lib you would assume that this would be linked automatically just by adding the include GL gl.h to your project but for some reason this doesn t seem to be the case .. . .. . At this stage your project should compile OK . To actually run it you also need to copy the freeglut.dll files into your project folder Comment : Just wanted to add that you need to copy freeglut.dll to the Debug folder in which the .exe of your project is there . Comment : Don t try to build glut or freeglut by yourself because the only consequence is a pile of linking errors crying out for OpenGL functions not found . Use the answer of Vishwanath gowda instead . Comment : A new user @randomize comments that I need to modify the application entry-point to mainCRTStartup in the VS project properties or an error will occur .", "Question : I just installed Visual Studio 2012 today and I was wondering how can you install GLUT and OpenGL on the platform Comment : OpenGL development files are part of the default installation of Visual Studio . However several usefull third party helper libraries are missing most importantly GLEW . You install them like you install any other development library . Comment : When I installed Visual Studio 2012 I don t think the OpenGL development files were in there . I ll double-check but I m pretty sure OpenGL was not in there . I installed VS 2010 in the meantime so I can get started on my school projects . Comment : Yes they re definitely there . Visual C++ comes with the OpenGL headers in GL gl.h and ships the linker symbol library opengl32.lib .. . Answer : OpenGL is bundled with Visual Studio . You just need to install GLUT package freeglut would be fine which can be found in NuGet . Open your solution click TOOLS- NuGet Package Manager- Package Manager Console to open a NuGet console type Install-Package freeglut . -- .. . .. . For VS 2013 use nupengl.core package instead . Comment : very nice and easy one tanx alot", "Question : I have been trying to setup the OpenGL and GLUT libraries in Eclipse with CDT on OS X with not very much success . I cannot seem to get eclipse to actually realize where GLUT is . It is currently giving me the error that I have an unresolved inclusion GL glut.h . Looking around online I found that I should be using the -framework GLUT flag in the gcc linker settings but this seems ineffective . .. . Answer : I wrote an article about how to setup Eclipse to develop OpenGL and GLUT applications in C C++ and Java in both Windows and Mac OS X if you are interested . It contains all the steps and all you need to know to have the system ready . You can find it here : .. . Setup Eclipse to develop OpenGL GLUT apps in Java C C++ on Windows MAC OS X http : riccardotramma.com 2011 04 setup-eclipse-to-develop-opengl-glut-apps-in-java-cc-on-windows-mac", "Question : I want to write a program with two buffers and have a frame-rate of 30 frames per second showing in the console . I m using Open GL - C++ .. . .. . Timer for fps : .. . .. . This code draws a line but I want to draw a line at a frame-rate 30 fps . Comment : Just...call drawScene at the top of Display . .. . Answer : glutTimerFunc 1000 30 mytimer 0 tells GLUT from now on call mytimer every 1000 30th milliseconds . You probably want to call it from main . Otherwise GLUT will have no idea that you ve written a timer function .", "Question : is it possible to create a fixed size window using glut so any changes with the window s dimensions will be disregarded . it s kinda too late for me switching back to SDL or anything similar . Comment : it s kinda too late for me switching back to SDL or anything similar . I can t imagine how that would be a significant problem . GLUT is for window setup and management switching managers should only require fairly localized changes . Unless you re dependent on GLUT-specific features like sRGB framebuffers and the like . .. . Answer : Ultimately no . The best you can do is call glutReshapeWindow to force it to a particular size whenever you detect that it has been resized . But that s about it . And if you do that you need to do some infinite-loop prevention by ensuring that you only call glutReshapeWindow if the new size isn t the same as the desired . This won t prevent the user from trying to resize it but it ll prevent them from succeeding . Possibly . Remember : GLUT is designed for demo applications and simple test-beds . For such application the ability to resize the window is pretty standard .", "Question : I have been trying to setup the OpenGL and GLUT libraries in Eclipse with CDT on OS X with not very much success . I cannot seem to get eclipse to actually realize where GLUT is . It is currently giving me the error that I have an unresolved inclusion GL glut.h . Looking around online I found that I should be using the -framework GLUT flag in the gcc linker settings but this seems ineffective . .. . Answer : The default install directory for MacPorts is opt local . Could be opt local isn t added to your compiler include path in Eclipse . Either that or reinstalling Xcode to give you GLUT glut.h on the default include path for Xcode libs which you may then need to add to eclipse I don t run OS X so I can t say what the Xcode installdir is but it looks like it could be in Developer or Library Developer Shared .", "Question : I just installed Visual Studio 2012 today and I was wondering how can you install GLUT and OpenGL on the platform Comment : OpenGL development files are part of the default installation of Visual Studio . However several usefull third party helper libraries are missing most importantly GLEW . You install them like you install any other development library . Comment : When I installed Visual Studio 2012 I don t think the OpenGL development files were in there . I ll double-check but I m pretty sure OpenGL was not in there . I installed VS 2010 in the meantime so I can get started on my school projects . Comment : Yes they re definitely there . Visual C++ comes with the OpenGL headers in GL gl.h and ships the linker symbol library opengl32.lib .. . Answer : Download the GLUT library . At first step Copy the glut32.dll and paste it in C : Windows System32 folder.Second step copy glut.h file and paste it in C : Program Files Microsoft Visual Studio VC include folder and third step copy glut32.lib and paste it in c : Program Files Microsoft Visual Studio VC lib folder . Now you can create visual-c++ console-application project and include glut.h header file then you can write code for GLUT project . If you are using 64 bit windows machine then path and glut library may be different but process is similar . Comment : -1 : For the suggestion to add them into system directories . You should not be throwing things into system directories . Or the MSVC directories . You should have your own place somewhere on your drive for these things lest you accidentally break things . Comment : @NicolBolas I am also begineer in GLUT OpenGL . I have setup GLUT same as above method . If we save these thing in our own drive then does we have to do linker setting and how Comment : You tell your tools where to find your stuff instead of putting your stuff in the tool directories . Comment : @NicolBolas how do you tell your tools where to find the library Comment : @caleb.breckon : That s what include paths and library paths are for . You can set them within a project or you can set global defaults for all projects using VS ." ] }
[ "yes-answer-long", "yes-answer-short" ]
opengl
UNK_RELATION
pypm@binary@111
pypm -- pypm is the python package manager included with activepython that allows one to install pre-compiled @placeholder packages from the activestate pypm repository .
{ "confidence": [ 80.12662506103516, 71.2892837524414, 70.46304321289062, 69.52133178710938, 67.87409973144531, 67.22824096679688, 66.35718536376953, 64.8211669921875, 64.30149841308594, 64.02342224121094, 63.049774169921875, 62.90325927734375, 62.90325927734375, 61.21794509887695, 61.21794509887695, 60.13624572753906, 59.98542022705078, 58.49488067626953, 55.65745544433594, 54.66835021972656, 54.149017333984375, 53.66220474243164, 53.273712158203125, 53.040679931640625, 52.62212371826172, 51.94815444946289, 51.40258026123047, 51.40258026123047, 51.40258026123047, 51.40258026123047, 51.055389404296875, 50.41979217529297, 49.23176574707031, 49.186622619628906, 48.90953063964844, 47.92804718017578, 46.544586181640625, 43.03816604614258, 41.32142639160156, 40.77728271484375, 40.409603118896484, 37.96171569824219, 37.9132080078125, 37.8431282043457, 37.16276168823242, 36.595890045166016, 36.27722930908203, 35.745933532714844, 35.170501708984375, 34.965858459472656, 33.764564514160156, 32.594268798828125, 32.04233169555664, 29.920120239257812, 29.898679733276367, 28.69676971435547, 27.972379684448242, 26.197847366333008, 26.17464828491211, 26.17464828491211, 25.511934280395508, 24.60659408569336, 24.561185836791992, 23.85719108581543, 23.401378631591797, 23.348018646240234, 22.494434356689453, 22.358373641967773, 21.91678237915039, 21.839582443237305, 21.24253273010254, 20.126148223876953, 20.01968002319336, 19.814001083374023, 19.803573608398438, 19.75389289855957, 19.7274227142334, 19.7274227142334, 19.261333465576172, 18.989025115966797, 18.942853927612305, 18.68288803100586, 18.529348373413086, 18.499019622802734, 18.385059356689453, 18.18563461303711, 18.115264892578125, 18.002758026123047, 17.749900817871094, 17.595111846923828, 17.576828002929688, 17.493745803833008, 17.174379348754883, 17.012706756591797, 17.012706756591797, 16.71268653869629, 16.500619888305664, 16.49132537841797, 16.14502716064453, 15.754131317138672 ], "content": [ "The file pypm-script.py and pkg resources come from ActivePython http : code.activestate.com pypm .", "I m trying to download modules using pypm and activestate .", "The main reason for this is to use pypm the package manager .", "via the PyPM tool http : code.activestate.com pypm py2app package manager I have installed a package called py2app .", "The right answer was that in the folder for ActiveState Python 2.7 there is an icon for Python Package Manager PyPM .", "When I try pypm install twisted pypm install morbid pypm install orbited I get .. . .. . Does anyone know why none of these packages are recognised", "For some reason the Python Package Manager PyPM did not work last night .", "Launching this icon brought up a command-prompt window with the following : .. . .. . PyPM 1.4.3 Python Package Manager brief help : Type pypm install PACKAGE to install a package .", "PYPM is installing modules to APPDATA Python on Windows .", "Remove C : Python26 Scripts pypm and C : Python26 Lib site-packages pypm", "Yes but pypm install anything doesnt work even though I have pypm installed", "What is the output of pypm info", "What is pypm module", "Type pypm search KEYWORDS to search for packages .", "Type pypm upgrade to upgrade installed packages .", "But pypm is not working at all .", "You can install Django globally if the user-site path which is where pypm installs into is not recognized by pydev : pypm -g install django", "Here they say that command should be right. . code.activestate.com pypm twisted http : code.activestate.com pypm twisted", "Try running pypm -g install pyqt4 if all else fails .", "I ve used ActivePython and pypm on my Ubuntu work computer for a long time and never had any of these issues .", "Try to use the fullpath to the executable : C : Path To pypm install pandas .", "Type pypm help to show full help .", "Type this command to see where PyQt is installed : .. . .. . By default PyPM installs packages into your APPDATA Python directory .", "However after installing ActivePython and setting up my .bash-profile file to use that version of Python I encounter a lot of problems with the pypm-installed libraries .", "After the install I then opened a DOS window and typed pypm install pyqt4 http : code.activestate.com pypm pyqt4 which as far as I could tell installed properly .", "C : Windows system32 .. . .. . Here I could enter the command to run pypm and install the packages I wanted .", "so if i installed django using pypm would pydev detect it", "Any thoughts on why the pypm-installed versions are so problematic", "Everything I ve ever installed with pypm has worked beautifully .", "Unable to initial midi the log constantly shows unable to find pypm module .", "Workaround : remove wxpython using pypm pypm uninstall wxpython and then install the development cocoa binary wxPython2.9-osx-cocoa-py2.7 from wxpython.org http : wxpython.org download.php unstable .", "Trying to get a location using Python and Google Maps so I tried to use Geopy http : code.activestate.com pypm geopy module by installing activepython using pypm install geopy but i get a problem which is geo required business edition subscription .", "If there are libraries not available on the PyPM index with ActivePython how can I directly use the source code of those libraries example wxpython to include into this installation", "I gave it a quick try and it seems to use PyPM to download the newest scipy and numpy to its custom install location .", "Instead PyPM follows the PEP 370 specification and installs packages by default in .local on Unix and Mac and APPDATA Python on Windows and the Python interpreter automatically picks up the local packages .", "@Brian - For listing files in the global install you need to run pypm -g files --full-path pyqt4 .", "wxPython 2.8 doesn t support 64-bit due to using Carbon this is why the PyPM package is built for only 32-bit .", "You can also add Library Python 2.7 bin to your PATH in .profile - which PyPM tries to do on first run .", "Other pacakges of Python don t have PyPM installed -- so you ll have to figure out how to install that first if you want to stick with other distros of python .", "When I start python the command-prompt tells me this .. . .. . So I opened pypm-script.py .. . .. . This is very frustrating because have no idea how to read code or how to use Python", "You are probably using the Windows 64-bit build which requires Business Edition to install all packages as even this page http : code.activestate.com pypm geopy should tell you with the lock icon .", "However I kept getting the syntaxerror shown as below .. . .. . I also get the same error message when I try to run the same code : .. . .. . in Python interactive shell as below : .. . .. . I did try to open the Python Package Manager PyPM to check if anything wrong there .", "I did as they said the first answer : start over the 2nd answer : pydev do not detect detect django if installed from pypm .. . .. . so i decided to start over from 0....uninstalled django from pypm and deleted every other folder related to django and decided to install django the old fashion way when I run .. . .. . instead of installing the django setup what happen is there s a file called django-admin.py opens in pype", "Now the only package that has problem with the 32-bit python is the MySQLdb http : code.activestate.com pypm mysql-python which has been installed using : .. . .. . If I just removed the line .. . .. . If I removed arch -i386 from the shebang line the wxpython package doesn t work .", "This only worked on the ActiveState Python package .", "Before proceeding further here are some details of my Mac and the installed python ActivePython and wxpython versions : .. . .. . Mac version : 10.6.6 Python version : 2.7.1 ActiveState Python wxPython version : wxPython2.8-osx-unicode-py2.7 .. . .. . Here is a small code that I wrote to test : .. . .. . Here is the error that I got from running it : .. . .. . As you can see I am using 32-bit python in the shebang line because I need to work with wxpython http : code.activestate.com pypm wxpython which runs only on 32-bit .", "If you want to install globally into C : Python32 use the -g option like : pypm -g install pyqt4 .. . .. . How do I make sure that script is able to fing the PYQT4 files necessary to run .. . .. . Are you sure that you are invoking Python 3.2", "Uninstall Python remove C : Python26 and install ActivePython 2.6 http : www.activestate.com activepython downloads or 2.7 or .. . 2 .", "I have tried pypm install orbited but I still get sudo : orbited : command not found when running sudo orbited I downloaded orbited from http : pypi.python.org pypi orbited 0.7.10 Where do I put the files to install", "I have recently asked this question http : stackoverflow.com questions 7206762 why-does-django-open-with-pype and this one http : stackoverflow.com questions 7221154 if-django-is-installed-using-pypm-would-pydev-detect-it .. . .. . Now i think I know the answer to my questions....it s all because i installed django using pypm.. . and something else is wrong", "I found the below lines in the PyPM window : .. . .. . I really do not know where I did wrong I tried to uninstall ActivePython 2.7.2.5 and reinstall again several times I still get the same error messages .", "The beginning of the script contains : .. . .. . I have installed Python 3.2 via ActivePython after trying to install from python.org .", "Using PyPM I have installed paramiko and pycrypto .. . .. . but when I try to execute my scripts I get the following error : Script : python C : Python27 Scripts RunOnEnv ssh-matic.py .. . .. . Error : ImportError : no Modules named ssh .. . .. . When passing : help modules .. . .. . I can not see ssh in the list .", "I have tried : .. . .. . Unless the -g option is specified packages are not installed into the ActivePython installation directory .", "You probably must have installed a different Python on top of ActivePython .", "A virtualenv lets you decide where you want to install Python packages .", "I have installed ActiveState Python 2.7 on my windows desktop .", "so I deleted pype - just to see what would happen and run the same command what happen now is the open with window shows up and it asks me to choose a program to open django if i press cancel it says access denied .. . .. . i m using windows-xp pro by the way .. . .. . EDIT .. . .. . so here s what happens as I said earlier pydev is not detecting django when installed with pypm I managed to install django as KillianDS said .. . .. . but still pydev do not detect it although it is configured correctly .. . .. .", "While trying to find a workaround I found ActivePython .", "Please indicate which version of ActivePython you are using .", "From the documentation I believed that I just need this code in the IDLE Python GUI after successfully installing Python : .. . .. . to install and load the package .", "I have installed ActivePython 2.7 on Mac OS X 10.5 .", "The activestate website says that if I want to install to c : python32 it wont do it then Unless the -g option is specified : .. . .. . I have tried every combo in the terminal window .", "this installs python I want to install django...python is installed", "enter image description here http : i.stack.imgur.com vAJsG.jpg .. . .. . I uploaded the images just to prove it and as i said python is installed using activepython please don t tell me to remove it and install it from python.org because I am totally convinced there s something wrong with pydev", "I m using ActivePython 2.7 on OS X snow leopard .", "How can I use pyinstaller to build an executable using only the libraries in the ActivePython installation", "I bet you are using either 3.1 or 3.2 as none of these packages are available for Python 3 yet .", "cd My Documents progging python Django-1.3 .. . 3 . execute python setup.py install so explicitly give python as a program not setup.py", "I downloaded ActivePython-2.7.2.5-win32-x86 and installed the software as instructed on the documentation .", "The problem is that all of these appear to install with no problems they place the correct .pth and .so files into the correct site-packages folder and basic imports work fine .", "@Eli : no it doesn t it uses the python executable to run the setup.py script which will install django .", "To find where the package was installed use the show or files command .", "2.6.7 Python .", "sir I tried to change the path didn t work so since i have another problem with django as described in the question I wounder if i uninstalled activepython django and installed django using pip would it work and how about keeping the current django and installed a 2nd one", "i have recently asked a question http : stackoverflow.com questions 7206762 why-does-django-open-with-pype .. . .. . I rechecked and it seems that pydev does not detect django either but i can import django in activepython interpreter .", "I tried to uninstall ActivePython 2.7.2.5 and reinstall again several times still get the same error messages .", "On Windows with ActivePython 2.7.8.10 recently installed I attempted to do the same as the OP and got the same error message .", "I m using Mountain Lion 10.8.4 with python-2.7 original from Mac .. . .. . Thank you very much .", "You can not call .. . .. . from the Python interpreter prompt .", "Muck with your windows settings and your python install maybe reinstall python until when you double-click a .py file in file explorer and the python script runs try hello world then I bet you ll be good .", "pkg resources doesn t exist install if you haven t installed it .", "As you can see on the second screen it only has a c : django in there probably old install likely you also need something like C : python27 lib site-packages django .", "Make sure python and qt have same architecture 32bit vs 64bit .. . .. . for mathplot looks like a different g++ used to compile python and mathplot .. . .. . have you tried with stock osx python", "The aim is to input parameters to Python and base on these inputs to generate correspond MIDI signal then output from my Mac to other MIDI device .", "Your best bet would be to get rid of your current install and start from scratch .", "First here is what I see when checking for Python on my machine : .. . .. . Next I invoke Python and attempt to import things .", "This seemed like pretty much the only way to send midi messages from python .", "I am trying to get Python to run to use with Blender .", "I thought this would have been installed by the package .", "Duplicate http : community.activestate.com node 6641 - .. . .. . This is a known bug http : bugs.activestate.com show bug.cgi id 87704 -- the mysql-python package is built only for 64-bit at the moment .", "@Sridhar Ratnakumar thank you so much sir i have fixed this issue this afternoon what i did is in the window preferences i pointed pydev to the site packages...this has been a complete headache for me some told me to uninstall django the others told me to uninstall python...i didn t even need to uninstall django...i wish you where here yesterday to save me from all of this : D", "Of course replace Python26 with your Python installation dir .", "The way I ve upgraded on my local machine was to delete the folders of these libraries and then manually install the newer versions .", "To install all of these modules I just type .. . .. . and this is how I got matplotlib PyQt4 PIL etc .", "You can install it in the directory you want if you have the required permissions .", "Python-RTMIDI http : pypi.python.org pypi python-rtmidi is in alpha stages haven t tried it yet myself but it s my primary choice for an upcoming hardware synth editor project It s a C++ Python extension so it might not be painless to setup but then you get CoreMIDI as well as optional JACK support might be worth your while .", "I have a simple python program I want to turn into an app .", "I would try runnig the following command from the Django source code directory on the windows command-line : .. . .. . I do this all the time since I have several versions of Python installed on my system .", "https : docs.djangoproject.com en dev topics install --- this has proven very useful for me when installing on Windows 7 and Ubuntu" ] }
{ "confidence": [ 117.80787658691406, 109.57962799072266, 102.1109390258789, 101.82865142822266, 95.35481262207031, 93.65397644042969, 90.79297637939453, 89.75981140136719, 89.3997573852539, 81.53402709960938, 79.673828125, 77.99456787109375, 77.79872131347656, 77.50969696044922, 75.49491119384766, 73.73184967041016, 73.33670043945312, 72.01222229003906, 62.17012023925781, 61.82668685913086 ], "content": [ "Question : I downloaded ActivePython-2.7.2.5-win32-x86 and installed the software as instructed on the documentation . But pypm is not working at all . From the documentation I believed that I just need this code in the IDLE Python GUI after successfully installing Python : .. . .. . to install and load the package . However I kept getting the syntaxerror shown as below .. . .. . I also get the same error message when I try to run the same code : .. . .. . in Python interactive shell as below : .. . .. . I did try to open the Python Package Manager PyPM to check if anything wrong there . I found the below lines in the PyPM window : .. . .. . I really do not know where I did wrong I tried to uninstall ActivePython 2.7.2.5 and reinstall again several times I still get the same error messages . When I just type .. . .. . in Python interactive shell as below : .. . .. . Still the same error message . I tried to uninstall ActivePython 2.7.2.5 and reinstall again several times still get the same error messages . I am using Windows 7 operation system . Comment : You should probably set the PATH environment variable . Try to use the fullpath to the executable : C : Path To pypm install pandas . .. . Answer : I ran into the same problem . The answer given isn t completely accurate though . On Windows with ActivePython 2.7.8.10 recently installed I attempted to do the same as the OP and got the same error message . I too was using the Python 2.7.8 shell when I encountered the problem . The right answer was that in the folder for ActiveState Python 2.7 there is an icon for Python Package Manager PyPM . Launching this icon brought up a command-prompt window with the following : .. . .. . PyPM 1.4.3 Python Package Manager brief help : Type pypm install PACKAGE to install a package . Type pypm search KEYWORDS to search for packages . Type pypm upgrade to upgrade installed packages . Type pypm help to show full help . C : Windows system32 .. . .. . Here I could enter the command to run pypm and install the packages I wanted . A point to note . This only worked on the ActiveState Python package . Other pacakges of Python don t have PyPM installed -- so you ll have to figure out how to install that first if you want to stick with other distros of python .", "Question : I m trying to download modules using pypm and activestate . PYPM is installing modules to APPDATA Python on Windows . The activestate website says that if I want to install to c : python32 it wont do it then Unless the -g option is specified : .. . .. . I have tried every combo in the terminal window . What does the -g command supposed to look like I have tried : .. . .. . Unless the -g option is specified packages are not installed into the ActivePython installation directory . Instead PyPM follows the PEP 370 specification and installs packages by default in .local on Unix and Mac and APPDATA Python on Windows and the Python interpreter automatically picks up the local packages . To find where the package was installed use the show or files command . What is the correct way Is there an eaiser way to download modules not manually .. . Answer : Use pip tool :", "Question : I am trying to get Python to run to use with Blender . I have 64 bit Vista SP2 . 2.6.7 Python . When I start python the command-prompt tells me this .. . .. . So I opened pypm-script.py .. . .. . This is very frustrating because have no idea how to read code or how to use Python I hope this is easily fixable . Comment : pkg resources doesn t exist install if you haven t installed it . If you have search for it to find the directory . .. . Answer : The file pypm-script.py and pkg resources come from ActivePython http : code.activestate.com pypm . You probably must have installed a different Python on top of ActivePython . I can think of two ways to fix this problem : .. . .. . 1 . Uninstall Python remove C : Python26 and install ActivePython 2.6 http : www.activestate.com activepython downloads or 2.7 or .. . 2 . Remove C : Python26 Scripts pypm and C : Python26 Lib site-packages pypm", "Question : null .. . Answer : When I try pypm install twisted pypm install morbid pypm install orbited I get .. . .. . Does anyone know why none of these packages are recognised Am I doing something obviously wrong Comment : Here they say that command should be right. . code.activestate.com pypm twisted http : code.activestate.com pypm twisted Comment : Yes but pypm install anything doesnt work even though I have pypm installed Comment : Please indicate which version of ActivePython you are using . What is the output of pypm info I bet you are using either 3.1 or 3.2 as none of these packages are available for Python 3 yet .", "Question : I have installed ActivePython 2.7 on Mac OS X 10.5 . The main reason for this is to use pypm the package manager . However after installing ActivePython and setting up my .bash-profile file to use that version of Python I encounter a lot of problems with the pypm-installed libraries . To install all of these modules I just type .. . .. . and this is how I got matplotlib PyQt4 PIL etc . The problem is that all of these appear to install with no problems they place the correct .pth and .so files into the correct site-packages folder and basic imports work fine . But I get the following errors . First here is what I see when checking for Python on my machine : .. . .. . Next I invoke Python and attempt to import things . So the above shows that PyQt4 imports with no complaints but then I get the image not found error when I try to use any of the sub-modules . For another example here is the standard matplotlib . Any thoughts on why the pypm-installed versions are so problematic I ve used ActivePython and pypm on my Ubuntu work computer for a long time and never had any of these issues . Everything I ve ever installed with pypm has worked beautifully . Why is it so different on Mac .. . Answer : Make sure python and qt have same architecture 32bit vs 64bit .. . .. . for mathplot looks like a different g++ used to compile python and mathplot .. . .. . have you tried with stock osx python", "Question : I downloaded ActivePython-2.7.2.5-win32-x86 and installed the software as instructed on the documentation . But pypm is not working at all . From the documentation I believed that I just need this code in the IDLE Python GUI after successfully installing Python : .. . .. . to install and load the package . However I kept getting the syntaxerror shown as below .. . .. . I also get the same error message when I try to run the same code : .. . .. . in Python interactive shell as below : .. . .. . I did try to open the Python Package Manager PyPM to check if anything wrong there . I found the below lines in the PyPM window : .. . .. . I really do not know where I did wrong I tried to uninstall ActivePython 2.7.2.5 and reinstall again several times I still get the same error messages . When I just type .. . .. . in Python interactive shell as below : .. . .. . Still the same error message . I tried to uninstall ActivePython 2.7.2.5 and reinstall again several times still get the same error messages . I am using Windows 7 operation system . Comment : You should probably set the PATH environment variable . Try to use the fullpath to the executable : C : Path To pypm install pandas . .. . Answer : You can not call .. . .. . from the Python interpreter prompt . You have to type this from the command-line console shell . Comment : Now it works . For some reason the Python Package Manager PyPM did not work last night . Thanks a lot", "Question : Trying to get a location using Python and Google Maps so I tried to use Geopy http : code.activestate.com pypm geopy module by installing activepython using pypm install geopy but i get a problem which is geo required business edition subscription . Can any one help me Thanks in advance . .. . Answer : geo required business edition subscription .. . .. . No . You are probably using the Windows 64-bit build which requires Business Edition to install all packages as even this page http : code.activestate.com pypm geopy should tell you with the lock icon . Try the 32-bit version instead . Comment : Thank in advance it work :", "Question : Before proceeding further here are some details of my Mac and the installed python ActivePython and wxpython versions : .. . .. . Mac version : 10.6.6 Python version : 2.7.1 ActiveState Python wxPython version : wxPython2.8-osx-unicode-py2.7 .. . .. . Here is a small code that I wrote to test : .. . .. . Here is the error that I got from running it : .. . .. . As you can see I am using 32-bit python in the shebang line because I need to work with wxpython http : code.activestate.com pypm wxpython which runs only on 32-bit . Now the only package that has problem with the 32-bit python is the MySQLdb http : code.activestate.com pypm mysql-python which has been installed using : .. . .. . If I just removed the line .. . .. . If I removed arch -i386 from the shebang line the wxpython package doesn t work . I want to use both wxpython and MySQLdb at the same time . How do I do it Comment : According to www.wxpython.org 64 bit version of wxpython are available for the Mac . .. . Answer : Duplicate http : community.activestate.com node 6641 - .. . .. . This is a known bug http : bugs.activestate.com show bug.cgi id 87704 -- the mysql-python package is built only for 64-bit at the moment . I want to use both wxpython and MySQLdb at the same time . How do I do it wxPython 2.8 doesn t support 64-bit due to using Carbon this is why the PyPM package is built for only 32-bit . You could try using wxPython 2.9 . Workaround : remove wxpython using pypm pypm uninstall wxpython and then install the development cocoa binary wxPython2.9-osx-cocoa-py2.7 from wxpython.org http : wxpython.org download.php unstable . Comment : Thank you Sridhar . It worked .", "Question : I have a simple python program I want to turn into an app . py2app is what I need according to my research . I m using ActivePython 2.7 on OS X snow leopard . via the PyPM tool http : code.activestate.com pypm py2app package manager I have installed a package called py2app . The documentation for py2app has a tutorial page http : svn.pythonmac.org py2app py2app trunk doc index.html id7 .. . .. . It says I should be able to do this as a first step : .. . .. . but I have no such executable anywhere that I can find . I thought this would have been installed by the package . .. . Answer : Try running this command : .. . .. . So do you have Library Python 2.7 bin py2applet You can also add Library Python 2.7 bin to your PATH in .profile - which PyPM tries to do on first run .", "Question : I am currently using a Windows XP machine 32-bit . I am new to Scribus and have enjoyed using it over the other expensive program for desktop publishing . In Scribus I have a prewritten script I would like to run . The beginning of the script contains : .. . .. . I have installed Python 3.2 via ActivePython after trying to install from python.org . After the install I then opened a DOS window and typed pypm install pyqt4 http : code.activestate.com pypm pyqt4 which as far as I could tell installed properly . I then tried to run the script in Scribus and received the following message : .. . .. . I then tried reinstalling PYQT4 by typing what I had before and I was told that PYQT4 was already installed via : .. . .. . After looking in c : Python32 in all of the directories I can not find any PYQT files . Where were they installed How do I make sure that script is able to fing the PYQT4 files necessary to run My PATH variable is : .. . .. . Ultimately I would like help in getting the scribus script to work . Thank you for your help .. . Answer : Type this command to see where PyQt is installed : .. . .. . By default PyPM installs packages into your APPDATA Python directory . If you want to install globally into C : Python32 use the -g option like : pypm -g install pyqt4 .. . .. . How do I make sure that script is able to fing the PYQT4 files necessary to run .. . .. . Are you sure that you are invoking Python 3.2 Try running pypm -g install pyqt4 if all else fails . Comment : Thank you for the quick reply . I did as you suggested for the global install however I did not uninstall the APPDATA install When I run --full-path I get a list for APPDATA not c : Python32 sip pyqt4 where I now also see files . In the end I still try to run the script in Scribus and still receive the same error message as before No Module named pyqt4.QTCore . The scripts I am trying to run can be found here : blog.oak-tree.us index.php 2010 08 25 scribus-dockwidgets http : blog.oak-tree.us index.php 2010 08 25 scribus-dockwidgets The Dock Widget script Comment : @Brian - For listing files in the global install you need to run pypm -g files --full-path pyqt4 . Try adding import sys print sys.path above the import PyQt4.QtCore line and report back what you see being printed .", "Question : I have recently asked this question http : stackoverflow.com questions 7206762 why-does-django-open-with-pype and this one http : stackoverflow.com questions 7221154 if-django-is-installed-using-pypm-would-pydev-detect-it .. . .. . Now i think I know the answer to my questions....it s all because i installed django using pypm.. . and something else is wrong I did as they said the first answer : start over the 2nd answer : pydev do not detect detect django if installed from pypm .. . .. . so i decided to start over from 0....uninstalled django from pypm and deleted every other folder related to django and decided to install django the old fashion way when I run .. . .. . instead of installing the django setup what happen is there s a file called django-admin.py opens in pype i don t know from where it s created so I deleted pype - just to see what would happen and run the same command what happen now is the open with window shows up and it asks me to choose a program to open django if i press cancel it says access denied .. . .. . i m using windows-xp pro by the way .. . .. . EDIT .. . .. . so here s what happens as I said earlier pydev is not detecting django when installed with pypm I managed to install django as KillianDS said .. . .. . but still pydev do not detect it although it is configured correctly .. . .. . enter image description here http : i.stack.imgur.com K8brF.jpg .. . .. . enter image description here http : i.stack.imgur.com EujGW.jpg .. . .. . enter image description here http : i.stack.imgur.com vAJsG.jpg .. . .. . I uploaded the images just to prove it and as i said python is installed using activepython please don t tell me to remove it and install it from python.org because I am totally convinced there s something wrong with pydev .. . Answer : Your best bet would be to get rid of your current install and start from scratch . What s pype https : docs.djangoproject.com en dev topics install --- this has proven very useful for me when installing on Windows 7 and Ubuntu", "Question : I have recently asked this question http : stackoverflow.com questions 7206762 why-does-django-open-with-pype and this one http : stackoverflow.com questions 7221154 if-django-is-installed-using-pypm-would-pydev-detect-it .. . .. . Now i think I know the answer to my questions....it s all because i installed django using pypm.. . and something else is wrong I did as they said the first answer : start over the 2nd answer : pydev do not detect detect django if installed from pypm .. . .. . so i decided to start over from 0....uninstalled django from pypm and deleted every other folder related to django and decided to install django the old fashion way when I run .. . .. . instead of installing the django setup what happen is there s a file called django-admin.py opens in pype i don t know from where it s created so I deleted pype - just to see what would happen and run the same command what happen now is the open with window shows up and it asks me to choose a program to open django if i press cancel it says access denied .. . .. . i m using windows-xp pro by the way .. . .. . EDIT .. . .. . so here s what happens as I said earlier pydev is not detecting django when installed with pypm I managed to install django as KillianDS said .. . .. . but still pydev do not detect it although it is configured correctly .. . .. . enter image description here http : i.stack.imgur.com K8brF.jpg .. . .. . enter image description here http : i.stack.imgur.com EujGW.jpg .. . .. . enter image description here http : i.stack.imgur.com vAJsG.jpg .. . .. . I uploaded the images just to prove it and as i said python is installed using activepython please don t tell me to remove it and install it from python.org because I am totally convinced there s something wrong with pydev .. . Answer : Django-admin.py is a file that comes with Django and is used to start django projects and do other administrative stuff . Read the following link for more information about it : .. . .. . https : docs.djangoproject.com en de .. . .. . Check to see which directories it is trying to install the django module into . It should wind up in the site-packages folder someplace under C : PythonXXXX lib ... . .. . .. . You may need admin permissions to access that folder on your machine especially if it is a work machine . Comment : I know that the django-admin.py comes whith django to start the project but i said that i deleted django therefore this file should not be created...i m the admin on my pc it s my pc...and i know where django should be installed...setup.py install should take care of everything", "Question : I have recently asked this question http : stackoverflow.com questions 7206762 why-does-django-open-with-pype and this one http : stackoverflow.com questions 7221154 if-django-is-installed-using-pypm-would-pydev-detect-it .. . .. . Now i think I know the answer to my questions....it s all because i installed django using pypm.. . and something else is wrong I did as they said the first answer : start over the 2nd answer : pydev do not detect detect django if installed from pypm .. . .. . so i decided to start over from 0....uninstalled django from pypm and deleted every other folder related to django and decided to install django the old fashion way when I run .. . .. . instead of installing the django setup what happen is there s a file called django-admin.py opens in pype i don t know from where it s created so I deleted pype - just to see what would happen and run the same command what happen now is the open with window shows up and it asks me to choose a program to open django if i press cancel it says access denied .. . .. . i m using windows-xp pro by the way .. . .. . EDIT .. . .. . so here s what happens as I said earlier pydev is not detecting django when installed with pypm I managed to install django as KillianDS said .. . .. . but still pydev do not detect it although it is configured correctly .. . .. . enter image description here http : i.stack.imgur.com K8brF.jpg .. . .. . enter image description here http : i.stack.imgur.com EujGW.jpg .. . .. . enter image description here http : i.stack.imgur.com vAJsG.jpg .. . .. . I uploaded the images just to prove it and as i said python is installed using activepython please don t tell me to remove it and install it from python.org because I am totally convinced there s something wrong with pydev .. . Answer : I would try runnig the following command from the Django source code directory on the windows command-line : .. . .. . I do this all the time since I have several versions of Python installed on my system . Of course replace Python26 with your Python installation dir . Comment : this installs python I want to install django...python is installed Comment : @Eli : no it doesn t it uses the python executable to run the setup.py script which will install django . This should work . Comment : Run it from the django source folder . I ll clarify the contents of my answer . Comment : please read it i edit it", "Question : null .. . Answer : I have been developing a somewhat complicated app on core python-2.6 and have also managed to use pyinstaller to create an executable for deployment in measurements or distribution to my colleagues . I work on the Ubuntu OS . What has troubled me is in upgrading the versions of numpy or scipy . Some features I need are in 0.9 and I m still on 0.7 . The process of upgrading them or matplotlib for that matter are not elegant . The way I ve upgraded on my local machine was to delete the folders of these libraries and then manually install the newer versions . However this does not work for machines where I do not have root access . While trying to find a workaround I found ActivePython . I gave it a quick try and it seems to use PyPM to download the newest scipy and numpy to its custom install location . Excellent I don t need root access and can use the latest version of the libraries . QUESTION : .. . .. . 1 . If there are libraries not available on the PyPM index with ActivePython how can I directly use the source code of those libraries example wxpython to include into this installation 2 . How can I use pyinstaller to build an executable using only the libraries in the ActivePython installation", "Question : I have recently asked this question http : stackoverflow.com questions 7206762 why-does-django-open-with-pype and this one http : stackoverflow.com questions 7221154 if-django-is-installed-using-pypm-would-pydev-detect-it .. . .. . Now i think I know the answer to my questions....it s all because i installed django using pypm.. . and something else is wrong I did as they said the first answer : start over the 2nd answer : pydev do not detect detect django if installed from pypm .. . .. . so i decided to start over from 0....uninstalled django from pypm and deleted every other folder related to django and decided to install django the old fashion way when I run .. . .. . instead of installing the django setup what happen is there s a file called django-admin.py opens in pype i don t know from where it s created so I deleted pype - just to see what would happen and run the same command what happen now is the open with window shows up and it asks me to choose a program to open django if i press cancel it says access denied .. . .. . i m using windows-xp pro by the way .. . .. . EDIT .. . .. . so here s what happens as I said earlier pydev is not detecting django when installed with pypm I managed to install django as KillianDS said .. . .. . but still pydev do not detect it although it is configured correctly .. . .. . enter image description here http : i.stack.imgur.com K8brF.jpg .. . .. . enter image description here http : i.stack.imgur.com EujGW.jpg .. . .. . enter image description here http : i.stack.imgur.com vAJsG.jpg .. . .. . I uploaded the images just to prove it and as i said python is installed using activepython please don t tell me to remove it and install it from python.org because I am totally convinced there s something wrong with pydev .. . Answer : Did you try this simple method actually the easiest of them all when it comes to installing . 1 . Open a DOS shell start- Run.. . cmd .. . 2 . cd to the directory you extracted django to e.g . cd My Documents progging python Django-1.3 .. . 3 . execute python setup.py install so explicitly give python as a program not setup.py Comment : sir your solution worked but the problem is still there pydev won t detect it Comment : Okay less experience with that one on windows . Most likely there is no django in your PYTHONPATH environment variable . As you can see on the second screen it only has a c : django in there probably old install likely you also need something like C : python27 lib site-packages django . How to set this can be found here http : docs.python.org using windows.html section 3.3.1 . Comment : thank you sir i will award you the bounty in 5h coz stackoverflow is not letting me doing it now I knew that if i change the path to the site-packages django it will work but i was so confused and so pissed off because i asked it everywhere and i kept getting stupid answers Comment : i even joined the official django group it s a google asked the question the members sent me spams so i said : it s supposed to be the official django group you are sending spams they replied saying : you could unsubscribe and the maintainer of pydev told me to uninstall django to fix the problem I didn t need to See your answer was the best because it was the simplest Comment : Glad to help : .", "Question : I have recently asked this question http : stackoverflow.com questions 7206762 why-does-django-open-with-pype and this one http : stackoverflow.com questions 7221154 if-django-is-installed-using-pypm-would-pydev-detect-it .. . .. . Now i think I know the answer to my questions....it s all because i installed django using pypm.. . and something else is wrong I did as they said the first answer : start over the 2nd answer : pydev do not detect detect django if installed from pypm .. . .. . so i decided to start over from 0....uninstalled django from pypm and deleted every other folder related to django and decided to install django the old fashion way when I run .. . .. . instead of installing the django setup what happen is there s a file called django-admin.py opens in pype i don t know from where it s created so I deleted pype - just to see what would happen and run the same command what happen now is the open with window shows up and it asks me to choose a program to open django if i press cancel it says access denied .. . .. . i m using windows-xp pro by the way .. . .. . EDIT .. . .. . so here s what happens as I said earlier pydev is not detecting django when installed with pypm I managed to install django as KillianDS said .. . .. . but still pydev do not detect it although it is configured correctly .. . .. . enter image description here http : i.stack.imgur.com K8brF.jpg .. . .. . enter image description here http : i.stack.imgur.com EujGW.jpg .. . .. . enter image description here http : i.stack.imgur.com vAJsG.jpg .. . .. . I uploaded the images just to prove it and as i said python is installed using activepython please don t tell me to remove it and install it from python.org because I am totally convinced there s something wrong with pydev .. . Answer : You can try installing Django in a virtualenv . A virtualenv lets you decide where you want to install Python packages . You can install it in the directory you want if you have the required permissions . A virtualenv can either be a clean room environment excluding all system-wide modules or use those modules as well as modules only available within the virtualenv . Placing a clean room virtualenv in a location where you are absolutely sure that you will have the required permissions can help you understand whether it s an issue with file system permissions or something with old .py or .pyc files located somewhere you forgot about . You can use the installed Python modules in a virtualenv in different environments if you add the appropriate directories within the virtualenv to PYTHONPATH so you don t need to worry that if you use virtualenv you will not be able to use Eclipse or any other IDE editor anymore . You just need to configure it appropriately . Comment : please read my edit Comment : In the python shell type django . file to see where Django is located just to make absolutely sure that you added the correct directory in PyDev .", "Question : i have recently asked a question http : stackoverflow.com questions 7206762 why-does-django-open-with-pype .. . .. . I rechecked and it seems that pydev does not detect django either but i can import django in activepython interpreter . so if i installed django using pypm would pydev detect it Comment : You can install Django globally if the user-site path which is where pypm installs into is not recognized by pydev : pypm -g install django Comment : @Sridhar Ratnakumar thank you so much sir i have fixed this issue this afternoon what i did is in the window preferences i pointed pydev to the site packages...this has been a complete headache for me some told me to uninstall django the others told me to uninstall python...i didn t even need to uninstall django...i wish you where here yesterday to save me from all of this : D Comment : look at the theories man bit.ly pg73m6 http : bit.ly pg73m6 and the problem is silly yet i wouldn t have received a good answer if i haven t started a bounty .. . Answer : PyDev currently doesn t pick additions to the PYTHONPATH automatically so you have to re-configure your interpreter within PyDev even if only the PYTHONPATH changed . See : http : pydev.org manual 101 interpreter.html Comment : sir I tried to change the path didn t work so since i have another problem with django as described in the question I wounder if i uninstalled activepython django and installed django using pip would it work and how about keeping the current django and installed a 2nd one Comment : Adding a 2nd one should be OK you can have many at the same time . Still not recognizing is strange.. . You should check if your PYTHONPATH is really correct i.e . : the folder on the PYTHONPATH should be something as mypath considering that django is in mypath django init .py . Comment : Another thing make sure that django is not installed as a zip file i.e . : its contents should be uncompressed . If that still doesn t work it may be that there s some problem in some internal cache in that case you can try restarting Eclipse after configuring the shell . Comment : would you check this question sir bit.ly oKQjFc http : bit.ly oKQjFc this exacly what s happening when running the django setup", "Question : I have recently asked this question http : stackoverflow.com questions 7206762 why-does-django-open-with-pype and this one http : stackoverflow.com questions 7221154 if-django-is-installed-using-pypm-would-pydev-detect-it .. . .. . Now i think I know the answer to my questions....it s all because i installed django using pypm.. . and something else is wrong I did as they said the first answer : start over the 2nd answer : pydev do not detect detect django if installed from pypm .. . .. . so i decided to start over from 0....uninstalled django from pypm and deleted every other folder related to django and decided to install django the old fashion way when I run .. . .. . instead of installing the django setup what happen is there s a file called django-admin.py opens in pype i don t know from where it s created so I deleted pype - just to see what would happen and run the same command what happen now is the open with window shows up and it asks me to choose a program to open django if i press cancel it says access denied .. . .. . i m using windows-xp pro by the way .. . .. . EDIT .. . .. . so here s what happens as I said earlier pydev is not detecting django when installed with pypm I managed to install django as KillianDS said .. . .. . but still pydev do not detect it although it is configured correctly .. . .. . enter image description here http : i.stack.imgur.com K8brF.jpg .. . .. . enter image description here http : i.stack.imgur.com EujGW.jpg .. . .. . enter image description here http : i.stack.imgur.com vAJsG.jpg .. . .. . I uploaded the images just to prove it and as i said python is installed using activepython please don t tell me to remove it and install it from python.org because I am totally convinced there s something wrong with pydev .. . Answer : I would guess that windows has associated all .py files with your text-editor pype . So when a script tries to run another script by asking windows to open the .py file it just pops up in your editor instead of executing . Right click on a .py file in windows-explorer choose open-with and tell it to always open .py files with your python interpreter python.exe instead of pype . See if that fixes it . Comment : i did that and now when i run setup.py install the file setup.py opens up with the interpreter lol instead of installing django : D I know that there s a problem with my pc not just a silly mistake i just don t know what it is Comment : Muck with your windows settings and your python install maybe reinstall python until when you double-click a .py file in file explorer and the python script runs try hello world then I bet you ll be good . Comment : man i not a newbie i can run any python script you know just forget it I ll use turbo gears instead or better yet learn-ruby-on-rails and just forgot about django - unless someone can give an answer that is worth 50 pts - python is working PERFECTLY django is not that s all i can say I m even ready to give you team viewer access to my pc just to prove it s not a silly issue Comment : @Eli : I know it must be frustrating to run into such a basic problem . But that doesn t mean that you have to be so aggressive towards people who want to help he is only trying and you d be surprised how many times even the biggest experts make stupid newbies mistakes . Comment : So sorry sir for everything i said", "Question : I am new to python scripting and started to look into a script to allow me to SSH to a box and check it is still running . I have installed ActiveState Python 2.7 on my windows desktop . Using PyPM I have installed paramiko and pycrypto .. . .. . but when I try to execute my scripts I get the following error : Script : python C : Python27 Scripts RunOnEnv ssh-matic.py .. . .. . Error : ImportError : no Modules named ssh .. . .. . When passing : help modules .. . .. . I can not see ssh in the list . I have tried uninstalling and installing the modules with no problems . What else am I missing .. . Answer : I feel really foolish . After reading that paramiko has replaced ssh module there still is an ssh module available . Ooops", "Question : I ve been working on a project of MIDI . The aim is to input parameters to Python and base on these inputs to generate correspond MIDI signal then output from my Mac to other MIDI device . After a survey I know there are two libraries exist which might meet my requirement which are MIDIutil and pygame . However MIDIutil seems only output the midi file and not able to output the real-time signal . On the other hand Pygame is a real pain of Mac Mountain Lion user . I have working on it for 1 week and still stuck at same stage . Unable to initial midi the log constantly shows unable to find pypm module . What is pypm module I ve tried to find solution on google non of them able to solve the problem I faced . As a result I would like to ask if there is any other library recommended that might suit my requirement I m using Mountain Lion 10.8.4 with python-2.7 original from Mac .. . .. . Thank you very much . James .. . Answer : Python-RTMIDI http : pypi.python.org pypi python-rtmidi is in alpha stages haven t tried it yet myself but it s my primary choice for an upcoming hardware synth editor project It s a C++ Python extension so it might not be painless to setup but then you get CoreMIDI as well as optional JACK support might be worth your while ." ] }
[ "yes-answer-long", "yes-answer-short" ]
binary
UNK_RELATION
uiprogressbar@uiprogressview@65
uiprogressbar -- uiprogressbar is a common misrepresentation of @placeholder which typically presents a bar-like user-interface to show the progress of a task over time .
{ "confidence": [ 46.54528045654297, 44.82571029663086, 44.82571029663086, 44.82571029663086, 43.75117492675781, 42.849300384521484, 42.02802276611328, 42.02802276611328, 38.48422622680664, 36.040687561035156, 35.828590393066406, 31.13788604736328, 28.372676849365234, 28.372676849365234, 27.987598419189453, 27.783309936523438, 27.23973846435547, 27.076541900634766, 26.854473114013672, 26.60879898071289, 26.576168060302734, 26.186477661132812, 26.17178726196289, 25.902568817138672, 25.877681732177734, 25.864654541015625, 25.41379165649414, 25.41379165649414, 25.242687225341797, 25.242687225341797, 25.242687225341797, 25.112091064453125, 25.04351043701172, 25.03101348876953, 25.03101348876953, 24.597715377807617, 24.568519592285156, 24.53678321838379, 24.53678321838379, 24.535320281982422, 24.535320281982422, 24.535320281982422, 24.101913452148438, 23.953960418701172, 23.953960418701172, 23.59491729736328, 23.345605850219727, 23.266494750976562, 23.142108917236328, 23.0775146484375, 22.899263381958008, 22.817211151123047, 22.817211151123047, 22.817211151123047, 22.817211151123047, 22.817211151123047, 22.817211151123047, 22.817211151123047, 22.817211151123047, 22.817211151123047, 22.810754776000977, 22.766441345214844, 22.734664916992188, 22.734664916992188, 22.734664916992188, 22.734664916992188, 22.00751304626465, 21.938861846923828, 21.782184600830078, 21.782184600830078, 21.715599060058594, 21.676437377929688, 21.676437377929688, 21.676437377929688, 21.676437377929688, 21.676437377929688, 21.601444244384766, 21.48397445678711, 21.389713287353516, 21.3327693939209, 21.011852264404297, 20.66159439086914, 20.609758377075195, 20.609758377075195, 20.309188842773438, 20.309188842773438, 20.269367218017578, 20.19199562072754, 20.19199562072754, 19.778228759765625, 19.764400482177734, 19.764400482177734, 19.764400482177734, 19.70500373840332, 19.70500373840332, 19.67013931274414, 19.67013931274414, 19.67013931274414, 19.615249633789062, 19.561792373657227 ], "content": [ "I want to Display UIProgressbar With Percentage on Screen in iOS .", "Hello i m trying to write a method that update a UIProgressbar", "I tried it with Subclasses of the UIProgressbar but that not reallys worked well", "I want to make UIProgressBar programmatically in swift", "My Question here is how to add UIProgressbar bar in UIWebView s address area .. . .. . like to safari app .", "I saw a tutorial which showed how to create a UIProgressBar with UIToolKit the problem is that it was from 2 years ago and the methods to create a UIProgressbar have changed .", "Then again If I click on same row of FirstView --- SecondView still downloading in progress but UIProgressBar becomes zero .", "I can t find a clear answer on how to update the progress of a UIProgressbar whilst iterating a loop e.g .", "I have a requirement to display a UIProgressBar in UITableviewCell while streaming an audio clip .", "is it possible to show it in a progress-bar", "Process : .. . .. . FirstView Clicked on Any Row --- SecondView Navigation .. . .. . SecondView --- click on sync --- downloading starts with NSURLConnection and UIProgressBar starts updating .", "for 50 of upload progress-bar is filling for third time for 25 total progress-bar is filling .", "Take progress-bar in app delegate", "But i learn more on progress-bar", "In other words you re updating the progress-bar more than 10 times between each time that the progress-bar is actually redrawn on the screen .", "You can set tint color of track and progress-bar by this .. . .. . For track color : .. . .. . Progress bar : .. . .. . Hope this helps. . :", "On the button click a pop-up view will come up and on OK click the button will be replaced with a progress-bar and it will show the download progress .", "I need to display the scroll bar using UIProgressView where i need to show the current progress of the video playing in the ProgressView .", "Only then it is showing the progress-bar .", "i need to show progreess bar of those cell.i mean actually i hide progress-bar after clicking button i need to show progressbar that s it please help me", "Before you could set both progress-bar and the progress-bar border images but now you can only set the progress-bar image .", "NSUrlConnection file-upload snippet : .. . .. . The delegate method for updating progress-bar : .. . .. . Now in this case if I have a separate progress-bar for each file-upload is there a way to know which file-upload that is which NSURLConnection this delegate corresponds to so that I can update the correct progress-bar accordingly .", "one way to do this would be to use an NSTimer to generate time intervals used to update the progress-bar .", "Do you have mockup of progress-bar", "I want to custom a rectangle progress-bar with UIKIT like attracted image .", "First I m showing the progress-bar .", "What I would like to happen is when the next question in the array is pressed it moves the progress-bar along .", "like if progress-bar value is 40 100 then you need to do 100-40 100 .", "I am new to ios how to update a progress-bar in uitableview .", "Run the loop on a background-thread and update the progress-bar on the main thread :", "I have to use a progress-bar for sport prediction apps .", "This link is helpful to you .. . Progreess Bar http : rshankar.com swift-demo-add-progress-bar", "I want to create a circular progress-bar that has triangle line cap Triangle tip and also I need to show a text in the tip of the progression .", "I have a progress-bar and i am updating it based on the current time of the player .", "Instead I would suggest 15 updates at 0.1 second intervals and change the progress-bar by 1 15 each time .", "I like user-interface of Apple s AppStore App downloading .", "I want to show the progress-bar right after the OK button click it should not lock the UI .", "I suggest you to use a custom view as progress-bar or can also use a custom image view .", ".h file .. . .. . .m file .. . .. . pragma mark - .. . .. . pragma mark Progress Bar Method .. . .. . See Images .. . .. . 1 loaderbg.png .. . .. .", "i added the progress-bar as subview of webivew", "Rectangle progress-bar http : i.stack.imgur.com ASsTq.png", "To do this you have to create a custom progress-bar .", "Because each webview will have different progress-bar controllers .", "This is for me the optimal way to do it : .. . .. . where UIColorFromRGB is : .. . .. . OPTIONAL : Sometimes depending on the color the progress is not properly appreciated and is necessary to increase the progress-bar height :", "Use custom progress dialog i mean you can use image of your own otherwise you cannot control the thicknes of the default progress-bar", "@JuanCarlosOspinaGonzalez I just want the white bit to begin on one side and act like a progress-bar where it will go from 0 to 1.0 in 3 seconds", "In order to achieve this one solution would be to add a label positioned below above your progress-bar and at each step when you refresh the progress on your progress indicator view you also update the string value in on your label to display the percentage loaded .", "I am working on a Audioplayer where I need to show the progress of the audio which is being played .", "The progress indicator control does not offer the option of also displaying progress percent .", "I want to show a progressBar for the progress of importing .", "I am writing an IOS file-upload application which has multiple NSUrlConnection open at a time each one for one file-upload and want to implement corresponding progress-bar for each one of them .", "The bar starts in the top right corner and then expands to fill the progress view just before it ends .", "I need when I push pop views my progress-bar should not be affected while downloading .", "for example to make a 15 second long progress-bar : .. . .. . declare the updateProgressBar method in your header .", "I m trying to get this progress-bar working but i keep getting wrong results .", "I don t need to do anything with the value of the progress-bar it s just really there for design .", "So I want a custom progress-bar to remain in a constant value to explain the prediction for upcoming match .", "can I make the value of the progress-bar static and doesn t change though the second changes", "Here are the screenshot of the progress-bar that I created : progressBar : http : postimg.org image jtv0d44ht .. . .. . Thanks for the help", "what do you mean by can I make the value of the progress-bar static and doesn t change though the second changes", "It doesn t show the progress view and just start save right away .", "generally I have a button when I click a button in a particular cell I need to show progress-bar in that cell only please help me and thanks in advance", "So the progress-bar is only showing up short after the for-loop .", "And once the download completes the progress-bar will be again replaced by the button .", "The one I have linked will provide you with the actual progress-bar .", "You will then be able to add a simple button to your layout in in the center of the progress-bar .", "actually i have a button and progress-bar in coustom table cell when i add coustom table cell in table view should visible only button from coustom table cell in table view after clicking the button it should hide the button and display progress bar...thanks for ur reply", "code like below.. . .. . .. . Increase your progress .. . .. . let me know it is working or not", "First add delegate to UIWebView For adding progress-bar : - Web view delegate method : - .. . .. . For Removing progress-bar : - Web view delegate method : - .. . .. . Hope this helps you", "I am using NSTimer and circular progress-bar for the countdown timer i.e 15seconds .. . .. . Its working with the following code but I am getting tick animation for the progress-bar and not the smooth one how to make it smooth animation", "You should use an NSTimer instead and base the progress on actual elapsed time .", "the method to download the file is called the nslog of the byte downloaded works the progress-bar don t...please help me to update this progressbar.. .", "Here is my progress-bar drag start and stop code : .. . .. . Can anyone help me fix this issue", "MyUploader and I added the NSURLConnection object inside it also a reference to the progress-bar control that shall be updated by this NSURLConnection object .", "Also this class shall implement the NSURLConnectionDelegate to update the progress-bar as you did in your code", "Thanks for your reply I just tried you suggestion but the progress-bar still run in 2 seconds .", "I have a progress Bar which is shown as below : My question is v simple how would i control the thickness of circular view as it seems to be too thick in my opinion .", "progress getting started http : i.stack.imgur.com FNa81.png .. . .. .", "Check out some thing from cocoa controls https : www.cocoacontrols.com search utf8 E2 9C 93 q progress+bar .. . .. . YLProgressBar for iOS https : www.cocoacontrols.com controls ylprogressbar", "In the meantime the block sent to the first dispatch async starts executing and periodically calls back to the main thread with another dispatch async to update your progress-bar .", "The progress property is not animatable .", "this is really a great idea to show loading like this for webview", "In order to show progress you need to perform the work on a background-thread and update UIKit on the main thread .", "I try to show a progress view before I start the sync save and hide it after the save is done but this doesn t work .", "I used the following method : .. . .. . in this case the UI didn t lock but the progress-bar didn t come .", "When you call self.tblView reloadData you are setting the progress-bar back to 0.0 in the following line fCell.progressPlay.progress 0.0 .", "UIProgressView does a great job of reflecting the changes in variables as they update over time things like large network operations or long-running calculations .", "I wouldn t have a problem even taking the total download size and inserting an if-statement that states if downloaded x megabytes then add 0.1 to the progress-bar .", "I am performing a download through Download Manage class and updating a progress-bar view according to the received bytes in the delegate connection didReceiveData .", "Currently I have the code all set so that when you press the Next button for the first time it moves the progress-bar to the value 0.333 but when you press it again it doesn t move again it just stays where it is .", "When I pop SecondView to FirstView downloading is in progress .", "have you given iboulets to the progress and progressview", "suppose the 50 of files are downloaded so progress will be 0.5 .", "I am using asynchronous method and it should load multiple progress views at the same time .", "That s why the progress needs to be based on actual elapsed time and not some incremented value .", "I just gave this a go and am getting all kinds of issues : P I set up a new cocoa-touch file in swift for the progress-bar of type UIProgressView .", "in the : .. . .. . i retrieve information from my Custom UITableViewCell in this way : .. . .. . so how i can know the index path row of the row just added to change then the progress-bar", "Following the answer outlined in this question http : stackoverflow.com questions 7412795 how-to-use-the-progress-bar-in-the-iphone-app I managed to get a UIProgressView sort-of working but it seems to finish updating i.e .", "It s pretty obvious that I set progress within an animation block whose time I set at 10k .. . .. . Yet it s still so fast .", "i create a custom UITableViewCell and i add-on the Cell a UIProgressView because when i add a row on the UITableView i download the information from a XML data and i want use the ProgressView to show the progress of the process my question is how i can detect in what index row i have to change the progress-bar and then hidden it ...what is the index path of the row just created" ] }
{ "confidence": [ 60.76622009277344, 60.483821868896484, 54.309356689453125, 54.01688003540039, 53.46554183959961, 48.47869110107422, 47.30583190917969, 45.49509048461914, 45.33991241455078, 44.59521484375, 41.962215423583984, 41.911834716796875, 40.99501419067383, 40.44327926635742, 40.2032470703125, 40.2032470703125, 40.2032470703125, 34.95018005371094, 33.27934646606445, 32.575130462646484 ], "content": [ "Question : null .. . Answer : I m developing a 3D game with Unity and in order to build the button I use UIToolKit . I saw a tutorial which showed how to create a UIProgressBar with UIToolKit the problem is that it was from 2 years ago and the methods to create a UIProgressbar have changed . Before you could set both progress-bar and the progress-bar border images but now you can only set the progress-bar image . How can I set the border Have I got to set a sprite only for the border Does someone know something about it", "Question : In my app I have 2 view . first view is table view which contains list of videos and second view displays sync button to download video from url . Process : .. . .. . FirstView Clicked on Any Row --- SecondView Navigation .. . .. . SecondView --- click on sync --- downloading starts with NSURLConnection and UIProgressBar starts updating . When I pop SecondView to FirstView downloading is in progress . Then again If I click on same row of FirstView --- SecondView still downloading in progress but UIProgressBar becomes zero . I need when I push pop views my progress-bar should not be affected while downloading . Any suggestion sample code guys . Thanks for help . Comment : Are you sure you re pushing the same SecondView instance is it a field of the FirstView or are you creating it on the fly Comment : yes I am pushing same second view instance... . .. . Answer : Take progress-bar in app delegate", "Question : I can t find a clear answer on how to update the progress of a UIProgressbar whilst iterating a loop e.g . : .. . .. . how can I update the UI on a seperate thread Comment : Perform the long running process on a background-thread and update the UI on the main thread . This is a perfect use of Grand Central Dispatch GCD . .. . Answer : Run the loop on a background-thread and update the progress-bar on the main thread :", "Question : I want to make UIProgressBar programmatically in swift what is wrong in this code Comment : You said translatesAutoresizingMaskIntoConstraints false but then didn t add any constraints . Just add constraints to dictate where you want this . If you look at the view debugger I bet this view is not where you expect it to be.. . Comment : thank you @Rob it is working fine . .. . Answer : This link is helpful to you .. . Progreess Bar http : rshankar.com swift-demo-add-progress-bar", "Question : I am new to iOS developement . I want to Display UIProgressbar With Percentage on Screen in iOS . Any Help Appreciated . Comment : With the default UIProgressView class you can t do it . You try this by making a custom UIProgressview . Comment : Please try this link http : www.cocoacontrols.com search utf8 E2 9C 93 q progress There you can find lots of controls and demos which can help you out : Comment : Personally I prefers This one https : github.com appdesignvault ADVProgressBar .. . Answer : The progress indicator control does not offer the option of also displaying progress percent . In order to achieve this one solution would be to add a label positioned below above your progress-bar and at each step when you refresh the progress on your progress indicator view you also update the string value in on your label to display the percentage loaded .", "Question : I am new to iOS developement . I want to Display UIProgressbar With Percentage on Screen in iOS . Any Help Appreciated . Comment : With the default UIProgressView class you can t do it . You try this by making a custom UIProgressview . Comment : Please try this link http : www.cocoacontrols.com search utf8 E2 9C 93 q progress There you can find lots of controls and demos which can help you out : Comment : Personally I prefers This one https : github.com appdesignvault ADVProgressBar .. . Answer : As Vlad mentioned you can have a method which updates the value of progressView and its associated label . Call the following method when any update happens .", "Question : I have a requirement to display a UIProgressBar in UITableviewCell while streaming an audio clip . I tried running a NSTimer and then trying to update the progress view but its not working . This is my code . Please let me know whats wrong with this approach . Run the timer .. . .. . Update UIProgressView in TableviewCell .. . .. . CellForRowAtIndexPath .. . .. . Output should be something similar to this .. . .. . enter image description here http : i.stack.imgur.com c51wz.jpg Comment : Try to have your UITableViewCell as an iVar in your UIViewController . I think your progress is being reset or at least the value is not persisted . .. . Answer : When you call self.tblView reloadData you are setting the progress-bar back to 0.0 in the following line fCell.progressPlay.progress 0.0 . Remove the call to reloadData . Comment : did remove self.tblView reloadData . But nothing happens", "Question : null .. . Answer : I am creating a web-browser app . My Question here is how to add UIProgressbar bar in UIWebView s address area .. . .. . like to safari app . enter image description here http : i.stack.imgur.com ZVlCV.png Comment : already existing : cocoacontrols.com search utf8 E2 9C 93 q browser https : www.cocoacontrols.com search utf8 E2 9C 93 q browser at least you can review how it s done Comment : @Injectios thinks i search it Comment : @Terran can you please share that direct link with us so that i can use this feature in my app also . this is really a great idea to show loading like this for webview", "Question : I am new to iOS developement . I want to Display UIProgressbar With Percentage on Screen in iOS . Any Help Appreciated . Comment : With the default UIProgressView class you can t do it . You try this by making a custom UIProgressview . Comment : Please try this link http : www.cocoacontrols.com search utf8 E2 9C 93 q progress There you can find lots of controls and demos which can help you out : Comment : Personally I prefers This one https : github.com appdesignvault ADVProgressBar .. . Answer : There is one widget already available in iOS SDK - UIProgressView http : developer.apple.com library ios documentation uikit reference UIProgressView Class Reference Reference.html .. . .. . Where you can set and get its property : progress .. . .. . Hope this may help you .", "Question : I have a requirement to display a UIProgressBar in UITableviewCell while streaming an audio clip . I tried running a NSTimer and then trying to update the progress view but its not working . This is my code . Please let me know whats wrong with this approach . Run the timer .. . .. . Update UIProgressView in TableviewCell .. . .. . CellForRowAtIndexPath .. . .. . Output should be something similar to this .. . .. . enter image description here http : i.stack.imgur.com c51wz.jpg Comment : Try to have your UITableViewCell as an iVar in your UIViewController . I think your progress is being reset or at least the value is not persisted . .. . Answer : You can use UIProgressView as under : .. . .. . for e.g .", "Question : Hello i m trying to write a method that update a UIProgressbar .. . .. . The problem is that when both of values arrive fine to the method NSLog display values the division operation generate a bad access when i run the application I tried many messages from both value like intValue inValue .. . .. . .. . Help me to solve this issue and how can I print values of NSNumber .. . Answer : You can print value by using following code", "Question : I have a requirement to display a UIProgressBar in UITableviewCell while streaming an audio clip . I tried running a NSTimer and then trying to update the progress view but its not working . This is my code . Please let me know whats wrong with this approach . Run the timer .. . .. . Update UIProgressView in TableviewCell .. . .. . CellForRowAtIndexPath .. . .. . Output should be something similar to this .. . .. . enter image description here http : i.stack.imgur.com c51wz.jpg Comment : Try to have your UITableViewCell as an iVar in your UIViewController . I think your progress is being reset or at least the value is not persisted . .. . Answer : Eventually found the issue after almost 2 days : : Error was in this line .. . .. . Wrong .. . .. . Corrected Comment : So what is difference between the above two methods The both variants call the UITableViewDataSource method cellForRowAtIndexPath . It depends on how you create the cell inside that method .", "Question : I want to make UIProgressBar programmatically in swift what is wrong in this code Comment : You said translatesAutoresizingMaskIntoConstraints false but then didn t add any constraints . Just add constraints to dictate where you want this . If you look at the view debugger I bet this view is not where you expect it to be.. . Comment : thank you @Rob it is working fine . .. . Answer : you need to do this type code and you can t need to set frame .", "Question : I want to achieve something like this : .. . .. . enter image description here http : i.stack.imgur.com FNrLs.png .. . .. . There should be always 5 dots in total but the black colored Dots can be variable . Is there any Github Project or something like that I tried it with Subclasses of the UIProgressbar but that not reallys worked well Comment : @David : What do you really want.. . the logic or something else .. . Answer : How about .. . .. . A UIView with 5 UIImageView subviews each imageView has a regular and highlighted image : .. . .. . then set the highlighted property of each imageView depending on the rating . Rather than just pulling in some 3rd party code use it as an opportunity to learn", "Question : Hello i m trying to write a method that update a UIProgressbar .. . .. . The problem is that when both of values arrive fine to the method NSLog display values the division operation generate a bad access when i run the application I tried many messages from both value like intValue inValue .. . .. . .. . Help me to solve this issue and how can I print values of NSNumber .. . Answer : try currentOperationNumber intValue in-place of currentOperationNumber or floatValue if setProgress expects a float . So... . .. . .. . Actually isn t it a float value it expects in there Comment : no that s not working :", "Question : Hello i m trying to write a method that update a UIProgressbar .. . .. . The problem is that when both of values arrive fine to the method NSLog display values the division operation generate a bad access when i run the application I tried many messages from both value like intValue inValue .. . .. . .. . Help me to solve this issue and how can I print values of NSNumber .. . Answer : NSNumber is an object wrapper for various primitive-types with what you are doing you are trying to divide a pointer by a pointer. . .. . .. . maybe try chaining the code to. .", "Question : Hello i m trying to write a method that update a UIProgressbar .. . .. . The problem is that when both of values arrive fine to the method NSLog display values the division operation generate a bad access when i run the application I tried many messages from both value like intValue inValue .. . .. . .. . Help me to solve this issue and how can I print values of NSNumber .. . Answer : make it sure downloadBar.progress is a float and it s from 0.0 to 1.0 inclusive . Please try this : .. . .. . float current 0.0f float count 100.0f .. . .. . while stuff. . downloadBar.progress current count .. . .. . it should work without problems .", "Question : I want to achieve something like this : .. . .. . enter image description here http : i.stack.imgur.com FNrLs.png .. . .. . There should be always 5 dots in total but the black colored Dots can be variable . Is there any Github Project or something like that I tried it with Subclasses of the UIProgressbar but that not reallys worked well Comment : @David : What do you really want.. . the logic or something else .. . Answer : A quick search on GitHub with rating ios as query https : github.com search l Objective-C q rating 20ios type Repositories utf8 E2 9C 93 gives me this : .. . .. . EDStarRating https : github.com erndev EDStarRating .. . HCSStarRatingView https : github.com hugocampossousa HCSStarRatingView .. . .. . Tips : when browsing GitHub type one or two words max . describing what you need followed by the official StackOverflow tag eg . ios java etc . Comment : HCSStarRatingView is what i m looking for can t believe i did not found this after 1h of searching.. . thank you very much", "Question : Hello i m trying to write a method that update a UIProgressbar .. . .. . The problem is that when both of values arrive fine to the method NSLog display values the division operation generate a bad access when i run the application I tried many messages from both value like intValue inValue .. . .. . .. . Help me to solve this issue and how can I print values of NSNumber .. . Answer : The best way to debug EXC BAD ACCESS : .. . .. . 1 . If you are not using XCode 4 then upgrade . 2 . In XCode 4 press CMD-I to run Instruments . 3 . Select the Zombies profile . Background : EXC BAD ACCESS means you are sending a message to a deallocated object . Zombies turns on the zombie feature so that objects with a retain count of 0 are not deallocated but kept as a zombie . The NSZombie class raises an exception whenever a message is sent to it - thus it can be trapped and identified the point of origin . 4 . Run your app via Instruments . When it crashes Instruments will be brought to the foreground with a pop-up callout that indicates the memory that was freed but accessed . 5 . You can click the little arrow in the lower right corner this will give you that memory s alloc retain release history and the code that performs the action . Click on the source column it will take you to that line in the code . Comment : XCode 3 was just too difficult to debug this way . 4 is worth the small hit you will have in learning curve on the new interface .", "Question : i m using a progressbar to show upload percentage of a file uploading to ftpserver for the first time it is updating well when i cancel the upload and and again id i start that . for 50 of upload progress-bar is filling for third time for 25 total progress-bar is filling . here is the code i m using s7ftp class to upload to server .. . .. . in another class Comment : where you did alloc init for progressbar Comment : in view didload .. . Answer : K When you start upload again progressBar needs to be reset . You just alloc init it when user clcks on upload . Comment : tried that one also . Comment : Then may be some others values like totalFileSize uploadedData are not initialesed properly ." ] }
[ "yes-answer-long", "yes-answer-short" ]
uiprogressview
UNK_RELATION
newrelic@php@94
newrelic -- new relic is a web application performance monitoring service for ruby java .net @placeholder python node.js android and ios apps .
{ "confidence": [ 40.4770393371582, 39.59722137451172, 38.32530975341797, 37.713294982910156, 37.374698638916016, 37.22809600830078, 36.86558532714844, 36.628173828125, 35.80997085571289, 35.652706146240234, 35.65205383300781, 35.549930572509766, 35.356815338134766, 34.946109771728516, 34.746925354003906, 34.643672943115234, 34.44303894042969, 34.04982376098633, 33.913475036621094, 33.83235549926758, 33.6882438659668, 33.57234573364258, 33.56991958618164, 33.452308654785156, 32.865196228027344, 32.824989318847656, 32.61881637573242, 32.53975296020508, 32.40892028808594, 32.155120849609375, 31.998210906982422, 31.81644058227539, 31.674198150634766, 31.65646743774414, 31.44659423828125, 31.392574310302734, 31.37765121459961, 31.236629486083984, 31.108360290527344, 31.108360290527344, 31.101608276367188, 31.000160217285156, 31.000160217285156, 30.98321533203125, 30.92003631591797, 30.89035415649414, 30.868038177490234, 30.75025749206543, 30.67497444152832, 30.513137817382812, 30.30547523498535, 30.14471435546875, 30.09798812866211, 30.073184967041016, 30.067197799682617, 30.018360137939453, 29.91010284423828, 29.905288696289062, 29.78842544555664, 29.736865997314453, 29.736865997314453, 29.724010467529297, 29.682373046875, 29.682373046875, 29.682373046875, 29.637691497802734, 29.578948974609375, 29.56177520751953, 29.56177520751953, 29.43653106689453, 29.40662384033203, 29.306934356689453, 29.302139282226562, 29.23139190673828, 29.17837142944336, 29.039051055908203, 28.86573028564453, 28.76805877685547, 28.757251739501953, 28.743148803710938, 28.680763244628906, 28.680763244628906, 28.680763244628906, 28.680763244628906, 28.673580169677734, 28.646812438964844, 28.59466552734375, 28.59466552734375, 28.59466552734375, 28.59466552734375, 28.59466552734375, 28.59466552734375, 28.557239532470703, 28.446151733398438, 28.446151733398438, 28.43510627746582, 28.389530181884766, 28.37161636352539, 28.36334991455078, 28.359973907470703 ], "content": [ "There are different types of New Relic monitoring including server monitoring application monitoring and browser monitoring .", "I am new to new relic monitoring .", "I am trying to work on New Relic using this link https : docs.newrelic.com docs mobile-monitoring mobile-monitoring-installation android installing-android-apps-ant .", "var run newrelic folder exists and is owned by newrelic user and is assigned to new relic group .", "Is there anything like New Relic http : www.newrelic.com for .Net apps", "It s New Relic for .NET .", "I am trying to start a New Relic monitoring plugin MeetMe newrelic plugin agent https : github.com MeetMe newrelic-plugin-agent with upstart on Ubuntu 12.04 .", "Much as you cannot create for example a ruby application and a python application with the same name and expect them to occupy the same application space in New Relic .", "Trying to install java newrelic on Play app framework as per @Jeanie s comment .. . .. . 1 download the new relic java agent in downloads folder .", "The new relic folder is placed in my E : apache-tomcat-6.0.16 apache-tomcat-6.0.16 webapps newrelic .", "One interesting thing about this system is that since New Relic attempts to tie transactions within application code to in-browser performance every page header grabs an ID from the application monitoring agent .", "I am using New Relic to monitor an application .", "I m monitoring few services with New Relic plugins memcached mongodb etc .", "I want to know if with New Relic : .. . .. . I can monitoring a Thick Client in java Swing . .", "I was able to configure new relic to monitor my rake-task thanks to newrelic-rake https : github.com xinminlabs newrelic-rake gem .", "NewRelic monitoring occasionally shows some apps as grey with the warning message No data reporting for this application .", "background : the application name is used by New Relic to separate performance information out into a single heading .", "Full documentation of the API call to notice errors and increment the error metric is the New Relic Ruby Agent API documentation here http : rdoc.info github newrelic rpm NewRelic Agent Transaction.notice error", "Is it possible to use New Relic on my Java site", "Unistalling New Relic from Eclipse Android Project .. . .. . After removing New Relic sdk I faced the same error", "There s no Scala support in the New Relic Java Agent https : newrelic.com docs java new-relic-for-java", "I have a java application with newrelic agent .", "None of these slow requests show up in New Relic which we use for performance monitoring .", "I m trying to get a Java Application to work with New Relic on Elastic Beanstalk .", "New Relic Screenshot of SignalR dominating monitoring http : i.stack.imgur.com 6Nao8.png", "I have an Application on Openshift and I just added New Relic add-on .. . New Relic asks for setting up Server and configuration is listed as .. .", "-- Deploy a play framework 2.2.1 Java web application on Heroku and use newrelic as an add-on .", "I d like to tell NewRelic to not monitor a subset of my web application .", "UPDATE .. . .. . I found a browser monitoring https : github.com newrelic node-newrelic blob master lib config.default.js L358 option .", "We re using New Relic to monitor our application .", "With New Relic Java and Guice there are a bunch of Transactions in New Relic that are labeled WebTransaction Filter Guice Filter .", "New Relic appears fairly straight forward when it comes to instrumenting a web application .", "With this set to true a JavaScript being injected by New Relic monitoring on the SE environment .", "It s a Java app with no New-Relic-supported framework .", "Thanks very new to New Relic .", "I d like to set a tag in new Relic https : docs.newrelic.com and have it show up on the new relic dashboard .", "I m assuming you are asking about node.js application monitoring since you tagged your question with node.js .", "Mule started successfully and I can see my application available in newrelic Applications dashboard as a java background application .", "The plugin let s you push BlazeMeter performance-testing data to New Relic .", "Log in to the New Relic APM site to see your app s performance information .", "They will both report but under separate application instances in the New Relic Dashboard .", "Then click on the new relic addon .", "I setup New Relic .", "Try it out for free : https : newrelic.com docs dotnet new-relic-for-net .", "Is there anyway to get New Relic to ignore those", "So where is the exact purpose of ruby-prof regarding the New Relic agent", "I believe that this is evidence of creating the page headers for Browser Monitoring https : docs.newrelic.com docs browser new-relic-browser getting-started troubleshooting-page-view-monitoring .", "Resolved it by deleting the application from newrelic waiting 10 minutes restarting the APM agent and then adding the application again and recreating browser monitoring .", "I am following Manually uploading a Proguard map file https : docs.newrelic.com docs mobile-monitoring new-relic-mobile getting-started android-agent-crash-reporting manual-proguard doc in order to upload mapping.txt file to newrelic .", "But there is no metrics loading up in my New Relic account as shown in the link : http : blazemeter.com blazemeter-announces-new-relic-performance-testing-plugin Please help", "Are there any application performance monitoring tools which support PHP7", "Bye Bye New Relic for ever", "We are running Elasticsearch with the NewRelic Java agent installed .", "We have recently started using NewRelic for our performance measurement but today node in the cluster that had NewRelic installed died because of it .", "Only problem : If configured to use the same app name as the existing java-agent controlled App it registers a new app in NewRelic with the appendix Python .", "Bugsnag focuses on actionable error monitoring whereas New Relic s focus is on performance .", "New relic is already set for production .", "Now I am trying to monitor my application via new Relic but it is throwing - .. . Application down error - No data reporting for this application delete or troubleshoot .", "Here is the heroku-newrelic-java install doc : https : devcenter.heroku.com articles newrelic java-installation-and-configuration .. . .. . The ping service will attempt to connect to your site over http https from external locations to verify that it can be reached .", "I work at New Relic .", "I work for New Relic .", "In the New Relic trace we see lots of .. . .. . Application code in System.Web.Mvc.MvcHandler.BeginProcessRequest - Our agent can t see what is happening in your .NET code .", "However running the server under gunicorn using the new relic instructions and monitoring worked with no code changes required at all .", "I have a project that uses the gradle build-system and I m willing to add New Relic monitoring to it .", "I d like to use the New Relic platform for monitoring PHP on Heroku if possible to do in a clean way .", "Newrelic announced support for node.js applications on Oct 24 2013 .", "I m making some assumptions here but if all the components here are part of the same web application then using the same New Relic application name should be the right way to go .", "I am trying to install new-relic jar to my Openshift application wildfly cartridge but it fails with permission-denied .", "I want New Relic to send an alert notification when an error eg- 403 500 errors occurs in the application .", "I tested the ruby agent 3.7.1.188 of New Relic but I don t understand the purpose of the ruby-prof gem .", "How gems plugins be tied to single apps in New Relic", "I need co clarify : did you attempt to install New Relic from the right-click menu on these other apps", "I wanted to know if I get different results in New Relic real-time user monitoring when many users are logged into the application concurrentky", "We use new relic for our http based web servers .", "However I can t find any information on setting up new relic to work on a web application that hosts multiple named applications .", "When i log in to newrelic interface from browser i see two application Php Application Dev and Php Application .", "Did you go off the instructions at https : devcenter.heroku.com articles newrelic and pay close attention to the Java configuration at https : devcenter.heroku.com articles newrelic java-configuration", "Newrelic monitoring on fresh Ruby on Rails application with Sidekiq and not much logic yet implemented and not much trafic is showing that Redis is taking long time around 2s-3s on brpop operations .", "newrelic info https : docs.newrelic.com docs python status-of-python-agent", "Not necessarily as detailed as new relic .", "Cheers .. . .. . Serene C . .. . .. . New Relic Platform engineer", "Are Bugsnag and New Relic counterparts or they serve different purposes", "The question was about New Relic vs BugSnag not DynaTrace .", "The question was about New Relic vs BugSnag not AppDynamics .", "I set up monitoring for my node.js server .", "Dana New Relic - Tech Support", "Currently New Relic doesn t support alerting on arbitrary metrics .", "Always good to hear New Relic is working well for you thanks", "New Relic does not provide alerts when a specific error is traced .", "Further information about using this can be found on the New Relic doc site .", "I have installed New Relic as per their setup guide .", "New Relic doesn t currently support sending individual error alerts .", "There s a new version of new relic client available .", "New Relic does not fully support grape at this time .", "I have a simple question about New Relic .", "They show me statistics from this services but when service is down there is no alerts from New Relic .", "In the New Relic UI you can select the transaction type from the Type drop-down-menu when viewing the Monitoring Transactions page .", "See the New Relic Documentation https : docs.newrelic.com docs agents net-agent instrumentation net-custom-instrumentation procedures", "Generally I do not like how the New Relic plugin meddles with the Android API also .", "I ve installed newrelic for my android app using their guide for eclipse ." ] }
{ "confidence": [ 60.50483322143555, 59.1805534362793, 58.1786003112793, 57.908721923828125, 56.09831237792969, 55.4890022277832, 54.06645202636719, 53.741661071777344, 52.99779510498047, 52.588340759277344, 51.16025161743164, 51.13234329223633, 49.89202117919922, 49.36840057373047, 49.22123336791992, 49.086273193359375, 48.32204818725586, 48.16845703125, 48.0603141784668, 47.934844970703125 ], "content": [ "Question : Newrelic announced support for node.js applications on Oct 24 2013 . I set up monitoring for my node.js server . It is a service that talks to Client via socket.io . Now all the requests like this socket.io xhr-polling 40pt1SBvasfDuwctz4Ma for the service appear to take 20.000 seconds . Is there a way to set up newrelic so it would correctly show request times served by socket.io .. . Answer : New Relic gives you the option to ignore a rule for something exactly like this . For example you would want to add something like the following : .. . .. . There is also an API call that you can use to programmatically do this . You can find more about this in the node.js agent github README.md https : github.com newrelic node-newrelic rules-for-naming-and-ignoring-requests Comment : Is there a way to manually add monitoring rather than just to ignore the path", "Question : I would like to monitor my mule-standalone-3.1.2 ESB which is running on ubuntu-server using New Relic Agent v3.1.1 . I have several apps in the mule-standalone-3.1.2 apps directory . I have configured the newrelic agent in conf wrapper.conf .. . .. . newrelic.yml is available in the same directory as newrelic.jar . Mule started successfully and I can see my application available in newrelic Applications dashboard as a java background application . The issue now is when I open the overview dashboard on newrelic there is no data or Apdex score or any meaningful metrics . The only thing available is the throughput which is something like 488 cpm call per minute . Am I doing something wrong or newrelic is not designed to monitor ESBs like Mule . All I want to see is how my mule application are performing and where I can improve them . Thank you all .. . .. . Iyad .. . Answer : I m using Mule 3.4.0 and just updated from New Relic Java agent 3.1.0 to 3.3.1 which is now displaying some metrics e.g . Apdex web transactions and external services as well a displaying more tasks in background tasks than before . You could also look into using JMX https : docs.newrelic.com docs java custom-jmx-monitoring-by-yml to obtain useful data from Mule http : www.mulesoft.org documentation display current JMX+Management although I haven t had a chance to try that myself . Also you may find it helpful to add the following to wrapper.conf if you are monitoring more than one Java instance : Comment : Thank you for the update . I will try and get back to you . I hope it works .", "Question : Newrelic announced support for node.js applications on Oct 24 2013 . I set up monitoring for my node.js server . It is a service that talks to Client via socket.io . Now all the requests like this socket.io xhr-polling 40pt1SBvasfDuwctz4Ma for the service appear to take 20.000 seconds . Is there a way to set up newrelic so it would correctly show request times served by socket.io .. . Answer : The software is actually working as intended . When using XHR-polling with Socket.IO the default polling duration is 20 seconds . Therefore the connection is held open for 20 seconds which is the reason why New Relic reports it as so .", "Question : We are running Elasticsearch with the NewRelic Java agent installed . We want to record custom metrics without changing anything in ES . I know the NewRelic proposed way to do this is Steven Eksteens Elasticsearch Plugin http : newrelic.com plugins steven-eksteen 134 but it s Ruby based and we try to avoid adding another language to our stack . I tried to replicate Stevens efforts in Python using the NewRelic Python agent and the newrelic.agent.record custom metric function : .. . .. . This works fine . Only problem : If configured to use the same app name as the existing java-agent controlled App it registers a new app in NewRelic with the appendix Python . What I want is to add the metrics to the original one . Is this possible .. . Answer : Applications in the New Relic Dashboard have to be the same language to be consolidated . Otherwise you will end up with multiple applications with the same name and an appended language name due to the type of metrics and manner of reporting in different languages . There is no way to consolidate two applications of the same name written in different languages in your New Relic account . You could however create a custom dashboard which will allow you to place charts from multiple applications in one dashboard . Comment : Oh That means the official Elasticsearch plugin can t coexist with a java-agent as well No ES stats and JVM metrics at the same time Comment : They co-exist just fine . You simply cannot merge them into a single chart . Much as you cannot create for example a ruby application and a python application with the same name and expect them to occupy the same application space in New Relic . They will both report but under separate application instances in the New Relic Dashboard .", "Question : null .. . Answer : I am following new relic s documentation for installing node.js agent : .. . .. . https : docs.newrelic.com docs agents nodejs-agent installation-configuration nodejs-agent-configuration .. . .. . I have an application in new relic called My Awesome App QA . I setup my configuration file newrelic.js : .. . .. . When I go into new relic Browser search for My Awesome App QA I click it and there is no traffic . How can I troubleshoot debug this to find out what is going wrong UPDATE .. . .. . I found a browser monitoring https : github.com newrelic node-newrelic blob master lib config.default.js L358 option . I m working on a mechanism to get this to work in ReactJS .", "Question : I would like to monitor my mule-standalone-3.1.2 ESB which is running on ubuntu-server using New Relic Agent v3.1.1 . I have several apps in the mule-standalone-3.1.2 apps directory . I have configured the newrelic agent in conf wrapper.conf .. . .. . newrelic.yml is available in the same directory as newrelic.jar . Mule started successfully and I can see my application available in newrelic Applications dashboard as a java background application . The issue now is when I open the overview dashboard on newrelic there is no data or Apdex score or any meaningful metrics . The only thing available is the throughput which is something like 488 cpm call per minute . Am I doing something wrong or newrelic is not designed to monitor ESBs like Mule . All I want to see is how my mule application are performing and where I can improve them . Thank you all .. . .. . Iyad .. . Answer : Currently New Relic do not instrument Mule however you may be able to get some data by annotating your source with @Trace annotation depending on what information you are wanting to collect . A good place to keep any eye out for updates and possible changes to the Mule instrumentation is the New Relic agent release page . https : docs.newrelic.com docs releases java", "Question : I am trying to use nodejs with KCL to get records from kinesis . And now I want to monitor the situation of my application with newrelic . I followed steps in https : github.com newrelic node-newrelic . But now no info was posted to newrelic . Comment : Contact NewRelic support. . .. . Answer : Generally speaking the New Relic agents will not post anything to newrelic.com unless there s a certain amount of activities . So if no functions are called etc on the node.js code I would assume the New Relic agent would take a lazy approach and not send anything .", "Question : I m monitoring few services with New Relic plugins memcached mongodb etc . They show me statistics from this services but when service is down there is no alerts from New Relic . Only zeros in services statistics . How to configure plugins to create alerts I m using latest version of newrelic-plugin-agent https : github.com MeetMe newrelic-plugin-agent . .. . Answer : We are aware that low water mark thresholds are something our users want and that feature is on our road map to develop . In the interim plugin authors are able to work around the issue . If you reach out to the MeetMe author an intermediate solution could be written into the plugin for this specific use-case . Cheers .. . .. . Serene C . .. . .. . New Relic Platform engineer Comment : Any word on this I can t seem to figure out how to raise an alert when a service is down.. .", "Question : I have currently started using New Relic at work for one of our applications . I added the javascript to live to test if browser monitoring worked and it was working fine but then shortly after a deploy was made and that file got removed so now I don t have the javascript that I need to copy and paste for that application . Is there a way to recreate the browser monitoring or can I click something to get the Javascript for that app again Thanks very new to New Relic . .. . Answer : Resolved it by deleting the application from newrelic waiting 10 minutes restarting the APM agent and then adding the application again and recreating browser monitoring . Thanks", "Question : Is there anything like New Relic http : www.newrelic.com for .Net apps Comment : I could be wrong but New Relic sounds like a profiler which runs while the application is running for real isn t that a bad idea be it for java or .net Comment : Profiling is not inherently bad for performance . With the right tools it s fantastic and the only way to get real world insight into your app . New Relic profiles page render times and database times . It doesn t go deep into your app . The idea is to see which pages are taking the longest and then do deep profiling locally once you figure out where your site is spending most of it s time . .. . Answer : You can also use Ruxit http : www.ruxit.com a new SaaS APM solution : http : blog.ruxit.com net-monitoring-unlocked Its pretty cool", "Question : Is It possible to add an agent to punjab xmpp server I ve seen that there is a experimental support for twisted apps . newrelic info https : docs.newrelic.com docs python status-of-python-agent .. . Answer : Although there is experimental support for Twisted it is just that.. . experimental . New Relic does not have available instrumentation for XMPP entry points at this time . In short there is not much that could be done with a Punjab XMPP application using New Relic for now . Comment : I work for New Relic and wanted to update that this experimental Twisted instrumentation is no longer being offered . We do not currently support Twisted but feel free to reach out to us if you want us to file a feature request for consideration in a future release .", "Question : Is there anything like New Relic http : www.newrelic.com for .Net apps Comment : I could be wrong but New Relic sounds like a profiler which runs while the application is running for real isn t that a bad idea be it for java or .net Comment : Profiling is not inherently bad for performance . With the right tools it s fantastic and the only way to get real world insight into your app . New Relic profiles page render times and database times . It doesn t go deep into your app . The idea is to see which pages are taking the longest and then do deep profiling locally once you figure out where your site is spending most of it s time . .. . Answer : The IIS community has-many tools for performance monitoring . http : www.iis.net downloads Performance Comment : Not one of those was even remotely close to New Relic . It s easy to look at perf counters but that s not very insightful as to WHERE the app is spending most of it s time .", "Question : I have an Application on Openshift and I just added New Relic add-on .. . New Relic asks for setting up Server and configuration is listed as .. . enter image description here http : i.stack.imgur.com jeuj6.png .. . .. . However I could not get root access I tried .. . .. . How do I setup New Relic on my Openshift box Thanks .. . Answer : New relic only currently supports a java agent cartridge according to this link : https : discuss.newrelic.com t deploying-new-relic-on-openshift 10522 .. . .. . I would seem that if you want any other platform you will need to contact OpenShift for support . Comment : I followed that link you provided and found the third party New Relic Openshift cartridge on that site very useful for getting my Java app monitored . I ll link it here directly for others : github.com zokusai openshift-cartridge-newrelic-agent https : github.com zokusai openshift-cartridge-newrelic-agent", "Question : I am following Manually uploading a Proguard map file https : docs.newrelic.com docs mobile-monitoring new-relic-mobile getting-started android-agent-crash-reporting manual-proguard doc in order to upload mapping.txt file to newrelic . Doc is saying : .. . .. . enter image description here http : i.stack.imgur.com piRpe.png .. . .. . I know where mapping.txt is . I know Application tocken .. . There is no buildId in the mapping.txt file . How can I find it This is the end of my mapping.txt file : enter image description here http : i.stack.imgur.com 5QimD.png Any help would be appreciated . thanks . .. . Answer : newrelic.propertise file must be in root of Module not project .", "Question : Is there anything like New Relic http : www.newrelic.com for .Net apps Comment : I could be wrong but New Relic sounds like a profiler which runs while the application is running for real isn t that a bad idea be it for java or .net Comment : Profiling is not inherently bad for performance . With the right tools it s fantastic and the only way to get real world insight into your app . New Relic profiles page render times and database times . It doesn t go deep into your app . The idea is to see which pages are taking the longest and then do deep profiling locally once you figure out where your site is spending most of it s time . .. . Answer : Sam I m happy to tell you that as of today there is something that is very much like New Relic for .NET . It s New Relic for .NET . Same service UI pricing etc . New agent that supports the .NET framework . Try it out for free : https : newrelic.com docs dotnet new-relic-for-net .", "Question : Is it possible to use New Relic on my Java site I built it with JHipster Yeoman generator and deployed the WAR file to Heroku . I setup New Relic . I looked at the default policy . It appears to have a pinging service but I am wondering if I have to do something in addition to keep my site up . Maybe create a route for the pinging service .. . Answer : From looking at the Jhipster site it says it creates a Spring boot backend : https : jhipster.github.io .. . .. . Providing the version of spring used is v3 or v4 it should work . I was unable to verify what version boot actually uses https : docs.newrelic.com docs agents java-agent getting-started new-relic-java .. . .. . This looks like it should work to me trying it is the only way to know for sure . Here is the heroku-newrelic-java install doc : https : devcenter.heroku.com articles newrelic java-installation-and-configuration .. . .. . The ping service will attempt to connect to your site over http https from external locations to verify that it can be reached . You shouldn t need to do any additional configuration on your site .", "Question : We are trying to implement new relic http : www.newrelic.com on a dev server to test openerp s performance . The below installation steps of newrelic asks us to to modify WSGI application file . I am new to openerp and I can t seem to figure this out . Any help will be highly appreciated . Within the same WSGI application file you then need to add a wrapper around the actual WSGI application entry-point . If the WSGI application entry-point is a function declared in the file itself then you can use a decorator . If the WSGI application entry-point is a function or object imported from a different module then you can wrap it in pre decorator style . You should then restart the specific WSGI hosting mechanism you are using to reload the WSGI script file or module . .. . Answer : When we tested new relic it was too much effort to patch the WSGI handlers of which there are a few . However running the server under gunicorn using the new relic instructions and monitoring worked with no code changes required at all . Comment : yes . but as per our exp if we use openerp under this configuration then it gives alot of errors and we can t really use it . On top of all things they are going to release version 7 this month", "Question : Where should I call NewRelic.Api.Agent.NewRelic.IgnoreApdex or NewRelic.Api.Agent.NewRelic.IgnoreTransaction in my SignalR hubs to prevent long-running persistent connections from overshadowing my application monitoring logs New Relic Screenshot of SignalR dominating monitoring http : i.stack.imgur.com 6Nao8.png .. . Answer : This whole issue seems to be caused by the connect method on the SignalR controller . I created a hub pipeline module which ignores NewRelic logging by overriding the OnBeforeConnect method . Somewhere after the maphubs call in your Application Start method global.asax.cs for your web app add the following : .. . .. . Then create this class : Comment : @dfowler would this be the correct approach Comment : eh no i d block all signalr traffic", "Question : I have installed New Relic as per their setup guide . The new relic folder is placed in my E : apache-tomcat-6.0.16 apache-tomcat-6.0.16 webapps newrelic . My application is placed in E : apache-tomcat-6.0.16 apache-tomcat-6.0.16 webapps . Now I am trying to monitor my application via new Relic but it is throwing - .. . Application down error - No data reporting for this application delete or troubleshoot . What is the solution for this problem Is it a problem due to fortiguard firewall .. . Answer : This looks like the agent might be having an issue connecting to New Relic s collectors . The log file would be the first place to check for messages which could indicate an issue . You can check the location of your log file in the newrelic.yml configuration file . See the guide to setting up the Java agent for Tomcat on Windows : https : docs.newrelic.com docs agents java-agent frameworks tomcat-installation-java h2-tomcat .. . .. . It s also worth checking that your firewall network settings are configured to allow traffic to reach New Relic s servers . The list of IP addresses and ports required are here https : docs.newrelic.com docs apm new-relic-apm getting-started networks .. . .. . Should this not turn up and information as to why your application is not reporting you should then contact New Relic support at support.newrelic.com", "Question : If we install new relic on a linux server will it cause a delay in page loading time I have installed new relic and it seems that it is causing some delay in page loading time . Can anyone confirm me Thanks in advance . .. . Answer : Via https : discuss.newrelic.com t will-newrelic-server-monitoring-affect-my-server-performance 4051 : .. . .. . We do extensive testing and estimate our overhead impact to be roughly 5 + - a few points as it relates to CPU impact on the box and application response time . This is based on a number of different frameworks and load patterns we test with as well as our default instrumentation byte code probes . Given that the Server Monitors do much less instrumentation than our language agents and mostly just query data we would expect this number to be even lower . Since every application and server is different we always encourage customers to run their own tests in a pre-production environment to validate overhead and let us know if they encounter anything different . Based on our current traffic datacenter bandwidth divided by number of agents reporting we calculate each agent consumes an average of 0.0008 Mb s megabytes second 838 bytes second or roughly 50K bytes minute . So yes there is probably a measurable effect but it should be small ." ] }
[ "yes-answer-long", "yes-answer-short" ]
php
UNK_RELATION
labwindows@ansi-c@49
labwindows -- labwindows cvi is an event-driven @placeholder programming environment developed by national instruments .
{ "confidence": [ 61.29822540283203, 60.09981918334961, 60.08845138549805, 60.08845138549805, 59.58943557739258, 59.58943557739258, 57.533912658691406, 54.98948669433594, 53.731510162353516, 53.38973617553711, 50.726158142089844, 50.726158142089844, 50.590370178222656, 49.59253692626953, 49.59253692626953, 49.246925354003906, 48.1212043762207, 48.1212043762207, 48.1212043762207, 46.99417495727539, 45.56666564941406, 45.56666564941406, 45.56666564941406, 45.56666564941406, 45.56666564941406, 45.56666564941406, 45.56666564941406, 43.85787582397461, 43.85787582397461, 43.85787582397461, 43.799861907958984, 42.86151885986328, 42.84784698486328, 41.982269287109375, 41.93788146972656, 41.365577697753906, 41.365577697753906, 41.365577697753906, 41.27057647705078, 41.13905715942383, 41.13905715942383, 41.13905715942383, 41.13905715942383, 41.13905715942383, 40.306983947753906, 40.306983947753906, 39.84455871582031, 39.65434265136719, 39.65434265136719, 39.427734375, 39.20956039428711, 38.59819030761719, 38.520721435546875, 37.71894073486328, 37.71894073486328, 37.71894073486328, 37.71894073486328, 37.549015045166016, 37.464569091796875, 37.375396728515625, 36.37801742553711, 34.946231842041016, 34.946231842041016, 34.946231842041016, 34.860679626464844, 34.820858001708984, 34.09797668457031, 34.09797668457031, 33.441280364990234, 33.112064361572266, 33.112064361572266, 33.112064361572266, 33.112064361572266, 33.112064361572266, 33.112064361572266, 33.112064361572266, 33.112064361572266, 33.112064361572266, 32.017906188964844, 31.2392635345459, 30.489978790283203, 30.292560577392578, 30.170377731323242, 29.854372024536133, 29.158937454223633, 28.843402862548828, 28.811941146850586, 28.69928741455078, 27.81436538696289, 27.604801177978516, 27.134611129760742, 27.134611129760742, 27.134611129760742, 27.134611129760742, 27.03278160095215, 26.601741790771484, 26.404842376708984, 26.230121612548828, 26.230121612548828, 26.230121612548828 ], "content": [ "I am new to LabWindows CVI .", "I ve developed a software using National Instruments LabWindows CVI and installed the .exe in a Windows 7 32-bit PC with 4GB RAM .", "There are better environments and languages for analytics than Labwindows CVI .", "Support community is even bigger than it is for Labwindows CVI .", "Are you using LabVIEW or LabWindows CVI", "Is it possible to use Cassandra with Labwindows CVI", "Code example this should build with no modifications in LabWindows CVI", "Would the built-in libraries of LabWindows CVI meet the needs of a quantitative developer", "LabWindows CVI - Programming with DefineThreadSafeScalarVar http : zone.ni.com reference en-XX help 370051T-01 cvi libref definedeclarethreadsafescalarvar DeclareThreadSafeScalarVar", "LabWindows CVI is according to the documentation http : www.ni.com lwcvi whatis : .. . .. . LabWindows CVI is a proven ANSI C development-environment for test and measurement that increases the productivity of engineers and scientists .", "@Chrono just had a short look at the LabWindows CVI intro documentation .", "The programs were written in LabWindows CVI which I ve never heard of .", "LabWindows CVI is a proven ANSI C development-environment for test and measurement that increases the productivity of engineers and scientists .", "I m using NI s Labwindows CVI and I m trying to integrate source control .", "I m trying to write a simple UDP transfer program in Labwindows CVI .", "I need to Integrate Cognex Dataman Wireless Handheld scanner in to existing Application developed using LabWindows CVI .", "I have to make an interface between dSPACE MRET and Labwindows CVI for my test automation .", "But still Labwindows CVI is more targeted for a test-environments where e.g temperature controller measurement equipment needs to be controlled .", "Tab controls in LabWindows CVI are as you have discovered layer under the handle to the tab panel .", "I need to access LabWindows API and or functions written in labwindows from Python .", "Is anyone aware of the method in LabWindows CVI used to set file or stream translation mode to text or binary .", "Can anyone please explain what is the major difference between LabWindows CVI and C .", "I am currently using LabWindows CVI 2012 to develop lab automation software .", "Ideally I would like to use LabWindows 2012 and just tell it to target the older CVI RTE .", "Applications built-in LabWindows CVI are only compatible with the same version of the Run-Time Engine or later versions .", "I have looked at CVI samples and although the use of Activex controls is handy in Labwindows it presupposes that Excel is installed on the system .", "Excel does not have to be present on a PC to produce a file using LabWindows CVI that is readable by Excel .", "I d like to integrate a Python IDLE-esque command-prompt interface into an existing NI-CVI LabWindows application .", "I m trying to read a simple text string from a website into my LabWindows CVI program .", "This DLL it s called from a VBA macro and from an user-interface program made in LabWindows CVI .", "LabWindows is C only- is it possible to use c++ functions with a c only environment", "The development-environment that comes with Labwindows CVI is pretty decent -- they have a drag-and-drop GUI building interface that makes it easy to position controls within windows and wire them up to your C code if that matters to you .", "I develop software in LabWindows for multiple customers .", "I suspect that dSPACE never provides any interfacing DLL to Labwindows .", "For LabWindows CVI : .. . .. . EDIT to correct function names : .. . .. . In the LabWindows CVI development-environment you can use a family of functions also accessible through function panels that provide status and control of panels and controls things such as position size color.. . et .", "I do not have access to the LabWindows CVI real-time module therefore cannot see the function prototype you are referring to .", "LabWindows CVI for example has extensive libraries specifically for controlling and scaling User Interface objects .", "I am developing Test automation in GeoTest ATEasy and LabWindows CVI in the tests i measure analog and digital outputs inputs .", "LabWindows does not support compiling for previous versions of the RTE so the work-around is to install multiple versions of the LabWindows Development Environment and compile using whichever matches the target RTE .", "Does anyone know if this can be accomplished in LabWindows", "LabWindows allows this kind of functionality through Telnet services .", "LabWindows truly is an awful poorly documented language .", "The documentation says Labwindows features a function for this purpose NonLinearFit .", "I m trying to use openCV with LabWindows 2012SP1 .", "I am using gSoap to generate ANSI C source code that I would like to build within the LabWindows CVI environment on a Windows 7 64 bit OS .", "Although I did use the SDK it was not to select a different version of the OpenFile function rather it was to support the use of a function that an auto-code generator used setmode but that was not supported by my primary development-environment LabWindows CVI .", "To get around this the LabWindows Development Environment must always be installed in the order of oldest to newest with the oldest version installed first .", "I want to create a server-side using ATEASY- and inside the ATEASY tests ill send tests information to LABWINDOWS CVI which will implement the client-side .", "This legacy code consists of multiple-projects language C with NI LabWindows CVI and was never manged in a source control System but only in on folders .", "Is it possible to produce an Excel file in Labwindows when Microsoft Excel is not installed on the system", "I think LabWindows CVI has very nice built-in libraries but a lot of annoying things for example popups are not well designed or multithreading is some kind of wired and so on .", "I am using the thread safe variable http : www.ni.com white-paper 3663 en macros in the LabWindows CVI environment and have observed that it is possible to get a pointer to a thread safe variable before it has been released .", "The way that you should set up your development should be as follows : .. . .. . Option 1 : Do your normal development in LabWindows CVI .", "I have thought of using thread safe queues in Labwindows .", "The hope is to get away from LabWindows in general but for now I have to work with it .", "This can be done in windows with keyboard-hook but thought there might be something easier in Labwindows .", "calls to strcpy GetLastError and etc . can be called from LabWindows .", "On the Labwindows server whenever the TCP DATAREADY event is fired I read the buffer to get the data from the client .", "The wording of this error may be specific to my environment I am using LabWindows CVI but I would be interested in hearing of results of other ANSI C compilers as well .", "All my test scripts are already in Labwindows which i want to run in dSPACE .", "Look at the answer here : stackoverflow.com questions 17349775 http : stackoverflow.com questions 17349775 how-can-i-install-multiple-versions-of-the-labwindows-development-environment-on", "I am using NI LabWindows CVI 8.1 to compile and build a executable program which I need to run on either Windows XP and Windows 2000 OS .", "LabWindows CVI distribution kits are completely compatible with Microsoft Windows Installer MSI technology therefore API calls exist within the SDK to do anything you would like regarding that technology .", "Does there exist a tool which could be used to automate the execution of such programs or if possible does the LabWindows CVI have anything which could help me besides modifying the source", "Regarding your comment LabWindows truly is an awful poorly documented language It is simply ANSI C probably THE most documented programming language in history .", "The LabWindows installer will not permit an older version to be installed on a machine which already has a newer version on it .", "Regarding .. . .. . I suspect that dSPACE never provides any interfacing DLL to Labwindows .. . .. . They might look here http : www.dspace.com en inc home products sw impsw compilers.cfm for instance quick google-search .. . .. . LabWindows CVI should be able to link and build to any C compatible API .", "the post HERE http : forums.ni.com t5 LabWindows-CVI How-to-get-control-button-handle-HWND td-p 2041814 on an NI web site addressed the general case of getting a handle to a ctrl in short the post says it cannot be done .", "The above code is Copyright c National Instruments 1987-1996 .", "Okay so we have an extension that is written in C for Tcl 8.4 using LabWindows .", "@donal and schlenk I updated my question with results from LabWindows the can rule it out as the culprit .", "It seems the UI toolkit used by LabWindows is Tk through some wrapper of some kind .", "I m unfamiliar LabWindows and VisualStudio so I have no informed idea what you should do to resolve this .", "Sorry I can t help you any further - as I said I don t really speak LabWindows or Visual Studio .", "I have a Labwindows server that listens for data from a python client on a remote machine .", "The Labwindows documentation says the following about the ServerTCPRead Method : .. . .. . dataBuffer void The pointer to the buffer in which to store the data .", "I have an application in Labwindows that when a user clicks on a button Save data the button launches a file selection dialog box .", "It works fine with the VBA macro however the program in LabWindows crashes when I try to load it .", "You can however install multiple versions of the CVI environment on a system .", "All of the information is in the link but here is its prototype : .. . .. . Example code using NewCtrl is found here : .. . C : Program Files x86 National Instruments CVIxxxx samples userint buildui.cws .. . C : Program Files x86 National Instruments CVIxxxx samples userint ICOViewer.cws", "This would allow you to develop in CVI 2012 but build in CVI 9.0 .", "UPDATE 5 13 2013 2 : 13 PM - Okay so I got LabWindows and first tried deleting the line in the .cws file and re-compiling .", "The CVI project should compile build and run .", "I could access my National Hardware almost as easy as from CVI and can write my code in C and profit from a well designed and very powerfull language .", "Option 2 is nice because you are able to use the best of all worlds Visual Studio LabWindows Measurement Studio roll your own TortiseSVN VSS .", "I have installed the older version of LabWindows 9.0 on my machine and successfully built my project so I know that my code compiles under both environments .", "My experience with LabWindows CVI http : www.ni.com lwcvi is that its built-in libraries are more geared to instrumentation GPIB analog and digital I O motion control and so forth and data display GUI widgets like meters sliders switches LEDs simple graphs rather than extensive libraries of numeric statistical or analytic routines .", "My customer s lab stations all have the CVI 9.0 runtime environment RTE installed .", "National has a very good .net support .", "If you have the Advanced Analysis Library http : zone.ni.com reference en-XX help 370051T-01 TOC129.htm part of the LabWindows CVI Full Development System http : www.ni.com lwcvi whatis analysis NI provides these capabilities for you in the functions RMS http : zone.ni.com reference en-XX help 370051T-01 cvi libref cvirms and PulseMeas http : zone.ni.com reference en-XX help 370051T-01 cvi libref cvipulsemeas .", "So I used dependency-walker to see that the dll is dependent on tcl84.dll whereas my extensions made with Visual Studio VS and even other old LabWindows projects also don t have this listed as a dependency .", "UPDATE 5 13 2013 9 : 00 AM - From what I can tell from all the answers and comments so far is that it definitely has to have something to do with some idiosyncratic in the LabWindows build .", "Oh wow I don t know how I didn t see that.. . but alas the other LabWindows project that is working with Tcl 8.6 that does not have the dependency also has that line in it s project file OK.cws .", "please hint the LabWindows ppl at this http : answers.opencv.org question 17546 opencv-will-drop-c-api-support-soon they ve been living under a rock for too long", "Option 2 : Do your normal development in VS2005 or VS2008 and link-to the Measurement Studio libraries supplied by National Instruments .", "Here s the source : .. . .. . SI.c only up to the init method entire file is too large .. . .. . SI.h .. . .. . And if anyone is familiar with LabWindows here s the project setting files : .. . .. . SI.prj .. . .. . SI.cws .. . .. . The most promising possibility looks to be this line in the .cws file : .. . .. . but here is the .cws file from another LabWindows project : .. . .. . OK.cws .. . .. . ...it has the same line yet this project works properly after updating to Tcl 8.6 .", "I switched over to use Visual Studio with C and add the national references .", "Hi I want to use dotnet program written in c in Labwindow cvi in c language is it possible or not", "Your question poses other questions but in a nutshell Yes you can use a .net c .dll within CVI .", "If there is a header file you can even guarantee a COFF compatible and CVI compatible .lib file to make things easier ." ] }
{ "confidence": [ 83.33489227294922, 80.11133575439453, 79.7965087890625, 75.218505859375, 74.79126739501953, 74.45515441894531, 72.2676773071289, 70.67317962646484, 69.96714782714844, 68.06512451171875, 66.98171997070312, 64.9576187133789, 60.708187103271484, 60.12234878540039, 59.23451232910156, 59.14482116699219, 58.82948684692383, 58.25545120239258, 57.93445587158203, 55.412353515625 ], "content": [ "Question : I am new to LabWindows CVI . Can anyone please explain what is the major difference between LabWindows CVI and C . .. . Answer : As far as I can tell they re completely different . C is a language developed primarily by Microsoft usually targeting the .NET framework . LabWindows CVI is according to the documentation http : www.ni.com lwcvi whatis : .. . .. . LabWindows CVI is a proven ANSI C development-environment for test and measurement that increases the productivity of engineers and scientists . In other words it s an IDE for a different language C along with tools and libraries particularly suitable for engineers and scientists .", "Question : Would the built-in libraries of LabWindows CVI meet the needs of a quantitative developer Comment : en.wikipedia.org wiki http : en.wikipedia.org wiki Quantitative analyst Mathematical and statistical approaches .. . Answer : I think LabWindows CVI has very nice built-in libraries but a lot of annoying things for example popups are not well designed or multithreading is some kind of wired and so on . Therefore you have to do a lot handmade and search your way arround . I switched over to use Visual Studio with C and add the national references . National has a very good .net support . I could access my National Hardware almost as easy as from CVI and can write my code in C and profit from a well designed and very powerfull language . I think its a very nice Option .", "Question : I am new to LabWindows CVI . Can anyone please explain what is the major difference between LabWindows CVI and C . .. . Answer : LabWindows CVI is a proven ANSI C development-environment for test and measurement that increases the productivity of engineers and scientists . It has a powerful tool for writing data-acquisition programs . C C Sharp http : en.wikipedia.org wiki C Sharp 28programming language 29 on the other hand is an object-oriented programming .NET language from Microsoft . It is intended to be a simple modern general-purpose object-oriented programming language . Comment : Thank you Furqan", "Question : Would the built-in libraries of LabWindows CVI meet the needs of a quantitative developer Comment : en.wikipedia.org wiki http : en.wikipedia.org wiki Quantitative analyst Mathematical and statistical approaches .. . Answer : There are better environments and languages for analytics than Labwindows CVI . I am not saying it is not possible though . NI has extensive support if you stay within their ecosystem . You can use LabView Labwindos CVI to program the data gathering part and then visualize do post calculation it with e.g . NI DIAdem basically a Excel on steroids . You have integrated libraries for : .. . .. . Signal Generation Array Operations Complex Operations Signal Processing Measuremtn Statistic Curve Fitting Interpolation Vector matrix Algebra .. . .. . A pretty decent list . But still Labwindows CVI is more targeted for a test-environments where e.g temperature controller measurement equipment needs to be controlled . Languages like R Matlab as pointed out by Jim Maple Mathematica or even the .net environment may be more helpful to your needs . If you are an inexperienced programmer or not fond of text based languages check out LabView . Support community is even bigger than it is for Labwindows CVI .", "Question : I develop software in LabWindows for multiple customers . Often it is the case that a customer is using a backlevel version of the CVI Run-Time Engine RTE . When possible the customer is urged to upgrade to the latest but when they can t I must build the software targeting the older RTE . LabWindows does not support compiling for previous versions of the RTE so the work-around is to install multiple versions of the LabWindows Development Environment and compile using whichever matches the target RTE . How can one install multiple versions on the same machine .. . Answer : The LabWindows installer will not permit an older version to be installed on a machine which already has a newer version on it . To get around this the LabWindows Development Environment must always be installed in the order of oldest to newest with the oldest version installed first . Comment : Related information Look at the answer here : stackoverflow.com questions 17198728 http : stackoverflow.com questions 17198728 how-can-one-target-older-cvi-versions-during-build", "Question : I am currently using LabWindows CVI 2012 to develop lab automation software . My customer s lab stations all have the CVI 9.0 runtime environment RTE installed . The customer strongly prefers to avoid updating their lab stations to the latest CVI RTE . I have installed the older version of LabWindows 9.0 on my machine and successfully built my project so I know that my code compiles under both environments . Ideally I would like to use LabWindows 2012 and just tell it to target the older CVI RTE . Is this possible .. . Answer : No this is not possible . Applications built-in LabWindows CVI are only compatible with the same version of the Run-Time Engine or later versions . Also note that up until CVI 2012 only one version of the Run-Time Engine can be installed on a system at a time . In CVI 2012 the side-by-side Run-Time Engine was introduced which allows for multiple versions to be installed on the same system and for applications to be bound to a specific version 2012 or later . You can however install multiple versions of the CVI environment on a system . This would allow you to develop in CVI 2012 but build in CVI 9.0 . You would need to pay particular attention that you do not use any features or library functions introduced in CVI 2012 or later . The user-interface UIR files can be saved for older versions using the Save As menu item . Additionally you would need to downgrade your project to the older version . Since CVI 9.0 and 2012 are pretty close in version this is likely not a major issue it might work without any problems . Comment : I have run into trouble installing both 2012 and 9.0 on the same machine . The installer for 9.0 tells me that it will not install because a more recent version already exists . I will test installing 9.0 first time permitting but I was wondering if you had any experience with this Comment : Look at the answer here : stackoverflow.com questions 17349775 http : stackoverflow.com questions 17349775 how-can-i-install-multiple-versions-of-the-labwindows-development-environment-on", "Question : I m using NI s Labwindows CVI and I m trying to integrate source control . Supposedly it plays well with anything that fits the MS API MSSCC SCC but I haven t found this to be the case in practice . I d love if there was a SVN service that works well with it but I suppose that s asking for too much . .. . Answer : The way that you should set up your development should be as follows : .. . .. . Option 1 : Do your normal development in LabWindows CVI . For source control use Subversion and for your interface to Subversion use TortiseSVN . I have been using TortiseSVN with VS2008 and VS2005 for a while now and I find that it is just fine . Option 2 : Do your normal development in VS2005 or VS2008 and link-to the Measurement Studio libraries supplied by National Instruments . There you will have the option of using C C++ C or whatever your heart desires . You can also integrate other libraries or subsystems such as MatLab and you would get the added benefit of framing your questions in terms of Microsoft Technologies vs National Instruments technologies where the support is much smaller . You can integrate Subversion with Visual Studio through a number of addons http : ankhsvn.open.collab.net but again I prefer to use TortiseSVN . Option 2 is nice because you are able to use the best of all worlds Visual Studio LabWindows Measurement Studio roll your own TortiseSVN VSS . Comment : I do like you answer but as long as that request remains I won t mark it it s a bit rude don t you think I ve been pushing for VS+MS but i m in a department of hardware engineers that think they can code.. . it s quite frustrating .", "Question : Would the built-in libraries of LabWindows CVI meet the needs of a quantitative developer Comment : en.wikipedia.org wiki http : en.wikipedia.org wiki Quantitative analyst Mathematical and statistical approaches .. . Answer : My experience with LabWindows CVI http : www.ni.com lwcvi is that its built-in libraries are more geared to instrumentation GPIB analog and digital I O motion control and so forth and data display GUI widgets like meters sliders switches LEDs simple graphs rather than extensive libraries of numeric statistical or analytic routines . The development-environment that comes with Labwindows CVI is pretty decent -- they have a drag-and-drop GUI building interface that makes it easy to position controls within windows and wire them up to your C code if that matters to you . But for your analytic needs you might be better served with a product like Matlab http : www.mathworks.com products matlab index.html or IDL http : www.exelisvis.com idl-home idlhandyguide.aspx especially if your work is heavy on the plotting visualization end of things . If you want to stick with C the GNU Scientific Library http : www.gnu.org software gsl has a pretty extensive set of statistical and analytic routines .", "Question : I have a server that receives simultaneous client connections . I have mostly used the MultiClientServer sample provided by NI as a model to implement a server that uses multi-threading . I have up to 4 clients connecting with each client sending information about its internal variables . My goal is to display this data in separate tabs depending of which client sent it . I have an array that holds the handle for each tab element .. . .. . When client connect and report their ID s the ID is used to refer to the right ClientTABHandle when calling SetCtrlVal . For example .. . .. . The values in are symblic . Now this lets me use the right TAB handle at runtime depending on which client I am dealing with but I can t find a way to refer to dynamically . Since UI controls are in separate tabs each control would have a prefix of its TAB name . For example if the TABs are called TABPANEL1 TABPANEL2 TABPANEL3 and TABPANEL 4 then a UI element on the first TAB would be referred to as TABPANEL1 CONTROLNAME . But how can I make a string at runtime that refers to a control and use that in the SetCtrlVal command I do not like using Fmt as it will slow things down and plus I dont know of a way to use a string that would evaluate to a control name . Comment : the post HERE http : forums.ni.com t5 LabWindows-CVI How-to-get-control-button-handle-HWND td-p 2041814 on an NI web site addressed the general case of getting a handle to a ctrl in short the post says it cannot be done . I have used run-time variable assignments for regular ctrls never for tabs . Tab controls in LabWindows CVI are as you have discovered layer under the handle to the tab panel . More importantly you cannot create the concatenated UI references found in the UI .h file at runtime . They are created when you save the .uir file editing this not recommended .. . Answer : Your question how can I make a string at runtime that refers to a control and use that in the SetCtrlVal command : .. . If your approach will allow you to programmatically create the controls for which you later need to SetCtrlVal or SetCtrlAttribute then the answer may be to experiment with the NewCtrl function http : zone.ni.com reference en-XX help 370051T-01 cvi uiref cvinewctrl . It will allow you to create controls on the tab panels and it will return a unique handle ControlID for each control it creates . All of the information is in the link but here is its prototype : .. . .. . Example code using NewCtrl is found here : .. . C : Program Files x86 National Instruments CVIxxxx samples userint buildui.cws .. . C : Program Files x86 National Instruments CVIxxxx samples userint ICOViewer.cws", "Question : I have to make an interface between dSPACE MRET and Labwindows CVI for my test automation . All my test scripts are already in Labwindows which i want to run in dSPACE . can any of you please tell how to make this interfacing using some DLL file or any other way I suspect that dSPACE never provides any interfacing DLL to Labwindows . .. . Answer : Your question is vague more specific information will help get more specific answers . Regarding .. . .. . I suspect that dSPACE never provides any interfacing DLL to Labwindows .. . .. . They might look here http : www.dspace.com en inc home products sw impsw compilers.cfm for instance quick google-search .. . .. . LabWindows CVI should be able to link and build to any C compatible API . If there is a header file you can even guarantee a COFF compatible and CVI compatible .lib file to make things easier . Creating the .lib from a header file with an associated .dll is explained here http : stackoverflow.com questions 4461389 how-can-you-examine-lib-files 5760753 5760753 . If dSPACE MRET has the ability to call from other libraries then porting CVI functions into a .dll is a good way to go . Look here http : digital.ni.com public.nsf allkb EC2ECA974F8763D586256929006D17D7 here http : sine.ni.com nips cds nisearchservlet nistype psrelcon nid 11107 lang en q FQL 3a 28 28nilangs 3aen 29 29 20AND 20 28 28phwebnt : 1801 29 20OR 20 28phwebnt : 1802 29 29 20 20AND 20 28nicontenttype 3aproductmanual 29 20AND 20 28docstatus 3acurrent 29RANK 20nilangs 3aen title NI 20LabWindows E2 84 A2 CVI 20for 20Windows 20Manuals and here http : www.tau.ac.il roichman CVI manual.pdf starting bottom of page 2.6 .", "Question : Is it possible to produce an Excel file in Labwindows when Microsoft Excel is not installed on the system I have looked at CVI samples and although the use of Activex controls is handy in Labwindows it presupposes that Excel is installed on the system . Is it at all possible to produce an Excel file when Excel is not installed on the system Comment : en.wikipedia.org wiki Microsoft Office XML formats https : en.wikipedia.org wiki Microsoft Office XML formats .. . Answer : Excel does not have to be present on a PC to produce a file using LabWindows CVI that is readable by Excel . Without having the Excel object loaded on a PC Here is one way to do what you ask . The caveat in order to make the file true Excel it will have to be opened by Excel on another PC and saved in a classic Excel format i.e . xls or xlsx .. . Here are some easy steps : see software example below .. . Create a text file with a .csv extension to start . Write records to the open file using comma delimited strings and use n at the end of each . Once file is created Open it in Excel using Open as . all files to allow it to see .csv file types . Once opened it can saved it in any Excel format you wish . Code example this should build with no modifications in LabWindows CVI", "Question : I am using gSoap to generate ANSI C source code that I would like to build within the LabWindows CVI environment on a Windows 7 64 bit OS . The gSoap file stdsoap2.c includes several instances of the setmode function with the following prototype : .. . .. . Where fd is a file-descriptor and mode is set to either O TEXT or O BINARY . Oddly enough even though LW CVI contains an interface to Microsoft s SDK this SDK does not contain a prototype to setmode in any of its included header-files even though the help link-to the SDK contains information on the function . Is anyone aware of the method in LabWindows CVI used to set file or stream translation mode to text or binary . Thanks Ryyker Comment : Ummm I guess that would be a NO .. . Answer : Closing the loop on this question . I could not use the only offered answer for the reason listed in my comment above . Although I did use the SDK it was not to select a different version of the OpenFile function rather it was to support the use of a function that an auto-code generator used setmode but that was not supported by my primary development-environment LabWindows CVI . So in summary my solution WAS to include the SDK to give me definition for setmode as well as including the following in my non- auto-generated code : .. . .. . So with the caveat that this post describes what I actually did I am going to mark the answer @gary offered as the answer as it was in the ball park . Thanks @gary .", "Question : I need to access LabWindows API and or functions written in labwindows from Python . My approach so far I have been able to do so in Visual studio using SWIG to some extent but my dll creation fails when i try to generate it in Labwindows using the source file and the SWIG generated wrapper file . Comment : Can you report the precise nature of the failure e.g . the specific error message Comment : it does not find header-files like io.h and stdio.h so i include the vc include to the include directories and it still gives 20 odd built error . like this link forums.ni.com ni board message board.id 180 thread.id 29708 http : forums.ni.com ni board message board.id 180 thread.id 29708 .. . Answer : These links are essentially pointing to the same answer . Hope it is helpful.. . .. . .. . http : decibel.ni.com content docs DOC-1494 .. . .. . NI CVI with Python http : stackoverflow.com questions 91666 ni-cvi-with-python", "Question : I am using gSoap to generate ANSI C source code that I would like to build within the LabWindows CVI environment on a Windows 7 64 bit OS . The gSoap file stdsoap2.c includes several instances of the setmode function with the following prototype : .. . .. . Where fd is a file-descriptor and mode is set to either O TEXT or O BINARY . Oddly enough even though LW CVI contains an interface to Microsoft s SDK this SDK does not contain a prototype to setmode in any of its included header-files even though the help link-to the SDK contains information on the function . Is anyone aware of the method in LabWindows CVI used to set file or stream translation mode to text or binary . Thanks Ryyker Comment : Ummm I guess that would be a NO .. . Answer : It sounds like you just want to open a file as either ASCII or binary . So you should be able to replace the instances of setmode with the LW CVI OpenFile function as described here http : zone.ni.com reference en-XX help 370051H-01 cvi cviopenfile . Here s a short example reading a file as binary . Also note this warning from the page : .. . .. . Caution The Windows SDK also contains an OpenFile function . If you include windows.h and do not include formatio.h you will get compile errors if you call OpenFile . Comment : Sorry for the long delay but I would like to close the loop here . I have long since solved the problem . The reason I was not able to use your suggestion albeit for most scenarios it was a good suggestion was that I am using the gsoap code generator therefore can not lightly choose to manually change auto-generated code without complicating matters every time we re-generate . What I did finally do is listed in my brief answer below .", "Question : I m trying to read a simple text string from a website into my LabWindows CVI program . I ve looked everywhere but can t find an example of using a simple HTTP GET request . Does anyone know if this can be accomplished in LabWindows Here s the website text I m trying to read : http : www.swpc.noaa.gov ftpdir latest wwv.txt .. . Answer : Got it . LabWindows allows this kind of functionality through Telnet services . First you do a InetTelnetOpen to open the connection . Then you do InetTelnetWrite and write the GET .. . message . Then you do InetTelnetReadUntil and read until the string html to get all the site s text . LabWindows truly is an awful poorly documented language . Comment : InetTelnetOpen is returning -22 error type couldnt connect but i tested URL and connection in C what kind of aspects could be a reson Comment : For the website above I used telnetHandle InetTelnetOpen nos-ssmc2.woc.noaa.gov 80 0 to connect . It was over a year ago but it looks like I connected to the DNS rather than the url or something . Comment : Regarding your comment LabWindows truly is an awful poorly documented language It is simply ANSI C probably THE most documented programming language in history . However It is also shipped with more extended libraries for instrument control than I have seen in any other C Integrated development kit . Very useful if you are doing anything with measurement equipment . Just keeping it real .", "Question : null .. . Answer : I need to Integrate Cognex Dataman Wireless Handheld scanner in to existing Application developed using LabWindows CVI . Cognex has provided SDK in C . Below SDK link .. . .. . http : www.cognex.com support downloads File.aspx d 2628 .. . .. . I used CVI Tool .Net Controller to create C Wrapper . http : zone.ni.com reference en-XX help 370051T-01 cvi libref cvidotnet sample code .. . .. . Below is code that suppose to connect to cognex scanner . My problem is below line .. . .. . I can create execute but it s not connecting Constructor is not taking ipaddress . Below help on generate from C Wrapper Prototype .. . .. . Please advise I have no success so far with this Thank You", "Question : I am using the thread safe variable http : www.ni.com white-paper 3663 en macros in the LabWindows CVI environment and have observed that it is possible to get a pointer to a thread safe variable before it has been released . from a previous request .. . .. . Because the data I am interesting in protecting is a struct I am unable to explicitly set nesting level so I assume that the nesting level stays at 0 i.e . that once a single thread safe pointer has been issued a request for second will be denied until the first has been released . However I have observed this not to be true while stepping through a debug session . Execution continues through the DefineThreadSafeVar CLI SafeCli statement by continuing to use the F8 step-into key and subsequent requests for a pointer to the thread-safe variable are granted without ever having released the original . My expectations are that these macros should prevent access to a thread-safe variable once a pointer to it has been issued and not yet released . Are my expectations incorrect Or have I implemented the calls incorrectly Here is my source code : Comment : Is it possible that since you re calling func2 within the same thread it simply already has access to it Understanding you may have more code beyond this example you re not running multiple threads in this case . func2 is in the same call stack since it s being called inside func1 and hence the same thread . .. . Answer : In your case you are calling func2 within func1 and subsequently is within the same call stack and thus the same thread . You re granted access because you are requesting the pointer from within the same thread that already has access to the pointer . GetPointerToSafeCli is a waiting call . Had it been called from thread A and then again in thread B before ReleasePointerToSafeCli was called back in thread A thread B would wait until the pointer was released before granting access . LabWindows CVI - Programming with DefineThreadSafeScalarVar http : zone.ni.com reference en-XX help 370051T-01 cvi libref definedeclarethreadsafescalarvar DeclareThreadSafeScalarVar Comment : Thanks I think that sums it up .", "Question : I d like to integrate a Python IDLE-esque command-prompt interface into an existing NI-CVI LabWindows application . I ve tried to follow the Python.org discussions but seem to get lost in the details . Is there a resource out there for dummies like me .. . Answer : Here is a python sample code calling a CVI http : decibel.ni.com content docs DOC-1494 . There are DaqMx python bindings http : www.scipy.org Cookbook Data Acquisition with PyUL too .", "Question : I m not sure how one layouts a GUI e.g . buttons edit boxes text and etc . when one is given measurements in pixels . As in Microsofts s GUI Guidelines all the specifics are given in distances of pixels . How does one transform that into actual distances when using another editor besides a Microsoft editor Thanks Comment : That completely depends on what kind of GUI . Comment : what makes no sense . Comment : What editor are you trying to use The quality of answer depends on that as the techniques for each are different . LabWindows CVI for example has extensive libraries specifically for controlling and scaling User Interface objects . .. . Answer : For LabWindows CVI : .. . .. . EDIT to correct function names : .. . .. . In the LabWindows CVI development-environment you can use a family of functions also accessible through function panels that provide status and control of panels and controls things such as position size color.. . et . al . called the User Interface Library . Functions such as GetCtrlAttribute SetCtrlAttribute GetPanelAttribute and SetPanelAttribute . Each of these uses an enumerated list of pre-defined arguments to access which of the many properties you would like to control . For example to set the size and position of a panel as it is displayed on the monitor you would use something like : .. . .. . There are many more attributes properties that can be set or retrieved using these four functions such as background-color whether panel control is active or greyed out frame color etc . As mentioned before there is a similar set of functions in the same family for controls Get Set CtrlAttribute that provide control for all the control properties .", "Question : I ve developed a software using National Instruments LabWindows CVI and installed the .exe in a Windows 7 32-bit PC with 4GB RAM . When I run my software sometimes I get the following error . A program caused the program to stop working correctly . Windows will close the program and notify you if a solution is available .. . .. . This is very random and sometimes this error never comes . Can anyone help me to understand this issue please . I ve reviewed my software code many times and I am sure that I am not doing anything wrong in the software which causes this error to come up . Is this anything related to windows and how can I resolve this Help is much appreciated . Thanks Sujith Rajan Comment : Seems like you have a bug in your software . Test it and run it in a debugger . Or activate DrWatson and look at the DrWatson output . Comment : If I have a bug in my software I should see this issue coming at same place and same time I run the software . My software ran for 3 days without any issues and suddenly today I got this issue . Its very random . Your thoughts Comment : Not all bugs are consistently reproducible . Comment : @SujithRajan Welcome to software development and to the world of hard-to-find bugs which are not easily reproducible . .. . Answer : I have encountered similar problems several times . This may happen even with simple programs like a console-application used to get input from user and display some data on screen after processing it . Usually this is an indication that your computer is unable to provide enough resources to this program or that there is a bug in your code . It might be random due to the following reasons : .. . .. . 1 . The Processor might already be busy with several demanding tasks and your program needs to be closed due to this . At other times when it works well the resources might be available . 2 . Your program might have a certain logical error that appears at runtime only when certain conditions are fulfilled . such as an erroneous conditional statement .. . .. . 3 . Your program might have an infinite-loop . 4 . Windows suspects your file to be harmful to the system for some reason ." ] }
[ "yes-answer-long", "yes-answer-short" ]
ansi-c
UNK_RELATION
snowballanalyzer@lowercase@140
snowballanalyzer -- the snowball analyzer is elasticsearch analyzer of type snowball that uses the standard tokenizer with standard filter @placeholder filter stop filter and snowball filter .
{ "confidence": [ 75.22760772705078, 60.4813346862793, 60.4813346862793, 54.69386672973633, 54.69386672973633, 54.23405838012695, 51.21992492675781, 51.21992492675781, 45.38770294189453, 42.37745666503906, 40.813438415527344, 40.66204833984375, 40.175785064697266, 40.175785064697266, 38.78357696533203, 37.712398529052734, 34.010074615478516, 32.03978729248047, 31.557083129882812, 30.919296264648438, 30.707733154296875, 28.39321517944336, 28.39321517944336, 28.39321517944336, 28.37002182006836, 26.37774658203125, 22.861886978149414, 22.24695587158203, 22.24695587158203, 19.397403717041016, 16.81317710876465, 16.5743465423584, 14.896483421325684, 14.896483421325684, 14.896483421325684, 14.896483421325684, 14.896483421325684, 14.896483421325684, 14.896483421325684, 14.896483421325684, 14.896483421325684, 14.896483421325684, 14.896483421325684, 14.896483421325684, 14.896483421325684, 14.896483421325684, 14.896483421325684, 14.896483421325684, 14.896483421325684, 14.896483421325684, 14.896483421325684, 14.896483421325684, 14.896483421325684, 14.896483421325684, 14.896483421325684, 14.896483421325684, 14.896483421325684, 12.927772521972656, 12.927772521972656, 12.927772521972656, 12.927772521972656, 12.927772521972656, 12.927772521972656, 12.927772521972656, 12.927772521972656, 12.927772521972656, 12.927772521972656, 12.927772521972656, 12.927772521972656, 12.927772521972656, 12.927772521972656, 12.927772521972656, 12.927772521972656, 12.927772521972656, 12.927772521972656, 12.927772521972656, 12.927772521972656, 12.927772521972656, 12.927772521972656, 12.927772521972656, 12.927772521972656, 12.927772521972656, 12.927772521972656, 12.927772521972656, 12.927772521972656, 12.927772521972656, 12.927772521972656, 11.621718406677246, 11.621718406677246, 11.621718406677246, 11.621718406677246, 11.621718406677246, 11.621718406677246, 11.621718406677246, 11.621718406677246, 11.621718406677246, 11.621718406677246, 11.621718406677246, 11.621718406677246, 11.621718406677246 ], "content": [ "I m using lucene.net and the snowball analyzer in a asp.net application .", "So if the real query was specialized then the query should be specialize what normally the snowball analyzer does .", "I am using Lucene 3.0 and I need Snowball analyzer for stemming that is compatible with Lucene 3.0 .", "I see snowball is a separate .jar", "The latest Ive found is snowball-2.4.0 .", "In the Lucene 3.0.3 docs SnowballAnalyzer is in : .. . .. . with documentation at : .. . .. . https : lucene.apache.org core old versioned docs versions 3 0 3 api contrib-snowball org apache lucene analysis snowball SnowballAnalyzer.html .. . .. . The Lucene download archives are at : .. . .. . http : archive.apache.org dist lucene java .. . .. . Near as I can tell SnowballAnalyzer is part of the base Lucene package i.e .", "Is snowball supposed to come in lucene-core distibution", "snowball-2.4.0 suggest it is compatible with Lucene 2.4 not 3.0 .", "I am searching for singular words with plurals in the document.Read that snowball stemmer will do this type of conversion .", "I m trying to swap in the SnowballAnalyzer http : lucene.apache.org java 2 4 0 api org apache lucene analysis snowball SnowballAnalyzer.html for StandardAnalyzer http : lucene.apache.org java 2 4 0 api org apache lucene analysis standard StandardAnalyzer.html on my Maven 2 project .", "Yes it is in separate jar because in lucene-core jar version that I am using 3.0.1 there is no snowballAnalyzer in org.apache.lucene.analysis. . so i downloaded it separately tried 4 versions of snowball no solution .", "I removed the NGRAM Filter and not it works .", "I still did not manage to resolve it.... . am using lucene-core3.0.1 and i tried with several different Snowball jars .", "I don t know what snowball is I m telling you what your error means .", "I m trying to use SnowBallAnalyzer in PyLucene but I always get an error saying : InvalidArgsError when I try to create an instance of it like this : .. . .. . analyzer SnowBallAnalyzer Spanish .. . .. . or .. . .. . analyzer SnowBallAnalyzer Spanish STOPWORDS .. . .. . What I really need is i.e if I search for F tbol I should obtain the documents that have the word futbol or f tbol .", "As SnowballAnalyzer has been deprecated in lucene 3.1.0 I suggest you directly use the spanish analyzer .", "because of the stemming done by the SnowballAnalyzer .", "That is why there is an analyzer type one for storing content in the index and one for how to compare when running a query .", "In Lucene I use the SnowballAnalyzer for indexing and searching .", "Also look at the Solr logs and see if the Porter filter factory is being loaded correctly especially with the additional language tag or if it s throwing some kind of warning .", "It looks like you can t use the Ngram filter including word stemming .", "How can I teach the analyzer either not to stem this two words or to although stemming them know that they have different meanings .", "What I m missing is the analyzer ability to differentiate between them because after stemming they are equal .", "So you can create your own Analyzer overriding the tokenStream method and adding into the chain a KeywordMarkerFilter just before the SnowballFilter .", "How can I get the term analyzed by the analyzer for a single word or a phrase since query can contain a phrase : specialized machines .", "I just plugged SnowballAnalyzer in one of my project with lucene.net .", "I am new in elasticsearch", "I am indexing the documents with Lucene and am trying to apply the SnowballAnalyzer for punctuation and stopword removal from text . .", "I would like to apply SnowBallAnalyzer to the text I would like to index an to the query .", "As far as I understand it stop-words are ignored during search .", "I am working from memory here but as I recall in one of the constructors you can pass an array of stopwords which will stop the passed in words from being stemmed .", "I would suggest going to the Solr admin panel clicking on Analysis and running a field analysis on this type .", "When I have the index built I make queries on my index .", "For example I make a query specialized for the field body .", "IndexSearcher returns documents containing specialize specialized etc .", "Now - having top documents - I want to get a text snippet from the body field .", "This snipped should contain the stemmed version of the query word .", "For example one of the returned documents has the body field : Unfortunately in some states blind people only have access to general rehabilitation agencies which serve people with a variety of disabilities .", "In these cases specialized services for visually impaired people are not always available .", "Then I wish to get the part In these cases specialized services for visually as the snippet .", "Additionally I want to have terms from this snippet .", "Code which will do it but with one marked", "character where I have a question is : .. . .. . How I want to do it is IndexReader ir IndexReader.open fsDir .. . TermPositionVector tv TermPositionVector ir.getTermFreqVector hits.scoreDocs i .doc body .. . .. .", "- here : query - query has to be the term .", "int idx tv.indexOf query .. . int idxs tv.getTermPositions idx .. . for String t : tv.getTerms .. . int iidx tv.indexOf t .. . int iidxs tv.getTermPositions iidx .. . for int ni : idxs .. . tmpValue 0.0f .. . for int nni : iidxs .. . if Math.abs nni-ni Settings.termWindowSize .. . .. . edit .. . I found the way to get the stemmed term : .. . Query q queryParser.parse some text to be parsed String parsedQuery q.toString .. . There is a method for the Query object toString String fieldName http : lucene.apache.org java 3 0 2 api core index.html org apache lucene search TopFieldDocs.html", "I believe you are mixing several questions .", "First to see the stemmed version of your query and other useful information you can use the IndexSearcher s explain method .", "Please see my answer to this question http : stackoverflow.com questions 2409870 using-hit-highlighter-in-lucene .", "The Lucene solution for getting snippets is the Highlighter http : lucene.apache.org java 3 0 2 api contrib-highlighter org apache lucene search highlight Highlighter.html .", "Another option is the FastVectorHighlighter http : lucene.apache.org java 3 0 2 api contrib-fast-vector-highlighter org apache lucene search vectorhighlight FastVectorHighlighter.html .", "I believe you can customize both to get the stemmed term rather than the full one .", "Thx for your reply .", "Please see my post update to see a way to get the stemmed term .", "I searched in Google for an hour and I was unable to find a credible source .", "Please suggest a trusted location from which I can download snowball.dll .", "not in contrib .", "Thanks Mark It did not occur to me .", "I m currently using .. . .. . but I keep getting the following error :", "I swear that says porn.xml .", "From the repos it looks like you should be including this one : .. . .. . At least from what I can see from http : repo1.maven.org maven2 that looks like the proper dependency", "I use SnowballPorterFilterFactory for index and query analyzers .", "When i search for profession word .", "Solr successfully finds only articles that contains profession but i want professional professionalism .. .", "This is the current configuration on schema.xml", "Do both the query and index ones and see whether they re getting stemmed the same way or not .", "What is happening is porter is over-stemming your query .", "When you search for profession your keyword gets stemmed down to profess whereas profession professional and professionalism are all stored in the index as profession .", "The only real way you are going to get around this is by adding another fieldType where you do not stem your query .", "Something like : .. . .. . With a copyfield like : .. . .. . copyField source your text field dest text unstem query field", "I don t think this is the issue - I use the Porter stemmer myself and I ve never faced this double-stemming issue before .", "I ran his setup through the Solr analysis and this was the result I got .", "Profession gets stemmed down to profess and professional gets stemmed to profession in the index .", "They will not match with his current setup .", "hi thank s for your response i verified my logs and used copyfield solution but the problem persiste please note that i use edismax query parser .", "should i add the on my q parameter", "example : profession", "If he doesn t stem the query it s not going to match what he has in the index .", "One dirty getaround however is to stem everything twice .", "That way everything will be the stemmed to the base .", "There is no problem about the stem but the problem is to combine the stem with the mark .", "so the Profession word is stemmed to profess and when i add mark after prefess they don t find the articles with profess profession professional.. .", "With a specific language I m using I have the following issue : For two specific words with different meanings after they are stemmed the result is the same therefore a search for any of them will produce results for both things .", "That s not what I want .", "I want to be able to search for these two words .", "With Lucene 4.0 EnglishAnalyzer now has this ability since it has a constructor which takes a stemExclusionSet http : lucene.apache.org core 4 0 0 analyzers-common org apache lucene analysis en EnglishAnalyzer.html EnglishAnalyzer 28org.apache.lucene.util.Version 20org.apache.lucene.analysis.util.CharArraySet 20org.apache.lucene.analysis.util.CharArraySet 29 .. . .. . Of course Lucene.Net isn t up to Lucene 4 yet so fat lot of good that does .", "However EnglishAnalyzer does this by using a KeywordMarkerFilter http : lucene.apache.org core 3 1 0 api core org apache lucene analysis KeywordMarkerFilter.html .", "Something like : .. . .. . You ll need to construct your own stemExclusionSet see CharArraySet http : lucene.apache.org core 3 0 3 api core org apache lucene analysis CharArraySet.html .", "I created an index for an attachment using elasticsearch2.3.3 and Nest 2.3.2.My indexing is given below .", "But no records were returned on search.Is there any extra plugin words collection need to be added to the application to make it work .", "Can anyone help .", "I tried stemmer override also .", "But no luck", "Anybody please help me .", "Let me know if more clarification required .", "I found out the issue .", "Analyser is not set to the attachment field .", "and http : localhost : 9200 mydocs returns", "Our requirement is to support Singular Plural support as well remove customized noise keywords .", "The problem is my search result now returns nothing now .", "Before it was showing data ." ] }
{ "confidence": [ 100.03813934326172, 74.33514404296875, 73.77079772949219, 71.0179443359375, 63.093727111816406, 62.957157135009766, 58.22305679321289, 54.193397521972656, 39.770416259765625, 31.648311614990234, 26.40604019165039, 9.920601844787598, 9.920601844787598 ], "content": [ "Question : I am using Lucene 3.0 and I need Snowball analyzer for stemming that is compatible with Lucene 3.0 . I searched in Google for an hour and I was unable to find a credible source . Please suggest a trusted location from which I can download snowball.dll . .. . Answer : In the Lucene 3.0.3 docs SnowballAnalyzer is in : .. . .. . with documentation at : .. . .. . https : lucene.apache.org core old versioned docs versions 3 0 3 api contrib-snowball org apache lucene analysis snowball SnowballAnalyzer.html .. . .. . The Lucene download archives are at : .. . .. . http : archive.apache.org dist lucene java .. . .. . Near as I can tell SnowballAnalyzer is part of the base Lucene package i.e . not in contrib . Comment : Thanks Mark It did not occur to me .", "Question : I am indexing the documents with Lucene and am trying to apply the SnowballAnalyzer for punctuation and stopword removal from text . . I keep getting the following error : .. . .. . IllegalAccessError : tried to access method org.apache.lucene.analysis.Tokenizer . Ljava io Reader V from class org.apache.lucene.analysis.snowball.SnowballAnalyzer .. . .. . Here is the code I would very much appreciate help I am new with this. . .. . .. . public class Indexer .. . .. . .. . .. . private void indexDocument File someDoc throws IOException .. . .. . .. . Answer : This says that one Lucene class is inconsistent with another Lucene class -- one is accessing a member of the other that it can t . This strongly suggests you have two different and incompatible versions of Lucene in your classpath somehow . Comment : Thanx Sean I still did not manage to resolve it.... . am using lucene-core3.0.1 and i tried with several different Snowball jars . Nothing helps so far : Comment : I see snowball is a separate .jar then it s likely that the version you have is not compatible with the version of Lucene you re using . Comment : Yes it is in separate jar because in lucene-core jar version that I am using 3.0.1 there is no snowballAnalyzer in org.apache.lucene.analysis. . so i downloaded it separately tried 4 versions of snowball no solution . The latest Ive found is snowball-2.4.0 . Maybe im overlooking something silly Is snowball supposed to come in lucene-core distibution Comment : I don t know what snowball is I m telling you what your error means . snowball-2.4.0 suggest it is compatible with Lucene 2.4 not 3.0 .", "Question : I m using lucene.net and the snowball analyzer in a asp.net application . With a specific language I m using I have the following issue : For two specific words with different meanings after they are stemmed the result is the same therefore a search for any of them will produce results for both things . How can I teach the analyzer either not to stem this two words or to although stemming them know that they have different meanings . .. . Answer : I am working from memory here but as I recall in one of the constructors you can pass an array of stopwords which will stop the passed in words from being stemmed . Comment : As far as I understand it stop-words are ignored during search . That s not what I want . I want to be able to search for these two words . What I m missing is the analyzer ability to differentiate between them because after stemming they are equal .", "Question : I m trying to swap in the SnowballAnalyzer http : lucene.apache.org java 2 4 0 api org apache lucene analysis snowball SnowballAnalyzer.html for StandardAnalyzer http : lucene.apache.org java 2 4 0 api org apache lucene analysis standard StandardAnalyzer.html on my Maven 2 project . I m currently using .. . .. . but I keep getting the following error : Comment : I swear that says porn.xml . .. . Answer : From the repos it looks like you should be including this one : .. . .. . At least from what I can see from http : repo1.maven.org maven2 that looks like the proper dependency", "Question : In Lucene I use the SnowballAnalyzer for indexing and searching . When I have the index built I make queries on my index . For example I make a query specialized for the field body . IndexSearcher returns documents containing specialize specialized etc . because of the stemming done by the SnowballAnalyzer . Now - having top documents - I want to get a text snippet from the body field . This snipped should contain the stemmed version of the query word . For example one of the returned documents has the body field : Unfortunately in some states blind people only have access to general rehabilitation agencies which serve people with a variety of disabilities . In these cases specialized services for visually impaired people are not always available . Then I wish to get the part In these cases specialized services for visually as the snippet . Additionally I want to have terms from this snippet . Code which will do it but with one marked character where I have a question is : .. . .. . How I want to do it is IndexReader ir IndexReader.open fsDir .. . TermPositionVector tv TermPositionVector ir.getTermFreqVector hits.scoreDocs i .doc body .. . .. . - here : query - query has to be the term . So if the real query was specialized then the query should be specialize what normally the snowball analyzer does . How can I get the term analyzed by the analyzer for a single word or a phrase since query can contain a phrase : specialized machines . int idx tv.indexOf query .. . int idxs tv.getTermPositions idx .. . for String t : tv.getTerms .. . int iidx tv.indexOf t .. . int iidxs tv.getTermPositions iidx .. . for int ni : idxs .. . tmpValue 0.0f .. . for int nni : iidxs .. . if Math.abs nni-ni Settings.termWindowSize .. . .. . edit .. . I found the way to get the stemmed term : .. . Query q queryParser.parse some text to be parsed String parsedQuery q.toString .. . There is a method for the Query object toString String fieldName http : lucene.apache.org java 3 0 2 api core index.html org apache lucene search TopFieldDocs.html .. . Answer : I believe you are mixing several questions . First to see the stemmed version of your query and other useful information you can use the IndexSearcher s explain method . Please see my answer to this question http : stackoverflow.com questions 2409870 using-hit-highlighter-in-lucene . The Lucene solution for getting snippets is the Highlighter http : lucene.apache.org java 3 0 2 api contrib-highlighter org apache lucene search highlight Highlighter.html . Another option is the FastVectorHighlighter http : lucene.apache.org java 3 0 2 api contrib-fast-vector-highlighter org apache lucene search vectorhighlight FastVectorHighlighter.html . I believe you can customize both to get the stemmed term rather than the full one . Comment : Thx for your reply . Please see my post update to see a way to get the stemmed term .", "Question : I m using lucene.net and the snowball analyzer in a asp.net application . With a specific language I m using I have the following issue : For two specific words with different meanings after they are stemmed the result is the same therefore a search for any of them will produce results for both things . How can I teach the analyzer either not to stem this two words or to although stemming them know that they have different meanings . .. . Answer : With Lucene 4.0 EnglishAnalyzer now has this ability since it has a constructor which takes a stemExclusionSet http : lucene.apache.org core 4 0 0 analyzers-common org apache lucene analysis en EnglishAnalyzer.html EnglishAnalyzer 28org.apache.lucene.util.Version 20org.apache.lucene.analysis.util.CharArraySet 20org.apache.lucene.analysis.util.CharArraySet 29 .. . .. . Of course Lucene.Net isn t up to Lucene 4 yet so fat lot of good that does . However EnglishAnalyzer does this by using a KeywordMarkerFilter http : lucene.apache.org core 3 1 0 api core org apache lucene analysis KeywordMarkerFilter.html . So you can create your own Analyzer overriding the tokenStream method and adding into the chain a KeywordMarkerFilter just before the SnowballFilter . Something like : .. . .. . You ll need to construct your own stemExclusionSet see CharArraySet http : lucene.apache.org core 3 0 3 api core org apache lucene analysis CharArraySet.html .", "Question : I created an index for an attachment using elasticsearch2.3.3 and Nest 2.3.2.My indexing is given below . I am searching for singular words with plurals in the document.Read that snowball stemmer will do this type of conversion . But no records were returned on search.Is there any extra plugin words collection need to be added to the application to make it work . Can anyone help . I tried stemmer override also . But no luck Comment : Anybody please help me . Let me know if more clarification required . I am new in elasticsearch .. . Answer : I found out the issue . Analyser is not set to the attachment field . and http : localhost : 9200 mydocs returns", "Question : I m trying to use SnowBallAnalyzer in PyLucene but I always get an error saying : InvalidArgsError when I try to create an instance of it like this : .. . .. . analyzer SnowBallAnalyzer Spanish .. . .. . or .. . .. . analyzer SnowBallAnalyzer Spanish STOPWORDS .. . .. . What I really need is i.e if I search for F tbol I should obtain the documents that have the word futbol or f tbol . So.. . I would like to apply SnowBallAnalyzer to the text I would like to index an to the query . Any help will be appreciated . Thanks in advance . .. . Answer : I don t know pylucene very well as I only work with the java version but as far as I know pylucene is accessing the java implementation . If this is the case you are missing the Version parameter in the constructor . As SnowballAnalyzer has been deprecated in lucene 3.1.0 I suggest you directly use the spanish analyzer .", "Question : I use SnowballPorterFilterFactory for index and query analyzers . When i search for profession word . Solr successfully finds only articles that contains profession but i want professional professionalism .. . This is the current configuration on schema.xml Comment : I would suggest going to the Solr admin panel clicking on Analysis and running a field analysis on this type . Do both the query and index ones and see whether they re getting stemmed the same way or not . Comment : Also look at the Solr logs and see if the Porter filter factory is being loaded correctly especially with the additional language tag or if it s throwing some kind of warning . .. . Answer : What is happening is porter is over-stemming your query . When you search for profession your keyword gets stemmed down to profess whereas profession professional and professionalism are all stored in the index as profession . The only real way you are going to get around this is by adding another fieldType where you do not stem your query . Something like : .. . .. . With a copyfield like : .. . .. . copyField source your text field dest text unstem query field Comment : I don t think this is the issue - I use the Porter stemmer myself and I ve never faced this double-stemming issue before . Comment : I ran his setup through the Solr analysis and this was the result I got . Profession gets stemmed down to profess and professional gets stemmed to profession in the index . They will not match with his current setup . That is why there is an analyzer type one for storing content in the index and one for how to compare when running a query . Comment : hi thank s for your response i verified my logs and used copyfield solution but the problem persiste please note that i use edismax query parser . should i add the on my q parameter example : profession Comment : If he doesn t stem the query it s not going to match what he has in the index . One dirty getaround however is to stem everything twice . That way everything will be the stemmed to the base . Comment : There is no problem about the stem but the problem is to combine the stem with the mark . so the Profession word is stemmed to profess and when i add mark after prefess they don t find the articles with profess profession professional.. .", "Question : null .. . Answer : I have a problem with my german stemming SnowballPorterFilterFactory . I just can t get it to work . Neither in english or germna . I m using this AnalzyderDef . I tried it with walk walking walks like mentioned here http : wiki.apache.org solr AnalyzersTokenizersTokenFilters CharFilterFactories . Is maybe the combination of the filters the problem Comment : Shouldn t you try it with actual german words And be sure to look at the tokens and not the text returned from the field which will be identical to the stored one . Search for the stemmed version of a german word and see if that changes . Use the analysis page under the Solr Admin interface to see how the tokens are generated and the text is processed for the field . Comment : When you say can t get it to work what does that mean exactly How are you using the configured analyzers what outcome is it you expect and what happens instead Comment : Thanks for the help . It looks like you can t use the Ngram filter including word stemming . I removed the NGRAM Filter and not it works .", "Question : null .. . Answer : I just plugged SnowballAnalyzer in one of my project with lucene.net . Our requirement is to support Singular Plural support as well remove customized noise keywords . The problem is my search result now returns nothing now . Before it was showing data . E.g . When I search for Bridge or Bridges - It shows nothing . But if I search for Bridg - It shows result . Using Luke I seen that Bridg is Indexed but neither Bridge Bridges indexed . Our users will enter Bridges Bridge Not Bridg a big problem . Please advise since I am very new to Lucene.Net .. . .. . Thanks .", "Question : I use SnowballPorterFilterFactory for index and query analyzers . Search for apple word . Solr successfully finds necessary articles but tels that the word was spelled incorrect and give suggestion : appl . It works correct if I search for apples : no suggestion is given and found articles with apple word . schema.xml : .. . .. . Any ideas how to exclude incorrect suggestions .. . Answer : You should not use the same field for search spellchecking.. . Add a field without stemming for spellchecking . Example : .. . .. . Then in your solrconfig.xml :", "Question : I am using Lucene s Highlighter class to highlight fragments of matched search results and it works well . I would like to switch from searching with the StandardAnalyzer to the EnglishAnalyzer which will perform stemming of terms . The search results are good but now the highlighter doesn t always find a match . Here s an example of what I m looking at : .. . .. . Using the EnglishAnalyzer and searching for goat both documents are matched but the highlighter is only able to find a matched fragment from document 2 . Is there a way to have the highlighter return data for both documents I understand that the characters are different for the tokens but the same tokens are still there so it seems reasonable for it to just highlight whatever token is present at that location . If it helps this is using Lucene 3.5 . .. . Answer : I found a solution to this problem . I changed from using the Highlighter class to using the FastVectorHighlighter . It looks like I ll pick up some speed improvements too at the expense of storage of term vector data . For the benefit of anyone coming across this question later here s a unit test showing how this all works together :" ] }
[ "yes-answer-long", "yes-answer-short" ]
lowercase
UNK_RELATION
ascmd@database@51
ascmd -- the ascmd command-line utility enables a @placeholder administrator to execute an xmla script mdx query or dmx statement against an instance of microsoft sql-server-2005 analysis services ssas .
{ "confidence": [ 59.902923583984375, 55.02789306640625, 52.407005310058594, 50.336402893066406, 47.989749908447266, 47.59294891357422, 46.16939163208008, 40.852943420410156, 40.485164642333984, 39.80720520019531, 36.57730484008789, 36.41267776489258, 35.81672668457031, 35.58354187011719, 34.676307678222656, 34.676307678222656, 34.420127868652344, 34.39862060546875, 33.777130126953125, 31.536087036132812, 31.365646362304688, 30.129127502441406, 29.656272888183594, 29.656272888183594, 29.656272888183594, 28.57648468017578, 25.406478881835938, 24.770980834960938, 24.56748390197754, 23.19103240966797, 22.78681182861328, 22.07780647277832, 21.291170120239258, 20.047039031982422, 18.351598739624023, 18.247753143310547, 18.188880920410156, 18.093313217163086, 18.0001220703125, 17.82952308654785, 17.733070373535156, 17.537899017333984, 17.352909088134766, 16.96632194519043, 16.447134017944336, 16.291921615600586, 16.030818939208984, 15.943851470947266, 15.468391418457031, 15.338211059570312, 15.153741836547852, 14.645347595214844, 14.42831039428711, 13.81736946105957, 13.234722137451172, 13.234722137451172, 13.234722137451172, 13.234722137451172, 13.234722137451172, 13.234722137451172, 13.234722137451172, 13.234722137451172, 13.234722137451172, 12.390371322631836, 11.897658348083496, 11.897658348083496, 11.897658348083496, 11.897658348083496, 11.897658348083496, 11.897658348083496, 11.897658348083496, 11.897658348083496, 11.897658348083496, 10.295150756835938, 10.295150756835938, 10.295150756835938, 10.295150756835938, 10.295150756835938, 10.295150756835938, 10.295150756835938, 10.295150756835938, 10.295150756835938, 10.295150756835938, 10.295150756835938, 10.295150756835938, 10.295150756835938, 10.295150756835938, 10.295150756835938, 10.295150756835938, 10.295150756835938, 10.295150756835938, 10.295150756835938, 10.295150756835938, 10.295150756835938, 10.295150756835938, 8.415335655212402, 8.415335655212402, 8.415335655212402, 8.415335655212402, 8.415335655212402 ], "content": [ "With MS AS 2005 you should have under sample inst Analysis Services Administrator ascmd CS .", "Till now I used ascmd to execute some queries to SSAS 2008R2 .", "Indeed ascmd utility doesn t provide table output .", "I need to execute MDX query from command-line MS AS 2005 .", "I found that there is such tool such as ascmd.exe Readme For Ascmd Command-line Utility Sample https : technet.microsoft.com en-us library ms365187 v sql.90 .aspx .", "I m trying to see data in my OLAP cube by ascmd utility .", "Please help if you know any other page where I can download ascmd or any other program executing MDX in command-line .", "I can t find any ascmd tool in SQL Server 2012 neither any documents or relatives on the internet .", "If you need the ability to create output in CSV format try creating static method which transform XMLA to CSV and add it to ascmd source code .", "I have heard that there is a program named ascmd which can do this .", "@RBarryYoung c p problem this it the correct one : Microsoft R Analysis Services 2008 Command Line Tool Version 10.0.87.5 X86 Ascmd : Exception trying to impersonate user : Could not load file or assembly Microsoft.AnalysisServices Version 10.0.0.0 Culture neutral PublicKeyToken 89845dcd8080cc91 or one of its dependencies .", "Source Microsoft SQL Server 2008 R2 Analysis Services HelpFile .. . .. . However when I connect to the Analysis Services in SQL Server 2008 Management Studio I can t find it.. . .. . .. . Is it common issue or just on my system", "In SSAS 2012 Iam trying to use sqlpls -C Invoke-ascmd -S server -i file.xmla from command-line for cube processing . errorlevel is 0 even if cube processing fails since sqlps executing succesfully.Can any one help me to understand how to do error-handling for sqlps -C Invoke-ascmd in 2012", "When I try to execute a query with my version i get the following message : .. . .. . Microsoft R Analysis Services 2008 Command Line Tool Version 10.0.87.5 X86 Copyright C 2008 Microsoft Corporation .", "Unfortunately when I went to codeplex page I found that page supposed to deliver an ascmd doesn t work .", "You could log this as a request in the Issue Tracker on the ascmd site http : www.codeplex.com MSFTASProdSamples .", "take the old ascmd solution from microsoft samples delete the old reference dll and add new one it will solve ur problem", "Another possible work around would be to configure a linked-server on your SQL Server and use the OPENQUERY function to send MDX to SSAS .", "I can say that I wasn t use ascmd.exe tool because I wasn t able to get this tool I couldn t compile the project in C from here : Readme For Ascmd Command-line Utility Sample http : msftasprodsamples.codeplex.com wikipage title SS2005 Readme 20For 20Command-line 20Utility 20Sample .", "I want to have on my output something like this www.pinaldave.com download sqlcmd4.gif -- Is it possible to get text output in ascmd as it is in sqlcmd", "As input I put a MDX query but only what I have as output in command-line is a XML file .", "Update : .. . When I m trying to Attach and then choose a folder it gives me the following error : .. . .. . Database Administrator or server administrator permissions are required to execute SystemGetLogicalDrives command", "Ascmd : Exception trying to impersonate user : Could not load file o crosoft.AnalysisServices Version 10.0.0.0 Culture neutral Publi 5dcd8080cc91 or one of its dependencies .", "Ascmd : Execution failed : Could not load file or assembly Microsof ices Version 10.0.0.0 Culture neutral PublicKeyToken 89845dcd80 of its dependencies .", "Ascmd : Execution failed : Could not load file or assembly Microsoft.AnalysisServ ices Version 10.0.0.0 Culture neutral PublicKeyToken 89845dcd8080cc91 or one of its dependencies .", "The reason i could not see the database is because I was not running in administrative mode Right Click on SQL Server Management - Run As Administrator Then the Analysis Database will appear", "Its so frustrating to know that administrative privileges in Windows Server 2008 + SQL Server 2008 could make those errors Running as administrator solved my problem and the OLAP creation process did not stuck", "I m looking for tool or a easy way to run xmla script example for create or delete cube .", "I m trying to create OLAP DB via analysis services in SQL Server 2008 with ascmd.exe tool I get the following error : .. . .. . Error ErrorCode 3239313410 Description Errors in the metadata man ager .", "I ve looked into the code of the Ascmd and I ve found that for some reason the trace file log file did not start therefore the code got into a loop forever section and did not get out I ve added prints to the code to check out if it is get stuck here and i ve noticed that it gets stuck on while TraceStarted Thread.Sleep 1 : .. . .. . Does anyone know why the trace file is not started", "I have downloaded Samples for MS SQL Server 2005 and I don t know how to get an .exe file from files like ascmd.sln ascmd.cs ascmd.csproj .", "where sample inst is the folder where you have installed the samples .. . .. . Typcally : .. . .. . C : Program Files Microsoft SQL Server 90 Samples", "However if I check in the SQL Server Managment I can see that the OLAP database is created .", "Is there any other for MS SQL Server 2012 and newer versions", "ascmd.exe is included in this MS-SQL Server samples download http : www.codeplex.com SqlServerSamples Release ProjectReleases.aspx ReleaseId 4000 .", "I wrote my own exe file in C which I can run from command-line .", "The second important is that the script i m working on must run on several version 2005-2008-2012 so i think it will be a bad decision to run different version one without PS one with PS.. . of the script .", "Windows Server 2008 R2 64-bit .. . 2 .", "I think it s because MDX queries can create multidimensional outputs like pivot-tables where there are many elements and hierarchies on rows and on columns .", "SQL Server 2008 R2 64-bit .. . .. . When I run ascmd.exe it giving xml file in order to build OLAP database most of the time the process just gets stuck and the console window is open even after ten minutes with no further messages .", "I used to make exe file using Inno Setup program and there I can write command which can run another exe file just like in command-line .", "Does it related to Windows Server 2008 hard security rules", "This will cause it to use the SQL 2014 .", "But it was used in older versions of MS SQL .", "If you want SQL 2012 then change 12.0.0.0 to 11.0.0.0 :", "My company begin to install some new SSAS 2012 servers and I want to re-use all my maintenance scripts with these new servers .", "One you have it installed you can run the command csc ascmd.cs to compile .", "Check the Findstr command from MS-DOS .. . .. . Example", "I believe that the -Tf is the format for capturing trace output not query results .", "It will be very bad to maintain.. . I m quite sure that cmdlet in PS are quite different in 2005 and 2012", "The database with the name of CosmoComOLAPDB already exists in the LIOR2K8 server .", "I can t use PowerShell script.. .", "SQLPS will always return 0 if the command executed successfully it does not cares about whether the instruction are successful .", "You can download the 2008 R2 Analysis Management Objects from this page http : www.microsoft.com en-us download details.aspx id 16978 .", "I m pulling my hair out here for that I can t understand what is going on .. . I have the following : .. . .. . 1 .", "Then in other times Same machine Same scenario Same snapshot it succeeds .", "What can cause this odd behaviour", "I ve tried to search everywhere but did not find any similar issue .. . I ve tried to replace the ascmd.exe tool with its latest Version 10.0.87.5 .. . .. . I don t know whats causing this please help", "Thanks", "Update : Please someone", "it is very important .. . .. . Update : I think I have a progress on it but can t explain the behaviour .", "I cannot remove the trace file since its a requirement for us Any suggestions", "thanks", "The tool appears to have been migrated to a cmdlet http : msdn.microsoft.com en-us library hh479579.aspx and PowerShell is usually installed and available on all recent Microsoft OSes .", "When I m trying to launch an .sln file in Visual Studio there is an error like : .. . .. . The application for project C : project path project name is not installed .. . .. . Do I need a C compiler or something like that", "yes you will need to compile the .CS file .", "The compilers are part of Visual Studio Express download http : www.microsoft.com express download .", "You ll want the C Edition .", "csc is located in windir Microsoft.NET Framework v3.5 csc.exe .. . .. . Alternatively you can compile from the IDE .", "Just double click the .sln or .csproj file and the IDE will open .", "CRTL+SHIFT+B compiles .", "F5 runs .", "Thev v3.5 will vary based on the version you install .", "All you need to do is get the output using out-file option in ASCII code and check for tag .", "if found it will return 0 else it will return 1 for not found .", "Find Message tag for error messages .", "I would recommend you download ASCMD StressTestingScripts which contains Ascmd.exe from : https : sqlsrvanalysissrvcs.codeplex.com releases .. . .. . Then create an Ascmd.exe.config file with the following contents in the same directory as Ascmd.exe .", "Maybe my code will help someone with similar problem .", ":", "Thanks for reply", "This is a different page than the one you probably went to originally it has moved .", "Just click on the SqlServerSamples.msi link .", "You will get with SP2 samples .", "You can download and install it separately from http : www.microsoft.com downloads details.aspx familyid e719ecf7-9f46-4312-af89-6ad8702e4e6e displaylang en http : www.microsoft.com downloads details.aspx familyid e719ecf7-9f46-4312-af89-6ad8702e4e6e displaylang en", "I tried to use -Tf text and -Tf csv parameters but they don t work in the way I think they should I have a XML on output all the time .", "Thanks for help .", "Best Regards .", "PS .", "syntax I use : ascmd.exe -S Servername -d Database -i query.mdx -Tf csv -o output.csv", "it may exist but not be attached .", "Right click on the database folder and click attach .", "Select the folder from the list and inform the password if existing", "Thanks I got new error please look at the update", "Thanks for you help", "You need to run Management Studio with highest lever permission .", "Does anyone have some information about that", "Or a link-to download the tool", "All Rights Reserved .", "The system cannot find t ied .", "The system cannot find the file specified ." ] }
{ "confidence": [ 115.85540008544922, 90.53997802734375, 89.92878723144531, 89.11830139160156, 88.87818908691406, 88.14517211914062, 84.37894439697266, 79.8184585571289, 79.56757354736328, 66.08055114746094, 55.379249572753906, 50.19647216796875, 46.16694641113281, 26.699234008789062 ], "content": [ "Question : I need to execute MDX query from command-line MS AS 2005 . I have heard that there is a program named ascmd which can do this . Unfortunately when I went to codeplex page I found that page supposed to deliver an ascmd doesn t work . Please help if you know any other page where I can download ascmd or any other program executing MDX in command-line . Thanks for reply .. . Answer : With MS AS 2005 you should have under sample inst Analysis Services Administrator ascmd CS . where sample inst is the folder where you have installed the samples .. . .. . Typcally : .. . .. . C : Program Files Microsoft SQL Server 90 Samples", "Question : I need to execute MDX query from command-line MS AS 2005 . I have heard that there is a program named ascmd which can do this . Unfortunately when I went to codeplex page I found that page supposed to deliver an ascmd doesn t work . Please help if you know any other page where I can download ascmd or any other program executing MDX in command-line . Thanks for reply .. . Answer : ascmd.exe is included in this MS-SQL Server samples download http : www.codeplex.com SqlServerSamples Release ProjectReleases.aspx ReleaseId 4000 . This is a different page than the one you probably went to originally it has moved . Just click on the SqlServerSamples.msi link .", "Question : Till now I used ascmd to execute some queries to SSAS 2008R2 . My company begin to install some new SSAS 2012 servers and I want to re-use all my maintenance scripts with these new servers . I can t find any ascmd tool in SQL Server 2012 neither any documents or relatives on the internet . Does anyone have some information about that Or a link-to download the tool When I try to execute a query with my version i get the following message : .. . .. . Microsoft R Analysis Services 2008 Command Line Tool Version 10.0.87.5 X86 Copyright C 2008 Microsoft Corporation . All Rights Reserved . Ascmd : Exception trying to impersonate user : Could not load file o crosoft.AnalysisServices Version 10.0.0.0 Culture neutral Publi 5dcd8080cc91 or one of its dependencies . The system cannot find t ied . Ascmd : Execution failed : Could not load file or assembly Microsof ices Version 10.0.0.0 Culture neutral PublicKeyToken 89845dcd80 of its dependencies . The system cannot find the file specified . When I check in C : Windows Assembly I can see that I have the 11.0.0.0 version . How can I deal with it I can t use PowerShell script.. . Thanks Comment : Is that really the actual exact error message text including all of the partial and missing words in the middle Or was that just a cut and paste problem Comment : Why can t you use PowerShell The tool appears to have been migrated to a cmdlet http : msdn.microsoft.com en-us library hh479579.aspx and PowerShell is usually installed and available on all recent Microsoft OSes . Comment : @RBarryYoung c p problem this it the correct one : Microsoft R Analysis Services 2008 Command Line Tool Version 10.0.87.5 X86 Ascmd : Exception trying to impersonate user : Could not load file or assembly Microsoft.AnalysisServices Version 10.0.0.0 Culture neutral PublicKeyToken 89845dcd8080cc91 or one of its dependencies . The system cannot find the file specified . Ascmd : Execution failed : Could not load file or assembly Microsoft.AnalysisServ ices Version 10.0.0.0 Culture neutral PublicKeyToken 89845dcd8080cc91 or one of its dependencies . The system cannot find the file specified . Comment : @Pondlife I can t use powershell for many reasons . One of them is that means to re-write a lot of scripts in another language that we in the company does not know at all not acceptable for my boss . The second important is that the script i m working on must run on several version 2005-2008-2012 so i think it will be a bad decision to run different version one without PS one with PS.. . of the script . It will be very bad to maintain.. . I m quite sure that cmdlet in PS are quite different in 2005 and 2012 Comment : @Pondlife I ve just tried right now with PS and jsut discovered that my company has blocked the PS UnRestricted policy mode.. . And it will not be possible to un-block this.. . : .. . Answer : take the old ascmd solution from microsoft samples delete the old reference dll and add new one it will solve ur problem", "Question : I m trying to see data in my OLAP cube by ascmd utility . As input I put a MDX query but only what I have as output in command-line is a XML file . I tried to use -Tf text and -Tf csv parameters but they don t work in the way I think they should I have a XML on output all the time . I want to have on my output something like this www.pinaldave.com download sqlcmd4.gif -- Is it possible to get text output in ascmd as it is in sqlcmd Thanks for help . Best Regards . PS . syntax I use : ascmd.exe -S Servername -d Database -i query.mdx -Tf csv -o output.csv .. . Answer : I believe that the -Tf is the format for capturing trace output not query results . You could log this as a request in the Issue Tracker on the ascmd site http : www.codeplex.com MSFTASProdSamples . Another possible work around would be to configure a linked-server on your SQL Server and use the OPENQUERY function to send MDX to SSAS .", "Question : Till now I used ascmd to execute some queries to SSAS 2008R2 . My company begin to install some new SSAS 2012 servers and I want to re-use all my maintenance scripts with these new servers . I can t find any ascmd tool in SQL Server 2012 neither any documents or relatives on the internet . Does anyone have some information about that Or a link-to download the tool When I try to execute a query with my version i get the following message : .. . .. . Microsoft R Analysis Services 2008 Command Line Tool Version 10.0.87.5 X86 Copyright C 2008 Microsoft Corporation . All Rights Reserved . Ascmd : Exception trying to impersonate user : Could not load file o crosoft.AnalysisServices Version 10.0.0.0 Culture neutral Publi 5dcd8080cc91 or one of its dependencies . The system cannot find t ied . Ascmd : Execution failed : Could not load file or assembly Microsof ices Version 10.0.0.0 Culture neutral PublicKeyToken 89845dcd80 of its dependencies . The system cannot find the file specified . When I check in C : Windows Assembly I can see that I have the 11.0.0.0 version . How can I deal with it I can t use PowerShell script.. . Thanks Comment : Is that really the actual exact error message text including all of the partial and missing words in the middle Or was that just a cut and paste problem Comment : Why can t you use PowerShell The tool appears to have been migrated to a cmdlet http : msdn.microsoft.com en-us library hh479579.aspx and PowerShell is usually installed and available on all recent Microsoft OSes . Comment : @RBarryYoung c p problem this it the correct one : Microsoft R Analysis Services 2008 Command Line Tool Version 10.0.87.5 X86 Ascmd : Exception trying to impersonate user : Could not load file or assembly Microsoft.AnalysisServices Version 10.0.0.0 Culture neutral PublicKeyToken 89845dcd8080cc91 or one of its dependencies . The system cannot find the file specified . Ascmd : Execution failed : Could not load file or assembly Microsoft.AnalysisServ ices Version 10.0.0.0 Culture neutral PublicKeyToken 89845dcd8080cc91 or one of its dependencies . The system cannot find the file specified . Comment : @Pondlife I can t use powershell for many reasons . One of them is that means to re-write a lot of scripts in another language that we in the company does not know at all not acceptable for my boss . The second important is that the script i m working on must run on several version 2005-2008-2012 so i think it will be a bad decision to run different version one without PS one with PS.. . of the script . It will be very bad to maintain.. . I m quite sure that cmdlet in PS are quite different in 2005 and 2012 Comment : @Pondlife I ve just tried right now with PS and jsut discovered that my company has blocked the PS UnRestricted policy mode.. . And it will not be possible to un-block this.. . : .. . Answer : You can download the 2008 R2 Analysis Management Objects from this page http : www.microsoft.com en-us download details.aspx id 16978 . That includes the 10.0.0.0 version . Comment : It works thanks A little disapointed that the tool is not longer supported in its original form. .", "Question : I m trying to see data in my OLAP cube by ascmd utility . As input I put a MDX query but only what I have as output in command-line is a XML file . I tried to use -Tf text and -Tf csv parameters but they don t work in the way I think they should I have a XML on output all the time . I want to have on my output something like this www.pinaldave.com download sqlcmd4.gif -- Is it possible to get text output in ascmd as it is in sqlcmd Thanks for help . Best Regards . PS . syntax I use : ascmd.exe -S Servername -d Database -i query.mdx -Tf csv -o output.csv .. . Answer : Indeed ascmd utility doesn t provide table output . I think it s because MDX queries can create multidimensional outputs like pivot-tables where there are many elements and hierarchies on rows and on columns . If you need the ability to create output in CSV format try creating static method which transform XMLA to CSV and add it to ascmd source code .", "Question : I need to execute MDX query from command-line MS AS 2005 . I have heard that there is a program named ascmd which can do this . Unfortunately when I went to codeplex page I found that page supposed to deliver an ascmd doesn t work . Please help if you know any other page where I can download ascmd or any other program executing MDX in command-line . Thanks for reply .. . Answer : You will get with SP2 samples . You can download and install it separately from http : www.microsoft.com downloads details.aspx familyid e719ecf7-9f46-4312-af89-6ad8702e4e6e displaylang en http : www.microsoft.com downloads details.aspx familyid e719ecf7-9f46-4312-af89-6ad8702e4e6e displaylang en", "Question : I m looking for tool or a easy way to run xmla script example for create or delete cube . I used to make exe file using Inno Setup program and there I can write command which can run another exe file just like in command-line . I found that there is such tool such as ascmd.exe Readme For Ascmd Command-line Utility Sample https : technet.microsoft.com en-us library ms365187 v sql.90 .aspx . But it was used in older versions of MS SQL . Is there any other for MS SQL Server 2012 and newer versions I can say that I wasn t use ascmd.exe tool because I wasn t able to get this tool I couldn t compile the project in C from here : Readme For Ascmd Command-line Utility Sample http : msftasprodsamples.codeplex.com wikipage title SS2005 Readme 20For 20Command-line 20Utility 20Sample . .. . Answer : I would recommend you download ASCMD StressTestingScripts which contains Ascmd.exe from : https : sqlsrvanalysissrvcs.codeplex.com releases .. . .. . Then create an Ascmd.exe.config file with the following contents in the same directory as Ascmd.exe . This will cause it to use the SQL 2014 . If you want SQL 2012 then change 12.0.0.0 to 11.0.0.0 :", "Question : I m looking for tool or a easy way to run xmla script example for create or delete cube . I used to make exe file using Inno Setup program and there I can write command which can run another exe file just like in command-line . I found that there is such tool such as ascmd.exe Readme For Ascmd Command-line Utility Sample https : technet.microsoft.com en-us library ms365187 v sql.90 .aspx . But it was used in older versions of MS SQL . Is there any other for MS SQL Server 2012 and newer versions I can say that I wasn t use ascmd.exe tool because I wasn t able to get this tool I couldn t compile the project in C from here : Readme For Ascmd Command-line Utility Sample http : msftasprodsamples.codeplex.com wikipage title SS2005 Readme 20For 20Command-line 20Utility 20Sample . .. . Answer : I wrote my own exe file in C which I can run from command-line . Maybe my code will help someone with similar problem . :", "Question : In SSAS 2012 Iam trying to use sqlpls -C Invoke-ascmd -S server -i file.xmla from command-line for cube processing . errorlevel is 0 even if cube processing fails since sqlps executing succesfully.Can any one help me to understand how to do error-handling for sqlps -C Invoke-ascmd in 2012 .. . Answer : SQLPS will always return 0 if the command executed successfully it does not cares about whether the instruction are successful . All you need to do is get the output using out-file option in ASCII code and check for tag . if found it will return 0 else it will return 1 for not found . Check the Findstr command from MS-DOS .. . .. . Example Comment : Find Message tag for error messages .", "Question : I m trying to create OLAP DB via analysis services in SQL Server 2008 with ascmd.exe tool I get the following error : .. . .. . Error ErrorCode 3239313410 Description Errors in the metadata man ager . The database with the name of CosmoComOLAPDB already exists in the LIOR2K8 server . Source Microsoft SQL Server 2008 R2 Analysis Services HelpFile .. . .. . However when I connect to the Analysis Services in SQL Server 2008 Management Studio I can t find it.. . .. . .. . Is it common issue or just on my system Update : .. . When I m trying to Attach and then choose a folder it gives me the following error : .. . .. . Database Administrator or server administrator permissions are required to execute SystemGetLogicalDrives command .. . Answer : The reason i could not see the database is because I was not running in administrative mode Right Click on SQL Server Management - Run As Administrator Then the Analysis Database will appear", "Question : I m trying to create OLAP DB via analysis services in SQL Server 2008 with ascmd.exe tool I get the following error : .. . .. . Error ErrorCode 3239313410 Description Errors in the metadata man ager . The database with the name of CosmoComOLAPDB already exists in the LIOR2K8 server . Source Microsoft SQL Server 2008 R2 Analysis Services HelpFile .. . .. . However when I connect to the Analysis Services in SQL Server 2008 Management Studio I can t find it.. . .. . .. . Is it common issue or just on my system Update : .. . When I m trying to Attach and then choose a folder it gives me the following error : .. . .. . Database Administrator or server administrator permissions are required to execute SystemGetLogicalDrives command .. . Answer : it may exist but not be attached . Right click on the database folder and click attach . Select the folder from the list and inform the password if existing Comment : Thanks I got new error please look at the update Comment : Thanks for you help Comment : You need to run Management Studio with highest lever permission .", "Question : I m pulling my hair out here for that I can t understand what is going on .. . I have the following : .. . .. . 1 . Windows Server 2008 R2 64-bit .. . 2 . SQL Server 2008 R2 64-bit .. . .. . When I run ascmd.exe it giving xml file in order to build OLAP database most of the time the process just gets stuck and the console window is open even after ten minutes with no further messages . However if I check in the SQL Server Managment I can see that the OLAP database is created . Then in other times Same machine Same scenario Same snapshot it succeeds . What can cause this odd behaviour I ve tried to search everywhere but did not find any similar issue .. . I ve tried to replace the ascmd.exe tool with its latest Version 10.0.87.5 .. . .. . I don t know whats causing this please help Thanks Update : Please someone it is very important .. . .. . Update : I think I have a progress on it but can t explain the behaviour . I ve looked into the code of the Ascmd and I ve found that for some reason the trace file log file did not start therefore the code got into a loop forever section and did not get out I ve added prints to the code to check out if it is get stuck here and i ve noticed that it gets stuck on while TraceStarted Thread.Sleep 1 : .. . .. . Does anyone know why the trace file is not started Does it related to Windows Server 2008 hard security rules I cannot remove the trace file since its a requirement for us Any suggestions thanks .. . Answer : Its so frustrating to know that administrative privileges in Windows Server 2008 + SQL Server 2008 could make those errors Running as administrator solved my problem and the OLAP creation process did not stuck", "Question : I have downloaded Samples for MS SQL Server 2005 and I don t know how to get an .exe file from files like ascmd.sln ascmd.cs ascmd.csproj . When I m trying to launch an .sln file in Visual Studio there is an error like : .. . .. . The application for project C : project path project name is not installed .. . .. . Do I need a C compiler or something like that .. . Answer : yes you will need to compile the .CS file . The compilers are part of Visual Studio Express download http : www.microsoft.com express download . You ll want the C Edition . One you have it installed you can run the command csc ascmd.cs to compile . csc is located in windir Microsoft.NET Framework v3.5 csc.exe .. . .. . Alternatively you can compile from the IDE . Just double click the .sln or .csproj file and the IDE will open . CRTL+SHIFT+B compiles . F5 runs . Thev v3.5 will vary based on the version you install ." ] }
[ "yes-answer-long", "yes-answer-short" ]
database
UNK_RELATION
browserstack@web@59
browserstack -- browserstack is a cloud service providing @placeholder browsers and mobile-devices for both manual and automated testing .
{ "confidence": [ 46.34183120727539, 45.52366638183594, 43.91383743286133, 43.38644027709961, 43.20597839355469, 43.09852600097656, 42.209197998046875, 41.944175720214844, 41.361270904541016, 41.361270904541016, 41.361270904541016, 41.361270904541016, 41.361270904541016, 40.898990631103516, 40.82080841064453, 40.76693344116211, 40.76693344116211, 39.87606430053711, 39.72174835205078, 39.58672332763672, 39.35597610473633, 39.35597610473633, 38.873870849609375, 38.409481048583984, 38.409481048583984, 38.409481048583984, 38.409481048583984, 38.409481048583984, 38.18531036376953, 38.167972564697266, 38.167972564697266, 37.696624755859375, 36.9985237121582, 36.9985237121582, 36.9985237121582, 36.924278259277344, 36.73174285888672, 36.65058135986328, 36.65058135986328, 36.51945114135742, 36.47883224487305, 36.47883224487305, 36.39342498779297, 36.39342498779297, 36.39342498779297, 35.51332092285156, 35.2396240234375, 35.216182708740234, 35.216182708740234, 35.216182708740234, 35.216182708740234, 35.088924407958984, 33.912315368652344, 33.866615295410156, 33.866615295410156, 33.80522537231445, 33.80522537231445, 33.80522537231445, 32.6905403137207, 32.6905403137207, 32.430686950683594, 32.21764373779297, 32.092071533203125, 32.092071533203125, 32.092071533203125, 32.092071533203125, 31.32942008972168, 31.279582977294922, 31.234092712402344, 31.234092712402344, 30.914825439453125, 30.914825439453125, 30.914825439453125, 30.914825439453125, 30.914825439453125, 30.914825439453125, 30.914825439453125, 30.914825439453125, 30.68060874938965, 30.65614128112793, 30.552997589111328, 29.503868103027344, 29.503868103027344, 29.503868103027344, 29.503868103027344, 29.503868103027344, 29.503868103027344, 29.503868103027344, 29.45954704284668, 28.282302856445312, 27.848751068115234, 27.848751068115234, 26.87134552001953, 26.87134552001953, 26.87134552001953, 26.511028289794922, 26.511028289794922, 25.333784103393555, 25.333784103393555, 25.084369659423828 ], "content": [ "I am using browserstack-runner https : github.com browserstack browserstack-runner to run the tests on Browserstack https : www.browserstack.com .", "The testswarm-browserstack nodejs module just seems like its ignoring the OS X browsers when it requests browsers from BrowserStack .", "I am using BrowserStack for my testing .", "Now we want to increase the number of browsers and devices under tests so I started to change protractor.conf.js to work with browserstack .", "I ve recently setup an instance of TestSwarm that interfaces with BrowserStack by using the testswarm-browserstack nodejs module https : github.com clarkbox testswarm-browserstack .", "Now I m trying to adapt it to run on multi-browsers following https : github.com browserstack protractor-browserstack blob master conf parallel.conf.js .", "When I move my tests to browserstack to try them on android iPhone it just does not work with those browsers devices .", "ex : .. . .. . So does BrowserStack expects .", "Is it still with Browserstack after the coverage tables are displayed", "I am try to do a functionnal test with browserstack .", "but when I run the test on BrowserStack for firefox it fails .", "BrowserStack message is : Send a sequence of key strokes to an element .", "My company already uses BrowserStack and are very happy with it .", "I was referred to use the nodejs module from a link on BrowserStack site that walked through connecting TestSwarm to BrowserStack .", "To access the local servers on BrowserStack Automate you can follow these steps : .. . .. . 1 .", "These assertions however do not reach BrowserStack .", "I try to configure browserstack-cli .", "I understand there are problems with Browserstack and we have had problems that turned out to be there before however it s difficult to tell if this would in fact be a Browserstack issue", "We have to copy .browserstack folder in home folder install bower browserstack-cli and testem .", "Check the api docs at https : github.com browserstack api .", "The same should work on BrowserStack as well .", "Issues is with browserstack-runner s qunit plugin .", "On a normal multicapabilites logs running on local without browserstack logs are like that : .. . .. . Does anyone knows how to get e2e tests working on multi-browsers using browserstack with the web application under test running on local", "Is there an easier way to force fail the test at BrowserStack", "Bit offtopic but : Browserstack is really awesome piece of software", "The solution is to use BrowserStackLocal and browserstack-cli tools together .", "Download BrowserStackLocal .. . .. . and insert in .browserstack folder in your project .", "Let s call this file runthis.sh and save in .browserstack folder .", "BrowserStack provides some small documentation about TestSwarm and Selenium at http : www.browserstack.com automated-browser-testing-api but since I m absolutely new to the web testing topic I don t see how BrowserStack Selenium and maybe TestSwarm interact together .", "I found the issue reported here https : twitter.com browserstack status 729610910889746433 .", "I still can t send any order to browserstack or saucelabs .", "How can I combine the Selenium test can be in JS or C or whatever with BrowserStack so that BrowserStack executes the test in all browsers I need and then sends some report to me like a bunch of screenshots", "Good guys from BrowserStack support found the solution", "I would like to run tests with protractor and browserstack .", "Below is my browserstack.json .. . .. . Tests are running correctly on browserstack .", "I just started using nightwatch with browserstack and I m noticing that when we get a failed test nightwatch registers the failure but browserstack does not .", "I try to connect together our cicleCI with browserstack and run our integration test and unit tests not only with PhantomJS but on real Firefox and Internet Explorer as well using Browserstack service .", "After that we can use browserstack-cli to launch browsers and running tests from testem .", "So if you update your project on github circleci will launch your test and connect to browserstack and gonna use browsers there.. .", "I run this command : .. . .. . And then I run my tests : .. . .. . In BrowserStack I see this error : .. . .. .", "The original question mentioned issues with BrowserStack for ref I m using v5.1 of the BrowserStackLocal https : www.browserstack.com browserstack-local BrowserStackLocal-darwin-x64.zip for OS X so in all likelihood there is still an issue here .", "That said I noticed on the BrowserStack automate website that all the sessions are closed correctly and the runs are correctly labelled by Intern via the BrowserStack REST API as pass fail etc .", "TestSwarm was created before BrowserStack existed so that relationship was not part of the original design .", "I am Writing scripts for Browserstack using PHP Codeception .", "I m currently trying to get my Protractor tests working with Browserstack .", "I can see in browserstack automate dashboard that all the tests are done within 30 seconds max but it doesn t notify browserstack that tests are done .", "I have written a spec and a config file that run using protractor and browserstack to test a website on different browsers .", "Also I am using free trial version of BrowserStack .", "Are there any ideas how to tell browserstack when a test run failed", "A session on BrowserStack has only three types of statuses : Completed Error or Timeout .", "Browserstack created really nice documentation which covers different languages .", "I m using Selenium to perform testing on BrowserStack and have hit a problem while testing IE8 .", "I use selenium on BrowserStack service and I need to disable chrome notifications ex .", "I was wondering if anyone has been able to integrate Intern.js with BrowserStack and if so how", "You should be able to use BrowserStack with the following Intern configuration for Intern 1 : .. . .. . or this configuration for Intern 2 :", "BrowserStack uses Appium to drive your Selenium tests on iOS .", "browserstack-runner provides the plugin for qunit which I am using .", "Is this correct does Browserstack ignore the X-UA-Compatible-setting", "64bit linux version of BrowserStackLocal : http : www.browserstack.com local-testing Binnaries .. . .. . Create a script .. . .. . which will run and create settings for browserstack-cli .", "When testing my Angular 2 app in BrowserStack IE 9 RC 2 currently I noticed that my app throws the Access is Denied error .", "I haven t been able to get BrowserStack to work yet but I see that other people have like stackoverflow.com questions 24629522 http : stackoverflow.com questions 24629522 working-with-intern-js-and-browserstack-access-the-remote-browser-environment", "If you wish to access your local servers on BrowserStack such as http : localhost : 8080 you can follow these steps : .. . .. . a Setup a Local Testing connection using the binaries https : www.browserstack.com local-testing command-line .", "The way the github seems to talk about browserstack it says that it s necessary to utilize testswarm .", "The web application under tests is running locally so I use browserstack-local as well .", "I would like the Paypal connection to be made directly from the Browserstack remote machine .", "Refer to this article https : www.surevine.com restricting-browserstack-access-within-your-local-network for more info .", "While trying to run automated-tests on BrowserStack to test a webpage on IE11 and Safari I m unable to upload a document from the test-running assembly .", "After some more testing I found out that Browserstack ignores the chrome 1 part of the X-UA-Compatible so Chrome Frame is not activated .", "After adding a few console.log here and there I found the line it was hanging on digdug Tunnel.js : 554 : .. . .. . This line is responsible for closing the Tunnel which in my case was to BrowserStack .", "Since you are able to run the test locally without any issues you should drop in an email to BrowserStack support@browserstack.com sharing the failed session ID .", "sample test I am using https : github.com browserstack automate-node-samples tree master nightwatch .", "Selenium and hence BrowserStack does not have a way of understanding if a test has passed or failed .", "EDIT : Selenium and Testswarm are just examples I don t prefer any framework I just need to automate BrowserStack .", "Yes BrowserStack did infact come through mid-July with browserstack.com automate http : www.browserstack.com automate .", "I can run the test from circleci via tunnel on Browserstack but never report back to circleci server .", "The 64bit linux version of BrowserStackLocal builds up the tunnel from circleCI server to Browserstack server .", "I m getting the following error : browserstack launch chrome --attach exited unexpectedly with exit code 1 . @Zoltan", "As shown below BrowserStack does actually allow you to copy+paste into an IE 8 session .", "TL DR : If I set up a computer to just use testswarm to run tests for the browsers it has open can I do that without having a browserstack account", "I have a configuration working well for one browser which test website running on local inspired from https : github.com browserstack protractor-browserstack blob master conf local.conf.js : .. . .. . The onPrepare part is just to have some test results reports .", "According the the documentation the testswarm-browserstack nodejs module should be able to handle OS X browser request as it uses BrowserStack API version 2.0 https : github.com clarkbox testswarm-browserstack pull 33 .. . .. . Here is a small sample of how I m specifying OS X browser in my TestSwarm configuration file : .. . .. . Any incite would be appreciated thanks", "Locally I do it with the following code but all manuals in Internet didn t help me to get it working on remote ChromeDriver on BrowserStack .", "This should help you run Protractor tests on BrowserStack through the proxy in your network .", "The issue is that automation is currently done using Browserstack so the file would not be available locally when running tests through it .", "THe strange thing here is that they fails ONLY if I execute tests from Jenkins on Browserstack .", "Locally everything just fine locally on browserstack everything is fine on saucelabs everything is fine .", "Sounds like that in this particular case for some reason some magic happens and only on Jenkins and only on Browserstack .", "Has anyone tried integrating browserstack with ember-cli project then please guide me .", "I am currently running my Protractor tests on SauceLabs and BrowserStack and have FileDetector configured so that I can run tests that involve uploading files .", "I know also how to perform this test on browserstack.com manually that is by starting a BrowserStack VM for each browser I need and then perform these steps .", "Does anyone have any suggestions as to how I may send a textual value to a field in IE8 using Selenium and BrowserStack", "This double-clicking is not required when I manually test using IE8 via BrowserStack .", "Here it is being displayed on BrowserStack : .. . .. . It s the same on SauceLabs : .. . .. . The problem lies in the fact that access to these tests aren t restricted--these tests need to be viewed by people in other departments .", "I have followed this post http : stackoverflow.com questions 25537919 running-protractor-tests-on-browserstack-automate I am behind a proxy .", "Also while test is getting executed I see that values are getting changed i even did screenshots and check visual log on browserstack .", "I m able to join the swarm manually with BrowserStack where I manually pull up an OS X browser and browse to the join url on my TestSwarm instance and it will properly pick up the browser and start running tests against it .", "You need to set the capabilities as follows when executing a test on Android emulators Samsung Galaxy S5 on BrowserStack : .. . .. . Note : android for browser needs to be all lower case and for platform all upper case .", "From BrowserStack doc https : www.browserstack.com automate node : .. . .. . REST API .. . .. . It is possible to mark tests as either a pass or a fail using the following snippet : .. . .. . The two potential values for status can either be completed or error .", "@YoniDabush sorry I don t use CircleCI Browserstack at the moment I cannot test it but if the configuration is changed meanwhile and you find the solution please let me know and I update the answer .", "I got registered for free and I got my ids on browserstack website but when I do . node-modules .bin intern-client config tests intern I got this message : .. . .. . Error : The tunnel reported : Could not connect to local.browserstack.com" ] }
{ "confidence": [ 62.036964416503906, 60.17340850830078, 59.91748046875, 59.327457427978516, 57.992164611816406, 57.863739013671875, 56.53594970703125, 55.960060119628906, 53.98461151123047, 50.40555953979492, 49.76527404785156, 48.98867416381836, 48.98225784301758, 48.55681228637695, 48.31981658935547, 48.270076751708984, 47.80900192260742, 47.71129608154297, 47.55109405517578, 47.37238311767578 ], "content": [ "Question : I ve recently setup an instance of TestSwarm that interfaces with BrowserStack by using the testswarm-browserstack nodejs module https : github.com clarkbox testswarm-browserstack . I was referred to use the nodejs module from a link on BrowserStack site that walked through connecting TestSwarm to BrowserStack . Everything seems to be working as expected except that non-Windows OS s don t kick off in my automated process . I have a bunch of OS X browsers configured on TestSwarm that seem to be configured correctly they just never get launched during the automated runs . I m able to join the swarm manually with BrowserStack where I manually pull up an OS X browser and browse to the join url on my TestSwarm instance and it will properly pick up the browser and start running tests against it . The testswarm-browserstack nodejs module just seems like its ignoring the OS X browsers when it requests browsers from BrowserStack . According the the documentation the testswarm-browserstack nodejs module should be able to handle OS X browser request as it uses BrowserStack API version 2.0 https : github.com clarkbox testswarm-browserstack pull 33 .. . .. . Here is a small sample of how I m specifying OS X browser in my TestSwarm configuration file : .. . .. . Any incite would be appreciated thanks .. . Answer : I checked the link and can see the configuration is bit different . It specifies to mention browser version and os . ex : .. . .. . So does BrowserStack expects . Check the api docs at https : github.com browserstack api . Do comment back if you have your own config translator .", "Question : null .. . Answer : I m working on an angular project where we have end-to-end tests using protractor . We use gulp-protractor to run these tests . Every thing works fine on local . Now we want to increase the number of browsers and devices under tests so I started to change protractor.conf.js to work with browserstack . The web application under tests is running locally so I use browserstack-local as well . I have a configuration working well for one browser which test website running on local inspired from https : github.com browserstack protractor-browserstack blob master conf local.conf.js : .. . .. . The onPrepare part is just to have some test results reports . Now I m trying to adapt it to run on multi-browsers following https : github.com browserstack protractor-browserstack blob master conf parallel.conf.js . I end up with that configuration : .. . .. . Tests are launched and worked my reports are generated for each browsers but it never stop . Here the end of console logs : .. . .. . so I have to kill them manually which is not an option as at the end tests will be running in a continuous-integration server . On a normal multicapabilites logs running on local without browserstack logs are like that : .. . .. . Does anyone knows how to get e2e tests working on multi-browsers using browserstack with the web application under test running on local .. . .. . Thanks", "Question : Say I want to perform the following test on my website : .. . .. . Load it into the browser . Click on a button which performs some Javascript . Wait for the Javascript action to complete . Look at how the page appears now . I know how to create a Selenium test for this . I know also how to perform this test on browserstack.com manually that is by starting a BrowserStack VM for each browser I need and then perform these steps . How can I combine the Selenium test can be in JS or C or whatever with BrowserStack so that BrowserStack executes the test in all browsers I need and then sends some report to me like a bunch of screenshots BrowserStack provides some small documentation about TestSwarm and Selenium at http : www.browserstack.com automated-browser-testing-api but since I m absolutely new to the web testing topic I don t see how BrowserStack Selenium and maybe TestSwarm interact together . EDIT : Selenium and Testswarm are just examples I don t prefer any framework I just need to automate BrowserStack . .. . Answer : Currently it is really easy to run automatic tasks on Selenium . Browserstack created really nice documentation which covers different languages . For instance here is the way how you need to do this for C https : www.browserstack.com automate c-sharp . So all you need is to modify a little bit your selenium tests get your API-key if you will subscribe to a this service it will be already on the page and select OS Browser Device you want your tests to be done . As you see everything is almost the same as your selenium test . You can also create screenshots from selenium https : www.browserstack.com automate c-sharp enhancements-screenshots as well as with their screenshot API http : www.browserstack.com screenshots api", "Question : I try to connect together our cicleCI with browserstack and run our integration test and unit tests not only with PhantomJS but on real Firefox and Internet Explorer as well using Browserstack service . I try to configure browserstack-cli . I can run the test from circleci via tunnel on Browserstack but never report back to circleci server . Could you please share your experience if you already played with this stack Thank you very much .. . Answer : The solution is to use BrowserStackLocal and browserstack-cli tools together . The 64bit linux version of BrowserStackLocal builds up the tunnel from circleCI server to Browserstack server . After that we can use browserstack-cli to launch browsers and running tests from testem . Download BrowserStackLocal .. . .. . and insert in .browserstack folder in your project . 64bit linux version of BrowserStackLocal : http : www.browserstack.com local-testing Binnaries .. . .. . Create a script .. . .. . which will run and create settings for browserstack-cli . You have to setup global-variables in circleCI and you can keep your access details there secretly . Let s call this file runthis.sh and save in .browserstack folder . This script will run your BrowserStackLocal binary as well so the tunnel will be exist . CircleCI config .. . .. . circle.yml file mainly depend of your project . We have to copy .browserstack folder in home folder install bower browserstack-cli and testem . An example : .. . .. . Testem config : .. . .. . testem.yml - Most of the part is depend of your project . Important in our case is launchers section . So if you update your project on github circleci will launch your test and connect to browserstack and gonna use browsers there.. . Comment : don t you need to define a machine environment I m getting the following error : browserstack launch chrome --attach exited unexpectedly with exit code 1 . @Zoltan Comment : @YoniDabush sorry I don t use CircleCI Browserstack at the moment I cannot test it but if the configuration is changed meanwhile and you find the solution please let me know and I update the answer . Thank you . :", "Question : Say I want to perform the following test on my website : .. . .. . Load it into the browser . Click on a button which performs some Javascript . Wait for the Javascript action to complete . Look at how the page appears now . I know how to create a Selenium test for this . I know also how to perform this test on browserstack.com manually that is by starting a BrowserStack VM for each browser I need and then perform these steps . How can I combine the Selenium test can be in JS or C or whatever with BrowserStack so that BrowserStack executes the test in all browsers I need and then sends some report to me like a bunch of screenshots BrowserStack provides some small documentation about TestSwarm and Selenium at http : www.browserstack.com automated-browser-testing-api but since I m absolutely new to the web testing topic I don t see how BrowserStack Selenium and maybe TestSwarm interact together . EDIT : Selenium and Testswarm are just examples I don t prefer any framework I just need to automate BrowserStack . .. . Answer : BrowserStack.com http : www.browserstack.com now supports selenium testing end-to-end under the name Automate http : www.browserstack.com automate . There is a documentation http : www.browserstack.com automate getting-started to help you get started with sample code of quite a few programming-languages . As with other products tunnel and several other features are already integrated . Full disclosure : I work for BrowserStack.com . Comment : Bit offtopic but : Browserstack is really awesome piece of software Comment : I get authentication required error when the browser stack hub url hub.browserstack.com wd hub quot http : hub.browserstack.com wd hub quot is passed . Any suggestions how to solve this. . Comment : Unfortunately I m struggling with web-driver behind a proxy that requires a username and password", "Question : Say I want to perform the following test on my website : .. . .. . Load it into the browser . Click on a button which performs some Javascript . Wait for the Javascript action to complete . Look at how the page appears now . I know how to create a Selenium test for this . I know also how to perform this test on browserstack.com manually that is by starting a BrowserStack VM for each browser I need and then perform these steps . How can I combine the Selenium test can be in JS or C or whatever with BrowserStack so that BrowserStack executes the test in all browsers I need and then sends some report to me like a bunch of screenshots BrowserStack provides some small documentation about TestSwarm and Selenium at http : www.browserstack.com automated-browser-testing-api but since I m absolutely new to the web testing topic I don t see how BrowserStack Selenium and maybe TestSwarm interact together . EDIT : Selenium and Testswarm are just examples I don t prefer any framework I just need to automate BrowserStack . .. . Answer : I don t think it s possible at this time.. . .. . .. . Their localhost testing doc http : www.browserstack.com local-testing configuration gives an example of how their command-line works : .. . .. . Command line interface .. . .. . java -jar BrowserStackTunnel.jar TI3PnSeogaDEcwSyiSzm localhost 3000 0 .. . .. . In my experience with selenium that doesn t leave any way of launching the selenium test . Here s an example of how I call a selenium test : .. . .. . I just received an email from them that promised full support for selenium sometime next month May 2013 : .. . .. . We are working on implementing full scale automated testing including Selenium and expect it to be released sometime next month . We will notify you personally once done . Hope this helps . Comment : It s now June did they in fact notify you personally about adding Selenium support In either case do you know what the current state of play is No longer important to me personally but it d be nice to keep this answer up to-date . Comment : it s now August and I only just noticed you pinged me sorry . Yes BrowserStack did infact come through mid-July with browserstack.com automate http : www.browserstack.com automate . I m quite pleased with it . Sample code that works first time . Visual dashboard updates in realtime . 24 hour turn around on email support .", "Question : 1 . I am Writing scripts for Browserstack using PHP Codeception . Here it is my acceptance.yml file .. . .. . But after run the program through the command-line it will be displaying as below error message in command-prompt . 2 . I will-change some script like url : http : localhost : 8080 and browserstack.local : false From the above acceptance.yml file . Then Error being displayed as Unable to Connect to Server .. . .. . Can anyone please give some suggestion to resolve this problem . Comment : WebDriver : should be indented more than config : .. . Answer : You need to set the capabilities as follows when executing a test on Android emulators Samsung Galaxy S5 on BrowserStack : .. . .. . Note : android for browser needs to be all lower case and for platform all upper case . The Code Generator https : www.browserstack.com automate php setting-os-and-browser can be very helpful to specify the capabilities while testing on different browser and OS combinations especially mobile-devices . If you wish to access your local servers on BrowserStack such as http : localhost : 8080 you can follow these steps : .. . .. . a Setup a Local Testing connection using the binaries https : www.browserstack.com local-testing command-line . b Add the capability browserstack.local : true in your scripts .", "Question : I m currently trying to get my Protractor tests working with Browserstack . My automated-tests are run on a staging server that can only be accessed from within a VPN . I am using Browserstacklocal to access the staging server without a problem . My question : Is it possible to direct ONLY the staging server URLs through Browserstacklocal For exemple during my test I go to PayPal Sandbox to purchase an item . I would like the Paypal connection to be made directly from the Browserstack remote machine . .. . Answer : Seems like Browserstacklocal s -only flag does the trick . Refer to this article https : www.surevine.com restricting-browserstack-access-within-your-local-network for more info . Although I wouldn t mind someone explaining what the parameters are . Comment : Documentation on different parameters supported by the Local Testing binaries is available here https : www.browserstack.com local-testing modifiers .", "Question : null .. . Answer : I am writing an automation for uploading a photo to the form . While local tests with .. . .. . works . When I move my tests to browserstack to try them on android iPhone it just does not work with those browsers devices . Could you recommend an approach to handle it properly I am using LocalFileDetector for local images and it works well for IE Chrome Firefox . Mobile version does not . Comment : Uploading of files via your Selenium tests is not supported on mobile-devices due to WebDriver limitation . I would recommend dropping an email to support@browserstack.com for more details .", "Question : Intern.js is a great testrunner but it only appears to work with SauceLabs . My company already uses BrowserStack and are very happy with it . I was wondering if anyone has been able to integrate Intern.js with BrowserStack and if so how .. . Answer : You should be able to use BrowserStack with the following Intern configuration for Intern 1 : .. . .. . or this configuration for Intern 2 : Comment : Shouldn t you update this response for Intern 2 I haven t been able to get BrowserStack to work yet but I see that other people have like stackoverflow.com questions 24629522 http : stackoverflow.com questions 24629522 working-with-intern-js-and-browserstack-access-the-remote-browser-environment", "Question : I m currently trying to get my Protractor tests working with Browserstack . My automated-tests are run on a staging server that can only be accessed from within a VPN . I am using Browserstacklocal to access the staging server without a problem . My question : Is it possible to direct ONLY the staging server URLs through Browserstacklocal For exemple during my test I go to PayPal Sandbox to purchase an item . I would like the Paypal connection to be made directly from the Browserstack remote machine . .. . Answer : The -only parameter restricts the Local Testing access to specified local servers and or folders . Consider the following example : .. . .. . . BrowserStackLocal ACCESS KEY -only localhost 443 1 .. . .. . In this case only the traffic for the domain localhost will be directed to your private server and rest all URL s domains will be accessed directly through our remote VM s . More details on all the Local Testing modifiers can be found here https : www.browserstack.com local-testing modifiers .", "Question : I have written a spec and a config file that run using protractor and browserstack to test a website on different browsers . I am trying to utilize browserstack s mobile device testing feature by editing the config to test a device . When protractor filename-conf is run the following error is returned . WebDriverError : Not yet implementd . Please help us : htttp : appium.io get-involved.html .. . .. . Here is the config that attempts to run the spec on a mobile web browser . Do I need appium to utilize browserstacks mobile testing Comment : What if you remove the directConnect Comment : the capabilities seems like not formatted as well Comment : same error when removing directConnect @alecxe Comment : 1 . change platform : MAC to platformName : iOS 2 . device to deviceName 3 . stackoverflow.com questions 30787588 http : stackoverflow.com questions 30787588 using-protractor-appium-saucelabs 30857288 30857288 .. . Answer : Few changes required as also suggested in the comments to your capabilities -", "Question : I m trying to run my tests against a url that is behind our firewall . I run this command : .. . .. . And then I run my tests : .. . .. . In BrowserStack I see this error : .. . .. . enter image description here http : i.stack.imgur.com 3c0Fk.png .. . .. . I must be doing something wrong when running the BrowserStackLocal binary but I can t figure out what . Any ideas .. . Answer : To access the local servers on BrowserStack Automate you can follow these steps : .. . .. . 1 . Setup the Local Testing connection by executing the Local Testing binaries . 2 . Add the capability browserstack.local true in your scripts . It seems you have done Step 1 have you added the capability as well Comment : Correct not only did I have to use browserstack.local true but I also had to use v4.2 . I set the value to true but it was still failing but when i upgraded to v4.2 of the binary it started working . This was on a linux 64 bit Thanks Comment : After running for a few days it just started failing again . It turns out the binary has changed yet again on browserstack.com local-testing https : www.browserstack.com local-testing Too bad 1 there is no version history of the binaries on that webpage 2 binaries are not backwards compatible 3 no error from the binary when you try to run an older version . ARGH", "Question : While testing my site www.luchtspin.nl with the Utilu IE Collection IE6-8 - http : utilu.com IECollection the results are fine . But as soon as I doublecheck my site via Browserstack.com X-UA-Compatible seems to be ignored . Is this correct does Browserstack ignore the X-UA-Compatible-setting Note : X-UA-Compatible value IE Edge chrome 1 is correctly served through web.config . .. . Answer : After some more testing I found out that Browserstack ignores the chrome 1 part of the X-UA-Compatible so Chrome Frame is not activated . Makes sense of course . On the other hand in the browsers in the Utilu IE Collection in my VM Chrome Frame is activated hence my confusion .", "Question : The way the github seems to talk about browserstack it says that it s necessary to utilize testswarm . However from what I ve been reading it seems to just create virtual users browsers to run all of your unit tests . It looks like you could still use testswarm even without an account but I haven t seen many resources online about this . TL DR : If I set up a computer to just use testswarm to run tests for the browsers it has open can I do that without having a browserstack account .. . Answer : TestSwarm was created before BrowserStack existed so that relationship was not part of the original design . The prerequesties are : .. . .. . PHP .. . MySQL .. . Web Server Apache IIS nodeJS etc .. . A list of paths that reference the executable file of each browser .. . A list of URLs that reference test pages you want TestSwarm to run .. . TestSwarm injection script on each page : .. . .. . script .. . var inject js inject.js + new Date .getTime .. . var foo document.createElement script .. . foo.src inject .. . document.getElementsByTagName head 0 .appendChild foo .. . script .. . .. . .. . Here are some unrelated questions on how to do a self-contained installation : .. . .. . Deploying TestSwarm on IIS7 http : stackoverflow.com questions 1340626 1113772 .. . How to install and setup Testswarm http : stackoverflow.com questions 17629176 1113772 .. . How to create project in testswarm http : stackoverflow.com questions 17695572 1113772", "Question : I use selenium on BrowserStack service and I need to disable chrome notifications ex . on screenshot . Locally I do it with the following code but all manuals in Internet didn t help me to get it working on remote ChromeDriver on BrowserStack . ChromeDriver notification.jpg http : i.stack.imgur.com vz7CI.jpg .. . Answer : Good guys from BrowserStack support found the solution Very thanks to them . This code works in ChromeDriver remotely : .. . .. .", "Question : I have written a spec and a config file that run using protractor and browserstack to test a website on different browsers . I am trying to utilize browserstack s mobile device testing feature by editing the config to test a device . When protractor filename-conf is run the following error is returned . WebDriverError : Not yet implementd . Please help us : htttp : appium.io get-involved.html .. . .. . Here is the config that attempts to run the spec on a mobile web browser . Do I need appium to utilize browserstacks mobile testing Comment : What if you remove the directConnect Comment : the capabilities seems like not formatted as well Comment : same error when removing directConnect @alecxe Comment : 1 . change platform : MAC to platformName : iOS 2 . device to deviceName 3 . stackoverflow.com questions 30787588 http : stackoverflow.com questions 30787588 using-protractor-appium-saucelabs 30857288 30857288 .. . Answer : BrowserStack uses Appium to drive your Selenium tests on iOS . The exception you received probably indicates a certain Selenium command you executed is not supported yet by Appium . You need NOT download Appium to run your Selenium scripts on BrowserStack s mobile testing platform . You simply have to change the capabilities as you ve done and you should be good to go . I would recommend reaching out to BrowserStack s Support support@browserstack.com as they would be the best guys to help you with this : .. . .. . Note : The capabilities you ve mentioned for iOS are correct as given in BrowserStack s documentation here https : www.browserstack.com automate node setting-os-and-browser . You need not make any changes there .", "Question : I am try to do a functionnal test with browserstack . I got registered for free and I got my ids on browserstack website but when I do . node-modules .bin intern-client config tests intern I got this message : .. . .. . Error : The tunnel reported : Could not connect to local.browserstack.com For more information about the message error you can find in the following image : http : i.stack.imgur.com m8xKr.png 1 http : i.stack.imgur.com m8xKr.png 5D 5B1 5D .. . .. . Did you find any error like this one Thanks for your help . .. . Answer : I found the issue reported here https : twitter.com browserstack status 729610910889746433 . Downloading and replacing the binary from BrowserStack s documentation https : www.browserstack.com local-testing command-line solved the issue . Could you try the same Comment : Thanks for your help @Nishant I tried it unfortunately am still having the same error message : . I don t understand the binairies issue . Comment : Can you drop an email at support@browserstack.com with issue details I am sure they will be able to help you . Comment : Alrigth I will do it . Thanks for your advice . @Nishant", "Question : null .. . Answer : am troubleshooting a failing test that verifies a keyboard shortcut on my app . when I run the test locally using selenium driver it passes . but when I run the test on BrowserStack for firefox it fails . BrowserStack message is : Send a sequence of key strokes to an element . g .. . .. . this is the intern test excerpt : .findByCssSelector body .click .type g .. . .. . should I use a different syntax in this scenario since the g is not getting entered into any field thanks Comment : Since you are able to run the test locally without any issues you should drop in an email to BrowserStack support@browserstack.com sharing the failed session ID . They should be able to help you resolve this .", "Question : Our tests are all running successfully and completing and we see the coverage summary following table with TOTAL : tested X platforms 0 X tests failed however the process then seems to hang . I had been able to run them using Intern 3.0.3 however since trying a newer version it now seems to hang all the time even if I specify version 3.0.3 .. . I understand there are problems with Browserstack and we have had problems that turned out to be there before however it s difficult to tell if this would in fact be a Browserstack issue Is it still with Browserstack after the coverage tables are displayed Comment : I am seeing the exact the same thing tests all pass using the intern-runner yet hang after the final line TOTAL : tested... . . .. . Answer : Update : This has now been addressed with an update to digdug BrowserStackTunnel.js https : github.com theintern digdug blob master BrowserStackTunnel.js and looks like it ll form part of the 1.5.0 DigDug release . .. . .. . I took a look into this I m new to Intern and I thought it d be a good way to learn . After spending a bit of time tracing through Intern s Runner and Executor modules I finally landed in the DigDug Tunnel module . After adding a few console.log here and there I found the line it was hanging on digdug Tunnel.js : 554 : .. . .. . This line is responsible for closing the Tunnel which in my case was to BrowserStack . I was able to get the runner to exit cleanly by simply changing from SIGINT to SIGTERM . The question is why doesn t it work with SIGINT According to wikipedia https : en.wikipedia.org wiki Unix signal SIGINT it s nearly identical to SIGTERM . The original question mentioned issues with BrowserStack for ref I m using v5.1 of the BrowserStackLocal https : www.browserstack.com browserstack-local BrowserStackLocal-darwin-x64.zip for OS X so in all likelihood there is still an issue here . But I could see no documentation on the binary . That said I noticed on the BrowserStack automate website that all the sessions are closed correctly and the runs are correctly labelled by Intern via the BrowserStack REST API as pass fail etc . So could there be something within Intern hanging onto the Tunnel Comment : Seems to have made its way into 1.4.0 and Intern 3.1.0 . Thanks very much for investigating" ] }
[ "yes-answer-long", "yes-answer-short" ]
web
UNK_RELATION
cassandra-2.0@apache@64
cassandra-2 .0 -- casandra 2.0 is a nosql database sponsored by @placeholder .
{ "confidence": [ 31.530017852783203, 30.83110809326172, 30.572893142700195, 30.224292755126953, 29.65998649597168, 29.477163314819336, 29.267169952392578, 29.12290382385254, 28.862892150878906, 27.477540969848633, 27.143035888671875, 27.044042587280273, 27.044042587280273, 26.883216857910156, 26.62796974182129, 26.483844757080078, 26.443973541259766, 26.443973541259766, 26.28082847595215, 26.261442184448242, 25.866466522216797, 25.841278076171875, 25.738319396972656, 25.684730529785156, 25.429954528808594, 25.429954528808594, 25.410064697265625, 25.221982955932617, 25.138248443603516, 25.126066207885742, 25.126066207885742, 25.06302261352539, 25.062427520751953, 24.92009925842285, 24.744293212890625, 24.73708724975586, 24.682300567626953, 24.59370231628418, 24.575260162353516, 24.532127380371094, 24.532127380371094, 24.49959945678711, 24.48761749267578, 24.42296028137207, 24.27236557006836, 24.27236557006836, 24.173372268676758, 24.151744842529297, 24.124229431152344, 24.093509674072266, 24.050762176513672, 24.02021598815918, 23.962018966674805, 23.962018966674805, 23.932085037231445, 23.932085037231445, 23.932085037231445, 23.932085037231445, 23.932085037231445, 23.932085037231445, 23.932085037231445, 23.932085037231445, 23.932085037231445, 23.932085037231445, 23.932085037231445, 23.8580265045166, 23.856441497802734, 23.820343017578125, 23.762557983398438, 23.762557983398438, 23.529216766357422, 23.515151977539062, 23.43136215209961, 23.412771224975586, 23.410158157348633, 23.410158157348633, 23.390766143798828, 23.390766143798828, 23.32914924621582, 23.32914924621582, 23.32914924621582, 23.32914924621582, 23.32914924621582, 23.32494354248047, 23.255786895751953, 23.255786895751953, 23.255786895751953, 23.255786895751953, 23.249046325683594, 23.103248596191406, 23.091445922851562, 23.091445922851562, 22.970144271850586, 22.970144271850586, 22.970144271850586, 22.970144271850586, 22.970144271850586, 22.970144271850586, 22.970144271850586 ], "content": [ "https : docs.datastax.com en cassandra-2.0 cassandra dml dml about deletes c.html", "Check the Fire wall : Port setting in the new node .. . .. . http : www.datastax.com documentation cassandra-2.0 cassandra security secureFireWall r.html", "As of cassandra-2.0 .. . .. . If you want to add a user .", "See : http : docs.datastax.com en cassandra-2.0 cassandra dml dml config consistency c.html", "The Datastax instructions for preparing server certificates for Cassandra 2.0 http : www.datastax.com documentation cassandra-2.0 cassandra security secureSSLCertificates t.html drops a parameter that was present in their Cassandra 1.2 instructions http : www.datastax.com documentation cassandra 1.2 cassandra security secureSSLCertificates t.html .", "Cassandra is highly write optimized database .", "I have installed cassandra-2.0 successfully .", "Cassandra 2.1.9 .. . 2 .", "This link http : www.datastax.com documentation cassandra-2.0 cassandra dml dml config consistency c.html in Cassandra s documentation describes the different consistency level s for write .", "Here you can find more info : .. . .. . LIGHTWEIGHT TRANSACTIONS http : www.datastax.com dev blog lightweight-transactions-in-cassandra-2-0 .. . LINEARIZABLE CONSISTENCY http : www.datastax.com documentation cassandra-2.0 cassandra dml dml tunable consistency c.html .. . .. . HTH Carlo", "I think the most straightforward method would be the Node restart method described here http : docs.datastax.com en cassandra-2.0 cassandra operations ops backup snapshot restore t.html .", "Say we have a Cassandra cluster of 2 nodes .", "Change authenticator in cassandra.yaml to AllowAllAuthenticator and restart Cassandra .. . 2 .", "Cassandra is a great database and for what it does it works wonders .", "You can use the following tool to inspect your sstables you may also have to use nodetool flush : datastax.com documentation cassandra-2.0 cassandra tools http : datastax.com documentation cassandra-2.0 cassandra tools toolsSStable2json t.html", "Login as cassandra cassandra .. . 7 .", "I want to connect Tableau software to my cassandra database .", "I am creating a GenericRepository for my Cassandra database using linq .", "Cassandra uses vnodes or virtual nodes http : www.datastax.com dev blog virtual-nodes-in-cassandra-1-2 by default .", "See these references : .. . .. . http : docs.datastax.com en cassandra 2.1 cassandra reference referenceStorage r.html .. . .. . http : www.datastax.com dev blog datastax-community-2-2-0-is-ready-for-download", "I have a cluster of 3 Cassandra 2.0 nodes .", "Internal Authorization https : docs.datastax.com en cassandra-2.0 cassandra security secure config native authorize t.html : This enables permission security within Cassandra .", "It works with the latest version of Cassandra at time of writing .. . .. . 2 .", "This Hive handler should also work for Cassandra 2.0 as it is using CQL3 .", "I m trying to upgrade from Cassandra 1.2.x to 2.x .", "What types of tombstones does Cassandra version 2 support", "Using default Cassandra account cassandra cassandra", "http : stackoverflow.com questions 34611382 is-there-a-way-to-use-facebook-presto-0-131-with-cassandra-3-0-0 .. . .. . I have a lot of data loaded into Cassandra 3.0 and I wouldn t like to rebuild the whole thing .", "However I need to intstall DataStax for interacting with Cassandra Database .", "Cassandra batches : - .. . .. . http : docs.datastax.com en cql 3.1 cql cql reference batch r.html .. . .. . To add to above answers : - With Cassandra 2.0 you can write batch statements + LWT .", "Edit : .. . .. . With debug turned on the seed node logs : .. . .. . I ve pretty carefully created the certs for both servers following the instructions at http : www.datastax.com documentation cassandra-2.0 cassandra security secureSSLCertificates t.html scroll task ds c14 xjy 2k .", "Since the original question has cassandra-2.0 tagged I want to add the link-to the documentation of the newer version of the stress tool : .. . .. . http : docs.datastax.com en cassandra 2.1 cassandra tools toolsCStress t.html .. . .. . The improved stress test tool introduced with Casssandra 2.1 can be used with Cassandra 2.0 clusters .", "ACID are properties of relational databases where BASE are properties of most nosql databases and Cassandra is one of the .", "But I think the LWT will be more expensive as per docs.datastax.com en cassandra 2.2 cassandra dml https : docs.datastax.com en cassandra 2.2 cassandra dml dmlLtwtTransactions.html .", "Would another NoSQL database with support for this type of aggregation function work", "There is no rollback in Cassandra .", "I run KairosDB on a 2-node Cassandra cluster RF 2 Write CL 1 Read CL 1 .", "Please see : DataStax Cassandra 2.1 Documentation http : docs.datastax.com en cassandra 2.1 cassandra initialize initializeSingleDS.html .. . .. . Specifically : auto bootstrap : false Add this setting only when initializing a fresh cluster with no data .", "@BeyhanG l You ll need to configure the properties based on the machine hosting the Cassandra database and the database you wish to connect to .", "I have Cassandra version 2.0 and in it I am totally new in it so the question.. .", "In vanilla Cassandra 2.0 that probably means using a secondary index but there are a number of potential performance pitfalls to watch out for there .", "Check out Automatic Paging http : www.datastax.com dev blog client-side-improvements-in-cassandra-2-0 for more examples .", "I have built Cassandra server 2.0.3 then run it .", "docs.datastax.com en cassandra 2.1 cassandra tools https : docs.datastax.com en cassandra 2.1 cassandra tools toolsCStress t.html", "And i went through the below doc http : www.datastax.com documentation cassandra-2.0 cassandra tools toolsCFstats.html But i did not find the explanation for number of keys in there .", "I have created a project from my work for cassandra 2.0.4 hive 0.11 and hadoop 2.0 .. . .. . try it .. . .. . https : github.com 2013Commons hive-cassandra", "Is there any binding for Cassandra 2.x in R language", "But if Replication factor is 2 and 1 of 2 nodes are down then if I write with a Consistency of 2 Cassandra will not even write to that single node which is available .", "I read about Cassandra 2 s lightweight transactions .", "I am writing an API which queries a Cassandra 2.1.2 based database and returns results in JSON format .", "If that is the Cassandra log file it indicates a bug in Cassandra .", "Hinted handoffs http : docs.datastax.com en cassandra 2.2 cassandra operations opsRepairNodesHintedHandoff.html .. . Repairs - http : docs.datastax.com en cassandra-2.0 cassandra tools toolsRepair.html .. . Read Repairs - those may not help much on your use-case - http : wiki.apache.org cassandra ReadRepair .. . .. . AFAIK if you are running a version greater than 0.8 the hinted handoffs should duplicate the data after node restarts without the need for a repair unless data is too old this should not be the case for 10 minutes .", "I have 2 node cassandra cluster with replication factor as 2 .", "In 5 node-cluster 2 are cassandra 2 are solr and one is on hadoop spark .", "as I am new to Cassandra .", "Cassandra is installed on windows machine .", "Does cassandra not support json", "Regarding Cassandra and paging .", "This doesn t seem possible in Cassandra .", "So why use cassandra for this", "Consistency in Cassandra can is", "Restart cassandra .. . 3 .", "Restart cassandra .. . 6 .", "Is this also the case in Cassandra", "This is not the case in Cassandra because it is not possible .", "I am using two different databases cassandra and mysql .. . .. . I heard about prestoDB and it is kind of amzing tool because we can make sql query in Cassandra Big database .", "Thanks Ananth but I ve check API thydoc.com cassandra javadoc org apache cassandra io sstable http : thydoc.com cassandra javadoc org apache cassandra io sstable CQLSSTableWriter.html no TTL for CQLSSTableWriter .", "Now you should save your data files somewhere safe create another single-node cluster then follow the procedure described here http : www.datastax.com documentation cassandra-2.0 cassandra operations ops snapshot restore new cluster.html .", "I am reading this post http : www.datastax.com documentation cassandra 1.2 cassandra architecture architectureClientRequestsRead c.html on read operations and consistency level in Cassandra .", "Ref : http : docs.datastax.com en cassandra 2.1 cassandra dml dml atomicity c.html .. . .. . So does Cassandra write to a node which is up even if Consistency cannot be met", "The Table should exist in Cassandra .. . 2 .", "Our JDBC Driver for Cassandra allows you to access your Cassandra data in R . To be clear our driver creates a relational interface to your Cassandra data allowing you to submit SQL queries to Cassandra through our driver internally we translate the SQL to CQL send the request and return the results as a relational-database .", "IS cassandra started", "The setup : .. . .. . 2-node Cassandra 2.0.7.31 cluster .. . replicas 1 .. . DataStax java driver 2.0 .. . .. . Problem .. . .. . I am using Datastax java driver for load-balancing .", "Try 2 http : grokbase.com t cassandra user 128ytz5egj cassandra-cqlsh .. . .. . 3 .", "This is not true the current version of RJDBC https : code.google.com a apache-extras.org p cassandra-jdbc works with Cassandra 2.X .", "I am trying to spin up a new node using cassandra 2.0.7 .", "After making the above changes restart all of the cassandra processes .", "I am using cassandra 2.1.9 .", "I was referring to the Cassandra ODBC driver .", "What version of Cassandra are you using", "I am using cassandra 2.1.10 .", "Cassandra is meant to store data for queries .", "Trying to follow this http : www.datastax.com dev blog whats-new-in-cassandra-2-2-json-support to use JSON but it has a strange behaviour .", "I have a 2 node apache cassandra 2.0.3 cluster with rep factor of 1 .", "That makes me ask the question : did you check that the data was correctly populated into Cassandra while node 2 as off", "Using Thrift to connect to Cassandra is deprecated and Hector hasn t processed a pull request in almost 2 years .", "I want to build a RESTful API with Java and Cassandra 2.x on Jersey framework .", "Reach out to cassandra conf cassandra-env.sh location .. . .. . Check out the current heap size You can assign at max of 1 2 RAM to the HEAP .. . .. . if you are changing your current heap-size then remove comment. .", "Initialize the JDBC connection : .. . .. . conn - dbConnect driver Database MyCassandraDB Port 7000 Server 127.0.0.1 .. . .. . .. . Set the Server Port and Database connection properties to connect to Cassandra .", "And I only see the Cassandra CQL shell where is the GUI interface of Cassandra", "Cassandra data-modeling respects Denormalization and duplication of data is a fact of life with Cassandra .", "After setting up a 3 node cassandra cluster cassandra version - 2.1.9 I ran the nodetool status command .", "For this i ve installed the Cassandra ODBC and Simba cassandra ODBC but i got the same problem .", "It turned out that this is a known bug http : stackoverflow.com questions 15157161 copy-command-not-working-in-cassandra in Cassandra 1.2.2 .", "Here https : github.com apache cassandra blob trunk NEWS.txt is cassandra version upgrade news there is no details about the version is stablility .", "Just added other cassandra tags in case someone should know something regarding JSON in cassandra that could help .", "Delete all log files in usr local var lib cassandra commitlog and restart Cassandra .", "Cassandra is contrasting itself to MongoDB by saying : unlike MongoDB all nodes in Cassandra are equal ." ] }
{ "confidence": [ 37.420867919921875, 34.40095901489258, 32.40663528442383, 32.03572082519531, 31.8641357421875, 31.235485076904297, 30.3475341796875, 30.239864349365234, 30.090198516845703, 30.02585220336914, 29.850059509277344, 29.796154022216797, 29.78512191772461, 29.741207122802734, 29.513870239257812, 29.468189239501953, 29.43099594116211, 29.26866912841797, 29.08993148803711, 28.83519744873047 ], "content": [ "Question : I m testing out Cassandra 2.0 as a possible replacement for storing our time-series data . I made a simple table and dumped some of our data into it : .. . .. . I can quite easily perform the most used queries like first value last value current and get statistics via max min count avg etc . But I also need to not only fetch the max value in a range but the sampletime where that value is . For for the given data : .. . .. . I d like the query to return 2015-08-28 01 : 00 and 15 .. . .. . I tried something like this : .. . .. . which would work in normal SQL but Cassandra does not like it . Any ideas Comment : Does it have to be Cassandra . Would another NoSQL database with support for this type of aggregation function work Comment : I m open to other suggestions even though I was evaluating Cassandra now . Comment : Seems I m testing Cassandra 2.2 . Though I downloaded 2.0 but either apt-get updated to 2.2 or I plainly did not see what I was installing . Comment : Nominating ATSD . Posting the details in answer mode to include a screenshot and a description of these aggregators . .. . Answer : Axibase Time-Series Database http : axibase.com products axibase-time-series-database supports MIN VALUE TIME and MAX VALUE TIME aggregators . MIN VALUE TIME returns time in milliseconds when the MIN value was first reached within the period . MAX VALUE TIME returns time in milliseconds when the MAX value was first reached within the period . Multiple aggregators can be combined within the same API request so you can fetch both MAX and MAX VALUE TIME in one go . As for the back-end ATSD uses HBase for raw storage . Disclosure : I work for Axibase . Export Screenshot http : i.stack.imgur.com qKR7z.png .. . .. . UPDATE 1 : Examples on how these aggregators can be represented . Typically you would show timestamps along with MIN and MAX values respectively . This answers the question on what was the maximum and when was it reached . Widget http : i.stack.imgur.com bFjYP.png .. . .. . UPDATE 2 : SQL Console .. . .. . SQL Console http : i.stack.imgur.com mr7B0.png", "Question : I m testing out Cassandra 2.0 as a possible replacement for storing our time-series data . I made a simple table and dumped some of our data into it : .. . .. . I can quite easily perform the most used queries like first value last value current and get statistics via max min count avg etc . But I also need to not only fetch the max value in a range but the sampletime where that value is . For for the given data : .. . .. . I d like the query to return 2015-08-28 01 : 00 and 15 .. . .. . I tried something like this : .. . .. . which would work in normal SQL but Cassandra does not like it . Any ideas Comment : Does it have to be Cassandra . Would another NoSQL database with support for this type of aggregation function work Comment : I m open to other suggestions even though I was evaluating Cassandra now . Comment : Seems I m testing Cassandra 2.2 . Though I downloaded 2.0 but either apt-get updated to 2.2 or I plainly did not see what I was installing . Comment : Nominating ATSD . Posting the details in answer mode to include a screenshot and a description of these aggregators . .. . Answer : You can do this type of query in Cassandra 2.2 . The older 2.0 branch is outdated and has fewer query options than 2.2 . In 2.2 it looks like this : .. . .. . For some more background although CQL Cassandra Query Language looks similar to SQL it has a lot of restrictions on what types of queries you can do . See this http : www.datastax.com dev blog a-deep-look-to-the-cql-where-clause . So you have a few options : .. . .. . 1 . Set up your schema and queries to work within the restrictions of CQL sometimes relying on code in your client to do filtering analysis on a superset of the rows you are actually interested in . 2 . You can create UDF s User Defined Functions and user defined aggregate-functions to do some additional work on the query co-ordinator i.e . using in cluster resources instead of client resources . 3 . You can pair Cassandra with Apache Spark which can do much more complex analytics than CQL but is somewhat complex to set up and use . 4 . In Cassandra 3.0 there is a new feature called materialized-views which lets you define an alternate primary-key for your data to support different query patterns on your dataset than would be supported by the base table . Cassandra 3.0 is currently in beta release . Cassandra 2.2 adds the min max avg and sum functions to CQL along with user-defined-functions so is more powerful than 2.0 . I think over time CQL will slowly gain more SQL functionality but some traditional SQL operations are difficult in a distributed model and will take time to be implemented . Comment : I tried the above but as even your sample shows it returns the max value but not the corresponding sampletime . It selects the first sampletime that matches the range and the max value . Paaland 6 mins ago Comment : Interesting I didn t notice that before . I guess it s a bug or limitation . Then you re probably stuck with trying some of the other approaches I mentioned .", "Question : I have a development-machine that had a single-node Cassandra 2.1.2 setup . The main drive failed but the secondary drive mounted at var is good . I was able to connect this drive to another system with a working OS and Cassandra install and mount it . I can see the files for my database under var cassandra data and would like to recover that data . Nothing outside of var survived -- no configs or binaries . Is it as simple as copying that directory to the var cassandra data directory on the good system or is there some other more detailed procedure for recovering importing that data .. . Answer : All you need to remember from your config files - is what was the partitioner . Now you should save your data files somewhere safe create another single-node cluster then follow the procedure described here http : www.datastax.com documentation cassandra-2.0 cassandra operations ops snapshot restore new cluster.html . The files in your saved data folder is what in these manuals is referred to as snapshot .", "Question : I read about Cassandra 2 s lightweight transactions . Is the consistency level of such a write always at QUORUM Would this mean that even if I have a multi data center setup with 100s of nodes then quorum of the entire cluster majority of the row s replicas across all data centers is involved Won t this be really slow and wont it affect availability Can we do LOCAL QUORUM or EACH QUORUM consistency This would be preferred if writers for data replicated across multiple data centers would always originate from a specific data center only . .. . Answer : The suggested Consistency Level for lightweight transactions is SERIAL . Behind the scenes however SERIAL is even worse than QUORUM because it s a multi-phase QUORUM . As you said the situation can get hard to handle when you have multiple DC -- Datastax estimate effectively a degradation to one-third of normal . There is a LOCAL SERIAL that could be perfect for your situation where all DCs receive data from a specific DC . Here you can find more info : .. . .. . LIGHTWEIGHT TRANSACTIONS http : www.datastax.com dev blog lightweight-transactions-in-cassandra-2-0 .. . LINEARIZABLE CONSISTENCY http : www.datastax.com documentation cassandra-2.0 cassandra dml dml tunable consistency c.html .. . .. . HTH Carlo", "Question : I am trying to spin up a new node using cassandra 2.0.7 . Both nodes are at Digital Ocean . The seed node is up and running and I can telnet to port 7000 on that host from the node I m trying to start . But when I start cassandra on the new node I see the following exception : .. . .. . I m using the murmur3 partition on both nodes and I have the seed node s IP listed in the cassandra.yaml of the new node . I m just wondering what the issue might be and how I can get around it . Comment : Can you try with 2.0.10 Comment : Hey I have the same . Have you resolved it .. . Answer : Check the Fire wall : Port setting in the new node .. . .. . http : www.datastax.com documentation cassandra-2.0 cassandra security secureFireWall r.html", "Question : I would like learn more on cassandra-stress-tool like how I can do the stress test and study the result . When cassandra-stress is executed from the cmd where is the keyspace made How to view them .. . Answer : Since the original question has cassandra-2.0 tagged I want to add the link-to the documentation of the newer version of the stress tool : .. . .. . http : docs.datastax.com en cassandra 2.1 cassandra tools toolsCStress t.html .. . .. . The improved stress test tool introduced with Casssandra 2.1 can be used with Cassandra 2.0 clusters . It uses Yaml profiles and adds the ability to stress test your actual schema with queries that you specify . There is an excellent introduction to it here : http : www.datastax.com dev blog improved-cassandra-2-1-stress-tool-benchmark-any-schema", "Question : I m adding a second node to a single-node cassandra cluster and getting a stack-trace on the second node : .. . .. . There are other SO questions with this same issue but none of the answers have worked for me : .. . .. . Apache Cassandra : Unable to gossip with any seeds http : stackoverflow.com questions 20690987 apache-cassandra-unable-to-gossip-with-any-seeds .. . .. . new cassandra node can t gossip with seed http : stackoverflow.com questions 23874160 new-cassandra-node-cant-gossip-with-seed .. . .. . Datastax Enterprise is crashing with Unable to gossip with any seeds error http : stackoverflow.com questions 23419067 datastax-enterprise-is-crashing-with-unable-to-gossip-with-any-seeds-error .. . .. . I m running Cassandra 2.0.8 and jdk 1.7.0 51 on both nodes . One node is hosted at DigitalOcean the other at Linode . I ve tried configuring them as the same datacenter and as different datacenters in cassandra-rackdc.properties it makes no difference . I ve tried listen address and broadcast address blank and hardcoded makes no difference . I did limit the list of cipher suites to stop a flood of log messages about missing cipher suites . From the stock cassandra.yaml I ve changed the following entries excluding entries related to concurrent writes and compaction . For the sake of this question wherever there s a hardcoded ip-address in the config I ve replaced those with . Each box has a firewall but I ve tried it with the firewalls disabled . I ve also tried it with internode encryption : none and the result is the same . I ve used telnet and netcat to confirm that each host can connect to the other s port 7000 and 7001 . .. . .. . on the original host : .. . .. . on the new host : .. . .. . Edit : .. . .. . Also using netstat I can see that the new server successfully establishes a tcp connection to port 7001 of the original server . Edit : .. . .. . Okay next day . I ve upgraded to java 1.7.0 60 on both machines . Gossip now works with internode encryption : none . I very much doubt the new result is related to the change in JDK it s more likely related to some carelessness in scrubbing directories or the like . I ve commented the line in each config file that lists ciphers . Gossip still fails in the same way with internode encryption : all . The seed node s logs are clean but the other node logs Filtering out TLS RSA WITH AES 256 CBC SHA TLS DHE RSA WITH AES 256 CBC SHA TLS ECDHE RSA WITH AES 256 CBC SHA as it isnt supported by the socket repeatedly until gossip fails . I think the log entry is related to the failure . Why one logs this and the other not I don t know . They re both debian running the same jdk version . Edit : .. . .. . Installing the JCE on both nodes made the filtering warning go away . Still no encrypted internode communication at this point . Edit : .. . .. . With debug turned on the seed node logs : .. . .. . I ve pretty carefully created the certs for both servers following the instructions at http : www.datastax.com documentation cassandra-2.0 cassandra security secureSSLCertificates t.html scroll task ds c14 xjy 2k . .. . Answer : It s now working using either unencrypted or encrypted communications . Encrypted communications started working after installing the JCE extensions on both servers and making a change in certificate generation . The Datastax instructions for preparing server certificates for Cassandra 2.0 http : www.datastax.com documentation cassandra-2.0 cassandra security secureSSLCertificates t.html drops a parameter that was present in their Cassandra 1.2 instructions http : www.datastax.com documentation cassandra 1.2 cassandra security secureSSLCertificates t.html . Including the parameter seemed to make the difference . The additional parameter is -keyalg RSA : .. . .. . Then make sure both servers have both certs and use them to create a trust store using these commands on both servers :", "Question : I ve a cassandra table definition as following .. . .. . I want to know if number of tombstones would vary between following types of queries : .. . .. . Above query affect multiple records multiple values of colC .. . .. . However 2nd query needs to be executed for each value of last column colC while 1st query takes care of deletion in one execution .. . .. . Will Cassandra create same number of tombstones in both the cases Comment : Is there a tool using which I could inspect the tombstones created in Cassandra That could help answer my question very easily . Comment : You can use the following tool to inspect your sstables you may also have to use nodetool flush : datastax.com documentation cassandra-2.0 cassandra tools http : datastax.com documentation cassandra-2.0 cassandra tools toolsSStable2json t.html .. . Answer : Cassandra will create a single tombstone for each delete statement . However each statement will create a different type of tombstone . 1 . delete from mytable where colA .. . AND colB .. . and timeCol 111 .. . .. . Will create a row level tombstone : .. . .. . key : 00032e2e2e0000032e2e2e000008000000000000006f00 metadata : deletionInfo : markedForDeleteAt : 1427461335167000 localDeletionTime : 1427461335 columns : .. . .. . Row level tombstones will make sure all columns will be covered with the delete . 2 . delete from mytable where colA .. . AND colB .. . and timeCol 111 AND colC .. . .. . .. . Creates a column tombstone : .. . .. . key : 00032e2e2e0000032e2e2e000008000000000000006f00 columns : .. . .. . : 1427461572135000 t 1427461572 .. . .. . This will only delete values that have been saved under this clustering key . Comment : For a combination of colA colB timeCol i.e . a b 1111 I ve 4 values of colC . So the data is like following : colA colB timeCol colC ---------------------------------- a b 111 c1 a b 111 c2 a b 111 c3 a b 111 c4 ----- Delete using only 1st 3 columns . . where colA a and colB b and timeCol 111 ------ Delete using all 4 columns ...where colA a and colB b and timeCol 111 and colC c1 and run it 4 times with different value of colC . Are you saying that no . of tombstones will be 4 in 2nd query-set and only 1 tombstone in 1st query Comment : Yes you get a tombstone for each value of colC .", "Question : null .. . Answer : Im using Cassandra 2.0.3 in Initial Token . Having one data center DC1 with three nodes . Now wants to convert from Initial Token to Virtual Token so i follow the instructions noted Enabling virtual nodes on an existing production cluster http : docs.datastax.com en cassandra-2.0 cassandra configuration configVnodesProduction t.html .. . .. . And i used Hector Client with Consistency level LOCAL QUORUM for read and wirte . After i change all configuration-files when i UP single node in DC2 from Hector Client i can t read existing data but i can write data . And I can read the newly written data .", "Question : Suppose I have a column family : .. . .. . With two secondary indexes where record link id is a high-cardinality column : .. . .. . According to my knowledge Cassandra will create two hidden column families like so : .. . .. . Cassandra secondary indexes are implemented as local indexes rather than being distributed like normal tables . Each node only stores an index for the data it stores . Consider the following query : .. . .. . 1 . How will this query execute under the hood in Cassandra 2 . How will a high-cardinality column index record link id affect its performance 3 . Will Cassandra will touch all nodes for the above query Why .. . 4 . Which criteria will be executed first base table partition key or secondary index partition key How will Cassandra intersect these two results Comment : My 2 cents : Since you specified a full partition key it makes no sense to query all the nodes . It should clearly only query a node responsible for 35 78005 . Due to the way Cassandra is designed I m expecting it to consider reducing the number of involved nodes as a priority . Given that the only involved node should probably look at how many records it has for 35 78005 and how many it has in the index for record link id 9897 and use the fastest one to serve the query which isn t necessarily the smallest one depending on whether the index is also sorted by primary-key . Comment : My theory seems to be supported by docs.datastax.com en cql 3.0 cql ddl http : docs.datastax.com en cql 3.0 cql ddl ddl using multiple indexes.html Comment : if this the way then creating index over high-cardinality columns will be the fastest and best data model if you are including partition key also in criteria . .. . Answer : Query with only secondary index is also possible in Cassandra 2.x .. . .. . select from update audit where record link id 9897 .. . .. . But this has a large impact on fetching data because it reads all partitions on distributed environment . The data fetched by this query is also not consistent and could not relay on it . Suggestion : .. . Use of Secondary index is considered to be a DIRT query from NoSQL Data Model view . To avoid secondary index we could create a new table and copy data to it . Since this is a query of the application Tables are derived from queries .", "Question : This link http : www.datastax.com documentation cassandra-2.0 cassandra dml dml config consistency c.html in Cassandra s documentation describes the different consistency level s for write . If I am okay with data-loss and want the best write performance possible on a 3 node-cluster with replication of 2 - which one should I choose between ANY and ONE Which one is better for brute-force performance of writes I use Astyanax client library and it uses a default of CL ONE . But it also has an option of CL ANY .. . Answer : ANY will give you the fastest write performance if you don t care about possible loss but you can easily overload your nodes with it such that you cause extra loss . So if you are going to have sustained writes to your cluster then I would recommend ONE . If your sustained write load isn t going to be such that you can t keep up then you should be fine using ANY .", "Question : Getting following exception while connecting to Cassandra Cluster withAuthentication : .. . .. . Exception in thread main com.datastax.driver.core.exceptions.AuthenticationException : Authentication error on host 127.0.0.1 : SASL Authentication is not supported in version 1 of the protocol at com.datastax.driver.core.Connection.waitForSaslCompletion Connection.java : 203 at com.datastax.driver.core.Connection.initializeTransport Connection.java : 169 .. . .. . I am using PasswordAuthenticator and CassandraAuth in Config file . Using default Cassandra account cassandra cassandra Comment : What version of the driver and what version of cassandra Comment : The datastax java driver does not work with dse as it relies on C 2.0 SASL . Comment : Driver : Earlier I was using 1.0.5 and now 1.0.5-dse Cassandra : 2.0.3 .. . Answer : DSE distributes a patched driver for use with DSE 3.1 authentication . See https : github.com datastax java-driver tree 1.0 and this.. . .. . .. . DSE users should use the following Maven dependency note the version is set to 1.0.5-dse : Comment : Hi Darlo Thanks for replying . But I am still getting same error even on using maven-dependency 1.0.5-dse Comment : I am also running into this issue and I can t update to the version 2 driver as a third party library depends on 1.0.5-dse .", "Question : I have Cassandra version 2.0 and in it I am totally new in it so the question.. . I have table T1 with columns with names : 1 2 3...14 for simplicity Partitioning key is column 1 2 Clustering key is column 3 1 5 I need to perform following query : .. . .. . Column 2 is a flag so values are repeating . I get the following error : .. . .. . So what is the right way to do it I really need to get the data that already filtered . Thanks . .. . Answer : So to make sure I understand your schema you have defined a table T1 : .. . .. . Correct If this is the case then Cassandra cannot find the data to answer your CQL query : .. . .. . because your query has not provided a value for column 1 without which Cassandra cannot compute the partition key which requires per your composite PRIMARY KEY definition both columns 1 and 2 and without that it cannot determine where to look on which nodes in the ring . By including 2 in your partition key you are telling Cassandra that that data is required for determine where to store and thus where to read that data . For example given your schema this query should work : .. . .. . since you are providing both values of your partition key . @Caleb Rockcliffe has good advice though regarding the need for other secondary supplemental lookup mechanisms if the above table definition is a big part of your workload . You may need to find some way to first lookup the values for 1 and 2 then issue your query . E.g . : .. . .. . Given a value for 1 the above will provide all of the possible 2 values through which you can then iterate : .. . .. . And then for each 1 and 2 combination you can then issue your query against table T1 : .. . .. . Hope this helps Comment : This helps a lot thank you . So does it mean that for the T1 index I need to do separate insert each time I insert to T1 Comment : Yes unfortunately . Cassandra likes denormalization which effectively means duplication . And it does not support foreign key constraints or things of that sort so your application code needs to know to write to the multiple relevant tables and to read from them . Comment : I just spent some time trying this and that in my schema and it seems I found a solution for my task based on what you ve shown . So we can say that for each specific select query I need to create a separate table and include that table in inserting batch in my code and that s fine as soon as these inserts are negligible rare right So Cassandra is for huge amount of reads and occasional inserts or updates right Again I am new in it and completely RDBMS guy Is there any mechanism inside Cassandra to keep all that tables updated instead of having multiples inserts in my code Comment : Actually Cassandra is optimized for writes it s the reads which are expensive . That s why the denormalization duplication is useful it helps improve Cassandra read latency . And no as far as I know there s nothing built into Cassandra to automatically keep related tables updated based on a single write insert . A large part of Cassandra s speed and scaling abilities come from not having that sort of schema relationships enforced by the database those relationships are treated as business or application logic and left to your application to handle . Comment : Cool thanks a lot . It helped hugely .", "Question : Output .. . .. . Error in .jcall drv@jdrv Ljava sql Connection connect as.character url 1 : java.lang.NoClassDefFoundError : org apache thrift transport TTransportException Comment : Are you using windows machine Comment : no using ubuntu 14.04 .. . Answer : Our JDBC Driver for Cassandra allows you to access your Cassandra data in R . To be clear our driver creates a relational interface to your Cassandra data allowing you to submit SQL queries to Cassandra through our driver internally we translate the SQL to CQL send the request and return the results as a relational-database . We have an article http : www.cdata.com kb tech cassandra-jdbc-r.rst in our Knowledge Base for connecting but I ll transcribe it here as well . 1 . Load the RJDBC Package : .. . .. . library RJDBC .. . .. . .. . 2 . Set the driver class and classpath : .. . .. . driver - JDBC driverClass cdata.jdbc.cassandra.CassandraDriver classPath MyInstallationDir lib cdata.jdbc.cassandra.jar identifier.quote .. . .. . .. . 3 . Initialize the JDBC connection : .. . .. . conn - dbConnect driver Database MyCassandraDB Port 7000 Server 127.0.0.1 .. . .. . .. . Set the Server Port and Database connection properties to connect to Cassandra . At this point you can perform standards actions available in R like : .. . .. . Listing the tables : .. . .. . dbListTables conn .. . .. . .. . Executing any SQL query supported by the Cassandra API : .. . .. . customer - dbGetQuery conn SELECT City SUM TotalDue FROM Customer GROUP BY City .. . .. . .. . Viewing the results : .. . .. . View customer .. . .. . .. . Feel free to download a free Beta http : www.cdata.com drivers cassandra download jdbc of the driver If you have any questions please let us know . Comment : Unable to connect JDBC to Database MyCassandraDB Port 9160 Server 127.0.0.1 I got this error at the 3.step tried 700 9042 but all of this gave error Comment : @BeyhanG l You ll need to configure the properties based on the machine hosting the Cassandra database and the database you wish to connect to . While I m happy to help debug minor issues here if you continue to run into errors our Support Team http : www.cdata.com support submit.aspx will be happy to help .", "Question : I ve been recently attempting to send a workload of read operations to a 2-node Cassandra cluster version 2.0.9 with rf 2 . My intention was to send a number of reads at a rate that is higher than the capacity of my backend servers thereby overwhelming them and resulting in server-side queuing . To do so I m using the datastax java driver cql version 2 to run my operations asynchronously in other words the calling thread doesn t block waiting for a response . The problem is that I m unable to reach a high-enough sending-rate to overload my backend servers . The of requests that I m sending is being somehow throttled by Cassandra . To confirm this I ve ran clients from two different machines simultaneously and the total number of requests sent per unit time is still peaking at the same value . I m wondering if there s a mechanism that is employed by Cassandra to throttle the amount of requests that are being received Otherwise what else might be causing this behavior .. . Answer : Each request received by Cassandra will be handled by multiple thread pools implementing a staged event-driven architecture https : en.wikipedia.org wiki Staged event-driven architecture where requests will be queued for each stage . You can use nodetool tpstats http : docs.datastax.com en cassandra-2.0 cassandra tools toolsTPstats.html to inspect the current status of each queue . Once too many requests are about to overwhelm the server Cassandra will shed load by dropping requests once queues are about to reach their capacity . You ll notice this by numbers shown in the dropped section of tpstats . In case no requests are dropped all of them will eventually complete but you may see higher latencies using nodetool cfhistograms http : docs.datastax.com en cassandra-2.0 cassandra tools toolsCFhisto.html or WriteTimeoutExceptions on the client . Comment : I ve checked the codebase for Cassandra s threadpoolexecutor and my understanding is that the workqueue is practically unbounded i.e . the maximum size is by default set to an arbitrarily high value . However even assuming that this is not true tpstats reports 0 blocked dropped operations . Comment : It s also important to note that the java driver client I m utilizing is not timing out on any requests and that Cassandra s queues aren t exploding i.e . they keep fluctuating between 0 and 300 . However despite all this I can t manage to exceed a certain sending rate in my experiments .", "Question : Say I have a 50 node-cluster and my replication factor 3 and Write Consistency Level Quorum which is 50 2 + 1 26 and Read Consistency Level ONE . Now we satisfy the equation R + W N because 26 + 1 3 but how does this guarantee strong consistency what if my write goes to first 26 nodes and I happen to read from node 45 . How can I get the most updated value .. . Answer : Consistency Level The number of acknowledgements that REPLICA nodes need to give the coordinator in order to satisfy a request . So in your example CL QUORUM 2 because 2 is the majority of RF 3 . Plugging that back into the equation.. . 2 + 1 3 3 3 there for you don t have 100 consistency . See : http : docs.datastax.com en cassandra-2.0 cassandra dml dml config consistency c.html", "Question : I am trying to setup a KairosDB installation using Cassandra as backend but I am facing the following error : .. . .. . HThriftClient.java : 152 - Creating a new thrift connection to localhost 127.0.0.1 : 9042 ERROR HConnectionManager.java : 418 - MARK HOST AS DOWN TRIGGERED for host localhost 127.0.0.1 : 9042 ERROR HConnectionManager.java : 422 - Pool state on shutdown : : localhost 127.0.0.1 : 9042 IsActive : true Active : 1 Blocked : 0 Idle : 15 NumBeforeExhausted : 49 .. . .. . HConnectionManager.java : 303 - Exception : me.prettyprint.hector.api.exceptions.HectorTransportException : org.apache.thrift.transport.TTransportException : Read a negative frame size -2080374784 at me.prettyprint.cassandra.service.ExceptionsTranslatorImpl.translate ExceptionsTranslatorImpl.java : 39 hector-core-1.1-4.jar : na .. . .. . I already checked the cassandra opened port and it is set to 9042 . Also I set start rpc to true on cassandra.yaml file . Any idea on further troubleshooting Comment : Make sure no firewall is blocking your ports . Which IP interface are you binding Cassandra to rpc address or rpc interface in cassandra.yaml Comment : Using Thrift to connect to Cassandra is deprecated and Hector hasn t processed a pull request in almost 2 years . In fact Hector s main page even tells you not to use it anymore . Switch over to the DataStax Java driver and you ll be a lot happier . .. . Answer : What version of Cassandra are you using I think thrift is disabled in newer versions of Cassandra you may enable the protocol by modifying Cassandra.yaml and restarting cassandra or maybe by using nodetool .", "Question : Getting following exception while connecting to Cassandra Cluster withAuthentication : .. . .. . Exception in thread main com.datastax.driver.core.exceptions.AuthenticationException : Authentication error on host 127.0.0.1 : SASL Authentication is not supported in version 1 of the protocol at com.datastax.driver.core.Connection.waitForSaslCompletion Connection.java : 203 at com.datastax.driver.core.Connection.initializeTransport Connection.java : 169 .. . .. . I am using PasswordAuthenticator and CassandraAuth in Config file . Using default Cassandra account cassandra cassandra Comment : What version of the driver and what version of cassandra Comment : The datastax java driver does not work with dse as it relies on C 2.0 SASL . Comment : Driver : Earlier I was using 1.0.5 and now 1.0.5-dse Cassandra : 2.0.3 .. . Answer : Th problem is resolved by using the following maven-dependency : Comment : Thanks for the update . That does actually make sense .", "Question : I have Cassandra version 2.0 and in it I am totally new in it so the question.. . I have table T1 with columns with names : 1 2 3...14 for simplicity Partitioning key is column 1 2 Clustering key is column 3 1 5 I need to perform following query : .. . .. . Column 2 is a flag so values are repeating . I get the following error : .. . .. . So what is the right way to do it I really need to get the data that already filtered . Thanks . .. . Answer : Your WHERE clause needs to include the first element of the partition key . Comment : Yes this is exactly what error says . But how to get what I need the right way Comment : If you don t have any data-modeling flexibility and you need to cut across partitions you might want to consider an indexing strategy . In vanilla Cassandra 2.0 that probably means using a secondary index but there are a number of potential performance pitfalls to watch out for there . If this query is a big part of your read workload you might want to consider modeling your data so that the key you re restricting is a prefix of the primary-key .", "Question : I want to connect Tableau software to my cassandra database . Note that i m using tableau in windows7 and cassandra in ubuntu Virtual machine . For this i ve installed the Cassandra ODBC and Simba cassandra ODBC but i got the same problem . I got a connexion succes and i found my keyspace but not my tables Connexion success http : i.stack.imgur.com ePnR1.jpg .. . .. . No table http : i.stack.imgur.com L1pHK.png .. . .. . But no table in cim keyspace Note that in my keyspace cim i have 3 tables that i can request with any problem in cassandra . Is there something i should do before creating the ODBC driver Thank you for your help .. . Answer : Update Simba ODBC driver for Cassandra supports CQL3 and solves your problem . http : www.simba.com connectors apache-cassandra-odbc" ] }
[ "yes-answer-long", "yes-answer-short" ]
apache
UNK_RELATION
inversion-of-control@procedural-programming@204
inversion-of-control -- inversion-of-control ioc is an abstract principle describing an aspect of some software architecture designs in which the flow of control of a system is inverted in comparison to @placeholder .
{ "confidence": [ 72.6739273071289, 70.01219940185547, 69.01170349121094, 63.5832405090332, 61.700721740722656, 61.37603759765625, 61.37603759765625, 59.793846130371094, 58.40843200683594, 58.330169677734375, 55.59299850463867, 55.25912094116211, 55.25912094116211, 55.25912094116211, 54.463565826416016, 54.439125061035156, 54.439125061035156, 54.16496658325195, 54.047035217285156, 53.713584899902344, 53.713584899902344, 53.641845703125, 53.573184967041016, 53.573184967041016, 52.213253021240234, 52.03125, 51.782386779785156, 51.782386779785156, 51.782386779785156, 51.782386779785156, 51.68431854248047, 51.68431854248047, 51.38592529296875, 50.509765625, 50.509765625, 50.509765625, 50.509765625, 50.509765625, 50.509765625, 50.509765625, 50.509765625, 50.26546096801758, 50.26546096801758, 49.9615478515625, 49.67000961303711, 49.124351501464844, 49.124351501464844, 49.124351501464844, 49.124351501464844, 49.124351501464844, 48.84735107421875, 48.73651885986328, 48.73651885986328, 48.116111755371094, 48.05653381347656, 47.99753189086914, 47.463897705078125, 47.463897705078125, 47.463897705078125, 47.32395935058594, 47.056129455566406, 46.980995178222656, 46.43464660644531, 45.891021728515625, 45.891021728515625, 45.51610565185547, 45.51610565185547, 45.51610565185547, 45.51610565185547, 45.38373947143555, 45.304508209228516, 45.07024383544922, 44.834228515625, 44.4620246887207, 44.45694351196289, 44.1124153137207, 44.1124153137207, 44.1124153137207, 44.1124153137207, 44.1124153137207, 44.1124153137207, 44.1124153137207, 44.1124153137207, 44.1124153137207, 44.1124153137207, 44.1124153137207, 44.1124153137207, 44.1124153137207, 43.964210510253906, 43.70094299316406, 43.6636848449707, 43.249168395996094, 42.72700500488281, 42.72700500488281, 42.72700500488281, 42.72700500488281, 42.72700500488281, 42.72700500488281 ], "content": [ "About IoC Inversion of Control see : What is Inversion of Control", "To understanding the concept Inversion of Control IoC or Dependency Inversion Principle DIP involves two activities : abstraction and inversion .", "Thus inversion-of-control inverts the flow of control of the program .", "If told in layman s term inversion-of-control implies change in flow of control in the program .", "Inversion of Control simply states that control whatever that is is inverted .", "What is Inversion of Control", "So it is called as inversion-of-control .", "Inversion of Control or IoC can be quite confusing when it is first encountered .", "this is referred as Spring IOC container because of it provides Spring Inversion of Control .", "in connection with Inversion of Control .", "Inversion of control is a pattern used for decoupling components and layers in the system .", "I ve got three questions about inversion-of-control .", "http : stackoverflow.com questions 3058 what-is-inversion-of-control", "there are several basic techniques to implement inversion-of-control .", "One is that we haven t bothered to use the IoC qualifier which is essentially redundant - since calling something a framework implies the inversion-of-control flow .", "Inversion of Control IoC means that objects do not create other objects on which they rely to do their work .", "IoC - Inversion of control is generic term independent of language it is actually not create the objects but describe in which fashion object is being created .", "The combination and management of components is usually delegated to Inversion of Control http : abdullin.com wiki inversion-of-control-ioc.html Container .", "Inversion of Control is a generic principle while Dependency Injection realises this principle as a design pattern for object graph construction i.e .", "Inversion of Control is a pattern implementation of the Dependency Inversion Principle where abstract dependencies replace concrete dependencies allowing concretions of the dependency to be specified outside of the object .", "Example 2 : .. . .. . Here we observe the Dependency Inversion Principle and Inversion of Control since an abstract ICatSkinner is provided in order to allow concrete dependencies to be passed in by the programmer .", "According to the paper written by Martin Fowler : http : martinfowler.com bliki InversionOfControl.html inversion-of-control is the principle where the control-flow of a program is inverted : instead of the programmer controlling the flow of a program the external sources framework services other components take control of it .", "IOC Inversion Of Controller : Giving control to the container to get instance of object is called Inversion of Control . means instead of you are creating object using new-operator let the container do that for you .", "IOC Inversion Of Controller : Giving control to the container to get instance of object is called Inversion of Control . means instead of you are creating object using new-operator let the container do that for you .", "That s how Dependency Injection Inversion of Control works .", "This is because DIP takes advantage of two different Software Design Principles : IoC Inversion of Control and DI Dependency Injection .", "The Inversion of Control IoC and Dependency Injection DI patterns are all about removing dependencies from your code .", "-- .. . .. . The inversion part of the Inversion of Control IoC is the confusing thing because inversion is the relative term .", "Using an IoC container is a subset of inversion-of-control http : en.wikipedia.org wiki Dependency inversion principle not the whole thing .", "You can use inversion-of-control as a design construct without relying on an IoC container framework .", "Questions : .. . .. . Is IoC a direct implementation of the Dependency Inversion Principle", "Is IoC a direct implementation of the Dependency Inversion Principle", "In short IoC is a much broader term that includes but is not limited to DI .. . .. . The term Inversion of Control IoC originally meant any sort of programming style where an overall framework or run-time controlled the program flow .. . .. . Before DI had a name people started to refer to frameworks that manage Dependencies as Inversion of Control Containers and soon the meaning of IoC gradually drifted towards that particular meaning : Inversion of Control over Dependencies .", "See also on Programmers.SE : Why is Inversion of Control named that way", "http : programmers.stackexchange.com questions 205681 why-is-inversion-of-control-named-that-way", "Inversion of Control is what you get when your program callbacks e.g .", "You divorced you have just implemented Inversion of Control .", "Your boss implemented Inversion of Control by setting up a new coffee machine .", "You find a job you have implemented Inversion of Control .", "http : stackoverflow.com questions 3058 what-is-inversion-of-control 99100 .. . .. . 2 .", "At its simplest inversion-of-control can be stated in this context as supply don t instantiate .", "In other words Inversion control is about frameworks .", "A framework is a reusable library that does apply Inversion of Control .", "Inversion of control is a design paradigm with the goal of giving more control to the targeted components of your application the ones getting the work done .", "By my book Inversion of Control principle is same as here http : stw.castleproject.org Windsor.Inversion-of-Control.ashx so I won t rehash it .", "I have implemented my own inversion-of-control methodology in MVC 2 .", "Inversion of Control is too generic a term and thus people find it confusing .", "That s an assurance given Fowler s statement : Inversion of Control is too generic a term .", "Otherwise it s not dependency-injection and inversion-of-control but service location .", ".. . Inversion of control is a common feature of frameworks but it s something that comes at a price .", "Flow of control is inverted by dependency-injection because you have effectively delegated dependancies to some external system e.g .", "The answer you are looking for likely will be found in Why and what of Inversion of Control http : www.pocomatic.com docs whitepapers ioc by Ke Jin .", "I ve never felt a need to use an Inversion of Control http : en.wikipedia.org wiki Inversion of control IoC container .", "That control has been inverted .", "Do note that we as developers can only apply Inversion of Control if we are writing a framework ourselves you can t apply inversion-of-control as an application developer .", "Inversion of control is a practical way to reduce code duplication and if you find yourself copying an entire method and only changing a small piece of the code you can consider tackling it with inversion-of-control .", "For example what if we use separation-of-concerns but don t do inversion-of-control .", "@DarinDimitrov DI is a poor but common name for the Inversion of Control pattern .", "The app is using the following design-patterns : dependency-injection inversion-of-control container .", "My understanding of these things is : .. . .. . The Dependency Inversion Principle implies that objects should depend upon abstractions not concretions - this is the fundamental principle upon which the Inversion of Control pattern and Dependency Injection are implemented .", "In some definitions of an application framework Inversion of Control is the main property that is viewed as distinguishing a framework from a library .", "By implementing Inversion of Control a software object consumer get more controls options over the software objects instead of being controlled or having less options .", "Don t get me wrong I love dependency-injection and the inversion-of-control principle but I think the IOC container could be used responsibly but just be aware of the battles that you will need to fight because of the above list .", "That s a corollary of the Dependency Inversion Principle .", "But does that breaks Dependency Inversion Principle", "Dependency Injection is a design pattern that implements Inversion of Control and provides dependency-resolution .", "A reusable library that does not apply Inversion of Control is merely a library .", "BTW I m not sure if MEF is the best choice as inversion-of-control container.. .", "This paradigm in many languages requires inversion-of-control in order to satisfy this paradigm .", "Note that by doing this you re actually using the container as a Service Locator which doesn t decouple things as well as inversion-of-control .", "Inversion of Control is : .. . .. . a design in which custom-written portions of a computer program receive the flow of control from a generic reusable library source https : en.wikipedia.org wiki Inversion of control .. . .. . Inversion of control is allowing us to hook our custom code into the pipeline of a reusable library .", "That control should be inverted .", "IoC is a mechanism of Dependency Inversion but containers are those which uses IoC .", "This leads to loosely coupled application development . .. . .. . Inversion of Control IoC Container : .. . This is common characteristic of frameworks IOC manages java objects .. . from instantiation to destruction through its BeanFactory .", "Inversion", "MVC http : en.wikipedia.org wiki Model view controller was invented on Smalltalk and is arguably the original Inversion of Control http : en.wikipedia.org wiki Inversion of control framework .", "Inversion of Control is a design pattern within frameworks that s used to reduce the need for extensive boilerplate in java applications .", "stackoverflow.com questions 9403155 http : stackoverflow.com questions 9403155 what-is-dependency-injection-and-inversion-of-control-in-spring-framework", "This leads to the difference between framework and library : .. . .. . Inversion of Control is a key part of what makes a framework different to a library .", "In particular note the part saying Inversion of Control is too generic a term and thus people find it confusing .", "If you follow these simple two steps you have done inversion-of-control : .. . .. . 1 .", "To me inversion-of-control is turning your sequentially written code and turning it into an delegation structure .", "Inversion of control is made easy in many languages through the concept of delegates interfaces or even raw function-pointers .", "Inversion of Control is about getting freedom You get married you lost freedom and you are being controlled .", "I found one good example here http : www.goospoos.com 2009 12 inversion-of-control-basics-with-example .", "Inversion of control as a design guideline serves the following purposes : .. . .. . .. . There is a decoupling of the execution of a certain task from implementation .", "Looking at Inversion of Control as a design pattern we need to look at what we are inverting .", "So number 1 above http : stackoverflow.com questions 3058 what-is-inversion-of-control 99100 .", "For those interested in more depth on Inversion of Control a paper has been published outlining a more complete picture of Inversion of Control as a design pattern OfficeFloor : using office patterns to improve software-design http : doi.acm.org 10.1145 2739011.2739013 with a free copy available to download from http : www.officefloor.net mission.html .. . .. . What is identified is the following relationship : .. . .. . Inversion of Control for methods Dependency state Injection + Continuation Injection + Thread Injection", "In short Control gets inverted from Programmer to container .", "IoC is the general concept where control of flow is Inverted from client code to framework which Does something for the client .", "Inversion of Control Containers other than the Dependency Injection pattern : http : www.pocomatic.com docs whitepapers ioc-vs-di .. . .. . Additional reading to understand what s the problem with old Component-Based Development Framework which leads to the second paper above : Why and what of Inversion of Control : http : www.pocomatic.com docs whitepapers ioc .. . .. . My Question : What s exactly is IOC and DI", "Part of my problem is figuring out where the factory and Inversion of Control patterns fall in the Dependecy Injection continuum .", "I m getting the feeling that there s is not such thing as inversion-of-control or rather the correct term is dependency-injection .", "Managing these dependencies and lots of other stuff is what Inversion of Control Containers do and using DI as part of it is merely an implementation detail .", "Dependency injection is indeed a much more concrete term more well-defined than inversion-of-control .", "I understand the principles of inversion-of-control but don t have much knowledge of the specifics of the Unity framework .", "And then if you read later is another justification to actually use constructor-injection Inversion of control ." ] }
{ "confidence": [ 85.33328247070312, 84.3868408203125, 82.17494201660156, 81.90148162841797, 81.90148162841797, 80.83109283447266, 80.70246124267578, 80.42794036865234, 80.30757904052734, 78.66761016845703, 78.66761016845703, 76.57779693603516, 76.5777359008789, 76.28897857666016, 75.4052963256836, 75.34082794189453, 74.39724731445312, 74.29033660888672, 74.00236511230469, 71.74002075195312 ], "content": [ "Question : According to the paper written by Martin Fowler : http : martinfowler.com bliki InversionOfControl.html inversion-of-control is the principle where the control-flow of a program is inverted : instead of the programmer controlling the flow of a program the external sources framework services other components take control of it . It s like we plug something into something else . He mentioned an example about EJB 2.0 : .. . .. . For example the Session Bean interface defines ejbRemove ejbPassivate stored to secondary storage and ejbActivate restored from passive state . You don t get to control when these methods are called just what they do . The container calls us we don t call it . This leads to the difference between framework and library : .. . .. . Inversion of Control is a key part of what makes a framework different to a library . A library is essentially a set of functions that you can call these days usually organized into classes . Each call does some work and returns control to the client . I think the point of view that DI is IOC means the dependency of an object is inverted : instead it controls its own dependencies life cycle.. . something else does it for you . But as you told me about DI by hands DI is not necessary IOC . We can still have DI and no IOC . However in this paper from the pococapsule another IOC Framework for C C++ it suggests that because of IOC and DI the IOC containers and DI frameworks are far more superior to J2EE since J2EE mixes the framework code into the components thus not making it Plain Old Java C++ Object POJO POCO . Inversion of Control Containers other than the Dependency Injection pattern : http : www.pocomatic.com docs whitepapers ioc-vs-di .. . .. . Additional reading to understand what s the problem with old Component-Based Development Framework which leads to the second paper above : Why and what of Inversion of Control : http : www.pocomatic.com docs whitepapers ioc .. . .. . My Question : What s exactly is IOC and DI I am confused . Based on pococapsule IOC is something more significant than just invert the control of objects or between programmers and frameworks . Comment : Here s a good writeup on the subject IoC vs DI Dependency Inject vs SL Service Locator : tinyurl.com kk4be58 http : tinyurl.com kk4be58 - Extract from the url : IoC vs DI Dependency Injection IoC is the general concept where control of flow is Inverted from client code to framework which Does something for the client . SL Service Locator and DI Dependency Injection are two design-patterns stem off from IoC . .. . Answer : In short IoC is a much broader term that includes but is not limited to DI .. . .. . The term Inversion of Control IoC originally meant any sort of programming style where an overall framework or run-time controlled the program flow .. . .. . Before DI had a name people started to refer to frameworks that manage Dependencies as Inversion of Control Containers and soon the meaning of IoC gradually drifted towards that particular meaning : Inversion of Control over Dependencies . Inversion of Control IoC means that objects do not create other objects on which they rely to do their work . Instead they get the objects that they need from an outside source for example an xml-configuration file . Dependency Injection DI means that this is done without the object intervention usually by a framework component that passes constructor parameters and set properties .", "Question : Inversion of Control or IoC can be quite confusing when it is first encountered . 1 . What is it 2 . What problems does it solve 3 . When is it appropriate and when not Comment : The problem with most of these answers is the terminology used . What s a container Inversion Dependency Explain it in layman terms without the big words . Comment : See also on Programmers.SE : Why is Inversion of Control named that way http : programmers.stackexchange.com questions 205681 why-is-inversion-of-control-named-that-way Comment : It is Dependency Injection DI - see Martin Fowlers descrition here : martinfowler.com articles injection.html InversionOfControl http : martinfowler.com articles injection.html InversionOfControl Comment : This pic kinda sums it up http : i.stack.imgur.com QOw2T.png .. . Answer : Inversion of Control is what you get when your program callbacks e.g . like a gui program . For example in an old school menu you might have : .. . .. . thereby controlling the flow of user interaction . In a GUI program or somesuch instead we say .. . .. . So now control is inverted.. . instead of the computer accepting user input in a fixed order the user-controls the order in which the data is entered and when the data is saved in the database . Basically anything with an event-loop callbacks or execute triggers falls into this category . Comment : dont mark this guy down . technically he is correct martinfowler.com bliki InversionOfControl.html http : martinfowler.com bliki InversionOfControl.html IoC is a very general principal . Flow of control is inverted by dependency-injection because you have effectively delegated dependancies to some external system e.g . IoC container Comment : Agreed with Schneider s comment . 5 downvotes The mind boggles since this is the only answer that s really correct . Note the opening : like a gui program . Dependency injection is only the most commonly-seen realization of IoC . Comment : Indeed this is one of the few correct anwsers Guys IoC is not fundamentally about dependencies . Not at all . Comment : +1 - This is a good description with example of the following statement by Martin Fowler - Early user interfaces were controlled by the application program . You would have a sequence of commands like Enter name enter address your program would drive the prompts and pick up a response to each one . With graphical or even screen based UIs the UI framework would contain this main loop and your program instead provided event handlers for the various fields on the screen . The main control of the program was inverted moved away from you to the framework . Comment : I now get it why it is sometimes facetiously referred to as the Hollywood Principle : Don t call us we ll call you", "Question : According to the paper written by Martin Fowler : http : martinfowler.com bliki InversionOfControl.html inversion-of-control is the principle where the control-flow of a program is inverted : instead of the programmer controlling the flow of a program the external sources framework services other components take control of it . It s like we plug something into something else . He mentioned an example about EJB 2.0 : .. . .. . For example the Session Bean interface defines ejbRemove ejbPassivate stored to secondary storage and ejbActivate restored from passive state . You don t get to control when these methods are called just what they do . The container calls us we don t call it . This leads to the difference between framework and library : .. . .. . Inversion of Control is a key part of what makes a framework different to a library . A library is essentially a set of functions that you can call these days usually organized into classes . Each call does some work and returns control to the client . I think the point of view that DI is IOC means the dependency of an object is inverted : instead it controls its own dependencies life cycle.. . something else does it for you . But as you told me about DI by hands DI is not necessary IOC . We can still have DI and no IOC . However in this paper from the pococapsule another IOC Framework for C C++ it suggests that because of IOC and DI the IOC containers and DI frameworks are far more superior to J2EE since J2EE mixes the framework code into the components thus not making it Plain Old Java C++ Object POJO POCO . Inversion of Control Containers other than the Dependency Injection pattern : http : www.pocomatic.com docs whitepapers ioc-vs-di .. . .. . Additional reading to understand what s the problem with old Component-Based Development Framework which leads to the second paper above : Why and what of Inversion of Control : http : www.pocomatic.com docs whitepapers ioc .. . .. . My Question : What s exactly is IOC and DI I am confused . Based on pococapsule IOC is something more significant than just invert the control of objects or between programmers and frameworks . Comment : Here s a good writeup on the subject IoC vs DI Dependency Inject vs SL Service Locator : tinyurl.com kk4be58 http : tinyurl.com kk4be58 - Extract from the url : IoC vs DI Dependency Injection IoC is the general concept where control of flow is Inverted from client code to framework which Does something for the client . SL Service Locator and DI Dependency Injection are two design-patterns stem off from IoC . .. . Answer : Inversion of control is a design paradigm with the goal of giving more control to the targeted components of your application the ones getting the work done . Dependency injection is a pattern used to create instances of objects that other objects rely on without knowing at compile-time which class will be used to provide that functionality . there are several basic techniques to implement inversion-of-control . These are : .. . .. . using a factory-pattern .. . using a service locator pattern .. . using a dependency-injection of any given below type : .. . 1 a constructor-injection .. . 2 a setter injection .. . 3 an interface-injection", "Question : According to the paper written by Martin Fowler : http : martinfowler.com bliki InversionOfControl.html inversion-of-control is the principle where the control-flow of a program is inverted : instead of the programmer controlling the flow of a program the external sources framework services other components take control of it . It s like we plug something into something else . He mentioned an example about EJB 2.0 : .. . .. . For example the Session Bean interface defines ejbRemove ejbPassivate stored to secondary storage and ejbActivate restored from passive state . You don t get to control when these methods are called just what they do . The container calls us we don t call it . This leads to the difference between framework and library : .. . .. . Inversion of Control is a key part of what makes a framework different to a library . A library is essentially a set of functions that you can call these days usually organized into classes . Each call does some work and returns control to the client . I think the point of view that DI is IOC means the dependency of an object is inverted : instead it controls its own dependencies life cycle.. . something else does it for you . But as you told me about DI by hands DI is not necessary IOC . We can still have DI and no IOC . However in this paper from the pococapsule another IOC Framework for C C++ it suggests that because of IOC and DI the IOC containers and DI frameworks are far more superior to J2EE since J2EE mixes the framework code into the components thus not making it Plain Old Java C++ Object POJO POCO . Inversion of Control Containers other than the Dependency Injection pattern : http : www.pocomatic.com docs whitepapers ioc-vs-di .. . .. . Additional reading to understand what s the problem with old Component-Based Development Framework which leads to the second paper above : Why and what of Inversion of Control : http : www.pocomatic.com docs whitepapers ioc .. . .. . My Question : What s exactly is IOC and DI I am confused . Based on pococapsule IOC is something more significant than just invert the control of objects or between programmers and frameworks . Comment : Here s a good writeup on the subject IoC vs DI Dependency Inject vs SL Service Locator : tinyurl.com kk4be58 http : tinyurl.com kk4be58 - Extract from the url : IoC vs DI Dependency Injection IoC is the general concept where control of flow is Inverted from client code to framework which Does something for the client . SL Service Locator and DI Dependency Injection are two design-patterns stem off from IoC . .. . Answer : IOC Inversion Of Controller : Giving control to the container to get instance of object is called Inversion of Control . means instead of you are creating object using new-operator let the container do that for you . DI Dependency Injection : Way of injecting properties to an object is called Dependency injection . Spring will support only Constructor Injection and Setter Getter Injection .", "Question : According to the paper written by Martin Fowler : http : martinfowler.com bliki InversionOfControl.html inversion-of-control is the principle where the control-flow of a program is inverted : instead of the programmer controlling the flow of a program the external sources framework services other components take control of it . It s like we plug something into something else . He mentioned an example about EJB 2.0 : .. . .. . For example the Session Bean interface defines ejbRemove ejbPassivate stored to secondary storage and ejbActivate restored from passive state . You don t get to control when these methods are called just what they do . The container calls us we don t call it . This leads to the difference between framework and library : .. . .. . Inversion of Control is a key part of what makes a framework different to a library . A library is essentially a set of functions that you can call these days usually organized into classes . Each call does some work and returns control to the client . I think the point of view that DI is IOC means the dependency of an object is inverted : instead it controls its own dependencies life cycle.. . something else does it for you . But as you told me about DI by hands DI is not necessary IOC . We can still have DI and no IOC . However in this paper from the pococapsule another IOC Framework for C C++ it suggests that because of IOC and DI the IOC containers and DI frameworks are far more superior to J2EE since J2EE mixes the framework code into the components thus not making it Plain Old Java C++ Object POJO POCO . Inversion of Control Containers other than the Dependency Injection pattern : http : www.pocomatic.com docs whitepapers ioc-vs-di .. . .. . Additional reading to understand what s the problem with old Component-Based Development Framework which leads to the second paper above : Why and what of Inversion of Control : http : www.pocomatic.com docs whitepapers ioc .. . .. . My Question : What s exactly is IOC and DI I am confused . Based on pococapsule IOC is something more significant than just invert the control of objects or between programmers and frameworks . Comment : Here s a good writeup on the subject IoC vs DI Dependency Inject vs SL Service Locator : tinyurl.com kk4be58 http : tinyurl.com kk4be58 - Extract from the url : IoC vs DI Dependency Injection IoC is the general concept where control of flow is Inverted from client code to framework which Does something for the client . SL Service Locator and DI Dependency Injection are two design-patterns stem off from IoC . .. . Answer : IOC Inversion Of Controller : Giving control to the container to get instance of object is called Inversion of Control . means instead of you are creating object using new-operator let the container do that for you . DI Dependency Injection : Passing the required parameters properties from XML to an object in POJO CLASS is called Dependency injection .", "Question : According to the paper written by Martin Fowler : http : martinfowler.com bliki InversionOfControl.html inversion-of-control is the principle where the control-flow of a program is inverted : instead of the programmer controlling the flow of a program the external sources framework services other components take control of it . It s like we plug something into something else . He mentioned an example about EJB 2.0 : .. . .. . For example the Session Bean interface defines ejbRemove ejbPassivate stored to secondary storage and ejbActivate restored from passive state . You don t get to control when these methods are called just what they do . The container calls us we don t call it . This leads to the difference between framework and library : .. . .. . Inversion of Control is a key part of what makes a framework different to a library . A library is essentially a set of functions that you can call these days usually organized into classes . Each call does some work and returns control to the client . I think the point of view that DI is IOC means the dependency of an object is inverted : instead it controls its own dependencies life cycle.. . something else does it for you . But as you told me about DI by hands DI is not necessary IOC . We can still have DI and no IOC . However in this paper from the pococapsule another IOC Framework for C C++ it suggests that because of IOC and DI the IOC containers and DI frameworks are far more superior to J2EE since J2EE mixes the framework code into the components thus not making it Plain Old Java C++ Object POJO POCO . Inversion of Control Containers other than the Dependency Injection pattern : http : www.pocomatic.com docs whitepapers ioc-vs-di .. . .. . Additional reading to understand what s the problem with old Component-Based Development Framework which leads to the second paper above : Why and what of Inversion of Control : http : www.pocomatic.com docs whitepapers ioc .. . .. . My Question : What s exactly is IOC and DI I am confused . Based on pococapsule IOC is something more significant than just invert the control of objects or between programmers and frameworks . Comment : Here s a good writeup on the subject IoC vs DI Dependency Inject vs SL Service Locator : tinyurl.com kk4be58 http : tinyurl.com kk4be58 - Extract from the url : IoC vs DI Dependency Injection IoC is the general concept where control of flow is Inverted from client code to framework which Does something for the client . SL Service Locator and DI Dependency Injection are two design-patterns stem off from IoC . .. . Answer : DI is subset of IoC .. . .. . IoC means that objects do not create other objects on which they rely to do their work . Instead they get the objects that they need from an outside service for example xml file or single app service . 2 implementations of IoC I use are DI and ServiceLocator . DI means the IoC principle of getting dependent object is done without using concrete objects but abstractions interfaces . This makes all components chain testable cause higher level component doesn t depend on lower level component only from interface . Mocks implements these interfaces . Comment : ServiceLocator is a good addition to my knowledge...thanks for that :", "Question : According to the paper written by Martin Fowler : http : martinfowler.com bliki InversionOfControl.html inversion-of-control is the principle where the control-flow of a program is inverted : instead of the programmer controlling the flow of a program the external sources framework services other components take control of it . It s like we plug something into something else . He mentioned an example about EJB 2.0 : .. . .. . For example the Session Bean interface defines ejbRemove ejbPassivate stored to secondary storage and ejbActivate restored from passive state . You don t get to control when these methods are called just what they do . The container calls us we don t call it . This leads to the difference between framework and library : .. . .. . Inversion of Control is a key part of what makes a framework different to a library . A library is essentially a set of functions that you can call these days usually organized into classes . Each call does some work and returns control to the client . I think the point of view that DI is IOC means the dependency of an object is inverted : instead it controls its own dependencies life cycle.. . something else does it for you . But as you told me about DI by hands DI is not necessary IOC . We can still have DI and no IOC . However in this paper from the pococapsule another IOC Framework for C C++ it suggests that because of IOC and DI the IOC containers and DI frameworks are far more superior to J2EE since J2EE mixes the framework code into the components thus not making it Plain Old Java C++ Object POJO POCO . Inversion of Control Containers other than the Dependency Injection pattern : http : www.pocomatic.com docs whitepapers ioc-vs-di .. . .. . Additional reading to understand what s the problem with old Component-Based Development Framework which leads to the second paper above : Why and what of Inversion of Control : http : www.pocomatic.com docs whitepapers ioc .. . .. . My Question : What s exactly is IOC and DI I am confused . Based on pococapsule IOC is something more significant than just invert the control of objects or between programmers and frameworks . Comment : Here s a good writeup on the subject IoC vs DI Dependency Inject vs SL Service Locator : tinyurl.com kk4be58 http : tinyurl.com kk4be58 - Extract from the url : IoC vs DI Dependency Injection IoC is the general concept where control of flow is Inverted from client code to framework which Does something for the client . SL Service Locator and DI Dependency Injection are two design-patterns stem off from IoC . .. . Answer : IoC - Inversion of control is generic term independent of language it is actually not create the objects but describe in which fashion object is being created . DI - Dependency Injection is concrete term in which we provide dependencies of the object at run time by using different injection techniques viz . Setter Injection Constructor Injection or by Interface Injection .", "Question : I see a lot of IoC frameworks for .Net and Java . Does anyone know why there are no equivalent frameworks for Smalltalk . This is more a philosophy question than anything else . I m wondering if there is something in the Smalltalk way of doing things that precludes the necessity of having an IoC framework . Comment : Great question .. . Answer : A few possible reasons for this . One is that we haven t bothered to use the IoC qualifier which is essentially redundant - since calling something a framework implies the inversion-of-control flow . Another is that the Smalltalk language provides direct support for IoC flows - in the form of closures . One result-of programming with closures is that the flow of control as found in frameworks doesn t seem so starkly different as to evoke a sense of being inverted from a normal sense of flow rather with closures the flow of control is flipping back and forth between these two perspectives all of the time and everywhere . Even within single statements . A third reason perhaps is that even without closures the inversion-of-control being described is not uniquely associated with frameworks - the same flows are found in most forms of code that involve I O . Fourth Smalltalkers probably use these sorts of flows even more than others as we lean more heavily on the notions of objects and the messages sent between them than on the notions of structures and the calling of member-functions . In the absense of closures these two views are equivalent and interchangeable but the addition of closures changes the result - the sense of control-flow in use is one of the effects . Finally one might even think about describing the REPL style of control-flow as a simpler but inverted sense of the normal flow normal in the sense that it is used nearly everywhere else . In summary the same sorts of frameworks exist for Smalltalk . We describe them a bit differently is all . The difference is at least in part due to the presence and utilization of closures in Smalltalk which many other environments do not yet provide -- -- notably C++ C and Java .", "Question : Inversion of Control or IoC can be quite confusing when it is first encountered . 1 . What is it 2 . What problems does it solve 3 . When is it appropriate and when not Comment : The problem with most of these answers is the terminology used . What s a container Inversion Dependency Explain it in layman terms without the big words . Comment : See also on Programmers.SE : Why is Inversion of Control named that way http : programmers.stackexchange.com questions 205681 why-is-inversion-of-control-named-that-way Comment : It is Dependency Injection DI - see Martin Fowlers descrition here : martinfowler.com articles injection.html InversionOfControl http : martinfowler.com articles injection.html InversionOfControl Comment : This pic kinda sums it up http : i.stack.imgur.com QOw2T.png .. . Answer : Inversion of Control is a generic principle while Dependency Injection realises this principle as a design pattern for object graph construction i.e . configuration controls how the objects are referencing each other rather than the object itself controlling how to get the reference to another object . Looking at Inversion of Control as a design pattern we need to look at what we are inverting . Dependency Injection inverts control of constructing a graph of objects . If told in layman s term inversion-of-control implies change in flow of control in the program . Eg . In traditional standalone app we have main method from where the control gets passed to other third party libraries in case we have used third party library s-function but through inversion-of-control control gets transferred from third party library code to our code as we are taking the service of third party library . But there are other aspects that need to be inverted within a program - e.g . invocation of methods and threads to execute the code . For those interested in more depth on Inversion of Control a paper has been published outlining a more complete picture of Inversion of Control as a design pattern OfficeFloor : using office patterns to improve software-design http : doi.acm.org 10.1145 2739011.2739013 with a free copy available to download from http : www.officefloor.net mission.html .. . .. . What is identified is the following relationship : .. . .. . Inversion of Control for methods Dependency state Injection + Continuation Injection + Thread Injection Comment : This is a good explanation because it is uses plain language and little jargon .", "Question : According to the paper written by Martin Fowler : http : martinfowler.com bliki InversionOfControl.html inversion-of-control is the principle where the control-flow of a program is inverted : instead of the programmer controlling the flow of a program the external sources framework services other components take control of it . It s like we plug something into something else . He mentioned an example about EJB 2.0 : .. . .. . For example the Session Bean interface defines ejbRemove ejbPassivate stored to secondary storage and ejbActivate restored from passive state . You don t get to control when these methods are called just what they do . The container calls us we don t call it . This leads to the difference between framework and library : .. . .. . Inversion of Control is a key part of what makes a framework different to a library . A library is essentially a set of functions that you can call these days usually organized into classes . Each call does some work and returns control to the client . I think the point of view that DI is IOC means the dependency of an object is inverted : instead it controls its own dependencies life cycle.. . something else does it for you . But as you told me about DI by hands DI is not necessary IOC . We can still have DI and no IOC . However in this paper from the pococapsule another IOC Framework for C C++ it suggests that because of IOC and DI the IOC containers and DI frameworks are far more superior to J2EE since J2EE mixes the framework code into the components thus not making it Plain Old Java C++ Object POJO POCO . Inversion of Control Containers other than the Dependency Injection pattern : http : www.pocomatic.com docs whitepapers ioc-vs-di .. . .. . Additional reading to understand what s the problem with old Component-Based Development Framework which leads to the second paper above : Why and what of Inversion of Control : http : www.pocomatic.com docs whitepapers ioc .. . .. . My Question : What s exactly is IOC and DI I am confused . Based on pococapsule IOC is something more significant than just invert the control of objects or between programmers and frameworks . Comment : Here s a good writeup on the subject IoC vs DI Dependency Inject vs SL Service Locator : tinyurl.com kk4be58 http : tinyurl.com kk4be58 - Extract from the url : IoC vs DI Dependency Injection IoC is the general concept where control of flow is Inverted from client code to framework which Does something for the client . SL Service Locator and DI Dependency Injection are two design-patterns stem off from IoC . .. . Answer : But the spring documentation says they are same . http : docs.spring.io spring docs current spring-framework-reference htmlsingle beans-introduction .. . .. . In the first line IoC is also known as dependency-injection DI . Comment : I guess what they were trying to address is that DI is a very widely used flavour of IoC design pattern that it can almost easily be called IoC aka DI - unless the documentation has any explicit reference that suggest otherwise . Comment : IoC is also known as dependency-injection DI .. . horsefeathers", "Question : According to the paper written by Martin Fowler : http : martinfowler.com bliki InversionOfControl.html inversion-of-control is the principle where the control-flow of a program is inverted : instead of the programmer controlling the flow of a program the external sources framework services other components take control of it . It s like we plug something into something else . He mentioned an example about EJB 2.0 : .. . .. . For example the Session Bean interface defines ejbRemove ejbPassivate stored to secondary storage and ejbActivate restored from passive state . You don t get to control when these methods are called just what they do . The container calls us we don t call it . This leads to the difference between framework and library : .. . .. . Inversion of Control is a key part of what makes a framework different to a library . A library is essentially a set of functions that you can call these days usually organized into classes . Each call does some work and returns control to the client . I think the point of view that DI is IOC means the dependency of an object is inverted : instead it controls its own dependencies life cycle.. . something else does it for you . But as you told me about DI by hands DI is not necessary IOC . We can still have DI and no IOC . However in this paper from the pococapsule another IOC Framework for C C++ it suggests that because of IOC and DI the IOC containers and DI frameworks are far more superior to J2EE since J2EE mixes the framework code into the components thus not making it Plain Old Java C++ Object POJO POCO . Inversion of Control Containers other than the Dependency Injection pattern : http : www.pocomatic.com docs whitepapers ioc-vs-di .. . .. . Additional reading to understand what s the problem with old Component-Based Development Framework which leads to the second paper above : Why and what of Inversion of Control : http : www.pocomatic.com docs whitepapers ioc .. . .. . My Question : What s exactly is IOC and DI I am confused . Based on pococapsule IOC is something more significant than just invert the control of objects or between programmers and frameworks . Comment : Here s a good writeup on the subject IoC vs DI Dependency Inject vs SL Service Locator : tinyurl.com kk4be58 http : tinyurl.com kk4be58 - Extract from the url : IoC vs DI Dependency Injection IoC is the general concept where control of flow is Inverted from client code to framework which Does something for the client . SL Service Locator and DI Dependency Injection are two design-patterns stem off from IoC . .. . Answer : IOC indicates that an external classes managing the classes of an application and external classes means a container manages the dependency between class of application . basic concept of IOC is that programmer don t need to create your objects but describe how they should be created . The main tasks performed by IoC container are : to instantiate the application class . to configure the object . to assemble the dependencies between the objects . DI is the process of providing the dependencies of an object at run time by using setter injection or constructor-injection .", "Question : Inversion of Control or IoC can be quite confusing when it is first encountered . 1 . What is it 2 . What problems does it solve 3 . When is it appropriate and when not Comment : The problem with most of these answers is the terminology used . What s a container Inversion Dependency Explain it in layman terms without the big words . Comment : See also on Programmers.SE : Why is Inversion of Control named that way http : programmers.stackexchange.com questions 205681 why-is-inversion-of-control-named-that-way Comment : It is Dependency Injection DI - see Martin Fowlers descrition here : martinfowler.com articles injection.html InversionOfControl http : martinfowler.com articles injection.html InversionOfControl Comment : This pic kinda sums it up http : i.stack.imgur.com QOw2T.png .. . Answer : I shall write down my simple understanding of this two terms : .. . .. . Dependency Injection DI : .. . Dependency injection generally means passing an object on which method depends as a parameter to a method rather than having the method create the dependent object . What it means in practice is that the method does not depends directly on a particular implementation any implementation that meets the requirements can be passed as a parameter . With this objects tell thier dependencies . And spring makes it available . This leads to loosely coupled application development . .. . .. . Inversion of Control IoC Container : .. . This is common characteristic of frameworks IOC manages java objects .. . from instantiation to destruction through its BeanFactory . -Java components that are instantiated by the IoC container are called beans and the IoC container manages a bean s scope lifecycle events and any AOP features for which it has been configured and coded . QUICK EXAMPLE : Inversion of Control is about getting freedom more flexibility and less dependency . When you are using a desktop computer you are slaved or say controlled . You have to sit before a screen and look at it . Using keyboard to type and using mouse to navigate . And a bad written software can slave you even more . If you replaced your desktop with a laptop then you somewhat inverted control . You can easily take it and move around . So now you can control where you are with your computer instead of computer controlling it . By implementing Inversion of Control a software object consumer get more controls options over the software objects instead of being controlled or having less options . Inversion of control as a design guideline serves the following purposes : .. . .. . .. . There is a decoupling of the execution of a certain task from implementation . Every module can focus on what it is designed for . Modules make no assumptions about what other systems do but rely on their contracts . Replacing modules has no side effect on other modules .. . I will keep things abstract here You can visit following links for detail understanding of the topic . A good read with example http : www.springbyexample.org examples intro-to-ioc-basic-constructor-injection.html .. . .. . Detailed explanation http : howtodoinjava.com 2013 03 19 inversion-of-control-ioc-and-dependency-injection-di-patterns-in-spring-framework-and-related-interview-questions", "Question : I was recently having a debate about the Dependency Inversion Principle Inversion of Control and Dependency Injection . In relation to this topic we were debating whether these principles violate one of the pillars of OOP namely Encapsulation . My understanding of these things is : .. . .. . The Dependency Inversion Principle implies that objects should depend upon abstractions not concretions - this is the fundamental principle upon which the Inversion of Control pattern and Dependency Injection are implemented . Inversion of Control is a pattern implementation of the Dependency Inversion Principle where abstract dependencies replace concrete dependencies allowing concretions of the dependency to be specified outside of the object . Dependency Injection is a design pattern that implements Inversion of Control and provides dependency-resolution . Injection occurs when a dependency is passed to a dependent component . In essence the Dependency Injection pattern provides a mechanism for coupling dependency abstractions with concrete implementations . Encapsulation is the process whereby data and functionality that is required by a higher level object is insulated away and inaccessible thus the programmer is unaware of how an object is implemented . The debate got to a sticking point with the following statement : .. . .. . IoC isn t OOP because it breaks Encapsulation .. . .. . Personally I think that the Dependency Inversion Principle and the Inversion of Control pattern should be observed religiously by all OOP developers - and I live by the following quote : .. . .. . If there is potentially more than one way to skin a cat then do not behave like there is only one . Example 1 : .. . .. . Here we see an example of encapsulation . The programmer only has to call Main and the cat will be skinned but what if he wanted to skin the cat with say a set of razor sharp teeth Example 2 : .. . .. . Here we observe the Dependency Inversion Principle and Inversion of Control since an abstract ICatSkinner is provided in order to allow concrete dependencies to be passed in by the programmer . At last there is more than one way to skin a cat .. . .. . The quarrel here is does this break encapsulation technically one could argue that .SkinTheCat is still encapsulated away within the Main method call so the programmer is unaware of the behavior of this method so I do not think this breaks encapsulation . Delving a little deeper I think that IoC containers break OOP because they use reflection but I am not convinced that IoC breaks OOP nor am I convinced that IoC breaks encapsulation . In fact I d go as far as to say that : .. . .. . Encapsulation and Inversion of Control coincide with each other happily allowing programmers to pass in only the concretions of a dependency whilst hiding away the overall implementation via encapsulation . Questions : .. . .. . Is IoC a direct implementation of the Dependency Inversion Principle Does IoC always break encapsulation and therefore OOP Should IoC be used sparingly religiously or appropriately What is the difference between IoC and an IoC container Comment : Being a question about conceptual questions about software development you might have more luck getting this answered on programmers.stackexchange.com http : programmers.stackexchange.com . As written this is a request for discussion which isn t the forte of a Q A site like SO . Comment : Poor kitty . We ve had to abstract away the skinning of you as there are so many ways to do it : Comment : @neontapir discussion requests are very poor fit for Programmers - it would be quickly voted down and closed over there see On discussions and why they don t make good questions http : meta.programmers.stackexchange.com q 6742 31260 . Recommended reading : What goes on Programmers.SE A guide for Stack Overflow http : meta.programmers.stackexchange.com q 7182 31260 Comment : Is IoC a direct implementation of the Dependency Inversion Principle Possible duplicate of stackoverflow.com q 6766056 126014 http : stackoverflow.com q 6766056 126014 Comment : What is the difference between IoC and an IoC container Duplicate of programmers.stackexchange.com q 131451 19115 http : programmers.stackexchange.com q 131451 19115 .. . Answer : Is IoC a direct implementation of the Dependency Inversion Principle The two are related in a way that they talk about abstractions but that s about it . Inversion of Control is : .. . .. . a design in which custom-written portions of a computer program receive the flow of control from a generic reusable library source https : en.wikipedia.org wiki Inversion of control .. . .. . Inversion of control is allowing us to hook our custom code into the pipeline of a reusable library . In other words Inversion control is about frameworks . A reusable library that does not apply Inversion of Control is merely a library . A framework is a reusable library that does apply Inversion of Control . Do note that we as developers can only apply Inversion of Control if we are writing a framework ourselves you can t apply inversion-of-control as an application developer . We can and should however apply Dependency Inversion Principle and the Dependency Injection pattern . Does IoC always break encapsulation and therefore OOP Since IoC is just about hooking into the pipeline of a framework there is nothing that s leaking here . So the real question is : does Dependency Injection break encapsulation . The answer to that question is : no it does not . It doesn t break encapsulation because of two reasons : .. . .. . Since the Dependency Inversion Principles states that we should program against an abstraction a consumer will not be able to access the internals of the used implementation and that implementation will therefore not be breaking encapsulation to the client . The implementation might not even be known or accessible at compile-time because it lives in an unreferenced assembly and the implementation can in that case not leak implementation details and break encapsulation . Although the implementation accepts the dependencies it requires throughout its constructor those dependencies will typically be stored in private fields and can t be accessed by anyone even if a consumer depends directly on the concrete type and it will therefore not break encapsulation . Should IoC be used sparingly religiously or appropriately Again the question is Should DIP and DI be used sparingly . In my opinion the answer is : NO you should actually use it throughout the application . Obviously you should never apply things religiously . You should apply SOLID principles and the DIP is a crucial part of those principles . They will make your application more flexible and more maintainable and in most scenarios it is very appropriate to apply the SOLID principles . What is the difference between IoC and an IoC container Dependency Injection is a pattern that can be applied either with or without a IoC container . An IoC container is merely a tool that can help building your object graph in a more convenient way in case you have an application that applies the SOLID principles correctly . If you have an application that doesn t apply the SOLID principles you will have a hard time using a IoC container . You will have a hard time applying Dependency Injection . Or let me put it more broadly you will have a hard time maintaining your application anyway . But in no way an IoC container is a required tool . I m developing and maintaining an IoC container for .NET but I don t always use a container for all my applications . For the big BLOBAs boring line of business applications I often use a container but for smaller apps or windows-services I don t always use a container . But I do almost always use Dependency Injection as a pattern because this is the most effective way to adhere to DIP . Note : Since an IoC container helps us in applying the Dependency Injection pattern IoC container is a terrible name for such library . .. . .. . But despite of anything I said above please note that : .. . .. . in the real world of the software developer usefulness trumps theory from Robert C . Martin s Agile Principle Patterns and Practices https : books.google.nl books id hckt7v6g09oC pg PT404 lpg PT404 dq in 20the 20real 20world 20of 20the 20software 20developer 20usefulness 20trumps 20theory source bl ots ISQc81 SKU sig D51wKiHCSqzGu5lwF mcOQszbeY hl en sa X ei zLmRVdPMHouBUcLympgP ved 0CCEQ6AEwAA v onepage q in 20the 20real 20world 20of 20the 20software 20developer 2C 20usefulness 20trumps 20theory f false .. . .. . In other words even if DI would break encapsulation it wouldn t matter because these techniques and patterns have proven to be very valuable because it results in very flexible and maintainable systems . Practice trumps theory .", "Question : I was recently having a debate about the Dependency Inversion Principle Inversion of Control and Dependency Injection . In relation to this topic we were debating whether these principles violate one of the pillars of OOP namely Encapsulation . My understanding of these things is : .. . .. . The Dependency Inversion Principle implies that objects should depend upon abstractions not concretions - this is the fundamental principle upon which the Inversion of Control pattern and Dependency Injection are implemented . Inversion of Control is a pattern implementation of the Dependency Inversion Principle where abstract dependencies replace concrete dependencies allowing concretions of the dependency to be specified outside of the object . Dependency Injection is a design pattern that implements Inversion of Control and provides dependency-resolution . Injection occurs when a dependency is passed to a dependent component . In essence the Dependency Injection pattern provides a mechanism for coupling dependency abstractions with concrete implementations . Encapsulation is the process whereby data and functionality that is required by a higher level object is insulated away and inaccessible thus the programmer is unaware of how an object is implemented . The debate got to a sticking point with the following statement : .. . .. . IoC isn t OOP because it breaks Encapsulation .. . .. . Personally I think that the Dependency Inversion Principle and the Inversion of Control pattern should be observed religiously by all OOP developers - and I live by the following quote : .. . .. . If there is potentially more than one way to skin a cat then do not behave like there is only one . Example 1 : .. . .. . Here we see an example of encapsulation . The programmer only has to call Main and the cat will be skinned but what if he wanted to skin the cat with say a set of razor sharp teeth Example 2 : .. . .. . Here we observe the Dependency Inversion Principle and Inversion of Control since an abstract ICatSkinner is provided in order to allow concrete dependencies to be passed in by the programmer . At last there is more than one way to skin a cat .. . .. . The quarrel here is does this break encapsulation technically one could argue that .SkinTheCat is still encapsulated away within the Main method call so the programmer is unaware of the behavior of this method so I do not think this breaks encapsulation . Delving a little deeper I think that IoC containers break OOP because they use reflection but I am not convinced that IoC breaks OOP nor am I convinced that IoC breaks encapsulation . In fact I d go as far as to say that : .. . .. . Encapsulation and Inversion of Control coincide with each other happily allowing programmers to pass in only the concretions of a dependency whilst hiding away the overall implementation via encapsulation . Questions : .. . .. . Is IoC a direct implementation of the Dependency Inversion Principle Does IoC always break encapsulation and therefore OOP Should IoC be used sparingly religiously or appropriately What is the difference between IoC and an IoC container Comment : Being a question about conceptual questions about software development you might have more luck getting this answered on programmers.stackexchange.com http : programmers.stackexchange.com . As written this is a request for discussion which isn t the forte of a Q A site like SO . Comment : Poor kitty . We ve had to abstract away the skinning of you as there are so many ways to do it : Comment : @neontapir discussion requests are very poor fit for Programmers - it would be quickly voted down and closed over there see On discussions and why they don t make good questions http : meta.programmers.stackexchange.com q 6742 31260 . Recommended reading : What goes on Programmers.SE A guide for Stack Overflow http : meta.programmers.stackexchange.com q 7182 31260 Comment : Is IoC a direct implementation of the Dependency Inversion Principle Possible duplicate of stackoverflow.com q 6766056 126014 http : stackoverflow.com q 6766056 126014 Comment : What is the difference between IoC and an IoC container Duplicate of programmers.stackexchange.com q 131451 19115 http : programmers.stackexchange.com q 131451 19115 .. . Answer : I will try to answer your questions According to my understanding : .. . .. . Is IoC a direct implementation of the Dependency Inversion Principle we can t label IoC as the direct implementation of DIP as DIP focuses on making higher level modules depending on the abstraction and not on the concretion of lower level modules . But rather IoC is an implementation of Dependency Injection . Does IoC always break encapsulation and therefore OOP I don t think the mechanism of IoC will violate Encapsulation . But can make the system become Tightly coupled . Should IoC be used sparingly religiously or appropriately IoC can be used as a in many patterns like Bridge Pattern where seperating Concretion from Abstraction improves the code . Thus can be used in order to achieve DIP . What is the difference between IoC and an IoC container IoC is a mechanism of Dependency Inversion but containers are those which uses IoC .", "Question : According to the paper written by Martin Fowler : http : martinfowler.com bliki InversionOfControl.html inversion-of-control is the principle where the control-flow of a program is inverted : instead of the programmer controlling the flow of a program the external sources framework services other components take control of it . It s like we plug something into something else . He mentioned an example about EJB 2.0 : .. . .. . For example the Session Bean interface defines ejbRemove ejbPassivate stored to secondary storage and ejbActivate restored from passive state . You don t get to control when these methods are called just what they do . The container calls us we don t call it . This leads to the difference between framework and library : .. . .. . Inversion of Control is a key part of what makes a framework different to a library . A library is essentially a set of functions that you can call these days usually organized into classes . Each call does some work and returns control to the client . I think the point of view that DI is IOC means the dependency of an object is inverted : instead it controls its own dependencies life cycle.. . something else does it for you . But as you told me about DI by hands DI is not necessary IOC . We can still have DI and no IOC . However in this paper from the pococapsule another IOC Framework for C C++ it suggests that because of IOC and DI the IOC containers and DI frameworks are far more superior to J2EE since J2EE mixes the framework code into the components thus not making it Plain Old Java C++ Object POJO POCO . Inversion of Control Containers other than the Dependency Injection pattern : http : www.pocomatic.com docs whitepapers ioc-vs-di .. . .. . Additional reading to understand what s the problem with old Component-Based Development Framework which leads to the second paper above : Why and what of Inversion of Control : http : www.pocomatic.com docs whitepapers ioc .. . .. . My Question : What s exactly is IOC and DI I am confused . Based on pococapsule IOC is something more significant than just invert the control of objects or between programmers and frameworks . Comment : Here s a good writeup on the subject IoC vs DI Dependency Inject vs SL Service Locator : tinyurl.com kk4be58 http : tinyurl.com kk4be58 - Extract from the url : IoC vs DI Dependency Injection IoC is the general concept where control of flow is Inverted from client code to framework which Does something for the client . SL Service Locator and DI Dependency Injection are two design-patterns stem off from IoC . .. . Answer : IoC is a generic term meaning rather than having the application call the methods in a framework the framework calls implementations provided by the application . DI is a form of IoC where implementations are passed into an object through constructors setters service look-ups which the object will depend on in order to behave correctly . IoC without using DI for example would be the Template pattern because the implementation can only be changed through sub-classing . DI Frameworks are designed to make use of DI and can define interfaces or Annotations in Java to make it easy to pass in implementations . IoC Containers are DI frameworks that can work outside of the programming language . In some you can configure which implementations to use in metadata files e.g . XML which are less invasive . With some you can do IoC that would normally be impossible like inject implementation at pointcuts http : en.wikipedia.org wiki Pointcut . See also http : martinfowler.com articles injection.html InversionOfControl Comment : Thanks for the answer . But the other paper suggests that with IOC IOC containers are far more superior to EJB while Martin Fowler suggests that EJB is a typical example of IOC . Comment : EJB management is really a typical example of IoC . You can see it from the fact that the lifecycle of a EJB is managed by the container not by the programmer . The programmer does not create or destroy an EJB instance because the control is delegated to the server . That is the concept of IoC : the external code controls when your code is called which is usually the inverse of what its done most of the time . Comment : IoC is a generic term meaning rather than having the application call the methods in a framework the framework calls implementations provided by the application . Can you explain a it more about this Comment : Aka Hollywood principle http : en.wikipedia.org wiki Hollywood principle don t call us we ll call you . Leaves the invocation up to the framework rather than the application . Comment : @ImadAlazani you d better read through the article that Garrett attached which is a detailed discussion about inverting the control from application code to framework .", "Question : Inversion of Control or IoC can be quite confusing when it is first encountered . 1 . What is it 2 . What problems does it solve 3 . When is it appropriate and when not Comment : The problem with most of these answers is the terminology used . What s a container Inversion Dependency Explain it in layman terms without the big words . Comment : See also on Programmers.SE : Why is Inversion of Control named that way http : programmers.stackexchange.com questions 205681 why-is-inversion-of-control-named-that-way Comment : It is Dependency Injection DI - see Martin Fowlers descrition here : martinfowler.com articles injection.html InversionOfControl http : martinfowler.com articles injection.html InversionOfControl Comment : This pic kinda sums it up http : i.stack.imgur.com QOw2T.png .. . Answer : To understanding the concept Inversion of Control IoC or Dependency Inversion Principle DIP involves two activities : abstraction and inversion . Dependency Injection DI is just one of the few of the inversion methods . To read more about this you can read my blog Here http : kusnaditjung.blogspot.co.uk 2016 05 dependency-inversion-principle-dip.html .. . .. . 1 . What is it It is a practice where you let the actual behavior come from outside of the boundary Class in Object Oriented Programming . The boundary entity only knows the abstraction e.g interface abstract-class delegate in Object Oriented Programming of it . 2 . What problems does it solve In term of programming IoC try to solve monolithic code by making it modular decoupling various parts of it and make it unit-testable . 3 . When is it appropriate and when not It is appropriate most of the time unless you have situation where you just want monolithic code e.g very simple program", "Question : Inversion of Control or IoC can be quite confusing when it is first encountered . 1 . What is it 2 . What problems does it solve 3 . When is it appropriate and when not Comment : The problem with most of these answers is the terminology used . What s a container Inversion Dependency Explain it in layman terms without the big words . Comment : See also on Programmers.SE : Why is Inversion of Control named that way http : programmers.stackexchange.com questions 205681 why-is-inversion-of-control-named-that-way Comment : It is Dependency Injection DI - see Martin Fowlers descrition here : martinfowler.com articles injection.html InversionOfControl http : martinfowler.com articles injection.html InversionOfControl Comment : This pic kinda sums it up http : i.stack.imgur.com QOw2T.png .. . Answer : IoC is about inverting the relationship between your code and third-party code library framework : .. . .. . In normal s w development you write the main method and call library methods . You are in control : .. . In IoC the framework controls main and calls your methods . The Framework is in control : .. . .. . DI Dependency Injection is about how the control flows in the application . Traditional desktop application had control-flow from your application main method to other library method calls but with DI control-flow is inverted that s framework takes care of starting your app initializing it and invoking your methods whenever required . In the end you always win : Comment : This is a good explanation because it is uses plain language and little jargon .", "Question : I was recently having a debate about the Dependency Inversion Principle Inversion of Control and Dependency Injection . In relation to this topic we were debating whether these principles violate one of the pillars of OOP namely Encapsulation . My understanding of these things is : .. . .. . The Dependency Inversion Principle implies that objects should depend upon abstractions not concretions - this is the fundamental principle upon which the Inversion of Control pattern and Dependency Injection are implemented . Inversion of Control is a pattern implementation of the Dependency Inversion Principle where abstract dependencies replace concrete dependencies allowing concretions of the dependency to be specified outside of the object . Dependency Injection is a design pattern that implements Inversion of Control and provides dependency-resolution . Injection occurs when a dependency is passed to a dependent component . In essence the Dependency Injection pattern provides a mechanism for coupling dependency abstractions with concrete implementations . Encapsulation is the process whereby data and functionality that is required by a higher level object is insulated away and inaccessible thus the programmer is unaware of how an object is implemented . The debate got to a sticking point with the following statement : .. . .. . IoC isn t OOP because it breaks Encapsulation .. . .. . Personally I think that the Dependency Inversion Principle and the Inversion of Control pattern should be observed religiously by all OOP developers - and I live by the following quote : .. . .. . If there is potentially more than one way to skin a cat then do not behave like there is only one . Example 1 : .. . .. . Here we see an example of encapsulation . The programmer only has to call Main and the cat will be skinned but what if he wanted to skin the cat with say a set of razor sharp teeth Example 2 : .. . .. . Here we observe the Dependency Inversion Principle and Inversion of Control since an abstract ICatSkinner is provided in order to allow concrete dependencies to be passed in by the programmer . At last there is more than one way to skin a cat .. . .. . The quarrel here is does this break encapsulation technically one could argue that .SkinTheCat is still encapsulated away within the Main method call so the programmer is unaware of the behavior of this method so I do not think this breaks encapsulation . Delving a little deeper I think that IoC containers break OOP because they use reflection but I am not convinced that IoC breaks OOP nor am I convinced that IoC breaks encapsulation . In fact I d go as far as to say that : .. . .. . Encapsulation and Inversion of Control coincide with each other happily allowing programmers to pass in only the concretions of a dependency whilst hiding away the overall implementation via encapsulation . Questions : .. . .. . Is IoC a direct implementation of the Dependency Inversion Principle Does IoC always break encapsulation and therefore OOP Should IoC be used sparingly religiously or appropriately What is the difference between IoC and an IoC container Comment : Being a question about conceptual questions about software development you might have more luck getting this answered on programmers.stackexchange.com http : programmers.stackexchange.com . As written this is a request for discussion which isn t the forte of a Q A site like SO . Comment : Poor kitty . We ve had to abstract away the skinning of you as there are so many ways to do it : Comment : @neontapir discussion requests are very poor fit for Programmers - it would be quickly voted down and closed over there see On discussions and why they don t make good questions http : meta.programmers.stackexchange.com q 6742 31260 . Recommended reading : What goes on Programmers.SE A guide for Stack Overflow http : meta.programmers.stackexchange.com q 7182 31260 Comment : Is IoC a direct implementation of the Dependency Inversion Principle Possible duplicate of stackoverflow.com q 6766056 126014 http : stackoverflow.com q 6766056 126014 Comment : What is the difference between IoC and an IoC container Duplicate of programmers.stackexchange.com q 131451 19115 http : programmers.stackexchange.com q 131451 19115 .. . Answer : Encapsulation does not contradict with Dependency Inversion Principles in Object-Oriented Programming world . For example in a car design you will have an internal engine which will be encapsulated from outside world and also wheels that can be replaced easily and considered as outside component of the car . The car has specification interface to rotate the shaft of the wheels and the wheels component implements part that interact with the shaft . Here The internal engine represents the encapsulation process while the wheel components represent the Dependency Inversion Principles DIP in the car design . With DIP basically we prevent building a monolithic object and instead we make our object composable . Can you image you build a car where you cannot replace the wheels because they are built-in into the car . Also you can read more about Dependency Inversion Principles in more details in my blog Here http : kusnaditjung.blogspot.co.uk 2016 05 dependency-inversion-principle-dip.html .", "Question : Inversion of Control or IoC can be quite confusing when it is first encountered . 1 . What is it 2 . What problems does it solve 3 . When is it appropriate and when not Comment : The problem with most of these answers is the terminology used . What s a container Inversion Dependency Explain it in layman terms without the big words . Comment : See also on Programmers.SE : Why is Inversion of Control named that way http : programmers.stackexchange.com questions 205681 why-is-inversion-of-control-named-that-way Comment : It is Dependency Injection DI - see Martin Fowlers descrition here : martinfowler.com articles injection.html InversionOfControl http : martinfowler.com articles injection.html InversionOfControl Comment : This pic kinda sums it up http : i.stack.imgur.com QOw2T.png .. . Answer : Inversion of Control is about getting freedom You get married you lost freedom and you are being controlled . You divorced you have just implemented Inversion of Control . That s what we called decoupled . Good computer system discourage any very close relationship . more flexibility The kitchen in your office only serves clean tap water that is your only choice when you want to drink . Your boss implemented Inversion of Control by setting up a new coffee machine . Now you get the flexibility of choosing either tap water or coffee . and less dependency Your partner has a job you don t have a job you financially depend on your partner so you are controlled . You find a job you have implemented Inversion of Control . Good computer system encourage in-dependency . When you use a desktop computer you are slaved or say controlled . You have to sit before a screen and look at it . Using keyboard to type and using mouse to navigate . And a bad written software can slave you even more . If you replace your desktop with a laptop then you somewhat inverted control . You can easily take it and move around . So now you can control where you are with your computer instead of your computer controlling it . By implementing Inversion of Control a software object consumer get more controls options over the software objects instead of being controlled or having less options .", "Question : Inversion of Control or IoC can be quite confusing when it is first encountered . 1 . What is it 2 . What problems does it solve 3 . When is it appropriate and when not Comment : The problem with most of these answers is the terminology used . What s a container Inversion Dependency Explain it in layman terms without the big words . Comment : See also on Programmers.SE : Why is Inversion of Control named that way http : programmers.stackexchange.com questions 205681 why-is-inversion-of-control-named-that-way Comment : It is Dependency Injection DI - see Martin Fowlers descrition here : martinfowler.com articles injection.html InversionOfControl http : martinfowler.com articles injection.html InversionOfControl Comment : This pic kinda sums it up http : i.stack.imgur.com QOw2T.png .. . Answer : For example task 1 is to create object . Without IOC concept task 1 is supposed to be done by Programmer.But With IOC concept task 1 would be done by container . In short Control gets inverted from Programmer to container . So it is called as inversion-of-control . I found one good example here http : www.goospoos.com 2009 12 inversion-of-control-basics-with-example . Comment : What is a container Comment : A container is a concept in IoC where the object-model including dependencies relationships between user object and used object and object instances reside and is managed -- e.g . contained . The container is usually provided by a IoC framework such as Spring . Think of it as a runtime repository for the objects that make up your application ." ] }
[]
procedural-programming
UNK_RELATION
tagbar@tags@51
tagbar -- tagbar is a vim-plugin for browsing the @placeholder of source code files .
{ "confidence": [ 54.73218536376953, 54.18825149536133, 52.95478820800781, 50.793827056884766, 49.46531295776367, 47.687705993652344, 47.35941696166992, 46.77145004272461, 46.24714660644531, 46.011505126953125, 45.72439193725586, 45.49967956542969, 44.9561767578125, 44.9561767578125, 44.44231033325195, 44.184696197509766, 43.54717254638672, 43.153907775878906, 42.92588806152344, 42.57109069824219, 42.57109069824219, 42.57109069824219, 42.29838562011719, 41.98516845703125, 41.71886444091797, 41.58222198486328, 41.511138916015625, 41.391048431396484, 40.91543960571289, 40.180328369140625, 40.180328369140625, 40.180328369140625, 40.180328369140625, 40.180328369140625, 39.9387092590332, 39.92387008666992, 39.20070266723633, 38.982994079589844, 38.87875747680664, 38.87875747680664, 38.74674987792969, 38.74674987792969, 38.74674987792969, 38.67414093017578, 38.49531555175781, 38.05339431762695, 37.04362869262695, 37.019752502441406, 36.94190979003906, 36.94190979003906, 36.94190979003906, 36.94190979003906, 36.94190979003906, 36.727012634277344, 36.58650207519531, 36.552581787109375, 36.30496597290039, 36.248558044433594, 35.74457550048828, 35.74457550048828, 35.62309646606445, 35.228904724121094, 35.04330062866211, 34.38461685180664, 34.38461685180664, 34.38461685180664, 34.38461685180664, 34.38461685180664, 34.38461685180664, 34.309532165527344, 33.722686767578125, 32.57978057861328, 32.57978057861328, 32.57978057861328, 32.57978057861328, 32.57978057861328, 32.57978057861328, 32.57978057861328, 32.57978057861328, 32.57978057861328, 32.57978057861328, 32.57978057861328, 32.410919189453125, 31.754600524902344, 31.3824405670166, 31.3824405670166, 30.51556396484375, 30.425739288330078, 29.947399139404297, 29.947399139404297, 29.91006088256836, 29.91006088256836, 29.91006088256836, 29.91006088256836, 29.91006088256836, 29.10055160522461, 28.724716186523438, 28.724716186523438, 27.277679443359375, 26.919879913330078 ], "content": [ "I installed tagbar in vim .", "when using VIM with tagbar displayed .", "I m using vim with tagbar plugin and by default tagbar shows tags for the current active buffer .", "I m trying to get the vim TagBar plugin to work with groovy language .", "I m using vim and tagbar to write my latex files .", "I am trying to configure a custom language for vim tagbar that would allow the tagbar to be used for viewing Abaqus Finite Element Analysis input files .", "Search tagbar in installed plugins list : : BundleList then tagbar .", "I ll add a link-to your plugin to the Tagbar wiki .", "List of filetypes at : .. . .. . Have it running on MacVim snapshot 72 Vim 7.4 and latest build of tagbar from https : github.com majutsushi tagbar", "The airline plugin https : github.com bling vim-airline has an extension which uses Tagbar https : majutsushi.github.io tagbar to show the current function name .", "About TagBar .. . .. . I had not seen TagBar before people had suggested it .", "If you have the plugins installed properly you can get to it in Vim with : h airline-tagbar and : h tagbar-statusline .", "If I use tagbar in vim it nests the function in the class accordingly .", "I have just installed NERDTree and Tagbar in vim using vundle .", "Technically I m using Tagbar https : github.com majutsushi tagbar in vim to view a file s tags but this question should apply generally to exuberant-ctags v5.8 .", "I duplicated examples from the following links : .. . .. . http : github.com majutsushi tagbar wiki .. . .. . http : andrew.stwrt.ca posts vim-ctags .. . .. . ctags vimwiki vim and tagbar-plugin http : stackoverflow.com questions 7037055 ctags-vimwiki-vim-and-tagbar-plugin .. . .. . http : ctags.sourceforge.net EXTENDING.html .. . .. . This is the software I m using : .. . .. . RHEL 6.7 .. . vim 7.4 .. . tagbar 2.6.1 .. . Exuberant Ctags 5.8 .. . .. . Example of an Abaqus input file example.inp .. . .. . This is what I added to my vim configuration file .vimrc .. . .. . I created a ctags configuration file .ctags .. . .. . When I open an input file and then open the tagbar nothing is there .", "Is there such an option in tagbar or I have to code it myself", "Try to toggle the tagbar with tt .", "I delete those files then open vim then open tagbar and TagBar file is created .", "There s a similar mechanism within Tagbar .", "Now isnt tagbar using ctags", "I just know it is a dependency for tagbar.. .", "I don t use TagBar anymore so I can t test it for you but the doc seems to say https : github.com majutsushi tagbar blob master doc tagbar.txt L243 that you can use : .. . .. . to jump to the TagBar window .", "What do you use besides Tagbar now", "The Tagbar problem .. . .. . 1 .", "I found that tagbar plugin is not installed if ctags command is not available on spf13 installation .", "This is what Tagbar currently looks like : .. . .. . gVim Tagbar image http : imgur.com J12nE.png", "can anybody help me to add systemverilog language support in tagbar vim-plugin .", "You should have proper Tagbar support if you use this https : github.com fishman ctags development version of exuberante-ctags together with my vim-plugin and the following Tagbar configuration :", "try tagbar looks better than taglist", "From left to right : the file TagBar TagList .", "Recently i gave up Taglist for Tagbar .", "Tagbar works as expected for all languages except PHP .", "Both phpctags and tagbar-phpctags should be installed .", "but what about adding support in tagbar", "Correctly indexing your code is thus not a TagBar problem but a ctags jsctags problem .", "Here s a diagram of vim with NERDTree open .. . .. . and after I open Tagbar with NERDTree open .. . .. . NERDTree is now squished to the left .", "How did you discover the name of the Tagbar window", "airline tagbar extension and the do foo function http : i.stack.imgur.com 4l5G4.png .. . .. . But Tagbar knows much more than this", "The explanation of flags is in tagbar doc https : github.com majutsushi tagbar blob master doc tagbar.txt L817 .", "https : github.com majutsushi tagbar blob master doc tagbar.txt L504", "I want to use the next command in .vimrc .. . .. . to jump to the next tag in the tagbar .", "If you want the cursor to stay in the TagBar window add p .", "If that got implemented in ctags it would be trivial to adjust Tagbar to make use of it -- depending on the exact implementation Tagbar would potentially not need any changes at all .", "I am currently trying to make vim s tagbar plugin to work with latex files on Mac OS X .", "It looks like https : github.com majutsushi tagbar blob master autoload tagbar.vim L1702 TagBar sets its own FileType : tagbar this could be used in an autocmd : .. . .. . Another option would be to set a custom highlighting for TagBar s own syntax groups that fits your need as shown in the documentation .", "I d like to have the tagbar VIM plugin launch when I open certain filetypes so I added the following to my .vimrc : .. . .. . However this isn t working as I expected .", "I m trying to use tagbar for reading code in jquery-1.7.1.js renamed jquery.js but it .. . .. . doesn t work and display any errors : .. . .. . your ctags and tagbar configuration are out of sync", "I am trying to show variables inside functions in Tagbar for gVim .", "I have tried messing around with kind2scope and scope2kind in Tagbar to no avail .", "This still doesn t clarify very well what tagbar is doing and what it is not .", "Any thoughts on why ctags is not creating the tags for tagbar to use", "If I try and toggle NERDTree it stays squished until I toggle tagbar .", "In the latex source the input for a graphic look like this : .. . .. . I would like to get in tagbar only the filename in this case plate hole fem elas cd map .", "I have just using PHP Parser https : github.com nikic PHP-Parser as syntax parsing backend written a tool called phpctags https : github.com techlivezheng phpctags to generate ctags compatiable index file and an addon plugin for tagbar called tagbar-phpctags https : github.com techlivezheng tagbar-phpctags to enhance the PHP suport for tagbar .", "Tagbar opens with function variables loaded cursor stays in php source file when Vim loads : .. . .. . substitute php for hs or any other file-type you want .", "However certain plugins such as NERDTree Tagbar create their temporary files in my current working directory .", "If you re mostly interested in Tagbar support there is another approach though : Tagbar supports arbitrary tag-generating programs as long as their output is compatible to the ctags one so you could write a simple parser in say Python and configure Tagbar to use that .", "Only close both if NERDTree and Tagbar are both opened .. . 2 .", "Well I wrote Tagbar so I naturally knew it .", "and when i make this file with Class then it will show in taglist all things like below .. . .. . Class .. . .. . Method .. . .. . Function .. . .. . variables .. . .. . and etc .. . .. . like my module code like something in which Tagbar not working .. . .. . and in normal mode it will like like below an Tagbar show this variable in Tagbar list .. . .. . please help me to set Tagbar for modular JavaScript .", "When you are defining a new language with ctags or change an existing one you also need to supply a corresponding Tagbar configuration so Tagbar knows that there is a new language and how to interpret ctags output .", "TagBar doesn t index your code : it delegates the job to an external program like exuberant-ctags or jsctags .", "So if you give the development version on GitHub a try https : github.com majutsushi tagbar it should work .", "But someone wrote a nice alternative for Haskell that works with Tagbar here : https : github.com bitc lushtags .", "I managed to fix it for some reason TagBar sets nocursorline in the initWindow function I simply replaced it with cul .", "TagBar has a mapping C-n to go to the next top-level tag which may or may be not what you want .", "the main window keep still even though the cusor in tagbar jump to the next tag", "Do you want the tag under your cursor in TagBar to be displayed in the main window", "tagbar is not working for me with above changes even with warning fix .", "I ve searched on the web and found those two sites : .. . .. . https : github.com majutsushi tagbar issues 84 .. . https : github.com majutsushi tagbar wiki groovy .. . .. . So I created a .ctags file containing .. . .. . And I ve added this at the end of my .vimrc file : .. . .. . But when I restart vim and edit a file with a simple class I don t see anything in tagbar .", "However the side effect of this command was that it saves all buffers even NERDTree TagBar etc .", "If I : set ft scheme both TagList and TagBar http : www.vim.org scripts script.php script id 3465 list checker as function .", "I d not actually found TagBar and interestingly enough it just worked with my .ctags file which I added to as I tested it .", "No TagBar doesn t show tags for multiple buffers you can still use native commands like : tselect though .", "I think this may require editing both Tagbar and ctags but I could be am probably completely wrong .", "You should have read the second line of that error message which says : Please read : help tagbar-extend .", "The image shows that global variable Class A but the local variable can t be show in tagbar why", "I want tagbar show local variable str m n and how to set", "http : i.stack.imgur.com 03sVb.png The image shows that global variable Class A but the local variable can t be show in tagbar why", "I want tagbar show local variable str m n and how to set", "So for example if the current buffer is foo.cpp I want tagbar to show tags for foo.hpp or foo.h .", "TagBar is supposed to honor the definitions in your .ctags when running ctags against your code .", "As per the documentation https : github.com vim-scripts Tagbar blob master doc tagbar.txt L937-L947 you are supposed to use the filetype in your custom configuration : .. . .. . g : tagbar type vim filetype .. . .. . .. . 2 .", "I want leader to open or close NERDTree and Tagbar under the following conditions : .. . .. . 1 .", "I do not use NERDTree or Tagbar so this is only supposition but I expect they both declare a global variable while they are open .", "You could add it to the mix or maybe use j : .. . .. . .. . .. . As a side note after a month of usage I found TagBar to be rather good at showing the structure of my code but rather bad at helping me navigate through it .", "In any case you should probably file an enhancement request at the plugin s GitHub issue tracker https : github.com majutsushi tagbar issues offer to implement this and coordinate with the plugin author to increase the chances of your patch becoming accepted .", "Background : TagBar won t use your tags file it queries ctags and read its output directly from stdout .", "Change your custom Tagbar config from : .. . .. . let g : tagbar type tex .. . ctagstype : latex .. . .. . .. . .. . .. . to : .. . .. . let g : tagbar type plaintex .. . ctagstype : plaintex .. . .. .", "TagList and TagBar against a racket file http : i.stack.imgur.com yEaIr.png .. . .. . From what I understand Racket is a rebranding of some Scheme derivative .", "TagBar generates its own tags on the fly and it doesn t even write it to disk somewhere : ctags output is directly parsed and displayed in the window .", "But until someone does that I m afraid there s no real way to properly display PHP scopes in Tagbar since it has to rely on the information that ctags hands to it .", "Have a look at : h tagbar-extend especially the last subsection Writing your own tag-generating program if that would be an option for you .", "Please ensure that no other ctags implementation is actually called by TagBar and try generating a tags file for a Groovy file manually on the command-line .", "Change your custom Tagbar config from : .. . .. . g : tagbar type tex .. . .. . .. . to : .. . .. . g : tagbar type latex .. . .. . .. . This solution will work only if Vim is configured to work well with the latex filetype ftplugin syntax indent which is dubious at best . .. . .. . A conservative solution .. . .. . 1 .", "What happens is this : If TagbarOpen is called while the window is already open Tagbar makes the cursor jump to its window instead of just doing nothing for convenience like I said .", "Thus a possible mapping would be : .. . .. . But neither your mapping nor this one allow you to place the cursor on the next tag which is what you seem to want to jump to the next tag in the tagbar .", "Do you mean something like let g : airline extensions tagbar flags f it displays the full hierarchy of the tag not just the tag itself", "I created a .ctags in my home which has the following line modified from the original line found in tagbar documentation : .. . .. . But I cannot get only the file name ." ] }
{ "confidence": [ 69.5385513305664, 62.90148162841797, 62.828643798828125, 61.62337875366211, 60.62632751464844, 60.220664978027344, 59.68223571777344, 59.61679458618164, 59.00092697143555, 58.11560821533203, 57.75788116455078, 57.097312927246094, 55.947113037109375, 55.893836975097656, 55.49182891845703, 55.318946838378906, 55.18901824951172, 54.420745849609375, 53.449798583984375, 52.96327209472656 ], "content": [ "Question : I d like to have the tagbar VIM plugin launch when I open certain filetypes so I added the following to my .vimrc : .. . .. . However this isn t working as I expected . It opens a side window but the side window displays nothing and my cursor is trapped within it . I cannot switch windows with a click or with the CTRL-W movement commands . However when I run TagbarOpen manually it works just fine . Anyone else tried this or is the above the wrong command to issue .. . Answer : I actually have this exact configuration set up my vimrc for php files . Tagbar opens with function variables loaded cursor stays in php source file when Vim loads : .. . .. . substitute php for hs or any other file-type you want . List of filetypes at : .. . .. . Have it running on MacVim snapshot 72 Vim 7.4 and latest build of tagbar from https : github.com majutsushi tagbar", "Question : I am trying to configure a custom language for vim tagbar that would allow the tagbar to be used for viewing Abaqus Finite Element Analysis input files . I duplicated examples from the following links : .. . .. . http : github.com majutsushi tagbar wiki .. . .. . http : andrew.stwrt.ca posts vim-ctags .. . .. . ctags vimwiki vim and tagbar-plugin http : stackoverflow.com questions 7037055 ctags-vimwiki-vim-and-tagbar-plugin .. . .. . http : ctags.sourceforge.net EXTENDING.html .. . .. . This is the software I m using : .. . .. . RHEL 6.7 .. . vim 7.4 .. . tagbar 2.6.1 .. . Exuberant Ctags 5.8 .. . .. . Example of an Abaqus input file example.inp .. . .. . This is what I added to my vim configuration file .vimrc .. . .. . I created a ctags configuration file .ctags .. . .. . When I open an input file and then open the tagbar nothing is there . AbaqusINP .inp is in the list when I call the following from the command-line . When I try to manually create a tags file I get the following warnings for every line where a keyword is found . The tags file is created but is only populated with the default header . Any thoughts on why ctags is not creating the tags for tagbar to use Thanks for your help . .. . .. . .. . .. . .. . .. . Update : Clarify the desired regular expressions . .. . .. . I would like the section names and the keywords to be assigned tags . I tried these patterns in vim and they seemed to work right . For the example.inp file above I would like the regex for sections to return : .. . .. . Section Name One .. . Section Name Two .. . .. . section regex + n tA-Za-z + .. . .. . .. . .. . For the example.inp file above I would like the regex for keywords to return : .. . .. . Keyword1 .. . KEYWORD2 .. . Keyword3 .. . .. . keyword regex A-Za-z + Comment : Random idea : try to avoid multi line patterns Comment : Could you show us what you are trying to match and capture with your regexes Also you don t have groups in the Section pattern so ctags will have a hard time extracting the third one . .. . Answer : According to this https : github.com universal-ctags ctags issues 219 issuecomment-72600993 ctags does not support multiple line regular expressions . The closer solution I could get to was : .. . .. . Take into account that the 1 in the replace expression refers to groups in the match expression so the parentheses are necessary around the keywords of interest . This was the reason why you received those warnings . I ve also fixed the keyword regular expression to allow the inclusion of numbers . The configuration above will return the following tags for the example you posted : .. . .. . This still returns the comments which is not desirable . But from what I can gather you are using normal comments to define sections so I guess that the format is not fixed . If this is true one possible solution would be : .. . .. . Although it requires that all Sections start with the keyword Section it will return what you are looking for :", "Question : I m using vim with tagbar plugin and by default tagbar shows tags for the current active buffer . I m curious if there is an option to make it always show tags for the corresponding header file . So for example if the current buffer is foo.cpp I want tagbar to show tags for foo.hpp or foo.h . Is there such an option in tagbar or I have to code it myself Thanks .. . Answer : In the latest version 2.5 there is a : TagbarTogglePause command that allows you to view the header tags while editing the implementation file and vice versa . Have you checked the documentation - I don t think your feature is mentioned In any case you should probably file an enhancement request at the plugin s GitHub issue tracker https : github.com majutsushi tagbar issues offer to implement this and coordinate with the plugin author to increase the chances of your patch becoming accepted . Comment : thanks i will look into implementing it myself", "Question : I am currently trying to make vim s tagbar plugin to work with latex files on Mac OS X . This is my .ctags file : .. . .. . and this is the corresponding part in my .vimrc : .. . .. . I basically got all this from this link : https : github.com vim-scripts Tagbar blob master doc tagbar.txt .. . .. . Unfortunately when I start the tagbar nothing happens and when I execute : UpdateTags I get the following error : .. . .. . ctags --version results in : .. . .. . and which ctags in : .. . .. . When I execute ctags --verbose abstract.tex it finds the .ctags file and generates this tag file : .. . .. . The file itself looks like this : .. . .. . What am I missing : .. . .. . Kind regards and thanks for your help : .. . Answer : The EasyTags problem .. . .. . 1 . EasyTags uses the filetype of the current buffer to determine what arguments it should pass to ctags . 2 . The filetype of your file is set to plaintex by Vim the default for .tex files . So you get that error because plaintex is not recognized by ctags . The Tagbar problem .. . .. . 1 . As per the documentation https : github.com vim-scripts Tagbar blob master doc tagbar.txt L937-L947 you are supposed to use the filetype in your custom configuration : .. . .. . g : tagbar type vim filetype .. . .. . .. . 2 . Since your .tex file is recognized as plaintex your g : tagbar type tex will never be used . A liberal solution .. . .. . 1 . Add these lines to your .vimrc to force Vim to recognize .tex files as latex : .. . .. . augroup latex .. . autocmd autocmd BufRead BufNewFile .tex set filetype latex .. . augroup END .. . .. . .. . 2 . Change your custom Tagbar config from : .. . .. . g : tagbar type tex .. . .. . .. . to : .. . .. . g : tagbar type latex .. . .. . .. . This solution will work only if Vim is configured to work well with the latex filetype ftplugin syntax indent which is dubious at best . .. . .. . A conservative solution .. . .. . 1 . Use plaintex instead of latex in your .ctags configuration : .. . .. . --langdef plaintex .. . --langmap plaintex : .tex .. . --regex-plaintex tableofcontents TABLE OF CONTENTS s toc .. . .. . .. . .. . .. . 2 . Change your custom Tagbar config from : .. . .. . let g : tagbar type tex .. . ctagstype : latex .. . .. . .. . .. . .. . to : .. . .. . let g : tagbar type plaintex .. . ctagstype : plaintex .. . .. .", "Question : null .. . Answer : The airline plugin https : github.com bling vim-airline has an extension which uses Tagbar https : majutsushi.github.io tagbar to show the current function name . I know this because of this question http : stackoverflow.com questions 26789467 how-can-i-display-the-function-name-in-vim-airline which I found via asking this question http : stackoverflow.com questions 33699049 display-current-function-in-vim-status-line .. . .. . This works really well and looks great . Here s airline showing me I m editing the do foo function : airline tagbar extension and the do foo function http : i.stack.imgur.com 4l5G4.png .. . .. . But Tagbar knows much more than this Specifically it knows the current class i.e . the parent of the current tag : .. . .. . Tagbar and the DoesFoo class http : i.stack.imgur.com WlMOl.png .. . .. . It does this using ctags https : github.com universal-ctags ctags .. . .. . Is there a way to configure airline to tell me the current class as well as the current function Comment : Do you mean something like let g : airline extensions tagbar flags f it displays the full hierarchy of the tag not just the tag itself Comment : @ryuichiro That s it Exactly what I ve been looking for Where is the documentation for this Comment : You can find it in vim-airline doc https : github.com bling vim-airline blob master doc airline.txt L345 . The explanation of flags is in tagbar doc https : github.com majutsushi tagbar blob master doc tagbar.txt L817 . If you have the plugins installed properly you can get to it in Vim with : h airline-tagbar and : h tagbar-statusline .", "Question : can anybody help me to add systemverilog language support in tagbar vim-plugin . I tried below things but its doesnt worked for me .. . .. . 1 Created .ctags and copy code from https : github.com shaohao config.d blob master ctags .. . .. . 2 mkdir ftplugin to .vim and add systemverilog.vim from https : github.com shaohao vimfiles blob master bundle verilog systemverilog ftplugin systemverilog.vim .. . .. . 3 cd to project directory and run ctags -R Got below warning though .. . .. . Below are some output of ctags .. . .. . But still when i open SV file in gvim and use : TagbarToggle tagbar window is blank : .. . .. . Please help .. . Answer : I ve introduced some improvements to the verilog systemverilog vim-plugin that I made available at Github https : github.com vhda verilog systemverilog.vim . You should have proper Tagbar support if you use this https : github.com fishman ctags development version of exuberante-ctags together with my vim-plugin and the following Tagbar configuration :", "Question : I m trying to get the vim TagBar plugin to work with groovy language . I m running on a Debian Linux . I ve installed exhuberant-ctags . I ve searched on the web and found those two sites : .. . .. . https : github.com majutsushi tagbar issues 84 .. . https : github.com majutsushi tagbar wiki groovy .. . .. . So I created a .ctags file containing .. . .. . And I ve added this at the end of my .vimrc file : .. . .. . But when I restart vim and edit a file with a simple class I don t see anything in tagbar . Just the first line press for help . Does anybody knows why I can t manage to have it work Thanks Comment : That identical setup works for me on Windows . Please ensure that no other ctags implementation is actually called by TagBar and try generating a tags file for a Groovy file manually on the command-line . Comment : Also make sure that the filetype is recognized correctly by Vim . Execute : set filetype and check whether it reports groovy . Comment : Filetype groovy is well recognized by Vim . But I don t really know how to use ctags . I just know it is a dependency for tagbar.. . When running ctags on a groovy file a tags file is created but it doesn t contain anything but some header information TAG FILE FORMAT etc.. . . It seems that my .ctags is read . I added some regex error into it and had some warnings from ctags . .. . Answer : Be sure to run ctags inside or outside of Vim . You must check than the generated tags file is correct . In my .vimrc I ve created the following mapping : .. . .. . to easily run ctags .", "Question : I have already mounted ctags but it still not working at all . I pressed tt and nothing happened . Is that any way to solve this problem in spf13-vim Did Anyone suffer the same problem as me Comment : Who knows Spf13 adds and changes too many things for anybody not familiar with that crap to help you reliably and you probably don t know Vim enough thanks to spf13 to explain your issue or narrow it down to something that can bedebugged . .. . Answer : I found that tagbar plugin is not installed if ctags command is not available on spf13 installation . Search tagbar in installed plugins list : : BundleList then tagbar . If it s not found install ctags first . Running : BundleInstall within vim and restarting vim will fix the problem .", "Question : when using VIM with tagbar displayed . I want to use the next command in .vimrc .. . .. . to jump to the next tag in the tagbar . But the it takes no effect at all . when i typed tn the cusor is jumped to the next tag but the main window keeps still .. . .. . is there somebody can help me .. . Answer : I don t use TagBar anymore so I can t test it for you but the doc seems to say https : github.com majutsushi tagbar blob master doc tagbar.txt L243 that you can use : .. . .. . to jump to the TagBar window . I think it is a little more solid than C-w h which is pretty much tied to a specific layout . Thus a possible mapping would be : .. . .. . But neither your mapping nor this one allow you to place the cursor on the next tag which is what you seem to want to jump to the next tag in the tagbar . TagBar has a mapping C-n to go to the next top-level tag which may or may be not what you want . You could add it to the mix or maybe use j : .. . .. . .. . .. . As a side note after a month of usage I found TagBar to be rather good at showing the structure of my code but rather bad at helping me navigate through it . Because I used it primarily for navigation I ditched it for Vim s default ctags integration C- : tag Tab : tselect and so on and CtrlP s wonderful : CtrlPBufTag and : CtrlPTag . Comment : this doesn t work either . the main window keep still even though the cusor in tagbar jump to the next tag Comment : What does keep still mean Do you want the tag under your cursor in TagBar to be displayed in the main window Then add CR at the end of the mapping . If you want the cursor to stay in the TagBar window add p . Comment : What do you use besides Tagbar now Comment : @EhevuTov it s in my answer : mostly CtrlP and vim s native tag-related commands . I don t use anything to show the structure of my code .", "Question : I d like to have the tagbar VIM plugin launch when I open certain filetypes so I added the following to my .vimrc : .. . .. . However this isn t working as I expected . It opens a side window but the side window displays nothing and my cursor is trapped within it . I cannot switch windows with a click or with the CTRL-W movement commands . However when I run TagbarOpen manually it works just fine . Anyone else tried this or is the above the wrong command to issue .. . Answer : Interesting that s a side effect of a convenience functionality that I hadn t anticipated . What happens is this : If TagbarOpen is called while the window is already open Tagbar makes the cursor jump to its window instead of just doing nothing for convenience like I said . So every time you try to leave the window by switching to the Haskell window the autocommand causes it to jump right back . I ve pushed a change that removes this functionality -- it probably wasn t that useful to begin with . So if you give the development version on GitHub a try https : github.com majutsushi tagbar it should work . That the window is empty has a different reason : Haskell is not supported by Exuberant Ctags by default . But someone wrote a nice alternative for Haskell that works with Tagbar here : https : github.com bitc lushtags .", "Question : I have just installed NERDTree and Tagbar in vim using vundle . Everything works fine when I use one plugin at a time but when I try and open one while having the other one already open causes problem . Here s a diagram of vim with NERDTree open .. . .. . and after I open Tagbar with NERDTree open .. . .. . NERDTree is now squished to the left . If I try and toggle NERDTree it stays squished until I toggle tagbar . Is there something special that I have to do to get the two to place nice Very new to vim so not sure what information to give other than I m using vim 7.4 and I m not sure how to find the versions of the plugins I m using . My .vimrc is Comment : Works for me out of the box . Have you trying deleting commenting out all of the configuration options relating to both of the plugins As in : if it works with default settings try bringing back the config line by line and see which setting is causing the issue . Comment : @guessimtoolate thanks for that suggestion . I found the problem . Looks like this was the line causing the problems au BufWinEnter .go silent loadview .. . Answer : In case anyone else comes across this problem . The solution for me was to remove this line", "Question : The question is really simple when i run TagbarToggle i want the cursorline option to be True in that window if it is in the main window . something like : .. . .. . Of course i could just set it manually every time but that s just not the Vim way . .. . Answer : It looks like https : github.com majutsushi tagbar blob master autoload tagbar.vim L1702 TagBar sets its own FileType : tagbar this could be used in an autocmd : .. . .. . Another option would be to set a custom highlighting for TagBar s own syntax groups that fits your need as shown in the documentation . https : github.com majutsushi tagbar blob master doc tagbar.txt L504 Comment : For some reason this doesn t work for me Comment : Just wanted to let you know that i fixed it .", "Question : Recently i gave up Taglist for Tagbar . Tagbar works as expected for all languages except PHP . It lists class methods and variables into their respective categories instead of displaying methods and variables into their respective scope . I came to know that ctags has poor support for PHP . Is there any way to improve ctags and Tagbar s support for PHP I am hopping for some kind of hack or tweak or any other way around . .. . Answer : I have just using PHP Parser https : github.com nikic PHP-Parser as syntax parsing backend written a tool called phpctags https : github.com techlivezheng phpctags to generate ctags compatiable index file and an addon plugin for tagbar called tagbar-phpctags https : github.com techlivezheng tagbar-phpctags to enhance the PHP suport for tagbar . Methods and properties even local-variables assigned in functions could be listed in their own scope now as well as their access information . Maybe these could help . Comment : Very nice I ll add a link-to your plugin to the Tagbar wiki . Comment : @Techlive Zheng - m getting phpctags not recognized as internal or external command i have included it to the system path . Is there any detail guide Comment : @user949293 Any luky Both phpctags and tagbar-phpctags should be installed .", "Question : I m using vim and tagbar to write my latex files . In the latex source the input for a graphic look like this : .. . .. . I would like to get in tagbar only the filename in this case plate hole fem elas cd map . I created a .ctags in my home which has the following line modified from the original line found in tagbar documentation : .. . .. . But I cannot get only the file name . I tried other things but sometimes I only remove the . . sometimes I get only plate hole . . What did I do wrong Thanks .. . Answer : Your regular expression is incorrect you can t use character classes like that . This one worked for me : Comment : It works for me too thanks.Could you explain this part please + + 4 Comment : The first group looks for for as many characters that are non-closing braces as possible and then a at the end and the second group looks for as many characters that are neither a closing brace nor a slash as possible . This way all slashes i.e . directories will end up in the first group and since that group is optional it also works with files that are in the current directory . Comment : thank you very much", "Question : can anybody help me to add systemverilog language support in tagbar vim-plugin . I tried below things but its doesnt worked for me .. . .. . 1 Created .ctags and copy code from https : github.com shaohao config.d blob master ctags .. . .. . 2 mkdir ftplugin to .vim and add systemverilog.vim from https : github.com shaohao vimfiles blob master bundle verilog systemverilog ftplugin systemverilog.vim .. . .. . 3 cd to project directory and run ctags -R Got below warning though .. . .. . Below are some output of ctags .. . .. . But still when i open SV file in gvim and use : TagbarToggle tagbar window is blank : .. . .. . Please help .. . Answer : Background : TagBar won t use your tags file it queries ctags and read its output directly from stdout . I believe the problem is how the --langmap is defined in your .ctags . AFAIK the coma is used to separate langmaps while different extensions are just put one after the other without separators : .. . .. . I think line 2 of your .ctags file should look like this : Comment : Thank you : with above change warning is gone but what about adding support in tagbar Comment : TagBar is supposed to honor the definitions in your .ctags when running ctags against your code . If you still have problems I suggest you try TagBar s issue tracker . Comment : didnt get you tagbar is not working for me with above changes even with warning fix . Comment : Yes I got you but this is not tagbar s issue tracker .", "Question : Technically I m using Tagbar https : github.com majutsushi tagbar in vim to view a file s tags but this question should apply generally to exuberant-ctags v5.8 . Suppose I ve got the following python file call it foo.py : .. . .. . Let s run ctags on it : ctags foo.py . The resulting tags file looks like this : .. . .. . The bit I m interested in is the last field of the second line class : foo . That s the scope of the bar function . If I use tagbar in vim it nests the function in the class accordingly . Now suppose I m adding support for a new language in my .ctags . In fact I m adding support for this puppet file : .. . .. . Suppose I use the following .ctags arguments . The import regex is ugly errr.. . ugly for regex but it gets the job done enough for this example : .. . .. . That generates the following tag in my tags file : .. . .. . Notice neither line contains scoping information . My question is this : Is there anyway for me to construct the --regex-puppet argument or --regex- LANG lines generally to collect information about a tag s scope To perhaps declare that tags meeting criterion A are always going to be scope-parents of tags meeting criterion B man ctags suggests no clear way to add arbitrary scope information but I might be overlooking another solution snipped slightly for emphasis : .. . Answer : No unfortunately that is not possible with the regex pattern support in ctags . The only way to get ctags to generate correct scopes is to write a parser as an additional module in C . I would like to add support for a better handling of new languages to ctags if I find the time but so far that hasn t worked out and I m also still unsure about the best approach . If you re mostly interested in Tagbar support there is another approach though : Tagbar supports arbitrary tag-generating programs as long as their output is compatible to the ctags one so you could write a simple parser in say Python and configure Tagbar to use that . Have a look at : h tagbar-extend especially the last subsection Writing your own tag-generating program if that would be an option for you .", "Question : I installed tagbar in vim . It parses the whole js file perfectly . But when i try to use ctags it doesnt parse the file well . Now isnt tagbar using ctags .. . Answer : TagBar generates its own tags on the fly and it doesn t even write it to disk somewhere : ctags output is directly parsed and displayed in the window . You may get this error because you didn t generate a tags file with : ctags -R . or because it s out of date . Comment : yup . i tried adding the -R flag but it the same .", "Question : i am working in vim and when i make js with modules then it not shown any tag . and when i make this file with Class then it will show in taglist all things like below .. . .. . Class .. . .. . Method .. . .. . Function .. . .. . variables .. . .. . and etc .. . .. . like my module code like something in which Tagbar not working .. . .. . and in normal mode it will like like below an Tagbar show this variable in Tagbar list .. . .. . please help me to set Tagbar for modular JavaScript . Comment : The question is unclear both with respect to what your current situation is and what your expected situation is . Comment : i explained all things dear but its ok i am trying to improve this Comment : Perhaps you might want to add some sample code as well . Comment : i have updated my question @DhruvaSagar Comment : This still doesn t clarify very well what tagbar is doing and what it is not . My guess is it should be showing both ENQUIRY enquiryData variables . Also the use of modules is a bit confusing here I assumed you were talking about node-modules . .. . Answer : TagBar doesn t index your code : it delegates the job to an external program like exuberant-ctags or jsctags . Correctly indexing your code is thus not a TagBar problem but a ctags jsctags problem . If you need help with either of those you ll have to ask another more precise question . If possible written in a better english . Or search this site because the topic has been discused many times before . Comment : thanks this make sense for me @romainl", "Question : I ve recently started using racket and one of the first things I ve done has been to try and get the vim TagList plugin http : vim-taglist.sourceforge.net to work with it . However it doesn t work in the slightest . I can open racket files and the TagList window will be as blank as-if I had opened a text file . According to the extending page http : vim-taglist.sourceforge.net extend.html I have added the following to my .vimrc file : .. . .. . The extra ctags stuff is also in my .ctags file but TList was spitting out errors about my setting line not being any good . I did original try to use ctags existing scheme functionality but I had the same nothing results . To use the existing scheme functionality i tried the following in my .vimrc .. . .. . If anyone else has any ideas on how to get it working then I would be extremely grateful . Thanks .. . .. . I d post a link-to the ctags one page as well but it wont let me new user . A link-to it can be found on the extending taglist page . EDIT .. . .. . ctags from the command-line .. . .. . I can use ctags from the command-line . Testing with the ctags line on the TagList FAQ page I get the following : .. . .. . Output is the same if I force the language definition with switches or if I change the language to scheme . About TagBar .. . .. . I had not seen TagBar before people had suggested it . Interestingly enough it just worked with the changes to my .ctags file . Unfortunately I ve not found a setting for showing the tags from all loaded buffers the way TagList does so I would prefer to use TagList . I d post comparison images but I don t think its going to let me as a new member . As per romainl s suggestion I can set the vim filetype to scheme and it does work . This however only seems like an 80 solution when the documentation according to the extending pages seems to suggest that what I have should work . Perhaps I should be looking at filing a bug report . Thanks again Comment : Do your settings work when you use ctags directly from the command-line If not it s not a problem with TagList or Vim but with your regular expression . Comment : Does this --langmap scheme : .rkt work when ctags is used directly Comment : try tagbar looks better than taglist Comment : @locojay Indeed it does but it does not as far as I can see display the tags of multiple buffers at once . Comment : @romainl yes to both questions . I m editing the post to provide more details . .. . Answer : Here is a small racket snippet I lifted from the official documentation http : docs.racket-lang.org quick index.html and saved as tt.rkt : .. . .. . Without racket-specific syntax indent files nothing is shown whether ft is set to racket of course or nothing the default . If I : set ft scheme both TagList and TagBar http : www.vim.org scripts script.php script id 3465 list checker as function . From left to right : the file TagBar TagList . TagList and TagBar against a racket file http : i.stack.imgur.com yEaIr.png .. . .. . From what I understand Racket is a rebranding of some Scheme derivative . If it doesn t deviate too much from the norm adding this line in your .vimrc may help : Comment : Thanks for answering . I d not actually found TagBar and interestingly enough it just worked with my .ctags file which I added to as I tested it . Unfortunately while it does work it doesn t display tags from multiple buffers at once at least I didn t see an option for it . I d like to see if I can get the problem fixed but it is good to know I can work around it . Thanks . Comment : No TagBar doesn t show tags for multiple buffers you can still use native commands like : tselect though . It s not as pretty and convenient but it works .", "Question : I ve recently started using racket and one of the first things I ve done has been to try and get the vim TagList plugin http : vim-taglist.sourceforge.net to work with it . However it doesn t work in the slightest . I can open racket files and the TagList window will be as blank as-if I had opened a text file . According to the extending page http : vim-taglist.sourceforge.net extend.html I have added the following to my .vimrc file : .. . .. . The extra ctags stuff is also in my .ctags file but TList was spitting out errors about my setting line not being any good . I did original try to use ctags existing scheme functionality but I had the same nothing results . To use the existing scheme functionality i tried the following in my .vimrc .. . .. . If anyone else has any ideas on how to get it working then I would be extremely grateful . Thanks .. . .. . I d post a link-to the ctags one page as well but it wont let me new user . A link-to it can be found on the extending taglist page . EDIT .. . .. . ctags from the command-line .. . .. . I can use ctags from the command-line . Testing with the ctags line on the TagList FAQ page I get the following : .. . .. . Output is the same if I force the language definition with switches or if I change the language to scheme . About TagBar .. . .. . I had not seen TagBar before people had suggested it . Interestingly enough it just worked with the changes to my .ctags file . Unfortunately I ve not found a setting for showing the tags from all loaded buffers the way TagList does so I would prefer to use TagList . I d post comparison images but I don t think its going to let me as a new member . As per romainl s suggestion I can set the vim filetype to scheme and it does work . This however only seems like an 80 solution when the documentation according to the extending pages seems to suggest that what I have should work . Perhaps I should be looking at filing a bug report . Thanks again Comment : Do your settings work when you use ctags directly from the command-line If not it s not a problem with TagList or Vim but with your regular expression . Comment : Does this --langmap scheme : .rkt work when ctags is used directly Comment : try tagbar looks better than taglist Comment : @locojay Indeed it does but it does not as far as I can see display the tags of multiple buffers at once . Comment : @romainl yes to both questions . I m editing the post to provide more details . .. . Answer : I ve been struggling with the same issue though for xslt files.. . My solution was found by poking around in taglist.vim whereby I added a line for .. . .. . try doing a search for the s : tlist def parts of the Vim code and put in something which looks sensible . There s a similar mechanism within Tagbar . I ve not read the code through in detail so I don t know why it would need this and not use the output from cta Comment : N.B . my code line above isn t complete.. . just for example only ." ] }
[ "yes-answer-long", "yes-answer-short" ]
tags
UNK_RELATION
pyjade@jinja2@42
pyjade -- jade syntax adapter for django @placeholder and mako templates .
{ "confidence": [ 43.34413528442383, 42.679019927978516, 40.17970657348633, 39.93043518066406, 38.82221221923828, 38.82221221923828, 36.77085876464844, 35.78190231323242, 35.75023651123047, 35.23212814331055, 35.23212814331055, 34.99531555175781, 33.97968292236328, 33.548545837402344, 33.548545837402344, 33.241844177246094, 33.176082611083984, 32.93711471557617, 32.700069427490234, 32.62249755859375, 32.534969329833984, 32.390541076660156, 31.90462875366211, 31.547346115112305, 31.36701202392578, 30.591041564941406, 30.460193634033203, 30.423080444335938, 30.228031158447266, 29.580202102661133, 29.306716918945312, 29.306716918945312, 29.180221557617188, 29.14714813232422, 29.05975341796875, 29.05975341796875, 28.370460510253906, 28.366107940673828, 28.159706115722656, 28.159706115722656, 28.007139205932617, 27.965248107910156, 27.613052368164062, 27.567028045654297, 27.444793701171875, 27.444793701171875, 27.444793701171875, 27.444793701171875, 27.444793701171875, 27.444793701171875, 26.969776153564453, 26.635663986206055, 26.635663986206055, 26.484813690185547, 26.431503295898438, 26.426067352294922, 26.417633056640625, 26.37784194946289, 26.372962951660156, 26.233646392822266, 25.899269104003906, 25.80728530883789, 25.70510482788086, 25.70510482788086, 25.56011962890625, 25.283763885498047, 24.867008209228516, 24.729148864746094, 24.729148864746094, 24.469894409179688, 24.165264129638672, 24.138442993164062, 24.138442993164062, 24.12458038330078, 24.081729888916016, 23.860109329223633, 23.603961944580078, 23.361751556396484, 23.361751556396484, 23.361751556396484, 23.361751556396484, 22.500118255615234, 22.42041015625, 22.4133358001709, 22.4133358001709, 22.4133358001709, 22.316497802734375, 22.18315887451172, 22.18315887451172, 22.126541137695312, 22.020614624023438, 21.962318420410156, 21.927570343017578, 21.927570343017578, 21.927570343017578, 21.615360260009766, 21.366085052490234, 21.34111785888672, 21.273143768310547, 20.782617568969727 ], "content": [ "Is this possible to do in standard Django templates without pyjade", "Jade is a great template.I wanna use it in Django and I found Pyjade .", "The problem here is the templates aren t really static they are jade pyjade templates that need to be pre-compiled .", "Based on the jade and pyjade docs what you have is not valid jade syntax : Jinja s with-statement http : jinja.pocoo.org docs dev templates with-statement is not supported in jade nor does pyjade support embedding python code in your jade template see also for example Using python code in pyjade http : stackoverflow.com questions 15779120 using-python-code-in-pyjade .", "I m using pyjade not which is not exactly jade .", "Unfortunately this will not work either in either jade or pyjade .", "I ve followed the install guide on pyjade website https : pypi.python.org pypi pyjade and rewritten all my templates in my Django project .", "No pyjade does not allow embedding arbitrary python code into jade .", "I m diving into Jade for the first time using PyJade https : github.com SyrusAkbary pyjade so that I can use it within Flask and Jinja2 .", "This : .. . .. . correctly translated into .. . .. . but .. . .. . become .. . .. . I use pyjade with Django .", "I m using pyjade in my django project .", "Although Pyjade is really nice with Django it has some drawbacks when it comes errors in templates .", "Pyjade does not have the same syntax for the engine-specific parts as jade and therefore will not work for me .", "Can I use pyjade on the command-line to convert files the same way I can use jade", "I don t use jade or pyjade much but I have used jinja2 with python-3.x .", "I am running pyjade https : github.com SyrusAkbary pyjade for Django templates as I find it much easier to write in but I am trying to convert it to html with the built-in converter .", "Looking at one of the examples in the pyjade docs https : github.com SyrusAkbary pyjade example it looks like you can embed JavaScript in the usual Jade Template Syntax way http : jade-lang.com I don t think you have to worry about the Python side for JavaScript in this case .", "Looking at the docs for pyjade https : github.com SyrusAkbary pyjade I don t see an example where Python can be directly embedded.. . because it seems like pyjade mostly acts as some sort of wrapper or parser for Jade Template Syntax .", "pyjade doesn t give you the option to directly interpolate jade and python objects rather it allows conversion of jade to a format friendly to another template-engine such as Jinja2 .", "In pyjade you can do : .. . .. . I do not know if you have your Django setup for using pyjade", "github.com SyrusAkbary pyjade blob master pyjade https : github.com SyrusAkbary pyjade blob master pyjade compiler.py L216", "As pyjade is rendered with python syntax.. . yo have to follow python syntax so this expression will succeed in js form.name.errors.length 0", "How to set it up in pyramid it would be great if the pyramid system will use different renderers depending on file extension and after using pyjade will also compile pyjade output with mako compiler to concrete html .", "Thank you and thanks for pyjade", "I m using PyJade in Django and i have a problem with association of arrays with item .", "I m using flask with pyjade for templating .", "Question : .. . .. . I would like to rewrite concrete.mako in pyjade as a concrete.jade and on rendering it I would like it to compile to mako and then to compile to concrete html .", "This bug is fixed in the new version 1.0 of pyjade https : github.com SyrusAkbary pyjade .", "I m unable to inject ternary syntax into Jade without an error .", "I m still a bit confused about when to use jade syntax and when to use flask Jinja2 syntax .", "However I think it can install pyjade .", "Yes PyJade comes with a command-line utility CLI .", "You should use the way of adding functions to the templating environment that is used by the tamplate language you compile the jade files to using pyjade .", "Is it possible to just try using a for or each loop as described in the Jade docs http : naltatis.github.com jade-syntax-docs for", "When I run pyjade -c django input.jade output.html I get the error pkg resources.DistributionNotFound : six .", "From my settings.py I have .. . .. . Is there any known bugs with using pyjade together with Django 1.5.4", "Thanks for the advice @oyvindym I will try to improve syntax-error handling for the next version of pyjade :", "I fixed this problem by using the Jinja2 syntax in the jade template .", "I d love it if you could submit a patch for this on GitHub.. . github.com SyrusAkbary pyjade https : github.com SyrusAkbary pyjade", "@Roshambo I have a forked repo which solved this problem : github.com dementrock pyjade https : github.com dementrock pyjade .", "As mentioned in the github issue 70 https : github.com SyrusAkbary pyjade issues 70 including mixins aren t supported .", "In Django Template : .. . .. . How can i make this using Jade", "The issue I am having is now is that pyjade adds extra double quotes exactly like the Tim in : github.com SyrusAkbary pyjade issues 67 https : github.com SyrusAkbary pyjade issues 67", "this is not caused by pyjade but Jinja2.. . .. . .. . You have to import the template with context .", "Does pyjade actually support arbitrary javascript expressions", "The below pyjade code causes an internal server error .", "It s Syrus creator of pyjade Python package .", "I have two projects using pyjade at the moment .", "I m using Flask PyJade and jQuery as a controller .", "Pyjade version I am using is 4.0.0", "I m Syrus author of pyjade .", "However it may cause other problems see github.com SyrusAkbary pyjade pull 5 https : github.com SyrusAkbary pyjade pull 5", "You can install PyJade with .. . .. . And then according to the documentation https : github.com SyrusAkbary pyjade you can insert the following line in your Flask app", "I m trying to combine Django with Jade but I ve had some problems .", "Is there a templating language like jade http : jade-lang.com that is for both python and javascript and has the same syntax on each", "I m trying to convert this html .. . .. . to jade .", "However Django doesn t seem to find templates when I use the extends tag in templates .", "I think a somewhat ugly workaround I found in a newer version of pyjade solves this : Including mixins in pyjade workaround http : stackoverflow.com questions 27278199 including-mixins-in-pyjade-workaround 27278200", "I m trying to generate a list using pyjade like so : .. . .. . But I see this error : .. . .. . UndefinedError : enumerate is undefined .. . .. . I must be embedding python code into Jade wrong .", "This is the line in jade .", "Jade uses what I refer to as implicit enumeration - it enumerates values in a list simply by adding one more variable i than there are values to unpack : for item i in list like For dicts you can do for key val in dict like .. . .. . Shown below is your example using tuple unpacking and implicit enumeration together tested with PyJade 2.0.2 .. . .. . NOTE : As more commonly seen in standard Jade code as of this writing PyJade does NOT support the ternary-operator for assignment .", "I can serve AngularJS templates from the templates directory instead of the static directory so I can run them through the jinjia pipeline and should be able to define the templates in PyJade .", "I solved this problem myself by changing some code inside pyjade.. .", "I m learning about pyjade and I m having trouble with the inputs type radio .", "Ideally I would like to use something that provides a nicer syntax then html something like slim haml or jade .", "In Django Debug Mode Django told me : .. . .. . When I try to use .. . .. . I can get the correct result but with 3 warning : .. . .. . Here is my setting.py .. . .. . I use pip to install pyjade on my Django 1.4 .. . .. . Does anybody meet this problem and how to solve it", "You could use Mako .", "Hi @user3745936 I m Syrus creator of pyjade .", "BTW how stable and feature complete is PyJade", "I am using 4.0.0 version of pyjade here as templating language .", "I m not yet comfortable with the idea of Flask working directly with my jade files .", "Given a jade template and a dictionary how can I use the dictionary to populate the jade template", "The snippet is directly taken from http : jade-lang.com reference iteration .. . .. . I am sure the dictonary is available to be parsed with jade .", "Pyjade s implementation of include doesn t support mixins but extends http : jade-lang.com reference extends does although you have to use a block .", "Let s say that I have a template written in mako : base.mako .", "I have static javascript templates I want to serve with my Django application .", "But jade renders in double quotes instead of single quotes .", "I haven t used pyjade but I m guessing you re looking for : a href url for browse problem problem id problem . id", "Follow this link and u would solve the problem.Maybe u can install the lastest version of pyjade to solve this problem .", "The author helped me and close this issue : https : github.com SyrusAkbary pyjade issues 85 .. . .. . Have fun .", "For example .. . .. . I ve been looking at pyjade but I can t figure out where a function like interpolate is defined .", "Finally I found an answer from here : https : github.com SyrusAkbary pyjade issues 44 .. . .. . use link href STATIC URL + css bla.css or link href STATIC URL css bla.css .. . .. . In addition to this situation I met some problems when I use jade to write for-loop in the template.I used django template to instead jade s for-loop .", "The problem is that when I try to render the page django raises an exception : .. . .. . I checked my manifest here it is : .. . .. . 608f1d299c1a9d4141630b7ebb668456 : .. . .. . Here is my jade template .. . .. . Any thoughts", "I m developing on an old operating-system that can t run a perquisite version of Node.js for using Jade .", "I ve tried it every way suggested here http : stackoverflow.com questions 7563647 jade-inline-conditional .", "For now I m going with the silly method of using the jade files to compile html code with jinja code inside it .", "One with Django 1.6.3 and one with Django 1.5.4 .", "Now let s say I have the following mixin in mixins.jade : .. . .. . And in my template index.jade : .. . .. . In the template itself I can read foo just fine but in the imported mixin I get .. . .. . Is this a shortcoming of pyjade or is there a workaround", "So try something like this : .. . .. . I presume you are using python-2.7 because with python-3.4 even the basic examples from the pyjade website don t work .", "Referring to https : github.com SyrusAkbary pyjade issues 27 it seems the jinja2 does not allow importing mixins from external files .", "Also I have a template written in mako named : concrete.mako which inherits from base.mako this way : inherit file base.mako .", "Did you check the issues here - github.com django-compressor django-compressor issues 169 https : github.com django-compressor django-compressor issues 169", "Coming from scalade I d thought pyjade allows you to embed python code as scalade allows you to embed scala code .", "I cant find the bit of code used for interpolation in the pyjade source so I haven t done anything other than look through that codebase .", "Assuming the above is correct my confusion is how to use pyjade or any such tool with flask to transform the partials that the client-side application would be using .", "Based on the error which is complaining about a TypeError with each module m in modules with this line and looking at the docs for iteration of jade http : jade-lang.com reference iteration suggests to me that the index derived in the iteration is a string .", "See here https : pythonhosted.org Flask-Mako how to install and use it .", "But your use of endfor and such makes me think you have not looked at the jade documentation which says nothing about these keywords and shows clearly that they are not needed .", "I didn t realize the python element of this formula made it s way into the templates .", "I can access context variables within templates directly and even in inherited templates but not when I include mixins or try to import mixins from another template ." ] }
{ "confidence": [ 57.81705856323242, 56.17247009277344, 53.74793243408203, 53.64244079589844, 51.71383285522461, 51.532981872558594, 51.45184326171875, 51.07978820800781, 49.543006896972656, 47.98311233520508, 47.72898483276367, 47.63637924194336, 47.28315353393555, 46.658470153808594, 45.584312438964844, 45.33504867553711, 43.0060920715332, 42.786075592041016, 42.3748893737793, 42.3748893737793 ], "content": [ "Question : I ve followed the install guide on pyjade website https : pypi.python.org pypi pyjade and rewritten all my templates in my Django project . However Django doesn t seem to find templates when I use the extends tag in templates . When I try to extend another template I get this error . From my settings.py I have .. . .. . Is there any known bugs with using pyjade together with Django 1.5.4 The project worked fine using ordinary html templates I have not changed anything about the folder structure . EDIT : Added settings and more information . Comment : Yes I have . I have two projects using pyjade at the moment . One with Django 1.6.3 and one with Django 1.5.4 . The 1.6.3 project works properly and I have the from what I can see exact same settings . .. . Answer : Solved it . Didn t really have anything to do with Django not finding the template . It was just errors with poor conversion from HTML to Jade leaving misspells and templatetags that wasn t closed . Although Pyjade is really nice with Django it has some drawbacks when it comes errors in templates . It just says line 0 and nothing about where the error is located . If you have the same problem a tip would be to check your syntax one more time . Comment : Thanks for the advice @oyvindym I will try to improve syntax-error handling for the next version of pyjade :", "Question : I m trying to convert this html .. . .. . to jade . I tried .. . .. . But messages get flashed messages just gets printed to the page . I m still a bit confused about when to use jade syntax and when to use flask Jinja2 syntax . .. . Answer : I don t use jade or pyjade much but I have used jinja2 with python-3.x . Based on the jade and pyjade docs what you have is not valid jade syntax : Jinja s with-statement http : jinja.pocoo.org docs dev templates with-statement is not supported in jade nor does pyjade support embedding python code in your jade template see also for example Using python code in pyjade http : stackoverflow.com questions 15779120 using-python-code-in-pyjade . Therefore you have to use a different construct . This should be rather straightforward as the with merely creates an inner scope for variables of the with-statement outside of this scope the with variables are not visible . The if messages is required only if messages can be None rather than empty list . So try something like this : .. . .. . I presume you are using python-2.7 because with python-3.4 even the basic examples from the pyjade website don t work . But your use of endfor and such makes me think you have not looked at the jade documentation which says nothing about these keywords and shows clearly that they are not needed . So as they say RTFM it always helps then your question can be more specific . Comment : Thanks this ended up working and helped clear up some of my confusion . I m not yet comfortable with the idea of Flask working directly with my jade files . For now I m going with the silly method of using the jade files to compile html code with jinja code inside it . Is this crazy Comment : @dramal Ok please remember that on SO it is important to close upvote the answer for others to know answered else please be specific about what is insufficient the method you ask about seems more like a separate question . Welcome to SO", "Question : I m diving into Jade for the first time using PyJade https : github.com SyrusAkbary pyjade so that I can use it within Flask and Jinja2 . So far everything seems to be working and compiling correctly though I m wondering if this is a bug in PyJade s translation I m unable to inject ternary syntax into Jade without an error . I ve tried it every way suggested here http : stackoverflow.com questions 7563647 jade-inline-conditional . My error is always .. . .. . or .. . .. . Am I doing something wrong here Here s a simplified code snippet .. . Answer : As pyjade is rendered with python syntax.. . yo have to follow python syntax so this expression will succeed in js form.name.errors.length 0 form-group : form-group has-error but not in python as the ternary operation in python is a if test else b . So the solution is : .. . .. . div class form-group if not len form.name.errors else form-group has-error Comment : Wow that s awesome . I didn t realize the python element of this formula made it s way into the templates . So cool and such a great project . Thank you Syrus", "Question : Is there a templating language like jade http : jade-lang.com that is for both python and javascript and has the same syntax on each Pyjade does not have the same syntax for the engine-specific parts as jade and therefore will not work for me . I am willing to use something like jinja2js https : github.com mkerrin pwt.jinja2js but jinja2js doesn t work for pyjade . .. . Answer : I m Syrus author of pyjade . I have developed recently the package jsjinja https : github.com SyrusAkbary jsjinja which converts Jinja2 templates to javascript in a new and different way . Check it out", "Question : I m trying to generate a list using pyjade like so : .. . .. . But I see this error : .. . .. . UndefinedError : enumerate is undefined .. . .. . I must be embedding python code into Jade wrong . What s the right way to do this Comment : Looking at the docs for pyjade https : github.com SyrusAkbary pyjade I don t see an example where Python can be directly embedded.. . because it seems like pyjade mostly acts as some sort of wrapper or parser for Jade Template Syntax . Is it possible to just try using a for or each loop as described in the Jade docs http : naltatis.github.com jade-syntax-docs for Comment : Oh Coming from scalade I d thought pyjade allows you to embed python code as scalade allows you to embed scala code . Does pyjade actually support arbitrary javascript expressions Or does it only pick out a few to convert into Python template equivalent Comment : Looking at one of the examples in the pyjade docs https : github.com SyrusAkbary pyjade example it looks like you can embed JavaScript in the usual Jade Template Syntax way http : jade-lang.com I don t think you have to worry about the Python side for JavaScript in this case . Comment : Which target language are you compiling to Also it seems the problem is that enumerate is not in the templating environment . .. . Answer : Jade uses what I refer to as implicit enumeration - it enumerates values in a list simply by adding one more variable i than there are values to unpack : for item i in list like For dicts you can do for key val in dict like .. . .. . Shown below is your example using tuple unpacking and implicit enumeration together tested with PyJade 2.0.2 .. . .. . NOTE : As more commonly seen in standard Jade code as of this writing PyJade does NOT support the ternary-operator for assignment . variable condition value if true : value if false", "Question : I m trying to generate a list using pyjade like so : .. . .. . But I see this error : .. . .. . UndefinedError : enumerate is undefined .. . .. . I must be embedding python code into Jade wrong . What s the right way to do this Comment : Looking at the docs for pyjade https : github.com SyrusAkbary pyjade I don t see an example where Python can be directly embedded.. . because it seems like pyjade mostly acts as some sort of wrapper or parser for Jade Template Syntax . Is it possible to just try using a for or each loop as described in the Jade docs http : naltatis.github.com jade-syntax-docs for Comment : Oh Coming from scalade I d thought pyjade allows you to embed python code as scalade allows you to embed scala code . Does pyjade actually support arbitrary javascript expressions Or does it only pick out a few to convert into Python template equivalent Comment : Looking at one of the examples in the pyjade docs https : github.com SyrusAkbary pyjade example it looks like you can embed JavaScript in the usual Jade Template Syntax way http : jade-lang.com I don t think you have to worry about the Python side for JavaScript in this case . Comment : Which target language are you compiling to Also it seems the problem is that enumerate is not in the templating environment . .. . Answer : No pyjade does not allow embedding arbitrary python code into jade . Use jade s syntax instead .", "Question : I m using PyJade in Django and i have a problem with association of arrays with item . In Django Template : .. . .. . How can i make this using Jade .. . Answer : In pyjade you can do : .. . .. . I do not know if you have your Django setup for using pyjade If not you need to do so .", "Question : I m trying to generate a list using pyjade like so : .. . .. . But I see this error : .. . .. . UndefinedError : enumerate is undefined .. . .. . I must be embedding python code into Jade wrong . What s the right way to do this Comment : Looking at the docs for pyjade https : github.com SyrusAkbary pyjade I don t see an example where Python can be directly embedded.. . because it seems like pyjade mostly acts as some sort of wrapper or parser for Jade Template Syntax . Is it possible to just try using a for or each loop as described in the Jade docs http : naltatis.github.com jade-syntax-docs for Comment : Oh Coming from scalade I d thought pyjade allows you to embed python code as scalade allows you to embed scala code . Does pyjade actually support arbitrary javascript expressions Or does it only pick out a few to convert into Python template equivalent Comment : Looking at one of the examples in the pyjade docs https : github.com SyrusAkbary pyjade example it looks like you can embed JavaScript in the usual Jade Template Syntax way http : jade-lang.com I don t think you have to worry about the Python side for JavaScript in this case . Comment : Which target language are you compiling to Also it seems the problem is that enumerate is not in the templating environment . .. . Answer : You should use the way of adding functions to the templating environment that is used by the tamplate language you compile the jade files to using pyjade . For Flask using jinja this should be put in your init .py would be :", "Question : The below pyjade code causes an internal server error . When the module.key is taken outside the href it works fine . Any ideas enter image description here http : i.stack.imgur.com o57vd.png .. . Answer : Based on the error which is complaining about a TypeError with each module m in modules with this line and looking at the docs for iteration of jade http : jade-lang.com reference iteration suggests to me that the index derived in the iteration is a string . You should try Comment : I m using pyjade not which is not exactly jade . Actually I realized that the syntax above is wrong . What I have to do : a href module.key . The issue I am having is now is that pyjade adds extra double quotes exactly like the Tim in : github.com SyrusAkbary pyjade issues 67 https : github.com SyrusAkbary pyjade issues 67", "Question : Jade is a great template.I wanna use it in Django and I found Pyjade . I follow the example code but I got error when I run the project . In Django Debug Mode Django told me : .. . .. . When I try to use .. . .. . I can get the correct result but with 3 warning : .. . .. . Here is my setting.py .. . .. . I use pip to install pyjade on my Django 1.4 .. . .. . Does anybody meet this problem and how to solve it Comment : Where is your django installed in I think you run django at 1.1 or lower version indeed take a look at the discuss groups.google.com d topic django-users CEvCz-IwLQc discussion https : groups.google.com d topic django-users CEvCz-IwLQc discussion Comment : nope .. . I am using Django 1.4 . : - .. . Answer : Follow this link and u would solve the problem.Maybe u can install the lastest version of pyjade to solve this problem . The author helped me and close this issue : https : github.com SyrusAkbary pyjade issues 85 .. . .. . Have fun .", "Question : I have some trouble adding my CSS in my template using STATIC URL . The tag does not work inside the link markup but works anywhere else . This : .. . .. . correctly translated into .. . .. . but .. . .. . become .. . .. . I use pyjade with Django . Anybody can help on this .. . .. . edit I found the answer : if you want to use static attributes use instead of . Example : Comment : I keep forgetting to use for Jade template code I want to escape being rendered . This solved my problem . Thanks . .. . Answer : Finally I found an answer from here : https : github.com SyrusAkbary pyjade issues 44 .. . .. . use link href STATIC URL + css bla.css or link href STATIC URL css bla.css .. . .. . In addition to this situation I met some problems when I use jade to write for-loop in the template.I used django template to instead jade s for-loop .", "Question : I have static javascript templates I want to serve with my Django application . Usually you put them in the static folder and that s it . The problem here is the templates aren t really static they are jade pyjade templates that need to be pre-compiled . My plan is having the templates inside a sub-directory of the app s templates dir lets call it jstemplates and then serve them from the urls.py file like this : .. . .. . but how can I get the captured template name .. . Answer : Thinking it better I suppose the captured attribute won t be available until view s instantiation so I made a sub-class of TemplateView called JsTemplateView . and added the corresponding line in urls.py url r jstemplates P template . JsTemplateView.as view", "Question : Given a jade template and a dictionary how can I use the dictionary to populate the jade template For example .. . .. . I ve been looking at pyjade but I can t figure out where a function like interpolate is defined . How do I write interpolate Comment : what have you tried so far Comment : I cant find the bit of code used for interpolation in the pyjade source so I haven t done anything other than look through that codebase . Comment : github.com SyrusAkbary pyjade blob master pyjade https : github.com SyrusAkbary pyjade blob master pyjade compiler.py L216 Comment : Can you show me an example of its usage .. . Answer : pyjade doesn t give you the option to directly interpolate jade and python objects rather it allows conversion of jade to a format friendly to another template-engine such as Jinja2 . This template-engine can then do the interpolation for you . For example", "Question : I m developing on an old operating-system that can t run a perquisite version of Node.js for using Jade . However I think it can install pyjade . Can I use pyjade on the command-line to convert files the same way I can use jade If so how .. . Answer : Yes PyJade comes with a command-line utility CLI . Like most all nix-style CLI programs help can be printed with the -h flag : .. . .. . So to output a Jinja2 template you could do the following : .. . .. . Note that you will still need to use the appropriate PyJade extension in your web framework to fully display the template in its final form .", "Question : I am new to Flask and building a web app that uses Flask and AngularJS . My understanding is that the static directory is the place to store AngularJS files like javascript and templates . I wonder if there is a stable alternative to Html Jinja that I can use for templates . And if there is how can I enable it to work with template files inside the static directory I was looking to PyJade but didn t get how to get it working with the web assets pipeline . Would appreciate any example or recommendation . .. . Answer : You could use Mako . See here https : pythonhosted.org Flask-Mako how to install and use it . Also you could use Genshi https : pythonhosted.org Flask-Genshi .", "Question : Let s say that I have a template written in mako : base.mako . I would like to use it as a renderer in a view named : base view . Also I have a template written in mako named : concrete.mako which inherits from base.mako this way : inherit file base.mako . It is used by different view . Question : .. . .. . I would like to rewrite concrete.mako in pyjade as a concrete.jade and on rendering it I would like it to compile to mako and then to compile to concrete html . How to set it up in pyramid it would be great if the pyramid system will use different renderers depending on file extension and after using pyjade will also compile pyjade output with mako compiler to concrete html . Thx . .. . Answer : Well pyramid does use different renderers based on file extension . However they do not cascade or anything a renderer just returns a string . I think you ll have to write your own .jade2mako2html renderer to do what you re asking . http : docs.pylonsproject.org projects pyramid en latest narr renderers.html adding-and-changing-renderers", "Question : I m using pyjade in my django project . I also started using django-compressor and for performance issues I need to use the offline compression . I set the COMPRESS OFFLINE to True in my settings.file .. . .. . I ran the command : manage.py compress --extension jade to generate the precompiled files and the manifest.json file . The problem is that when I try to render the page django raises an exception : .. . .. . I checked my manifest here it is : .. . .. . 608f1d299c1a9d4141630b7ebb668456 : .. . .. . Here is my jade template .. . .. . Any thoughts .. . Answer : Have you set django.conf.settings.COMPRESS OFFLINE to True before running python manage.py compress The key the template is expecting seems to be different from the key in the manifest . There is a chance things might just be out of sync . Comment : Yes I have already set the COMPRESS OFFLINE to True . If not the compress command raises an error . Comment : The different hashes generated indicate that something is wrong with the inline css . Can you check to see that it is not a server 500 error If an error page is being rendered the hash will be different from what is expected . Did you check the issues here - github.com django-compressor django-compressor issues 169 https : github.com django-compressor django-compressor issues 169", "Question : I had the following code in my jade file : .. . .. . I was trying to evaluate the url for function and set the value as the href attribute but the code above does not work . Can someone help me correct it Comment : I haven t used pyjade but I m guessing you re looking for : a href url for browse problem problem id problem . id Comment : Sorry that doesn t work. . .. . Answer : I solved this problem myself by changing some code inside pyjade.. . Seems to be a bug when parsing content including class or id . Comment : I d love it if you could submit a patch for this on GitHub.. . github.com SyrusAkbary pyjade https : github.com SyrusAkbary pyjade Comment : @Roshambo I have a forked repo which solved this problem : github.com dementrock pyjade https : github.com dementrock pyjade . However it may cause other problems see github.com SyrusAkbary pyjade pull 5 https : github.com SyrusAkbary pyjade pull 5", "Question : I had the following code in my jade file : .. . .. . I was trying to evaluate the url for function and set the value as the href attribute but the code above does not work . Can someone help me correct it Comment : I haven t used pyjade but I m guessing you re looking for : a href url for browse problem problem id problem . id Comment : Sorry that doesn t work. . .. . Answer : This bug is fixed in the new version 1.0 of pyjade https : github.com SyrusAkbary pyjade . Check it out This new code is totally compatible with the new version :", "Question : The below pyjade code causes an internal server error . When the module.key is taken outside the href it works fine . Any ideas enter image description here http : i.stack.imgur.com o57vd.png .. . Answer : It s Syrus creator of pyjade Python package . Pyjade doesn t cast your vars inside as strings so you have to do it yourself . The following example should work Comment : Unfortunately this will not work either in either jade or pyjade . See the solution I posted ." ] }
[ "yes-answer-long", "yes-answer-short" ]
jinja2
UNK_RELATION
rfc1738@url@78
rfc1738 -- rfc describing syntax and semantics of a uniform resource locator @placeholder .
{ "confidence": [ 34.571537017822266, 31.928955078125, 30.060688018798828, 30.060688018798828, 23.528411865234375, 22.651538848876953, 20.215534210205078, 19.728349685668945, 18.80095672607422, 16.968708038330078, 13.935826301574707, 13.935826301574707, 13.935826301574707, 13.935826301574707, 13.935826301574707, 13.935826301574707, 13.935826301574707, 13.935826301574707, 13.935826301574707, 13.935826301574707, 13.935826301574707, 13.935826301574707, 13.935826301574707, 13.935826301574707, 13.935826301574707, 13.935826301574707, 13.935826301574707, 13.935826301574707, 13.935826301574707, 13.935826301574707, 13.935826301574707, 13.935826301574707, 13.935826301574707, 13.935826301574707, 13.935826301574707, 13.935826301574707, 13.935826301574707, 13.935826301574707, 13.935826301574707, 13.935826301574707, 13.935826301574707, 13.935826301574707, 13.935826301574707, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223, 12.527932167053223 ], "content": [ "The RFC 1738 https : tools.ietf.org html rfc1738 section 3.3 suggests that the", "RFC1738 : .. . .. . SagePay : .. . .. . Surely if SagePay are following RFC1738 encoding the URL should work", ".. . .. . The URI standard is STD 66 http : tools.ietf.org html std66 which currently maps to RFC 3986 https : tools.ietf.org html rfc3986 which updates RFC 1738 https : tools.ietf.org html rfc1738 .", "According to RFC 1738 https : www.ietf.org rfc rfc1738.txt part 3.3 .. . .. . However at the end of part 3.1 of same document it says .. . .. . Checking up with curl revealed some interesting thing .. . .. . So question is .. . .. . Is this is a valid URL or not", "If we manually build the string to encrypt by doing : .. . .. . It works.. . .. . .. . Now as I understand RFC1738 if an url exists within an url it should be encoded i.e .", "The RFC that defines URL structure does not explicitly states that that is invalid structure .", "Whilst doing so we noticed that when using http build query which takes an associative-array and converts it into an RFC1738 valid URL that SagePay fails with the following error : .. . .. . The form submitting to the SagePay endpoint has an enctype of application x-www-form-urlencoded .", ".. . .. . The URI standard STD 66 http : tools.ietf.org html std66 is currently RFC 3986 http : tools.ietf.org html rfc3986 .", "question mark is not part of the query-string but just separates it from the path : .. . .. . Grammar presented in the RFC 3986 https : tools.ietf.org html rfc3986 Appendix A . also indicate the", "The linked section 2.3 lists the unreserved characters which are : .. . .. . ALPHA a - z A - Z .. . DIGIT 0 - 9 .. . - . .. . .. . This sections also states that even in case no normalization happens : .. . .. . URIs that differ in the replacement of an unreserved character with its corresponding percent-encoded US-ASCII octet are equivalent : they identify the same resource .", "We re just upgrading to form v3.0 and whilst doing so refactoring our code .", "However.. .", "Or is it because the string is encrypted which means it doesn t really matter", "Any thoughts", "Thanks .. . .. . Gavin", "You are correct .", "Because the Success Failure URLs are encrypted within the Crypt field there is no need to encode them .", "Typical Thanks .", "Except when they contain or other special-characters", "This especially blows up when the URL contains parameters that match those used in crypt field .", "From my testing and your answer I assume you split the string on known parameter names rather than a more standard split on .", "Correct - so if your SuccessURL string contains VendorTxCode it s going to get removed .", "Follow up to Can I use an at symbol @ inside URLs", "http : stackoverflow.com questions 19509028 can-i-use-an-at-symbol-inside-urls .. . .. . Based on the top voted answer http : stackoverflow.com a 19737890 84130 the @ is not a reserved character in the URL path although it is in the host .", "However given an @ in the path is the URL-encoded form interchangeable", "In other words is twitter.com @user strictly equivalent to twitter.com 40user", "In practice it seems like they re often used interchangeably but curious if that is strictly the case e.g .", "AbC@gmail.com is technically different from abc@gmail.com but nearly everyone treats them the same .", "More broadly when do characters and there URL-encoded version need to be treated the same and when different e.g .", "example.com path 2Fasdf is NOT the same as example.com path asdf", "The URIs http : twitter.com @user and http : twitter.com 40user are not equivalent .", "The section 6.2.2.2 .", "Percent-Encoding Normalization https : tools.ietf.org html rfc3986 section-6.2.2.2 defines how to normalize percent-encoded URIs to compare them for equivalence after uppercasing hexadecimal digits A - F as defined by 6.2.2.1 Case Normalization https : tools.ietf.org html rfc3986 section-6.2.2.1 .", "It says : .. . .. . some URI producers percent-encode octets that do not require percent-encoding resulting in URIs that are equivalent to their non-encoded counterparts .", "These URIs should be normalized by decoding any percent-encoded octet that corresponds to an unreserved character as described in Section 2.3 https : tools.ietf.org html rfc3986 section-2.3 .", "The @ is not part of the unreserved set .", "It s part of the reserved set https : tools.ietf.org html rfc3986 section-2.2 where it says : .. . .. . URIs that differ in the replacement of a reserved character with its corresponding percent-encoded octet are not equivalent .", "Today we had an arguing with colleague about if that would be a valid URL http : domain.com some param 1 .", "http : domain.com some param 1", "Section 3.3 defers to section 3.1 for host and port but the rest is as defined in that section .", "Thus the slash after port is required if either of path or searchpart is present .", "Nonetheless tools may attempt to extract a valid URL even with the omission of this slash since one of the precepts of various ideologies is to be liberal on input and conservative on output .", "Thanks you confirmed my understanding of it .", "TL TR : Is first question mark in URL part of query or is is just a separator followed by query", "is not part of the actual query-string : .. . .. . Now let s consider two URLs : .. . .. . 1 .", "http : server.com api item.json .. . 2 .", "http : server.com api item.json .. . .. . Are they equivalent or distinct", "Is it valid to distinguish them and use to identify two different resources", "Is it valid to distinguish them and use to identify two different resources even if it was I would not recommend it you never know which client will feel inclined to perform what normalization on such a URL .", "@CBroe I sympathise with your recommendation .", "tl dr : .. . .. . The is not part of the query component .", "The URIs are not equivalent because one has no query component while the other one has an empty query component .", "Section 6.2 .", "Comparison Ladder http : tools.ietf.org html rfc3986 section-6.2 describes methods how to test if URIs are possibly equivalent .", "In 6.2.3 .", "Scheme-Based Normalization http : tools.ietf.org html rfc3986 section-6.2.3 it says : .. . .. . Normalization should not remove delimiters when their associated component is empty unless licensed to do so by the scheme specification .", "For example the URI http : example.com cannot be assumed to be equivalent to any of the examples above .", "Where examples above refers to : .. . .. . .. . http : example.com .. . http : example.com .. . http : example.com : .. . http : example.com : 80 .. . .. . .. . These 4 URIs are equivalent .", "So http : example.com api item.json has no query component while http : example.com api item.json has an empty query component ." ] }
{ "confidence": [ 36.427791595458984, 31.639835357666016, 31.20557403564453, 30.075115203857422 ], "content": [ "Question : Today we had an arguing with colleague about if that would be a valid URL http : domain.com some param 1 . The RFC that defines URL structure does not explicitly states that that is invalid structure . According to RFC 1738 https : www.ietf.org rfc rfc1738.txt part 3.3 .. . .. . However at the end of part 3.1 of same document it says .. . .. . Checking up with curl revealed some interesting thing .. . .. . So question is .. . .. . Is this is a valid URL or not http : domain.com some param 1 .. . Answer : Section 3.3 defers to section 3.1 for host and port but the rest is as defined in that section . Thus the slash after port is required if either of path or searchpart is present . Nonetheless tools may attempt to extract a valid URL even with the omission of this slash since one of the precepts of various ideologies is to be liberal on input and conservative on output . Comment : Thanks you confirmed my understanding of it .", "Question : We re just upgrading to form v3.0 and whilst doing so refactoring our code . Whilst doing so we noticed that when using http build query which takes an associative-array and converts it into an RFC1738 valid URL that SagePay fails with the following error : .. . .. . The form submitting to the SagePay endpoint has an enctype of application x-www-form-urlencoded . However.. . If we manually build the string to encrypt by doing : .. . .. . It works.. . .. . .. . Now as I understand RFC1738 if an url exists within an url it should be encoded i.e . RFC1738 : .. . .. . SagePay : .. . .. . Surely if SagePay are following RFC1738 encoding the URL should work Or is it because the string is encrypted which means it doesn t really matter Any thoughts Thanks .. . .. . Gavin .. . Answer : You are correct . Because the Success Failure URLs are encrypted within the Crypt field there is no need to encode them . Comment : Typical Thanks . Comment : Except when they contain or other special-characters This especially blows up when the URL contains parameters that match those used in crypt field . From my testing and your answer I assume you split the string on known parameter names rather than a more standard split on . Comment : Correct - so if your SuccessURL string contains VendorTxCode it s going to get removed .", "Question : Follow up to Can I use an at symbol @ inside URLs http : stackoverflow.com questions 19509028 can-i-use-an-at-symbol-inside-urls .. . .. . Based on the top voted answer http : stackoverflow.com a 19737890 84130 the @ is not a reserved character in the URL path although it is in the host . However given an @ in the path is the URL-encoded form interchangeable In other words is twitter.com @user strictly equivalent to twitter.com 40user In practice it seems like they re often used interchangeably but curious if that is strictly the case e.g . AbC@gmail.com is technically different from abc@gmail.com but nearly everyone treats them the same . More broadly when do characters and there URL-encoded version need to be treated the same and when different e.g . example.com path 2Fasdf is NOT the same as example.com path asdf .. . Answer : The URIs http : twitter.com @user and http : twitter.com 40user are not equivalent . .. . .. . The URI standard is STD 66 http : tools.ietf.org html std66 which currently maps to RFC 3986 https : tools.ietf.org html rfc3986 which updates RFC 1738 https : tools.ietf.org html rfc1738 . The section 6.2.2.2 . Percent-Encoding Normalization https : tools.ietf.org html rfc3986 section-6.2.2.2 defines how to normalize percent-encoded URIs to compare them for equivalence after uppercasing hexadecimal digits A - F as defined by 6.2.2.1 Case Normalization https : tools.ietf.org html rfc3986 section-6.2.2.1 . It says : .. . .. . some URI producers percent-encode octets that do not require percent-encoding resulting in URIs that are equivalent to their non-encoded counterparts . These URIs should be normalized by decoding any percent-encoded octet that corresponds to an unreserved character as described in Section 2.3 https : tools.ietf.org html rfc3986 section-2.3 . The linked section 2.3 lists the unreserved characters which are : .. . .. . ALPHA a - z A - Z .. . DIGIT 0 - 9 .. . - . .. . .. . This sections also states that even in case no normalization happens : .. . .. . URIs that differ in the replacement of an unreserved character with its corresponding percent-encoded US-ASCII octet are equivalent : they identify the same resource . The @ is not part of the unreserved set . It s part of the reserved set https : tools.ietf.org html rfc3986 section-2.2 where it says : .. . .. . URIs that differ in the replacement of a reserved character with its corresponding percent-encoded octet are not equivalent .", "Question : TL TR : Is first question mark in URL part of query or is is just a separator followed by query The RFC 1738 https : tools.ietf.org html rfc1738 section 3.3 suggests that the question mark is not part of the query-string but just separates it from the path : .. . .. . Grammar presented in the RFC 3986 https : tools.ietf.org html rfc3986 Appendix A . also indicate the is not part of the actual query-string : .. . .. . Now let s consider two URLs : .. . .. . 1 . http : server.com api item.json .. . 2 . http : server.com api item.json .. . .. . Are they equivalent or distinct Is it valid to distinguish them and use to identify two different resources Comment : Is it valid to distinguish them and use to identify two different resources even if it was I would not recommend it you never know which client will feel inclined to perform what normalization on such a URL . Comment : @CBroe I sympathise with your recommendation . .. . Answer : tl dr : .. . .. . The is not part of the query component . The URIs are not equivalent because one has no query component while the other one has an empty query component . .. . .. . The URI standard STD 66 http : tools.ietf.org html std66 is currently RFC 3986 http : tools.ietf.org html rfc3986 . Section 6.2 . Comparison Ladder http : tools.ietf.org html rfc3986 section-6.2 describes methods how to test if URIs are possibly equivalent . In 6.2.3 . Scheme-Based Normalization http : tools.ietf.org html rfc3986 section-6.2.3 it says : .. . .. . Normalization should not remove delimiters when their associated component is empty unless licensed to do so by the scheme specification . For example the URI http : example.com cannot be assumed to be equivalent to any of the examples above . Where examples above refers to : .. . .. . .. . http : example.com .. . http : example.com .. . http : example.com : .. . http : example.com : 80 .. . .. . .. . These 4 URIs are equivalent . So http : example.com api item.json has no query component while http : example.com api item.json has an empty query component ." ] }
[ "yes-answer-long", "yes-answer-short" ]
url
UNK_RELATION
tungus@database@48
tungus -- mongoose driver for tingodb embedded @placeholder .
{ "confidence": [ 39.08379364013672, 36.4833869934082, 26.003368377685547, 24.48288345336914, 14.198076248168945, 14.198076248168945, 14.198076248168945, 14.198076248168945, 14.198076248168945, 14.198076248168945 ], "content": [ "Ok to asnwer to myself the problems seems to be because User.modele.findOne email : emailRegExp doesn t work in TingoDB Tungus .", "There s a short blog post explaining how to do it at http : ifrederik.com blog 2014 11 cms-without-db-running-keystonejs-without-mongodb .. . .. . Basically it explains how to replace MondgoDB with TingoDB and using a Tungus driver .", "The advice is to put the following into the top of the keystone.js file .. . .. . And later to set mongo database url to TingoDB .", "By inspecting the contect of data users file in TingoDB I can even see that the default user gets created but I was not able to log in .", "I would like to try running KeystoneJS without MongoDB .", "By doing this I got KeystoneJS up and running .", "It always reports that username password combination is not ok . .. . .. . What am I missing", "How do I debug the problem to find out what exactly is the problem here", "When replaced it with lookup.email without using regex-es it semms to work .", "But who knows if and what else will break because of incompatibility ." ] }
{ "confidence": [ 57.95405578613281 ], "content": [ "Question : I would like to try running KeystoneJS without MongoDB . There s a short blog post explaining how to do it at http : ifrederik.com blog 2014 11 cms-without-db-running-keystonejs-without-mongodb .. . .. . Basically it explains how to replace MondgoDB with TingoDB and using a Tungus driver . The advice is to put the following into the top of the keystone.js file .. . .. . And later to set mongo database url to TingoDB . By doing this I got KeystoneJS up and running . By inspecting the contect of data users file in TingoDB I can even see that the default user gets created but I was not able to log in . It always reports that username password combination is not ok . .. . .. . What am I missing How do I debug the problem to find out what exactly is the problem here .. . Answer : Ok to asnwer to myself the problems seems to be because User.modele.findOne email : emailRegExp doesn t work in TingoDB Tungus . When replaced it with lookup.email without using regex-es it semms to work . But who knows if and what else will break because of incompatibility ." ] }
[ "yes-answer-long", "yes-answer-short" ]
database
UNK_RELATION
libxl@excel@57
libxl -- libxl is a c++ library that can read and write @placeholder files .
{ "confidence": [ 54.978057861328125, 37.946205139160156, 23.196083068847656, 20.405986785888672, 18.614065170288086, 18.614065170288086, 18.614065170288086 ], "content": [ "I am trying to work with LibXL .", "A1 : B3 into startRow 0 endRow 2 startCol 0 endCol 1 LibXL uses 0 based indexing .. . .. . I have tried everything I can think of .", "The library does not come with any examples that use this function and the documentation is quite sparse .", "I can extract data from sheets but need a function to transform a string with Excel row and column indices into startRow endRow startCol endCol i.e .", "What am I doing wrong", "Here is my code :", "use xlSheetAddrToRowCol function for this purpose :" ] }
{ "confidence": [ 59.99311828613281 ], "content": [ "Question : I am trying to work with LibXL . I can extract data from sheets but need a function to transform a string with Excel row and column indices into startRow endRow startCol endCol i.e . A1 : B3 into startRow 0 endRow 2 startCol 0 endCol 1 LibXL uses 0 based indexing .. . .. . I have tried everything I can think of . The library does not come with any examples that use this function and the documentation is quite sparse . What am I doing wrong Here is my code : .. . Answer : use xlSheetAddrToRowCol function for this purpose :" ] }
[ "yes-answer-long", "yes-answer-short" ]
excel
UNK_RELATION
rspec3@ruby@83
rspec3 -- rspec 3 is a major release of the behaviour-driven development tool for @placeholder programmers .
{ "confidence": [ 29.93421745300293, 28.813419342041016, 27.772275924682617, 26.56026840209961, 26.31866455078125, 25.41850471496582, 25.41850471496582, 25.41850471496582, 25.41850471496582, 25.40105438232422, 25.267597198486328, 24.53044319152832, 24.53044319152832, 24.339954376220703, 24.006757736206055, 23.94744300842285, 23.751232147216797, 23.46007537841797, 23.46007537841797, 23.45151138305664, 23.27176284790039, 23.226572036743164, 23.17913246154785, 23.156627655029297, 22.99126434326172, 22.80401611328125, 22.67226791381836, 22.608745574951172, 22.48751449584961, 22.48751449584961, 22.431079864501953, 22.38152503967285, 22.303218841552734, 22.159221649169922, 22.121715545654297, 22.121715545654297, 21.82686996459961, 21.453716278076172, 21.2482967376709, 21.2482967376709, 21.132680892944336, 21.132680892944336, 21.132680892944336, 20.984895706176758, 20.984895706176758, 20.93661880493164, 20.855350494384766, 20.807910919189453, 20.74267578125, 20.647525787353516, 20.576709747314453, 20.545364379882812, 20.545364379882812, 20.545364379882812, 20.545364379882812, 20.545364379882812, 20.517467498779297, 20.301048278808594, 20.301048278808594, 20.301048278808594, 20.218608856201172, 20.16974639892578, 20.05413055419922, 20.05413055419922, 19.952905654907227, 19.937299728393555, 19.937299728393555, 19.937299728393555, 19.937299728393555, 19.937299728393555, 19.937299728393555, 19.75049591064453, 19.681365966796875, 19.572490692138672, 19.30498504638672, 19.30498504638672, 19.291545867919922, 19.25269317626953, 19.25269317626953, 19.25269317626953, 19.25269317626953, 19.25269317626953, 19.095794677734375, 19.05394744873047, 18.946388244628906, 18.8770751953125, 18.858749389648438, 18.858749389648438, 18.858749389648438, 18.858749389648438, 18.784683227539062, 18.761459350585938, 18.761459350585938, 18.761459350585938, 18.761459350585938, 18.761459350585938, 18.602813720703125, 18.32712745666504, 18.32712745666504, 18.32712745666504 ], "content": [ "Rspec 3", "I m using rspec3 .", "Ahh my bad that s from RSpec 2 not RSpec 3 .", "In RSpec 3 you would do :", "Are there any alternatives to pending or skip for them in RSpec 3", "I have Rspec 2.14.7 but I have a test suite that uses functionality from Rspec 3.x .", "Plines is just an example project that is being upgraded from RSpec 2 to RSpec 3 in the videos .", "How can I convert the RSpec 2 have .errors on matcher to RSpec 3", "Perhaps there is no such matchers at now https : relishapp.com rspec rspec-expectations v 3-0 docs built-in-matchers all-matcher .", "Doing so was deprecated in RSpec 2 and removed from RSpec 3 .", "It s probably RSpec 3 deprecations .", "Can anyone explain how to resolve this error in RSpec 3", "The have have exactly have at least and have at most matchers were removed from RSpec 3 .", "I have code like this : .. . .. . and my rspec 2 test does this : .. . .. . What is the Rspec 3 way of doing this", "In my Gemfile .. . .. . I figured out that the errors on matcher moved to another gem : https : github.com rspec rspec-collection matchers .. . .. . I m positive that there must a way to achieve the same within RSpec 3 .", "rspec-rails 3 generates spec helper.rb and rails helper.rb .", "Rails 4.2 RSpec 3.x", "I tried : .. . .. . regarding to https : github.com rspec rspec-rails issues 1033 .. . .. . but I get an RSpec error :", "They re now in the separate rspec-collection matchers https : github.com rspec rspec-collection matchers gem .", "Combining composable matchers http : www.relishapp.com rspec rspec-expectations v 3-2 docs composing-matchers with compound expectations http : www.relishapp.com rspec rspec-expectations v 3-2 docs compound-expectations as you have demonstrated provide an simple and valid alternative to writing a custom matcher http : www.relishapp.com rspec rspec-expectations v 3-2 docs custom-matchers .", "Have you played around with the --pattern relishapp.com rspec rspec-core v 3-5 docs command-line https : www.relishapp.com rspec rspec-core v 3-5 docs command-line pattern-option you can setup a rake-task to give that pattern to Rspec or you can configure it directly", "I am attempting to upgrade a project from RSpec 2 to RSpec 3 but it is failing with the following error : .. . .. . Here is the line : .. . .. . This post suggests https : github.com rspec rspec-mocks issues 667 one need only .. . .. . However I have done this and it still reports the error .", "Use the RSpec-instafail gem https : github.com grosser rspec-instafail .", "I would like to use Rspec Mocks 3.3 https : relishapp.com rspec rspec-mocks v 3-3 docs and the allow syntax but I m having a hard time .", "If you browse the RSpec Expectations 2.99 https : www.relishapp.com rspec rspec-expectations v 2-99 docs built-in-matchers and RSpec Expectations 2.14 https : www.relishapp.com rspec rspec-expectations v 2-14 docs built-in-matchers and search the section - Truthiness and existentialism you will find .. . .. . But of you browse RSpec Expectations 3.0 https : www.relishapp.com rspec rspec-expectations v 3-0 docs built-in-matchers the above method names got changed to - .. . .. . It seems you are in 3.0 and using the method which were exist prior to this version .", "Make it a helper method https : www.relishapp.com rspec rspec-core v 3-2 docs helper-methods arbitrary-helper-methods .", "@user3417583 No issue Enjoy Rspec", "I know that providing specifying a return-value with expect was the syntax in RSpec mocks 2.13 https : www.relishapp.com rspec rspec-mocks v 2-13 docs message-expectations expect-a-message provide-a-return-value but as far as I can see the syntax changed in RSpec mocks 3 http : www.relishapp.com rspec rspec-mocks v 3-1 docs configuring-responses returning-a-value specify-a-return-value to use allow .", "Something like this should work : .. . .. . Notable changes from your version : .. . .. . No need to require rspec RSpec will load itself when you run the rspec command .", "This is the recipe : .. . .. . Be green and warning free on RSpec 2 .. . gem rspec 2.99 .. . bundle install .. . Fix warnings .. . gem rspec 3.0 .. . .. . Done .", "I m using rails 4 and rspec 3 .", "The spec command was used for RSpec 1 from RSpec 2 it switched to the rspec command .", "I just feel that s beyond ugly and frankly represents a major failure in rspec .", "In use : Rails 4 RSpec 3 capybara capybara-email .", "It s done this way in RSpec 3 : stackoverflow.com a 26164289 238292 http : stackoverflow.com a 26164289 238292 .", "Source : http : myronmars.to n dev-blog 2014 05 notable-changes-in-rspec-3", "I really should have checked the most obvious place : the RSpec Mocks README https : github.com rspec rspec-mocks blob master README.md specifically the following sections : .. . .. . Mock Objects and Test Stubs https : github.com rspec rspec-mocks blob master README.md mock-objects-and-test-stubs .. . Test-Specific Extension https : github.com rspec rspec-mocks blob master README.md test-specific-extension .. . Setting Responses https : github.com rspec rspec-mocks blob master README.md setting-responses", "I m new to Ruby and RSpec did a little research and saw there s a few ways to do sort of data driven enumerating tests from posts online but they don t got into a whole lot of detail like a full tutorial .", "It s fine if the restructure means I can t use the standard RSpec format and have to require RSpec components differently the posts online didn t seem to follow the simple basic RSpec format .", "For more about the difference in scope between describe and the before block see the section in the rspec-core README that discusses scope https : github.com rspec rspec-core a-word-on-scope .", "http : rspec.info upgrading-from-rspec-2", "How do I test this properly using rspec", "Is there a matcher for comparing REXML elements for logical equality in RSpec", "An alternative is to make it a shared context https : www.relishapp.com rspec rspec-core v 3-2 docs example-groups shared-context : .. . .. . With a shared context you ll need to use include context in-place of include : include context RGeo matchers .", "Here the docu : https : relishapp.com rspec rspec-mocks v 3-0 docs message-expectations expect-a-message-on-any-instance-of-a-class .. . .. . Im wondering what is the right use of it .", "Is there a way to run Rspec macros conditionally", "It would be good to start from reading about controller specs https : www.relishapp.com rspec rspec-rails docs controller-specs and request specs https : www.relishapp.com rspec rspec-rails v 3-1 docs request-specs request-spec .", "More information at : https : github.com rspec rspec-rails issues 1076", "Ref : relishapp.com rspec rspec-expectations docs built-in-matchers https : www.relishapp.com rspec rspec-expectations docs built-in-matchers", "I m trying to test a ruby command-line script but am having troubles running tests with Cucumber-less Aruba in RSpec 3 .", "Here s sort of the setup I have based on the standard simple way of using RSpec defined describe it blocks not importing the parts of RSpec to do the expectations only .", "Though maybe the options argument of alias matcher http : rspec.info documentation 3.2 rspec-expectations RSpec Matchers.html alias matcher-class method is meant for that", "http : stackoverflow.com questions 6116668 rspec-how-to-run-a-single-test .. . .. . One answer says to use rspec to run tests .", "from https : relishapp.com rspec rspec-core v 2-0 docs pending pending-examples", "According to this thread https : github.com rspec rspec-expectations issues 283 be true and be false are now known as be truthy and be falsy .", "You should do .. . .. . Check out the doco Method stubs https : github.com rspec rspec-mocks method-stubs .", "This user http : stackoverflow.com questions 28298665 aruba-not-working-with-rspec-3 also seemed to encounter this issue but has not been able to elicit a solution as of 3 30 2015 .", "The version to rspec is 3.4 .", "What version of RSpec", "rspec version 3.1.7", "If you look at the template in the rspec-rails github repo https : github.com rspec rspec-rails blob master lib generators rspec model templates model spec.rb you can see there is no option to do this via config variables .", "As for the difference between running rake spec and rspec the best explanation I can find is here https : github.com rspec rspec-rails issues 208 issuecomment-413114 .", "I want to test API controller with rspec .", "I am using RSpec version 3.1.7", "In RSpec you may try the combination allow .to receive .and return as well to control the call to super .", "I have a test suite of rspec tests which are divided into different files .", "I have corrected this issue by using extend instead of include for RSpec : : Matchers .", "I didn t know you could call the RSpec 2 matcher on a block .", "obvious : .. . .. . here the errors are obviously correct Aruba is using Rspec 2 syntax .", "So I added .. . .. . to my rspec config but still not working .", "https : github.com bblimke webmock setting-expectations-in-rspec-on-webmock-module", "For anyone who simply wants to add headers using RSpec 3 and Rails 4 simply call request.headers.merge", "I personally prefer using github.com guard guard-rspec https : github.com guard guard-rspec but you might find this technique http : stackoverflow.com questions 18828790 rspec-how-can-i-continue-test-after-first-failure more applicable to your needs .", "There is a discussion of this situation in an rspec-rails Github issue https : github.com rspec rspec-rails issues 1076 .", "I know there is an option --fail-fast in rspec but if I m running tests like : rspec spec that will mean that when first step fails in any script it will abort complete execution .", "pending isn t suitable because as of the current version of RSpec when the tests pass RSpec will tell me that they passed and therefore shouldn t be marked as pending and mark the build as broken .", "But it is in the changelog https : github.com rspec rspec-expectations commit 860ca42905582549768ee0ff0837fb6c523b8199 .", "Check out the docs https : www.relishapp.com rspec rspec-mocks v 2-14 docs method-stubs for reference .", "Source : https : www.relishapp.com rspec rspec-rails docs upgrade default-helper-files", "I found the example count-instance method http : www.rubydoc.info gems rspec-core RSpec Core World example count-instance method .", "More information on the upgrade here : https : www.relishapp.com rspec rspec-rails docs upgrade .. . .. . To resolve the problem : .. . .. . 1 .", "Here s my setup : .. . .. . rails 4.1.4 .. . rspec-core 3.1.5 .. . rspec-rails 3.1.0 .. . fabrication 2.11.3 .. . .. . .", "To debug an expect .to change failure I included a debug puts message : .. . .. . The debug message confirms that the value of OutreachEvent.count IS changing from 0 to 1 but the error message from Rspec says : .. . .. . Failure Error : expect edit save.trigger click sleep 0.5 .to change puts OutreachEvent.count OutreachEvent.count .from 0 .to 1 .", "An additional gem to add this behaviour is ok .", "If you can t figure them out from searching or from this myronmars.to n dev-blog 2014 05 notable-changes-in-rspec-3 http : myronmars.to n dev-blog 2014 05 notable-changes-in-rspec-3 put them in a new question .", "According to info provided in this github issue https : github.com rspec rspec-mocks issues 736 issuecomment-48549995 you can also do that with the following pure-RSpec approach .", "Here is a thread I looked at : .. . .. . rspec how to run a single test", "If so then yes it has to be a code block for RSpec to handle exceptions .", "You can use an RSpec around hook in combination with with Ruby s Timeout .", "It was never edited . . I just want to understand this Rspec Rails behavior .", "I am new to rspec .", "I am using Rails 4.2 and RSpec 3.4 .", "I thought it would be better if RSpec is aware of the filters .", "Main file person.rb .. . .. . Rspec File spec person spec.rb", "This side of rails and rspec is a little over my head .", "PS : I m still a newbie with Rspec and TDD .", "What it means from rspec-expectations truthiness https : github.com rspec rspec-expectations truthiness is : .. . .. . Examples - .. . .. . For be true and be false : .. . .. . For be truthy and be falsy : .. . .. . You can use any other object as expected result at the place of string except nil true false because they are already present in the examples shown above .", "I m trying to do simple implementation of page object pattern using capybara and rspec .", "RSpec is designed to run in kinda automated environment that s why the functionality you requested is not available out of the box .", "I am using rspec with Sinatra http : www.sinatrarb.com and do not use cucumber or spinach ." ] }
{ "confidence": [ 32.15824508666992, 28.237186431884766, 27.69732666015625, 27.53847885131836, 27.40511131286621, 27.173175811767578, 27.100975036621094, 26.922773361206055, 26.052627563476562, 24.882286071777344, 24.554119110107422, 24.29208755493164, 24.16959571838379, 23.989479064941406, 23.9739990234375, 23.93846893310547, 23.90445327758789, 23.698833465576172, 23.431705474853516, 23.279985427856445 ], "content": [ "Question : I m trying to write a request spec for my api . I m using rspec3 . I want to stub a method in ApplicationHelper . I m using rabl https : github.com nesquena rabl to render my api JSON . This is the setup .. . .. . I m calling preview url method from my rabl file . Problem is since I m using request spec I dont have access to helper method given my rspec view specs .. . .. . Following is my spec so far .. . .. . However this will not stub the actual method in the ApplicationHelper . Following I tried with out a success .. . .. . How can I stub ApplicationHelper method from my request spec THX .. . Answer : Since you re just looking to stub a helper method instead of testing the helper itself you can use view .. . .. . Relish Documentation https : relishapp.com rspec rspec-rails docs view-specs view-spec passing-view-spec-that-stubs-a-helper-method Comment : thanks for the answer however view is not available since this is a request spec spec requests I tried and now working Comment : Instead of defining helper Object.new.extend ApplicationHelper can you try just adding include ApplicationHelper inside your describe block and rerunning the allow any instance of variant", "Question : I m new to Ruby and RSpec did a little research and saw there s a few ways to do sort of data driven enumerating tests from posts online but they don t got into a whole lot of detail like a full tutorial . So before I go review those online articles in detail again thought I d ask here instead first . Here s sort of the setup I have based on the standard simple way of using RSpec defined describe it blocks not importing the parts of RSpec to do the expectations only . Then I try to add-in data driven ability to it : .. . .. . What I notice here is that @device client is nil as it is structured right now debugged with a p @device client statement to dump contents out . To get it to have value I have to enclose the hash inside an it block where it s in scope which I typically have inside another describe block though assume I can skip the extra describe . How might I restructure the test to read the same to the reader of the test and function the way I intend it to It s fine if the restructure means I can t use the standard RSpec format and have to require RSpec components differently the posts online didn t seem to follow the simple basic RSpec format . I think my code is fairly straighforward to interpret . In case not the intent is to use the CSV input to dynamically build the test . Each CSV row is a scenario that has multiple tests - 1 test differs based on a CSV field value hence the ifs the remaining tests are common to all scenarios . And we repeat this set for as many CSV scenario rows there are in the file . And the before all block is the global setup before we process the CSV data . In the restructure ideally I d like to keep the describe it text description blocks or some equivalent to them so that in the test results they show up describing the tests not just a bunch of expects . .. . Answer : Something like this should work : .. . .. . Notable changes from your version : .. . .. . No need to require rspec RSpec will load itself when you run the rspec command . I moved the CSV logic out of before : all and into the describe body . The problem with what you had before is that before hooks are run after all examples and groups are defined just before executing a particular group . You need to leverage the CSV file contents during spec definition time during which the describe block is executed . I switched from instance-variables to local-variables . What you had before didn t work because the before : all hook runs in the context of an instance of the example group class where as the describe block runs in the context of the class itself -- so they run in different contexts and don t have access to the same instance-variables . Once we move the logic into the describe block you can just use simple local-variables . I added clients to the last line of your before : all logic . What you had before was throwing away the result-of device client.map .. . but I m assuming that s what you want to use . For more about the difference in scope between describe and the before block see the section in the rspec-core README that discusses scope https : github.com rspec rspec-core a-word-on-scope . Comment : Thanks for the solution and the insightful info .", "Question : null .. . Answer : In my Gemfile .. . .. . I figured out that the errors on matcher moved to another gem : https : github.com rspec rspec-collection matchers .. . .. . I m positive that there must a way to achieve the same within RSpec 3 . How can I convert the RSpec 2 have .errors on matcher to RSpec 3 I tried : .. . .. . regarding to https : github.com rspec rspec-rails issues 1033 .. . .. . but I get an RSpec error : Comment : I didn t know you could call the RSpec 2 matcher on a block .", "Question : There s some tests that sometimes pass and sometimes fail . I d like to fix them but I m not able to at the moment for reasons beyond the scope of this question . Are there any alternatives to pending or skip for them in RSpec 3 pending isn t suitable because as of the current version of RSpec when the tests pass RSpec will tell me that they passed and therefore shouldn t be marked as pending and mark the build as broken . skip isn t suitable . I only use skip to avoid specs that cause the suite to crash . If the tests consistently stop failing I d like to know that that s the case . I d like something that runs the tests displays whether it passes or not but doesn t cause the build to be broken whether they pass or fail . An additional gem to add this behaviour is ok . .. . Answer : There s nothing built-in but it s trivial to do this yourself : .. . .. . Then just wrap the body of the flickering tests with allow failure reason .. . . Caveat : The code above is off-the-cuff and I haven t tried it so it may not be exactly correct -- but it should be close .", "Question : I have Rspec 2.14.7 but I have a test suite that uses functionality from Rspec 3.x . What is the easiest way to upgrade to 3.x I have checked the upgrade docs at RSpec website but the screencasts don t make any sense to me . I ve tried the commands it gives me error on bash shell . http : rspec.info upgrading-from-rspec-2 Comment : Which command did you try and what is error you got Comment : Plines is just an example project that is being upgraded from RSpec 2 to RSpec 3 in the videos . If the videos don t make sense to you than ignore them . The directions at rspec.info is going to be the best way to upgrade . .. . Answer : This is the recipe : .. . .. . Be green and warning free on RSpec 2 .. . gem rspec 2.99 .. . bundle install .. . Fix warnings .. . gem rspec 3.0 .. . .. . Done . There is also Transpec http : yujinakayama.me transpec . Use it Comment : upvote for transpec", "Question : I m using authlogic for my user authentication and in my ApplicationController I have current user current user session etc . defined and set as helper methods . I have an extremely simple view spec for my main index : .. . .. . The problem is that if mocks.verify partial doubles true in my config then this causes an impressively massive error as it dumps an entire object and then says at the bottom : .. . .. . Of course it is recommended that verify partial doubles is set to true but in doing so this breaks . I pulled this straight from the documentation : .. . .. . https : www.relishapp.com rspec rspec-rails v 3-1 docs view-specs view-spec passing-view-spec-that-stubs-a-helper-method .. . .. . If the method appears in ApplicationHelper it ll work . But if it s in ApplicationController and defined as a helper method there s no such luck : .. . .. . I want the protection that verify partial doubles provides how can I work around this .. . Answer : You can disable double verification for views as follows : .. . .. . This way you ll be able to keep stubbing view methods with : .. . .. . More information at : https : github.com rspec rspec-rails issues 1076 Comment : Yes thanks for this . I just feel that s beyond ugly and frankly represents a major failure in rspec . The whole current user as a helper method in app controller setup is common enough that it shouldn t take a lot of effort to make this work .", "Question : I m trying to follow a guide on code.tuts http : code.tutsplus.com tutorials ruby-for-newbies-testing-with-rspec--net-21297 and I keep getting an error . Here is my Library spec : .. . .. . I m getting that have is undefined . I ve figured out it s my lines .. . .. . Is my syntax out of date I ve googled and I can t find it . Comment : Rspec 3 Perhaps there is no such matchers at now https : relishapp.com rspec rspec-expectations v 3-0 docs built-in-matchers all-matcher . Use size eq .. . Answer : The have have exactly have at least and have at most matchers were removed from RSpec 3 . They re now in the separate rspec-collection matchers https : github.com rspec rspec-collection matchers gem . Or as zishe says instead of installing the gem you can just use eq instead of have have exactly and be instead of have at least and be instead of have at most . Source : http : myronmars.to n dev-blog 2014 05 notable-changes-in-rspec-3 Comment : omg why sad face", "Question : I am attempting to upgrade a project from RSpec 2 to RSpec 3 but it is failing with the following error : .. . .. . Here is the line : .. . .. . This post suggests https : github.com rspec rspec-mocks issues 667 one need only .. . .. . However I have done this and it still reports the error . This user http : stackoverflow.com questions 28298665 aruba-not-working-with-rspec-3 also seemed to encounter this issue but has not been able to elicit a solution as of 3 30 2015 . I am using rspec with Sinatra http : www.sinatrarb.com and do not use cucumber or spinach . Can anyone explain how to resolve this error in RSpec 3 Thanks . Comment : Are you sure the line you mentioned is actually giving the error .. . Answer : I have corrected this issue by using extend instead of include for RSpec : : Matchers . While debugging this and attempting to integrate pry https : github.com pry pry I found this post https : github.com pry pry issues 1277 which suggested the change . Thus my code now looks like : .. . .. . And not", "Question : I am running this portion of a test : .. . .. . With this code : .. . .. . I don t know what I m doing wrong but my tests keep failing and saying this : .. . .. . I am confused at the error since it seems to be giving the correct answer . I would really appreciate if someone could take a few minutes to tell me what s wrong with my code . Thank you tons . .. . Answer : If you browse the RSpec Expectations 2.99 https : www.relishapp.com rspec rspec-expectations v 2-99 docs built-in-matchers and RSpec Expectations 2.14 https : www.relishapp.com rspec rspec-expectations v 2-14 docs built-in-matchers and search the section - Truthiness and existentialism you will find .. . .. . But of you browse RSpec Expectations 3.0 https : www.relishapp.com rspec rspec-expectations v 3-0 docs built-in-matchers the above method names got changed to - .. . .. . It seems you are in 3.0 and using the method which were exist prior to this version . Thus you were getting the error . I put the code in my test.rb file as below : - .. . .. . And my spec test spec.rb file is - .. . .. . Now I am running the code from my console and it works : .. . .. . .. . .. . Now I am changing the code in my spec test spec.rb file : - .. . .. . and again run the test : - .. . .. . .. . .. . Now they also mentioned in the 3.0.0.beta1 2013-11-07 changelog https : www.relishapp.com rspec rspec-expectations v 3-0 docs changelog .. . .. . Rename be true and be false to be truthy and be falsey . Sam Phippen Comment : Thanks a lot for the detailed answer It s fixed now : I would vote your answer up but I don t have enough reputation : Comment : @user3417583 No issue Enjoy Rspec Comment : It might be a slightly separate issue but I found with v 2.99.0 these were flagged as deprecation warnings so probably a lesson to be learned about bumping versions in your Gemfile somewhere in there as well . Certainly was for me Comment : I just solved another problem via your fantastic answer.Really helpful thank you .", "Question : I have a users controller.rb file in which the create action is defined as : - .. . .. . Now I would like to write test for this method reflecting all the behaviour in this method . I m completely new to testing so detailed and standard way for writing test will be accepted as answer . The version to rspec is 3.4 . Happy coding . .. . Answer : So the following way you could test this with rspec and capybara . For the fill in part you have to use the input elements that you have on your page .", "Question : In RSpec specifically version 3 is there any difference between : .. . .. . Using allow to set up message expectations with parameters that return test doubles and then using expect to make an assertion on the returned test doubles .. . Just using expect to set up the expectation with parameters and return the test double .. . .. . or is it all just semantics I know that providing specifying a return-value with expect was the syntax in RSpec mocks 2.13 https : www.relishapp.com rspec rspec-mocks v 2-13 docs message-expectations expect-a-message provide-a-return-value but as far as I can see the syntax changed in RSpec mocks 3 http : www.relishapp.com rspec rspec-mocks v 3-1 docs configuring-responses returning-a-value specify-a-return-value to use allow . However in the passing sample code below using either allow expect or just expect and return seems to generate the same result . If one syntax was favoured over another perhaps I would have expected there to be some kind of deprecation notice but since there isn t it would seem that both syntaxes are considered valid : .. . .. . If I deliberately make the tests fail by changing the passed-in baz parameter in the expectation to a different test double the errors are pretty much the same : .. . .. . So are there any real differences between these two tests either in result or expressed intent or is it just semantics and or personal preference Should allow expect be used over expect and return in general as it seems like it s the replacement syntax or are each of them meant to be used in specific test scenarios Update .. . .. . After reading Mori s answer http : stackoverflow.com a 28007007 567863 s I commented out the Foo.bar baz .qux line from the example code above and got the following errors : .. . .. . The allow spec fails because the foobar result double never gets to stand in for the result-of Foo.bar baz and hence never has qux called on it .. . The expect spec fails at the point of Foo never receiving .bar baz so we don t even get to the point of interrogating the foobar result double .. . .. . Makes sense : it s not just a syntax change and that expect and return does have a purpose different to allow expect . I really should have checked the most obvious place : the RSpec Mocks README https : github.com rspec rspec-mocks blob master README.md specifically the following sections : .. . .. . Mock Objects and Test Stubs https : github.com rspec rspec-mocks blob master README.md mock-objects-and-test-stubs .. . Test-Specific Extension https : github.com rspec rspec-mocks blob master README.md test-specific-extension .. . Setting Responses https : github.com rspec rspec-mocks blob master README.md setting-responses .. . Answer : See the classic article Mocks Aren t Stubs http : martinfowler.com articles mocksArentStubs.html . allow makes a stub while expect makes a mock . That is allow allows an object to return X instead of whatever it would return unstubbed and expect is an allow plus an expectation of some state or event . When you write .. . .. . .. . you re telling the spec environment to modify Foo to return foobar result when it receives : bar with baz . But when you write .. . .. . .. . you re doing the same plus telling the spec to fail unless Foo receives : bar with baz . To see the difference try both in examples where Foo does not receive : bar with baz .", "Question : I have several RSpec examples that share the following complex expectation with the array records and the floating-point numbers min long max long min lat max lat varying between these examples . The expectation checks whether all records the respective test produced have a shape an RGeo https : github.com rgeo rgeo Polygon https : github.com rgeo rgeo blob 3ebbf3140f5e694da59f33c7d4b09513855a65c3 lib rgeo geographic spherical feature classes.rb L108 in my case completely contained in a test-specific bounding-box . To reduce repetition and to make the intend of the complex expectation clearer by sticking a name on it I extracted it into a method : .. . .. . This works fine but now I have to call that method with e.g . in my examples . This looks foreign in RSpec s specification DSL . I d prefer to be able to write .. . .. . or .. . .. . instead . .. . .. . Is there a recommended way to achieve this I don t think I can use RSpec s matcher aliasing facilities for this as they only seem to map matcher names onto other matcher names not complete matcher invocations with arguments . Though maybe the options argument of alias matcher http : rspec.info documentation 3.2 rspec-expectations RSpec Matchers.html alias matcher-class method is meant for that Off course I could also implement a custom matcher but then I probably would be forced to provide an implementation that returns a boolean which contradict it being composed from already existing matchers . Not that it d be hard but I like the implementation using stuff like all and be between . Lastly I could also monkey-patch the class of the element of valid records to have a in bbox min long max long min lat max lat attribute so that RSpec would automatically provide the corresponding be in bbox min long max long min lat max lat matcher . .. . Answer : Sure you can do that . Make it a helper method https : www.relishapp.com rspec rspec-core v 3-2 docs helper-methods arbitrary-helper-methods . Helper Methods .. . .. . These are just normal Ruby methods . You can define them in any example group . These helper methods are exposed to examples in the group in which they are defined and groups nested within that group but not parent or sibling groups . I suggest putting that method in a helpfully named file stored in spec support . Possibly something such as spec support rgeo matchers.rb . As written this will define the helper on main mixing it into Kernel which makes it available to every object in Ruby . You ll need to make sure this helper file is required in all the necessary spec files with : require support rgeo matchers . Instead of defining helpers on main I suggest placing them in a module https : www.relishapp.com rspec rspec-core v 3-2 docs helper-methods define-helper-methods-in-a-module to prevent global leakage : .. . .. . Since the matcher is in a module you ll need to add include MyProject : : RGeo : : Matchers inside your RSpec.describe block . An alternative is to make it a shared context https : www.relishapp.com rspec rspec-core v 3-2 docs example-groups shared-context : .. . .. . With a shared context you ll need to use include context in-place of include : include context RGeo matchers . Complex Matchers .. . .. . While the matcher you describe is rather nested-if it fits your domain models and describes a coherent unit then that s acceptable in my book . The test one thing does not necessarily mean test only a single attribute . It means test a coherent concept or unit . What that means depends on the domain-model . Combining composable matchers http : www.relishapp.com rspec rspec-expectations v 3-2 docs composing-matchers with compound expectations http : www.relishapp.com rspec rspec-expectations v 3-2 docs compound-expectations as you have demonstrated provide an simple and valid alternative to writing a custom matcher http : www.relishapp.com rspec rspec-expectations v 3-2 docs custom-matchers . Alternatives .. . .. . Per your suggestion perhaps remove the all from the helper so that the matcher only describes being in a bounding-box : .. . .. . This makes the matcher more re-usable . As it really describe one thing e.g . inside a bounding-box . This allows you to use it as a standalone matcher or compose it with other matchers :", "Question : I m trying to test a ruby command-line script but am having troubles running tests with Cucumber-less Aruba in RSpec 3 . Some weird errors some obvious ones . e.g . weird : .. . .. . Looking in the code I can t even see what s triggering this . Trying to use Pry or Pry-byebug to check out the erroneous 2 args isn t working on it either a whole bunch of other errors . Then e.g . obvious : .. . .. . here the errors are obviously correct Aruba is using Rspec 2 syntax . So I added .. . .. . to my rspec config but still not working . Any ideas Tips Examples of this working anywhere Thanks in advance . .. . Answer : There are some conflicts using the examples for RSpec 2 specially if you are requiring aruba api and messing up with the include extend lines many of them have . This is the smallest example to get Aruba working . You might want to fine tune your configuration with the PATH env and things like that", "Question : I am upgrading from rspec 2.99 to rspec 3.0.3 and have converted instance methods to use allow any instance of but haven t figured out how to stub a class-method . I have code like this : .. . .. . and my rspec 2 test does this : .. . .. . What is the Rspec 3 way of doing this .. . Answer : You should do .. . .. . Check out the doco Method stubs https : github.com rspec rspec-mocks method-stubs . Comment : I m trying to implement this but when I write that mock and then write expect Class.foo .to eq bar I get a wrong number of arguments error because the foo method normally wants 2 arguments....but I just want it to return what I put in the stub Comment : FWIW this form would crash my ruby interpreter . However and return is not strictly needed and can be left off . My ruby interpreter also doesn t crash . Comment : @sixty4bit Is there a reason you can t call it with arguments", "Question : I want to test API controller with rspec . So here is the simple piece of code : .. . .. . But I ve got an error : Comment : not sure but you can try to add type to the tests . For example it routes GET .. . : type : request do .. . Answer : In RSpec 3 you would do : Comment : Who does it work How is calling the method of undefined variable defined Comment : @Nakilon i m not sure i understand what you re asking Comment : In OP s question the problem was in the undefined response . You still refer to this variable . How does appending another method call to it makes it defined Comment : Well this questions is 3 mos old - I think he edited it a few times as I answered . In the end we got it working Comment : It was never edited . . I just want to understand this Rspec Rails behavior .", "Question : Since upgrading to RSpec 3 my generated spec files contain RSpec.describe instead of just describe and explicitly include the type with e.g . : type : model . For example here s the model spec file that was just generated for a class called Plan : .. . .. . I d rather have it look like this note the changes on line 3 : .. . .. . .. . the type call seems especially redundant because I have the line config.infer spec type from file location in rails helper . How can I make RSpec generate spec files which look like my 2nd example I don t want to have to manually edit it every time . .. . Answer : If you look at the template in the rspec-rails github repo https : github.com rspec rspec-rails blob master lib generators rspec model templates model spec.rb you can see there is no option to do this via config variables . But you should be able to customize it by just creating a file in your lib generators rspec model templates that is called model spec.rb for creating a custom generator for your models . It s just an erb template as you can see in the link above : .. . .. . You should be easily able to customize any generator that Rspec defines with this approach . Yoe can even add extra things . Futher Info is here http : guides.rubyonrails.org generators.html customizing-your-workflow-by-changing-generators-templates . Hope this helpes you :", "Question : I have this rspec code : .. . .. . And it controller : .. . .. . But the controller code still doesn t satisfy the spec . What is wrong here . Here is the failure message : .. . .. . Failures : .. . .. . 1 Api : : ProductsController index should give a collection of products Failure Error : expect assigns : products .to eq product .. . .. . .. . expected : Product id : 3 name : Sample Product created at : 2016-06-15 05 : 10 : 50 updated at : 2016-06-15 05 : 10 : 50 .. . got : nil .. . .. . compared using .. . . spec controllers api products controller spec.rb : 53 : in block 3 levels in top required .. . .. . .. . Finished in 0.05106 seconds files took 1.89 seconds to load 1 example 1 failure .. . Answer : assign checks that an instance variable was set .. . and products should be created in database use let with bang for it then : .. . .. . in your controller : .. . .. . in rspec :", "Question : I have a test suite of rspec tests which are divided into different files . Every file represents one test scenario with some number of test steps . Now on some particular tests it can happen that specific step fails but it is too time consuming and not needed to run rest of the steps in that scenario . I know there is an option --fail-fast in rspec but if I m running tests like : rspec spec that will mean that when first step fails in any script it will abort complete execution . I m just looking for mechanism to abort execution of that specific test scenario test script when failure happens but to continue execution of other test scenarios . Thanks for the help Bakir Comment : RSpec is designed to run in kinda automated environment that s why the functionality you requested is not available out of the box . Though there are two possibilities to avoid a limitation . I personally prefer using github.com guard guard-rspec https : github.com guard guard-rspec but you might find this technique http : stackoverflow.com questions 18828790 rspec-how-can-i-continue-test-after-first-failure more applicable to your needs . .. . Answer : Use the RSpec-instafail gem https : github.com grosser rspec-instafail . According to its documentation it :", "Question : null .. . Answer : I ve got a rails 4.2 application with rspec-rails 3.5.1 .. . .. . I ve got feature specs in spec features module feature spec.rb .. . .. . When I run .. . .. . or .. . .. . the feature specs do not run . They run fine if I do .. . .. . How can I include this path in the default spec Update .. . .. . Here s one of the specs in brief .. . .. . I ve also tried replacing Rspec.describe with describe feature Rspec.feature . The spec doesn t run in the default specs . Comment : How have you got your Rspec.describe set up at the top of your feature specs Comment : Yes I ll edit and add an example . Comment : Have you played around with the --pattern relishapp.com rspec rspec-core v 3-5 docs command-line https : www.relishapp.com rspec rspec-core v 3-5 docs command-line pattern-option you can setup a rake-task to give that pattern to Rspec or you can configure it directly", "Question : null .. . Answer : To debug an expect .to change failure I included a debug puts message : .. . .. . The debug message confirms that the value of OutreachEvent.count IS changing from 0 to 1 but the error message from Rspec says : .. . .. . Failure Error : expect edit save.trigger click sleep 0.5 .to change puts OutreachEvent.count OutreachEvent.count .from 0 .to 1 . expected result to have changed from 0 to 1 but did not change .. . .. . How can I reconcile these two contradicting results When I look at the rails log I can see that the SQL test of OutreachEvent.count is properly occurring before and after an ActiveRecord object was saved to the db ." ] }
[ "yes-answer-long", "yes-answer-short" ]
ruby
UNK_RELATION
indexeddb@javascript@74
indexeddb -- indexeddb provides a way to store data in the browser using @placeholder .
{ "confidence": [ 44.251983642578125, 43.830238342285156, 42.337181091308594, 41.872406005859375, 41.459327697753906, 41.201576232910156, 41.065956115722656, 41.05583190917969, 40.82408142089844, 40.742027282714844, 40.50566482543945, 40.477508544921875, 40.4140625, 40.14312744140625, 39.91580581665039, 39.21215057373047, 39.0970458984375, 38.98949432373047, 38.972679138183594, 38.86360549926758, 38.82662582397461, 38.792152404785156, 38.48929977416992, 38.389766693115234, 38.315284729003906, 38.158077239990234, 38.10978317260742, 38.08672332763672, 38.0302848815918, 37.828651428222656, 37.715858459472656, 37.711997985839844, 37.43961715698242, 37.03269958496094, 36.97439193725586, 36.97439193725586, 36.97439193725586, 36.97439193725586, 36.95326232910156, 36.95326232910156, 36.87567138671875, 36.87359619140625, 36.87359619140625, 36.794464111328125, 36.777618408203125, 36.777618408203125, 36.71016311645508, 36.548095703125, 36.50926208496094, 36.30048370361328, 36.30048370361328, 36.2882080078125, 36.2822265625, 36.25608825683594, 36.07957077026367, 36.035423278808594, 36.035423278808594, 36.035423278808594, 35.9708251953125, 35.9708251953125, 35.891578674316406, 35.891578674316406, 35.67042541503906, 35.492958068847656, 35.492958068847656, 35.46021270751953, 35.458221435546875, 35.458221435546875, 35.458221435546875, 35.458221435546875, 35.458221435546875, 35.458221435546875, 35.458221435546875, 35.361515045166016, 35.34326171875, 35.34326171875, 35.243980407714844, 35.20506286621094, 35.10413360595703, 35.05120086669922, 35.05120086669922, 34.9464225769043, 34.91004943847656, 34.91004943847656, 34.91004943847656, 34.91004943847656, 34.864410400390625, 34.837364196777344, 34.837364196777344, 34.837364196777344, 34.837364196777344, 34.837364196777344, 34.837364196777344, 34.837364196777344, 34.75437927246094, 34.555450439453125, 34.555450439453125, 34.555450439453125, 34.51925277709961, 34.51925277709961 ], "content": [ "indexedDB allows a larger store .", "Basically IndexedDB NOT same as a Relational Database this something like Object Oriented IndexedDB store key-value pairs if IndexedDB does not use Structured Query Language SQL then how to Synchronise IndexedDB data A simple TODO application using IndexedDB to mysql using servlet .. . Anybody please help me on this .", "3 . indexedDB allows a larger store .", "The simpelest way of using the indexeddb is by using js promises .", "Indexeddb is the way to go for a reliable option to store big amounts of data just in the browser .", "I just downloaded the IndexedDB Browser add-on for Firefox .", "Basically I created a indexedDB by using angular-indexedDB to store data as cache I cannot use local-storage due to its size limitation .", "Is there a way to do an OR or IN query on the same property in IndexedDB", "I m using JavaScript and IndexedDB .", "Is there a way to read IndexedDB .", "I m having an issue with IndexedDB .", "get Data from IndexedDB .. . .. . Problem is while retive data from indexedDB it always return empty object .", "indexedDB is async .", "I m using indexedDB to cache large amounts of data .", "IndexedDB is not a key-value store in the same way that Local Storage is .", "IndexedDB on the other hand enjoys the support of all of the major browser vendors http : caniuse.com search indexeddb .", "This error message is not specific to using indexedDB .", "This functionality isn t present in the indexedDB API .", "I ve been playing with IndexedDB in Firefox Ubuntu .. . .. . Is there any way to visualize IndexedDB databases contents", "I want to search some data stored in IndexedDb using dexie .", "I understand that IndexedDB is object store implementation .", "It is worth checking the following small library that mirrors the indexedDb : github.com jakearchibald indexeddb-promised https : github.com jakearchibald indexeddb-promised", "Once downloaded it is located in : .. . .. . Tools Web Developer IndexedDB Browser .. . .. . https : addons.mozilla.org en-US firefox-addon indexeddb-browserupdated-fix .. . .. . EDIT : Since Firefox 26 the files for IndexedDB have moved from", "No it s not the same indexeddB database .", "How do I store this array I am using localforage indexeddb .", "I m using localforage with the indexedDB driver .", "There s no out of the box way to sync data from a breed of SQL to IndexedDB .", "I m new to IndexedDb in javasascript when i open a indexedDb request it always stays at Pending ReadyState .", "Also kudos on this answer for how to clear out you indexedDb data store .", "The only way to invoke this is by changing the version number when opening the indexeddb connection .", "IndexedDB on Chrome browser can use storage without requesting it .", "In windows you can manually delete the whole IndexedDB databases by locating the IndexedDB directory for the browser and deleting it .. . .. . For Chrome : .. . .. . C : Users user-name AppData Local Google Chrome User Data Profile 1 IndexedDB .. . .. . You can delete every folder which clears up the indexedDB .", "CRUD using IndexedDB .", "between using IndexedDB and local files", "IndexedDB for me is an uncertainty .", "Is this the correct spec for IndexedDB", "What is the point of indexedDB", "I have an IndexedDB of changes .", "Is this a shortcoming of IndexedDB or am I doing something wrong", "https : developer.mozilla.org en IndexedDB Using IndexedDB Adding data to the database", "IndexedDB http : www.w3.org TR IndexedDB is the tool of choice for larger in-browser data sets but is not yet available in PhoneGap though it s supposedly on the road map .", "See .. . .. . Why is db.transaction not working with indexeddb", "There is no 5mb limit related to IndexedDB in chrome .", "This gives you more cross-browser support for IndexedDB https : hacks.mozilla.org 2012 07 using-indexeddb-api-today-the-indexeddb-polyfills but IE will still be left out .", "I am using Dexie library for IndexedDb .", "I m working in a project which involves using IndexedDB .", "To use IndexedDB in order to store data when not connected to internet .", "I put IndexedDB into a search-engine https : duckduckgo.com q indexeddb and found this https : developer.mozilla.org en-US docs IndexedDB Using IndexedDB Using an index .", "Despite how some of us are using it there is no guarantee that data in an IndexedDB database will remain there .", "I m searching to use my browser DB through Polymer WebDB or IndexedDB .", "On the other hand on browser storage war IndexedDB win for good .", "In my case which is migrating a whole bunch of data from a websqldb to indexeddb this means that I have to hold all of that data possibly many megs in memory before starting saving with IndexedDB", "IndexedDB is an indexed key-value-store similar to a document-oriented database .", "Im working on a little webapp using indexedDB to store data I load from a server .", "Check this http : caniuse.com indexeddb only android 4.4 supports indexeddb", "For storage used IndexedDB and WebSQL .", "Modeling a relaionship in IndexedDB is not a problem .", "Is this part of the IndexedDb specification", "developer.mozilla.org en IndexedDB Using IndexedDB https : developer.mozilla.org en IndexedDB Using IndexedDB is a good introductory tutorial .", "check the post developer.mozilla.org en-US docs IndexedDB https : developer.mozilla.org en-US docs IndexedDB", "I have created indexedDB database that contain multiple table and data .", "Will I have problems if the data in the IndexedDB exceeds the user s RAM", "According to the IndexedDB spec http : w3c.github.io IndexedDB key-path-construct .. . .. . A key path is a DOMString or sequence that defines how to extract a key from a value .", "I know that location of my IndexedDB database is at : .. . .. . So is there a way for my app to use IndexedDB at the mobile-devices", "http : stackoverflow.com questions 12084177 in-indexeddb-is-there-a-way-to-make-a-sorted-compound-query for an explanation of how compound indexes work in IndexedDB .", "Is there any way to get IndexedDB on Chrome iOS or is it not added", "Promisifying indexedDB is probably the right solution .", "IE and FF will only have IndexedDB .", "Performance of IndexedDB is better than WebSQL .", "The IndexedDB API isn t very intuitive .", "Testing for multiple condition is not possible in IndexedDB .", "There seem to be several IndexedDB implementations for Node.js .", "There seem to be several IndexedDB implementations for Node.js .", "I am trying to make offline maps through caching IndexedDB in browser .", "I don t think you need to explicitly store tiles in IndexedDB or WebSQL .", "We are building a web-app that store lots of files as blobs with indexedDB .", "My indexedDB store is rather large but I was under the impression that indexedDB never really runs out of space it just expires old content .", "So is there a way to make a sorted compound query while using IndexedDB", "I am trying but I don t see indexeddb file : users user Library Application Support Firefox Profiles 5kaqoz4x.default the indexeddb tutorial simple to-do and indexeddb should have key pair values", "I have a database inside indexedDB filled using an Emberjs adapter .", "Firefox is using SQLlite as a backend database so IndexedDB is implemented on the top of it .", "hacks.mozilla.org 2012 07 https : hacks.mozilla.org 2012 07 using-indexeddb-api-today-the-indexeddb-polyfills", "IndexedDB is definitely faster .", "IndexedDB is not implemented on top of WebSQL .", "IndexedDB was introduced to replace WebSQL .", "I m new to indexeddb .", "store them on file system and store path to them in IndexedDB .", "I m developing a app which uses IndexedDB extensively .", "Suppose I have an IndexedDB collection with name items .", "Most indexedDB functions are async and return Request objects .", "Surprisingly IndexedDB won which I wasn t expecting .", "I wrote the Chrome IndexedDB quota enforcement code .", "There is currently no API to request more storage space for indexeddb .", "I have a few question regarding IndexedDB in appjs .", "I read this Question http : stackoverflow.com questions 20097662 how-to-create-multiple-object-stores-in-indexeddb before but is the only way is working with Raw IndexedDB", "Even if you right-click on the IndexedDB table and click Refresh IndexedDB the value does not change .", "possible duplicate of How to delete indexedDB in Chrome http : stackoverflow.com questions 9384128 how-to-delete-indexeddb-in-chrome", "You just need to to right-click on IndexedDB in Resources and select Refresh IndexedDB to confirm that the database has been zapped .", "How would I achieve it in IndexedDB", "Why not just use indexedDB directly" ] }
{ "confidence": [ 52.411888122558594, 52.235565185546875, 51.684791564941406, 50.944889068603516, 49.622581481933594, 49.19708251953125, 48.48894500732422, 47.8503532409668, 47.73204803466797, 47.70949172973633, 47.61422348022461, 47.52867889404297, 47.45795822143555, 47.16796112060547, 47.025108337402344, 46.915252685546875, 46.84635925292969, 46.79758071899414, 46.555355072021484, 46.541500091552734 ], "content": [ "Question : I m considering building a LOB appjs application for which I want to use the IndexedDB for storage . I have a few question regarding IndexedDB in appjs . 1 . What is the maximum storage limit and is there any way to configure appjs chromium browser to increase the limit 2 . Will I have problems if the data in the IndexedDB exceeds the user s RAM Since it s just a key-value-store that stores object graphs I was wondering if it would load the entire data in RAM . Thanks . .. . Answer : About the storage limit I can t say but in theory the indexeddb size is limited to the size of your harddisk . But in most cases a limit is set . As far as I know only the data you will be working on will be loaded into memory . JS has it s own garbage collector so that should take care of the RAM usage .", "Question : I am doing offline DB connectivity in my page using HTML5 IndexedDB concepts. . But Initially I want to fetch large datas to store it in my IndexedDb so for that purpose I am trying to sync Sql Server Data to my IndexedDb Datatbase but I didnt find any solution to do that. . Is there any way to do that If so Pls help me. . thank you. . .. . Answer : SQL is relational-database . IndexedDB is an indexed key-value-store similar to a document-oriented database . There s no out of the box way to sync data from a breed of SQL to IndexedDB . You ll have to write that code manually perhaps using a Polyfill like this one https : github.com facebook IndexedDB-polyfill as an example but note that inserting large amounts of data consecutively is not a good idea http : stackoverflow.com questions 22247614 optimized-bulk-chunk-upload-of-objects-into-indexeddb 22315353 22315353 .", "Question : null .. . Answer : If IndexedDB does not use Structured Query Language SQL It uses queries on an index that produces a cursor which you use to iterate across the result set . Basically IndexedDB NOT same as a Relational Database this something like Object Oriented IndexedDB store key-value pairs if IndexedDB does not use Structured Query Language SQL then how to Synchronise IndexedDB data A simple TODO application using IndexedDB to mysql using servlet .. . Anybody please help me on this . Thanks", "Question : Is there anything like ondelete event handler or way to warn user before they want to clear the indexedDB database . Background : There is a offline first app that works by saving most of the data on indexedDB while offline . Now when the user goes online it tries to sync the data to the server but now if someone mistakenly resets browser or clears the indexedDB they might create a disaster since they have important data that needs to sync to server . So is there any way to overcome this problem Is there a way to save indexedDB as a persistent file system or disable deletion or raise an event and handle properly when there is a deletion .. . Answer : No . Despite how some of us are using it there is no guarantee that data in an IndexedDB database will remain there . This is by design it is temporary storage . The browser can free up space if it needs to . The situation will be somewhat improved when eventually it is possible to store IndexedDB data as persistent data http : code.google.com p chromium issues detail id 340350 but there s never going to be a way to guarantee data isn t deleted . IMHO the user should have the ability to delete data on their computer and it would be a significant problem if that wasn t true . And the problem may be even worse than you realize . For instance here s a bug in Chrome https : code.google.com p chromium issues detail id 340821 and maybe in other browsers too . If the user says delete my cookies and site data from the past 24 hours Chrome will completely delete any IndexedDB database that has been changed in the past 24 hours . So if you have 5000 objects in a DB that were created a year ago but never changed since and one that was edited today they all get deleted . This can be confusing for users but to my knowledge nobody has proposed a good solution . The only workaround is to sync to the server which obviously is not 100 reliable . So if you have any data that is super important it probably shouldn t be in a website s IndexedDB database except as a cache .", "Question : I ve been playing with IndexedDB in Firefox Ubuntu .. . .. . Is there any way to visualize IndexedDB databases contents Or do I have to do it programmatic-ally .. . Answer : I just downloaded the IndexedDB Browser add-on for Firefox . It works well . Once downloaded it is located in : .. . .. . Tools Web Developer IndexedDB Browser .. . .. . https : addons.mozilla.org en-US firefox-addon indexeddb-browserupdated-fix .. . .. . EDIT : Since Firefox 26 the files for IndexedDB have moved from Comment : Since this addon hasn t been updated someone made an tweaked version that works : addons.mozilla.org en-US firefox-addon https : addons.mozilla.org en-US firefox-addon indexeddb-browserupdated-fix Comment : It s been a while but thanks @JW . I updated the link .", "Question : What is the soft limit at which the user needs to give permission to exceed What is the hard limit maximum allowed . Comment : developers.google.com chrome whitepapers storage https : developers.google.com chrome whitepapers storage might be helpful . Comment : let me know if I need to add to my answer .. . Answer : The minimum or soft limit is 5MB- the browser will ask for permission to store the data . Maximum storage is the limit of your hardrive disk as all of the data is stored locally on your machine disk . Basically if you have 20GB free storage than you can use all of the storage for IndexedDB . Comment : the message is answering the question and its right . do ur research first and after u can put my message as unuseful . Comment : check the post developer.mozilla.org en-US docs IndexedDB https : developer.mozilla.org en-US docs IndexedDB Comment : The question is about chrome . Your answer is about firefox .", "Question : I m working in a project which involves using IndexedDB . As I m begining to know this technology I need to be able to delete an indexedDB by hand so I can start over . I found the way to do it in Firefox but I can t find the way for Google Chrome . I tried deleting the content of this folder I m using Mac : .. . .. . home Library Application Support Google Chrome Default IndexedDB .. . .. . but it seems Chrome stil have the db anywhere so I can t start over . Comment : Did you try under your user home folder Comment : Yes . I meant that folder when I typed home . .. . Answer : In windows you can manually delete the whole IndexedDB databases by locating the IndexedDB directory for the browser and deleting it .. . .. . For Chrome : .. . .. . C : Users user-name AppData Local Google Chrome User Data Profile 1 IndexedDB .. . .. . You can delete every folder which clears up the indexedDB . You can start over now .", "Question : I am doing offline DB connectivity in my page using HTML5 IndexedDB concepts. . But Initially I want to fetch large datas to store it in my IndexedDb so for that purpose I am trying to sync Sql Server Data to my IndexedDb Datatbase but I didnt find any solution to do that. . Is there any way to do that If so Pls help me. . thank you. . .. . Answer : From what I understand in your question you are just using indexeddb like a cache layer in case the db goes done . What I would do is the following . In case you are working online a save of your data should exist out af 2 actions . Saving to your service SQL server and save to your indexeddb . In case-when you are offline I would do 2 operation . On is still updating your indexeddb but I would add an extra object store where you save all of your operation that have to be preformed on your service . Once back online you can processes them one by one . Comment : I am using IndexedDB to populate first time from SQL Server and save it in my indexedDB.. . Datas in my SQL Server wont be changing repeatedly it ll be almost same or maybe rarely some changes may happen. . So I will be almost working offline with my IndexedDB datas only. . But I cant able to save the SQL datas to my IndexedDB. . Just for now I have inserted some dummy datas which is also hard coded. . I want to automate the process of copying SQL Server datas to my IndexedDB. . Comment : So the data you are saving is in the indexeddb comes directly from the SQL server and users aren t allowed to save their own This will make it a lot easier . I think the best thing to do is expose your data from SQL server as a rest service . Next you will have to insert the data one by one there isn t a batch insert possibility . I would advice to use one transaction for inserting your data . But for awnsering your question do you need a code sample how you can insert the data Comment : For Now I have created a sample HTML file and manually inserted datas of my tables . Everything is working fine but instead of manually inserting the datas I want to make it more easier . Comment : Also I have another problem right now I have created a HTML file it is working fine . But when I try to add it in my .NET project and run it it is thrown me the error saying Microsoft JScript runtime-error : Object doesn t support property or method addEventListener . Am I missing something or do I need to reference something to make it work in my .NET application Comment : On your first comment : I think the best thing to do is expose your data by using a REST service . In the .NET world you have ASP.NET MVC Web API for that . On your second comment . On which object do you get the error The simpelest way of using the indexeddb is by using js promises . This makes the callbacks a bit easier", "Question : 1 . Both indexedDB and local-storage are key-value stores . What is the advantage of having two key-value stores 2 . indexedDB is asynchronous but joins the most time-consuming thing are manual . They appear to run in the same thread as the async calls were made . How will this not block the UI 3 . indexedDB allows a larger store . Why not increase the size of the HTML5 store 4 . I m scratching my head . What is the point of indexedDB .. . Answer : IndexedDB is not a key-value store in the same way that Local Storage is . Local storage just stores strings so to put an object in local-storage the usual approach is to JSON.stringify https : developer.mozilla.org En Using JSON in Firefox it : .. . .. . This is fine for finding the object with key uniq but the only way to get the properties of myObject back out of local-storage is to JSON.parse the object and examine it : .. . .. . This is fine if you only have one or a few objects in local-storage . But imagine you have a thousand objects all of which have a property b and you want to do something just with those ones where b 2 . With local-storage you ll have to loop through the entire store and check b on each item which is a lot of wasted processing . With IndexedDB you can store stuff other than strings in the value http : www.w3.org TR IndexedDB value-construct : This includes simple types such as DOMString and Date as well as Object and Array instances . Not only that but you can create indexes http : www.w3.org TR IndexedDB index-concept on properties of the objects that you stored in the value . So with IndexedDb you can put those same thousand objects in it but create an index on the b property and use that to just retrieve the objects where b 2 without the overhead of scanning every object in the store . At least that s the idea . The IndexedDB API isn t very intuitive . They appear to run in the same thread as the async calls were made . How will this not block the UI Asynchronous is not the same thing as multi-threaded JavaScript as a rule is not multi-threaded http : stackoverflow.com questions 39879 why-doesnt-javascript-support-multithreading . Any heavy processing you do in JS will block the UI if you want to minimize blocking the UI try Web Workers http : www.whatwg.org specs web-workers current-work . indexedDB allows a larger store . Why not increase the size of the HTML5 store Because without proper indexing it would get increasingly slower the larger it got . Comment : You may also want to check out the answers to the following Question http : stackoverflow.com questions 14314065 are-cookie-read-write-atomic-in-browser for how IndexedDB supports transactions while Local Storage does . Not having transaction support can be a problem with muti-tab window access to Local Storage in browsers such as Chrome and Opera that use a separate process thread per tab .", "Question : I m building a chrome app which requires a persistent and local database which in this case can be either indexedDB or basic object storage . I have several questions before i begin developing the app : .. . .. . 1 . Is it possible to persist indexedDB data after un-installation of the chrome app and chrome browser 2 . If the indexedDB file data persist can i locate and view it 3 . If I can locate but can t view it is it possible to change the location of the indexedDB file 4 . Can I store the indexedDB in a file located on desktop or any other custom location Comment : To that point @Shourya if you are looking to persist the data outside the app you can keep one copy in the app and using an iframe copy it to persist in on a web domain think iFrame or like it using postMessage this way you can move it . But in terms of the actual DB in the app no you do not have access to it at all only the data in the tables . Comment : @joseeight i dont have the option to sync it with a remote-server google drive web server . Comment : I see so what are you really trying to do I have dealt with storage in Chrome a lot and know for sure that you can t gain access to the database in a file form . But I can t see why you would want to do that for anyway . Comment : @joseeight i just want to make sure that the indexedDB persist even if I have to reinstall my app or chrome browser Comment : It is unclear to me how the data is stored but the data for indexedDB is stored in C : Users username AppData Local Google Chrome User Data Default IndexedDB on Windows and inside that folder there are folders for each site with indexedDB . I don t think you can configure it to save elsewhere . .. . Answer : I am currently attempting this very same thing . I am using the Chrome Sync File System Api http : goo.gl 5q8Z9M but running into some instances where my file or its contents is deleted . With this approach I am writing out a JSON object . Hope this helps . Comment : we ve got chrome.storage.sync chrome.storage.local indexedDB and WebSQL which is deprecated . out of which sync is the only one which i ve tested to be persistent across re-installation . i needed to store a large amount of data so it left me with local for which chrome gives no api to store objects . it left me with no choice but to port my app to Adobe AIR . It was just a copy-paste thing port-to-AIR . Comment : Good point the sync does only allow so much space. . my initial thought was to use google drive to store the data itself than pull it from there. .", "Question : I m using localforage with the indexedDB driver . My indexedDB store is rather large but I was under the impression that indexedDB never really runs out of space it just expires old content . However a large number of requests to the indexedDB are failing with the error : DOMException : Transaction timed out due to inactivity . after hanging for 60 seconds . If I just do a simple .. . .. . in an incognito window pointed at my webapp it works fine . If I do the same in the non-incognito window I get the timeout . The important thing is : I get the same timeout problems if I increase the loop size to something big even in a fresh session . So it feels like there s some threshold somewhere that s not quite right . Comment : The Transaction timed out due to inactivity is a Chrome-specific thing that triggers when no activity has been seen from a connnection which usually indicates a hung process . If you have a repro that s a bug - please file one at crbug.com .. . Answer : There isn t any limit on a single database item s size however there is in some cases a limit on each IndexedDB database s total size . This limit and the way the user-interface will assert it varies from one browser to another : https : www.raymondcamden.com 2015 04 17 indexeddb-and-limits", "Question : I have one requirement where should be stored locally when internet is not available . It should handle it in cross-browser compatible way . Now as I know there are variety of options to store the data locally indexedDB WebSQL localStorage . All I really want is a unified API . I don t want to detect and write code for several storage-engines . All I really care about is give a key and give the data and it should be persisted across browser sessions crashes . After lot of googling the only library that I have actually come across is persisJS : .. . .. . http : pablotron.org cid 1557 .. . .. . But it is roughly 4 1 2 years old . Is there anything better ormore reliable and newer than this .. . Answer : You should try lawnchair http : brian.io lawnchair . Also note that not all storage-engines are created equal . If you want to store large amounts of data and access it asynchronously not blocking the UI then you re restricted to IndexedDB and WebSQL which are not supported in all browsers . This gives you more cross-browser support for IndexedDB https : hacks.mozilla.org 2012 07 using-indexeddb-api-today-the-indexeddb-polyfills but IE will still be left out . Comment : Hi Jemery What is this lawnchair I viewed the page but it doesn t have anything mentioned regarding which storage-engines does it support . Can you please link me to that Comment : It calls them adapters http : brian.io lawnchair adapters . It supports basically anything . But as I said the caveat is that asynchonous storage of large amounts of data is not possible in IE now .", "Question : I am doing offline DB connectivity in my page using HTML5 IndexedDB concepts. . But Initially I want to fetch large datas to store it in my IndexedDb so for that purpose I am trying to sync Sql Server Data to my IndexedDb Datatbase but I didnt find any solution to do that. . Is there any way to do that If so Pls help me. . thank you. . .. . Answer : We have implemented crud operation on HTML5 and IndexedDB database to provide offline support . The next step is to synchronize offline and online databases . In this article we are going to implement synchronization of IndexedDB and SQL Server databases using ASP.NET Web API . To sync local DB from Server DB : .. . .. . To sync server DB from Local DB : .. . .. . For complete implementation for this example refer this link : .. . .. . A sample implementation is here : Syncing Offline Database HTML5 IndexedDB with Online Database using Asp.Net Web API http : www.mindstick.com Articles e717bbc3-5ca0-40e8-86a7-ba4e31c8fba8 Syncing 20Offline 20Database 20HTML5 20IndexedDB 20with 20Online 20Database 20using 20Asp 20Net 20Web 20API", "Question : I want to build jQueryMobile app using IndexedDB technology for databases . While developing in web browser the app is working . How can I convert this app into native android app using phonegap and to keep the data from IndexedDB database I know that location of my IndexedDB database is at : .. . .. . So is there a way for my app to use IndexedDB at the mobile-devices For conversion I am using phonegap cloud https : build.phonegap.com apps but the converted app does not have access to the database . I am testing with Nexus 7 tablet . The app on my PC works great . EDIT 1 : I am testing with Google Nexus 7 tablet . Android version is 4.4.2 so i suppose that IndexedDB is supported on my device . The problem is that I don t have idea how to implement the file from the location above what to do with it while conversion so that the database would be found on my device . I am using phonegap cloud https : build.phonegap.com apps for conversion . Comment : Check this http : caniuse.com indexeddb only android 4.4 supports indexeddb .. . Answer : Please go through this link for the support INDEXDB SUPPORT http : caniuse.com indexeddb .. . .. . I had tested it on android 4.3 and it did not worked but here it shows it has support on 4.4 . Also please go through this blog for IOS http : blog.nparashuram.com 2012 10 indexeddb-example-on-cordova-phonegap.html", "Question : I m working in a project which involves using IndexedDB . As I m begining to know this technology I need to be able to delete an indexedDB by hand so I can start over . I found the way to do it in Firefox but I can t find the way for Google Chrome . I tried deleting the content of this folder I m using Mac : .. . .. . home Library Application Support Google Chrome Default IndexedDB .. . .. . but it seems Chrome stil have the db anywhere so I can t start over . Comment : Did you try under your user home folder Comment : Yes . I meant that folder when I typed home . .. . Answer : To remove all Chrome IndexedDB databases run the following in OSX terminal-emulator . Now restart your browser and that s it . .. . .. . Because I need to purge IndexedDB databases very often I have set up an alias in my . bash profile .", "Question : I m starting the development of a web app with offline database storage requirements . Long story short the app should be able to run on : .. . .. . One of the major desktop browsers Chrome preferred .. . Safari on iOS .. . Android s native browser based on V8 and WebKit .. . .. . So the question is which technology to choose : IndexedDB or Web SQL Database Regarding Web SQL Database on one hand it is ready to be used in any of the above scenarios . On the other Mozilla has stated Firefox will never implement it and acording to the HTML5 working draft http : www.w3.org TR webdatabase the specification has reached an impasse : .. . .. . This specification has reached an impasse : all interested implementors have used the same SQL backend Sqlite but we need multiple independent implementations to proceed along a standardisation path . Until another implementor is interested in implementing this spec the description of the SQL dialect has been left as simply a reference to Sqlite which isn t acceptable for a standard . Should you be an implementor interested in implementing an independent SQL backend please contact the editor so that he can write a specification for the dialect thus allowing this specification to move forward . IndexedDB is the alternative advocated by Mozilla but it will only come in Firefox 4 . Microsoft is interested and Chrome will support it as well . I know nothing of Apple s plans regarding IndexedDB . I m personally inclined to choose Web SQL Database but just because I m used to SQLite I like the power and expressiveness of SQL and I understand the relational model . IndexedDB for me is an uncertainty . That said I m afraid of betting on the wrong horse . Is it safe to assume support for Web SQL Database will continue to exist even if IndexedDB becomes the standard A note on CouchDB : do you also see it as an alternative .. . Answer : Well as with all things computing the game is abstraction . If you can come up with an adequate layer that works on both a SQL store and a key-value-store then ideally you re isolated from the problem and can support the appropriate implementation on the particular browser . If your data model and access patterns don t fit with the lowest common denominator i.e . a k v store then that pretty much solves your problem right there . If you can use either store then work on a decent access layer and approach the problem from that direction . Mind just because you have a k v store on the back end doesn t mean you have to model your data as only a k v model . Essentially all a DB is on the backend is a k v store . If you don t have an insane amount of data you can do many things . With a large amount of data the hoops you might have to jump through may cost you in performance that you may well not see with a smaller amount of data . All depends . Comment : Great answer i totally agree .", "Question : I ve been playing with IndexedDB in Firefox Ubuntu .. . .. . Is there any way to visualize IndexedDB databases contents Or do I have to do it programmatic-ally .. . Answer : Bleeding edge Chromium builds reportedly allow you to view IndexedDB content in the Resources panel of the Chrome devtools but only I know of one way to view Firefox IndexedDB content non-programmically and that s to load the .sqlite file directly . Firefox s IndexedDB .sqlite files are located at Users USER Library Application Support Firefox Profiles PROFILE indexedDB on OS X and should be C : Users USER AppData Roaming Mozilla Firefox Profiles PROFILE on Windows . I use the excellent and free Firefox tool SQLite Manager https : addons.mozilla.org en-US firefox-addon sqlite-manager which is cross-platform . which looks like this http : i.stack.imgur.com bxrze.png .. . .. . One thing to keep in mind however is that the contents are often stored as binary blobs and are likely not to be human-readable . Keys are stored as text however so they should be able to be read by hand . Update Although local files remain a great way to view IDB databases and stores Chrome does now have great tooling available in the Resources panel . Comment : will take a look at chromium.. . Everybody keep saying indexedDB is the future . Right now I find myself hunting butterflies with a fork in a dark room . Anyway thanks for your answer . Comment : Just set up a user group . Feel free to email non-straightforward questions and I ll try to answer . groups.google.com group indexeddb-users msg new lnk gcis http : groups.google.com group indexeddb-users msg new lnk gcis Comment : SqlLite Manager is awesome . Thanks for the tip . Yea it shows values as blobs but at least I see all the objectstores keys etc . Comment : Fernando One master trick that we had to develop for IndexedDB is to wait till all transaction ended before starting any schema changes like adding new ObjectStore adding index to the existing store etc . If you like you can check the sources indexedDB.js and taskQueue.js in github.com urbien urbini http : github.com urbien urbini For that we used jquery-indexeddb.js http : nparashuram.com jquery-indexeddb to put IDB requests into taskQueue as promises . Then we had to fallback to Chrome s file api as Chrome does not support blobs . Also we used IDB shim http : nparashuram.com IndexedDBShim for Safari.. . Comment : I am trying but I don t see indexeddb file : users user Library Application Support Firefox Profiles 5kaqoz4x.default the indexeddb tutorial simple to-do and indexeddb should have key pair values", "Question : I m working on a simple web utility that makes use of IndexedDB similar to a key-value DB feature of HTML5 . I was looking for but I was unable to know : what is the maximum size I can store in an item .. . Answer : From an answer by mbrubeck http : support.mozilla.com en-US questions 818987 answer-180011 at support.mozilla.com : .. . .. . By default in Firefox 4 a site can use up to 50MB of IndexedDB storage . If it tries to use more than 50MB Firefox will ask the user for permission : http : mxr.mozilla.org mozilla-central source modules libpref init all.js 101 .. . .. . In Firefox for mobile-devices Google Android and Nokia Maemo Firefox will ask for permission if a site tries to use more than 5MB : http : mxr.mozilla.org mozilla-central source mobile android app mobile.js 571 .. . .. . .. . .. . .. . If the user grants permission for a site to exceed the 50 MB IndexedDB quota then as far as I know Firefox does not impose any more limits . The only limits on the size of the IndexedDB database will be the user s disk space and operating-system . .. . The localStorage quota is 5000KB and there is no way for a web site to ask the browser for permission to store more than that amount in localStorage . I don t think there s a specific limit for a size of a single item only a global limit but you d need to test that .", "Question : I m building a chrome app which requires a persistent and local database which in this case can be either indexedDB or basic object storage . I have several questions before i begin developing the app : .. . .. . 1 . Is it possible to persist indexedDB data after un-installation of the chrome app and chrome browser 2 . If the indexedDB file data persist can i locate and view it 3 . If I can locate but can t view it is it possible to change the location of the indexedDB file 4 . Can I store the indexedDB in a file located on desktop or any other custom location Comment : To that point @Shourya if you are looking to persist the data outside the app you can keep one copy in the app and using an iframe copy it to persist in on a web domain think iFrame or like it using postMessage this way you can move it . But in terms of the actual DB in the app no you do not have access to it at all only the data in the tables . Comment : @joseeight i dont have the option to sync it with a remote-server google drive web server . Comment : I see so what are you really trying to do I have dealt with storage in Chrome a lot and know for sure that you can t gain access to the database in a file form . But I can t see why you would want to do that for anyway . Comment : @joseeight i just want to make sure that the indexedDB persist even if I have to reinstall my app or chrome browser Comment : It is unclear to me how the data is stored but the data for indexedDB is stored in C : Users username AppData Local Google Chrome User Data Default IndexedDB on Windows and inside that folder there are folders for each site with indexedDB . I don t think you can configure it to save elsewhere . .. . Answer : If I had these requirements I see a couple of options that you might pursue .. . .. . 1 . Write a simple database backed by the FileSystem API and periodically lock the database and back up that file . This would be pretty cool because I don t know of anyone who has implemented a simple FileSystem API backed database but I could see it being useful for other purposes . 2 . Any edits to the database would be also made to a copy of the database stored on your backup server and I would write functions that could import snapshots from your backup . 3 . Simply write functions to export from your indexedDB to some format into a backup and to import from the backup . All options seem quite time consuming . It would be cool if when you create an indexedDB you could specify an HTML FileSystem API entry file to back it and that way you wouldn t have to do 1 or 2 . I agree that it seems like quite an oversight that an indexedDB is quite difficult to back up . Comment : do you mean to say that i can put indexedDB in a file Comment : No but I am saying that it would be awesome if indexedDB were implemented in this way . However it is not a part of the specification . It would be possible to implement your own database that uses a file for storage . Comment : Should I use the storage API to push the indexedDB data in an array and store it in a file or there s a better way to do it", "Question : 1 . Both indexedDB and local-storage are key-value stores . What is the advantage of having two key-value stores 2 . indexedDB is asynchronous but joins the most time-consuming thing are manual . They appear to run in the same thread as the async calls were made . How will this not block the UI 3 . indexedDB allows a larger store . Why not increase the size of the HTML5 store 4 . I m scratching my head . What is the point of indexedDB .. . Answer : Adding to the anwser of robertc indexedDB knows ranges so you can search and retrieve all records that start with ab and end with abd to find abc etc ." ] }
[ "yes-answer-long", "yes-answer-short" ]
javascript
UNK_RELATION
mkfifo@fifo@36
mkfifo -- creates a named-pipe aka @placeholder .
{ "confidence": [ 41.275169372558594, 33.07405090332031, 31.427532196044922, 28.335399627685547, 28.118328094482422, 27.945781707763672, 27.631792068481445, 27.570913314819336, 27.570913314819336, 27.48000717163086, 27.198192596435547, 27.17233657836914, 27.17233657836914, 27.17233657836914, 26.96692657470703, 26.9208927154541, 26.620162963867188, 26.441600799560547, 26.441600799560547, 26.296955108642578, 26.00110626220703, 26.00110626220703, 25.739948272705078, 25.513208389282227, 25.473430633544922, 25.290206909179688, 25.290206909179688, 25.290206909179688, 24.810916900634766, 24.54924774169922, 24.391626358032227, 24.385677337646484, 24.208402633666992, 24.208402633666992, 24.208402633666992, 24.061092376708984, 23.976638793945312, 23.967025756835938, 23.83650016784668, 23.463973999023438, 23.19873809814453, 23.19873809814453, 23.155366897583008, 23.09505271911621, 22.754993438720703, 22.116931915283203, 22.116931915283203, 22.116931915283203, 21.68271255493164, 21.673187255859375, 21.673187255859375, 21.673187255859375, 21.211761474609375, 21.203388214111328, 21.203388214111328, 21.173538208007812, 21.027141571044922, 21.027141571044922, 21.027141571044922, 21.027141571044922, 21.027141571044922, 20.683338165283203, 20.600296020507812, 20.600296020507812, 20.418283462524414, 20.37661361694336, 20.25897216796875, 20.091732025146484, 19.945335388183594, 19.945335388183594, 19.945335388183594, 19.86666488647461, 19.841468811035156, 19.84016227722168, 19.830429077148438, 19.830429077148438, 19.830429077148438, 19.830429077148438, 19.830429077148438, 19.698078155517578, 19.698078155517578, 19.698078155517578, 19.698078155517578, 19.698078155517578, 19.698078155517578, 19.465532302856445, 19.465532302856445, 19.345407485961914, 19.345407485961914, 19.23650360107422, 19.177165985107422, 18.849483489990234, 18.84137725830078, 18.79515838623047, 18.79515838623047, 18.78759765625, 18.78759765625, 18.78759765625, 18.78759765625 ], "content": [ "I use mkfifo to create a named pipe .", "mkfifo will create the Named pipe for Inter process communication in the name what you are giving in pipeNameo .", "The process that creates a pipe is the pipe server .", "I need to create a pipe using mkfifo from a super user process that pipe must be writable from a process not super user .", "Maybe pipe and named-pipe conflicts using them together", "If the writer closes the reader will not lose the ability to read the named pipe later if another writer opens the named pipe .", "Does mkfifo simply not work with Cygwin", "For more reference mkfifo http : linux.die.net man 3 mkfifo", "Try this : mkfifo -- FIFONAME printf mkfifo -- s failed n FIFONAME", "A Unix pipe can be named or unnamed .", "because if not then this might just be windows issue .. . .. . I m using babel-watch which uses mkfifo and since it s running inside the docker-container VM mkfifo can t create a file-pipe in that network shared directory .", "I start today studying named pipe .", "I need named pipe for other stuffs .", "I tried that with a named pipe updated above .", "I am trying to find the syntax that will let me redirect standard input output toward a named pipe after using the mkfifo function and creating a child-process using fork .", "Technically possible by wrapping a named pipe handle it still isn t a file .", "I have to say that I understand how do pipe fork mkfifo work .", "mkfifo utility is what makes a filename attached to a FIFO .", "I am wondering if there is a Windows equivalent for Linux mkfifo .", "If the writer closes the reader will not lose the ability to read the named pipe later if another writer opens the named pipe but the reader will not receive any notification either .", "Try mkfifo foo on the command-line .", "Are mkfifo - operations on cifs possible .. . 2 .", "This is my simple code that opens a named pipe writes a string to it and then closes the pipe .", "I attempted a simple mkfifo POC .. . .. . The ubiquitous tutorials say do this : .. . .. . to create a pipe and send some content to it and then do this : .. . .. . to read that content .", "Does anyone have any resource involve message mkfifo : must specify file of mkfifo", "The child filter has to read values from pipefd and write these in a named pipe .", "I m trying to create a named pipe in C but have not had any success .", "I don t see any use for a named pipe inside a git repository .", "mkfifo returned 0 which means it succeeded .", "Being unnamed is more secure than a named pipe but granting world-perms to any pipe is not a good security practice .", "According to mkfifo manual http : linux.die.net man 3 mkfifo such file needs to be open simultaneously for reading and writing .", "Windows just doesn t have the everything is a file abstraction you ll need to make-do with a named pipe .", "I am trying to use named pipe to communicated between process .", "I have tried to implement client-server model using named pipe .", "How can you create a temporary FIFO named pipe in Python", "I found some info about mkfifo here enter link description here http : linux.die.net man 1 mkfifo but nothing about error message .", "The result was a .fifo file that is not highlighted like the one created with mkfifo .. . .. . When using it with gnuradio the fifo file made with mkfifo could only be played once and its size would always return back to 0 bytes .", "Server creates the image and send it to the client via named-pipes too .", "I need named pipe for other stuffs .. . .. . Well if there s no one reading from the pipe then what other stuff can you do with the write end of the pipe", "In order just to get a proper stacktrace you may invoke read on an invalid FileInputStream : .. . .. . If you still need a blocking read named-pipes is the way to go : run mkfifo using Runtime.exec on POSIX systems or create . PIPE MyPipeName on Windows .", "Do anyone have anything document .. . regards that mkfifo message", "Did you read mkfifo 3 and fifo 7 man pages", "A process that connects to a pipe is a pipe client .", "The following is fifoserver.py .. . .. . and this is fifoclient.py .. . .. . I also created two FIFOs using mkfifo input and mkfifo output .", "If you open a named pipe for writing then it ll block until the other end is opened for reading .", "Does someone read what you unzip into mkfifo file", "So I m trying to implement a basic FIFO pipeline in C using mkfifo .", "EDIT .. . .. . I checked for return-value of mkfifo as @parapura rajkumar said .", "If you read the manpage you would have known that O CREAT is an invalid argument to mkfifo : .. . .. . mkfifo makes a FIFO special file with name pathname .", "A named pipe is implemented as a file which has standard user group and world ownership permission bits .", "I know using socket will make the implementation easier but right now I need to implement through named pipe .", "I need to unzip file in a named pipe return it : .. . .. . It hangs on exec gunzip -c fileName tmpFileName", "process 1 : creates a pipe and start reading till it reads over or it reads 100 message .. . .. . process 2 write to the same pipe .. . .. . output of process 1 at times it is Hi1 and at times it is over .. . .. . fd of both the process is blocking .", "The problem is that if i try to un-comment the comment 3 the open of the named-pipe the function won t print values it seem to be stuck on read call .", "I have gone through a variaty of different linux named pipe client-server implementations but most of them use the blocking defaults on reads writes .", "But what is the case with pipe and fifo", "I was so focused on the mkfifo call that I didn t even think about checking this.. .", "I ve created a FIFO with mkfifo and I need to wait till some process writes data several times into it .", "How can i use mkfifo to make a fifo in a directory which his path is home user .example .", "I was trying this mkfifo .example fifo but i get an error saying No such file or directory", "mkfifo requires Linux OSX environment while var app server was mounted from Windows .", "I ve made sure that there is no other process using the fifo jobqueue at the time of calling and the file-permissions for the queue once it s created are set prwxrwxr-x I m just using mkfifo ipcnm 0777 to create the pipe .", "and before the pipe Name neither worked .", "Redirect output of the pipe to the stdin 1 .", "What you re missing is something at the other end of that pipe reading that data .", "When trying the same on the other end replacing the input file with a named pipe I end up with a blank pdf .", "One process writes information to the pipe then the other process reads the information from the pipe .", "Then move the pipe to stdin .", "You want to replace fprintf stderr Error creating fifo n by perror mkfifo failed .", "This gives you the long text error message which corresponds to the value of errno set by mkfifo on failure .", "This doesn t have the same security issue as mktemp because mkfifo balks if the file-exists i.e .", "You can t write into a pipe if it isn t complete yet so the echo command hangs until something else tries to read from that pipe which in your case never happens .", "I read that to create new named pipe i have to use this function : mkfifo const char nom mode t mode .. . .. . example : .. . .. . My question is why in second argument we started with 0 0 760 I know 7 give all permissions to the owner 6 means group can read and write and the other doesn t have any permission", "While the one I accidentally created without using mkfifo kept the bytes for a long time and i could access it anytime i wanted which proved more beneficial to me .", "Instead if i do not open the fifo pipe it works .", "But both of the application wanted to open the send Pipe first .", "What I try to do : .. . .. . Create a pipe FIFO .", "Redirect input of the pipe to the 4th descriptor 4 .", "A pipe is a section of shared-memory that processes use for communication .", "I can t think of an easy OS-independent way - on Unix-like OSes I could try to create a FIFO using mkfifo and read from that file .", "Means in the 1st box there will be the files which will be generated nzsql and in the 2nd box that file will be pulled and while pulling it will be zipped using mkfifo or by any other means .", "I have one program writing to mkfifo created device 7 lines of text data every 3 seconds using printf .", "From the man page for mkfifo : .. . .. . Opening a FIFO for reading normally blocks until some other process opens the same FIFO for writing and vice versa .", "Sometimes it s not and there is no error or warning just a log .. . .. . I search on internet but not found any thing about the mkfifo message must specify file .", "I tried next code in Xcode7 ObjC path points to Documents dir + filename : .. . .. . mkfifo returns 0 but open fails with -1 .", "With poll and with the expectation that named-pipes never terminate and may be connected and disconnected multiple times : .. . .. . open pipe O RDWR O NONBLOCK .. . Main loop : .. . poll for POLLIN events possibly on multiple pipes at once .", "If read 0 something is wrong -- it shouldn t happen with O RDWR on named-pipes but only with O RDONLY or unnamed pipes it indicates a closed pipe which must be closed and re-opened .", "So you have to ensure there s a reader from the pipe or delay opening the pipe until there s someone ready to read from it .", "Without poll and with a single pipe : .. . .. . open pipe O RDONLY .. . Main loop : .. . read as much data as needed possibly looping on read calls .", "Use an anonymous pipe using the pipe http : linux.die.net man 2 pipe function like this the example is borrowed from german Wikipedia https : de.wikipedia.org wiki Pipe 28Informatik 29 Verwendung einer unnamed Pipe .28anonyme Pipe.29 in C : .. . .. . The above program creates an unidirectional pipe where the parent process holds the read end and the child-process holds the write end .", "An unnamed pipe also has permissions but these are constrained by euid egid and umask in-place at the time that the pipe is created .", "Of course with certain umask values the unnamed pipe world-permissions would allow the processes to communicate over the pipe but any process would be able to read-write that pipe .", "The thing with named-pipes is that you need to have something on both ends .", "Initially no pipe object exists .", "This was the problem for broken-pipe", "In fact never write a 0 in a pipe you will only get troubles .", "When my writer try to write in the pipe that return a segmentation-fault .", "One or both ends of the pipe is buffering more than you want .", "If read 0 the connection is closed and you must terminate or close and reopen the pipe ." ] }
{ "confidence": [ 39.756370544433594, 39.53782653808594, 39.44512176513672, 39.293846130371094, 37.60774230957031, 36.67235565185547, 36.438533782958984, 36.023468017578125, 36.023468017578125, 35.929588317871094, 34.59510803222656, 34.54509735107422, 33.50617218017578, 32.68549346923828, 32.66480255126953, 31.55343246459961, 31.246442794799805, 30.277732849121094, 29.875274658203125, 29.794057846069336 ], "content": [ "Question : I m trying to create a named pipe in C but have not had any success . Here is my code : .. . .. . So after running this I check the directory and there is no file being made . Here is some sample output : .. . .. . Please help : .. . .. . UPDATE Ok I see that the ls -l worked for when the path was set to my Desktop But it doesn t work when I try and set it to the current directory where the main.c is stored . I tried adding . and before the pipe Name neither worked . Comment : Does it work from the command-line Comment : mkfifo returned 0 which means it succeeded . .. . Answer : mkfifo will create the Named pipe for Inter process communication in the name what you are giving in pipeNameo . Named pipes are created in hard disk for IPC mechanism . In Command line give ls -l to view that file . For more reference mkfifo http : linux.die.net man 3 mkfifo Comment : But the fifo should be visible in the file system otherwise other processes could not open it . Comment : @MartinR but Is it visible normally like other files Comment : Yes I think so . Try mkfifo foo on the command-line . Comment : Yes it is if you are calling ls -l the first flag will be shown as p : prw-r--r-- 1 leo abkdev 0 2014-07-21 19 : 32 fifo Comment : @IngoLeonhardt Thank you buddy", "Question : I use mkfifo to create a named pipe . Then I use the following program to open it . However the program hangs at the line fopen . Is there something wrong here .. . Answer : The process blocks until the other end of the pipe gets opened .", "Question : Does mkfifo simply not work with Cygwin A simple set of commands such as .. . .. . just causes the terminal to sit forever with the cursor blinking . Am I doing it wrong .. . Answer : The thing with named-pipes is that you need to have something on both ends . You can t write into a pipe if it isn t complete yet so the echo command hangs until something else tries to read from that pipe which in your case never happens .", "Question : I need to unzip file in a named pipe return it : .. . .. . It hangs on exec gunzip -c fileName tmpFileName Comment : According to mkfifo manual http : linux.die.net man 3 mkfifo such file needs to be open simultaneously for reading and writing . It means that someone needs to read the data which you unzip into it . Does someone read what you unzip into mkfifo file Comment : Yes it will be read after function-call that s why gunzip executed in the background . .. . Answer : I solved this issue in this way :", "Question : null .. . Answer : I am wondering if there is a Windows equivalent for Linux mkfifo . By equivalent I mean way of creating files with st mode S IFIFO . Thanks for answers . Comment : Windows just doesn t have the everything is a file abstraction you ll need to make-do with a named pipe . Finding it back by name from the kernel object namespace is not a problem . Comment : I am just asking because Windows has S IFIFO defined but maybe it s defined only for some backwards compatibility . Also ntfs-3g from linux recognizes some files as S IFIFO . Comment : Hmm you found that in stat.h a header that Microsoft had to emulate . Technically possible by wrapping a named pipe handle it still isn t a file .", "Question : null .. . Answer : I m trying to create a named pipe in C but have not had any success . Here is my code : .. . .. . On running the above code every time output comes out : .. . .. . Please help . Comment : use perror to print the actual error message Comment : check that you have write permission on the cwd Comment : Did you check errno Probably EEXISTS if I had to guess . Comment : check that there is no file already Comment : You want to replace fprintf stderr Error creating fifo n by perror mkfifo failed . This gives you the long text error message which corresponds to the value of errno set by mkfifo on failure .", "Question : I need to unzip file in a named pipe return it : .. . .. . It hangs on exec gunzip -c fileName tmpFileName Comment : According to mkfifo manual http : linux.die.net man 3 mkfifo such file needs to be open simultaneously for reading and writing . It means that someone needs to read the data which you unzip into it . Does someone read what you unzip into mkfifo file Comment : Yes it will be read after function-call that s why gunzip executed in the background . .. . Answer : The problem is that the kernel will block in the open system call until the fifo is opened for the opposite direction and Tcl creates the redirections in the parent process prior to forking because this allows for much more reliable error-handling in normal circumstances . What you need is to get the O NONBLOCK flag passed into the open syscall but the exec command doesn t give you control over that . So some trickery is required This works by doing the open by hand with the flags we want Tcl maps them in without the O prefix and then passing that descriptor to the subprocess . Note that since this is the write side of the pipe that we re setting up we have to open in WRONLY mode which is sort of what open w would do under the covers minus some flags that don t apply here and plus the NONBLOCK which is the magic we want . Comment : Donal Fellows http : stackoverflow.com users 301832 donal-fellows It reports an ERROR : couldn t open tmp 52977 : no such device or address", "Question : I am trying to find the syntax that will let me redirect standard input output toward a named pipe after using the mkfifo function and creating a child-process using fork . Which man page should I be looking at for the syntax Thanks Aaron .. . Answer : Do you referred this http : www.cs.bu.edu teaching c file-io intro .. . .. . gives you idea about the syntax .", "Question : I am trying to find the syntax that will let me redirect standard input output toward a named pipe after using the mkfifo function and creating a child-process using fork . Which man page should I be looking at for the syntax Thanks Aaron .. . Answer : You ll want to use the dup2 function . Standard Input is file-descriptor 0 and Standard Output is 1 . http : pubs.opengroup.org onlinepubs 9699919799 functions dup2.html", "Question : I start today studying named pipe . I read that to create new named pipe i have to use this function : mkfifo const char nom mode t mode .. . .. . example : .. . .. . My question is why in second argument we started with 0 0 760 I know 7 give all permissions to the owner 6 means group can read and write and the other doesn t have any permission Comment : The leading zero represents octal . 0760 permissions would be user rwx 7 111b group rw- 6 110b other none 0 000b Comment : Possible duplicate of What does mode t 0644 mean http : stackoverflow.com questions 18415904 what-does-mode-t-0644-mean .. . Answer : the first bit 0 of 0760 represent the permission including set-user-ID on execute bit set-group-ID on execute bit and the sticky bit", "Question : I am trying to find the syntax that will let me redirect standard input output toward a named pipe after using the mkfifo function and creating a child-process using fork . Which man page should I be looking at for the syntax Thanks Aaron .. . Answer : Various sections of man page can serve your various purposes . Generally .. . Section 1 contain syntax for executable programs or shell command . Section 3 contain syntax for Library call used in c programs . Edit : I think i misunderstood the question..if u need the syntax for a command for redirection check", "Question : I start today studying named pipe . I read that to create new named pipe i have to use this function : mkfifo const char nom mode t mode .. . .. . example : .. . .. . My question is why in second argument we started with 0 0 760 I know 7 give all permissions to the owner 6 means group can read and write and the other doesn t have any permission Comment : The leading zero represents octal . 0760 permissions would be user rwx 7 111b group rw- 6 110b other none 0 000b Comment : Possible duplicate of What does mode t 0644 mean http : stackoverflow.com questions 18415904 what-does-mode-t-0644-mean .. . Answer : As John3136 points out the leading 0 signifies that the follow number 760 is octal and as you pointed out the permission bits for the new pipe would therefore be rwxrw---- for owner group and everyone else .", "Question : I start today studying named pipe . I read that to create new named pipe i have to use this function : mkfifo const char nom mode t mode .. . .. . example : .. . .. . My question is why in second argument we started with 0 0 760 I know 7 give all permissions to the owner 6 means group can read and write and the other doesn t have any permission Comment : The leading zero represents octal . 0760 permissions would be user rwx 7 111b group rw- 6 110b other none 0 000b Comment : Possible duplicate of What does mode t 0644 mean http : stackoverflow.com questions 18415904 what-does-mode-t-0644-mean .. . Answer : 760 is a decimal base 10 .. . .. . 0760 leading 0 is an octal number base 8 .. . .. . 0x0760 leading 0x is a hex number base 16 .. . .. . The leading 0 isn t actually part of the number just an indicator that it is octal not decimal .", "Question : I use mkfifo to create a named pipe . Then I use the following program to open it . However the program hangs at the line fopen . Is there something wrong here .. . Answer : Try passing w as the mode to fopen instead of rw . You probably don t want to both read and write to the FIFO in the same process . Some background on how FIFOs are opened : .. . .. . Using open for read-only without specifying O NONBLOCK causes a block until another process opens the FIFO for writing . Similarly an open without specifying O NONBLOCK for write-only blocks until another process opens the FIFO for reading . If you pass O NONBLOCK to open opening for read-only returns immediately but opening for write-only returns an error with an errno of ENXIO unless another process has the FIFO open for reading . Info from Advanced Programming in the UNIX Environment by W . Richard Stevens .", "Question : I have gone through a variaty of different linux named pipe client-server implementations but most of them use the blocking defaults on reads writes . As I am already using poll to check other flags I though it would be a good idea to check for incoming FIFO data via poll as well.. . .. . .. . After all the research I think that opening the pipe in O RDWR mode is the only way to prevent an indefinitely number of EOF events on a pipe when no writer has opened it . This way both ends of the pipe are closed and other clients can open the writable end as well . To respond back I would use separate pipes.. . .. . .. . My problem is that although I have found some examples that use the O RDWR flag the open manpages describe this flag as being unefined when assigned to a FIFO . http : linux.die.net man 3 open .. . .. . But how would you use poll on a pipe without O RDWR Do you think O RDWR is a legitimate way to open pipes Comment : Did you read mkfifo 3 and fifo 7 man pages And you won t get an indefinite number of EOF events... . Can t you open it O RDONLY on one side and O WRONLY on the other side and rthen poll appropriately And fifo 7 explicitly says that opening a FIFO for read and write will succeed both in blocking and nonblocking mode Comment : Yeah you are right fifo 7 mentions it to be OK under Linux although it is no standardized POSIX behavior . The thing here is that I cannot open the reading end with O RDONLY only and the writing end with O WRONLY because by default this will block and that is not allowed in my use-case . So while I can theoretically open it with O RDONLY O NONBLOCKING it will not block but since there might be no writer EOF events will be thrown on poll . So I will have to go with O RDWR to avoid blocking behavior on open and to be able to use poll .. . .. . Answer : According to open 2 http : www.kernel.org doc man-pages online pages man2 open.2.html man page you can pass O RDONLY O NONBLOCK or O WRONLY O NONBLOCK to avoid the open syscall to be blocked you ll get errno ENXIO in that case .. . .. . As I commented read also the fifo 7 http : www.kernel.org doc man-pages online pages man7 fifo.7.html and mkfifo 3 http : www.kernel.org doc man-pages online pages man3 mkfifo.3.html man pages . Comment : thanks but on linux O WRONLY O NONBLOCK will not work I guess.. . The thing is that I cannot block on open AND want to use poll so when I use O RDONLY O NONBLOCK it will not block but poll will fire EOF events all the time.. . So O NONBLOCK and poll is a bad combination . So it seems that I have to go with O RDWR although its no POSIX standard . So is there a way to use poll on non blocking pipes without O RDWR Comment : I never coded that but the man page says that O WRONLY O NONBLOCK should work without blocking . Did you tested it Of course you cannot poll for open since poll requires file descriptors returned by open Comment : Thanks a lot . I will try this for sure later . I am not going to poll on open . I will use POLLIN on reads after I have successfully openend the pipe... .", "Question : Does mkfifo simply not work with Cygwin A simple set of commands such as .. . .. . just causes the terminal to sit forever with the cursor blinking . Am I doing it wrong .. . Answer : No you re not doing anything wrong with either of those commands it s just your expectations are a little off . What you re missing is something at the other end of that pipe reading that data . This apparent hanging happens in Linux as well so it s not a CygWin problem or any sort of problem really . Just open up another window and enter : .. . .. . and you ll see the data appear followed by the original echo completing .", "Question : I m using docker on Windows and my src directory is mounted as a network share inside the docker-container https : docs.docker.com engine tutorials dockervolumes mount-a-host-directory-as-a-data-volume as opposed to COPY . So var app server inside the docker is actually a network share whose actual location on my host is C : ...project server . sidenote I m not familiar with how docker works on linux like does it still use network share for mount on linux as well because if not then this might just be windows issue .. . .. . I m using babel-watch which uses mkfifo and since it s running inside the docker-container VM mkfifo can t create a file-pipe in that network shared directory . sidenote : babel-watch actually does works on windows outside docker with cygwin which has a mkfifo.exe utility .. . .. . Is there any workaround to this I tried editing babel-watch source https : github.com kmagiera babel-watch blob 22119922c65edc4f6e8cebe16ac382ac4582f191 babel-watch.js L230 to have mkfifo create a file in var app or var instead where it would still be inside the realm of the docker-container and while this way mkfifo actually works the file changes aren t seen by babel-watch . I guess fundamentally the file change info isn t able to propagate pass the network share barrier - var app server the mount point to var app real directory inside docker . .. . Answer : mkfifo requires Linux OSX environment while var app server was mounted from Windows . So it does not works . So you should ADD or COPY instead of mount volume Comment : I should ve mentioned this earlier but on windows I use cygwin which provides mkfifo.exe and so babel-watch actually does work on windows . It s only this docker mounting situation that it doesn t work in . Comment : ADD or COPY defeats the purpose of node-watch . Unless there s some rsync like feature in docker like in vagrant which can ADD or COPY file changes on the fly into the container", "Question : I need to create a pipe using mkfifo from a super user process that pipe must be writable from a process not super user . Reader : .. . .. . Writer : .. . .. . I call . writer and sudo . reader . When my writer try to write in the pipe that return a segmentation-fault . And if I look in tmp myfifo I found that permissions prwxr-xr-x but I want prw-rw-rw- . Comment : The segmentation-fault occurs because you don t check if fopen did open the file it s very likely that the permissions are the cause but it s very bad practice not to check for fp NULL . Comment : GDB is your friend A segfault always indicates a programming error . Comment : You are right but this is an example now I ll modify it . The segmentation-fault become also if I check that fp NULL : Comment : now your check is wrong : - it has to be if fp NULL return -1 .. . Answer : Your writer is segfaulting because you are opening it for writing but do not have permissions to write to it . Hence fp will be NULL and your fprintf fails . The reason for your FIFO having incorrect permissions is probably because your umask is 022 which means those bits are being cleared from the mask you send to mkfifo . This will result in the permissions you see . To fix this either change your umask using the umask call or explicitly set permissions with chmod . But do you really want your FIFO to be executable Comment : No I don t need that my FIFO is executable but I was hopeless when I give the executable permission . : P Comment : No problem - feel free to accept the answer : - Comment : Ok using chmod works but how to use umask", "Question : I have one program writing to mkfifo created device 7 lines of text data every 3 seconds using printf . I am trying to read it with cat path to device in another terminal window . But instead of updating every 3 seconds it will print something only once every 25 seconds . Why How to make it update faster Ubuntu Wily Comment : are you using concurrency with other shells scripts .. . Answer : One or both ends of the pipe is buffering more than you want . In your writing program fflush when you finish writing your 7 lines and read the output with cat -u if your cat is not GNU cat .", "Question : null .. . Answer : 1 . I downloaded winBash and started to console no installation necessary .. . 2 . I attempted a simple mkfifo POC .. . .. . The ubiquitous tutorials say do this : .. . .. . to create a pipe and send some content to it and then do this : .. . .. . to read that content . I get : .. . .. . syntax-error near unexpected token .. . .. . when granted I think my syntax is a bit creative or desperate but even with the most mundane of syntax I get : .. . .. . mkfifo fifo files not supported .. . .. . So my question isn t really about syntax so much as I suspect maybe be there is more to be done in the way of setup environment configuration Other commands ls pwd mkdir etc . work so I don t think this is a PATH thing . I programmed Perl and C on Linux like 20 years ago but this is my very first time ever making a ported shell work on Windows . Any suggestions Thanks Comment : Please try to include complete error messages . Something like foo : line 4 : syntax-error near unexpected token done can reveal a lot that syntax-error near unexpected token alone can not . This even goes for trailing punctuation In any case it sounds like winBash does not allow for fifos . Comment : no line numbers or further information was given in the error message :" ] }
[ "yes-answer-long", "yes-answer-short" ]
fifo
UNK_RELATION
node-postgres@postgresql@104
node-postgres -- node-postgres is a postgresql client module for node.js applications to interact with @placeholder databases .
{ "confidence": [ 61.84715270996094, 59.08924865722656, 57.981502532958984, 56.30581283569336, 55.19198226928711, 55.16801834106445, 53.681434631347656, 53.11014175415039, 51.561798095703125, 50.64306640625, 50.43974685668945, 49.52779769897461, 49.33185958862305, 49.33185958862305, 48.920772552490234, 48.920772552490234, 47.750343322753906, 47.32350158691406, 47.24508285522461, 47.20161056518555, 46.89141082763672, 46.18437957763672, 45.22445297241211, 45.22445297241211, 45.1685676574707, 45.15928649902344, 44.508689880371094, 44.508689880371094, 44.508689880371094, 44.129844665527344, 43.551124572753906, 43.548763275146484, 43.548763275146484, 43.548763275146484, 43.548763275146484, 43.26923370361328, 43.236846923828125, 42.82521057128906, 42.80855178833008, 41.59354782104492, 41.5404052734375, 41.5404052734375, 41.5404052734375, 41.373992919921875, 41.29508972167969, 41.29508972167969, 40.81685256958008, 40.7490119934082, 40.24553298950195, 40.24553298950195, 40.24553298950195, 40.24553298950195, 40.08763122558594, 39.59952926635742, 39.58518600463867, 39.58518600463867, 38.583412170410156, 38.583412170410156, 38.583412170410156, 38.56984329223633, 38.56984329223633, 38.196929931640625, 37.63468933105469, 37.426456451416016, 37.37737274169922, 37.198326110839844, 37.198326110839844, 37.198326110839844, 37.198326110839844, 37.198326110839844, 37.198326110839844, 37.198326110839844, 37.17252731323242, 36.96829605102539, 36.94385528564453, 36.600677490234375, 36.561485290527344, 36.561485290527344, 36.561485290527344, 36.561485290527344, 36.30842208862305, 35.878456115722656, 35.42351150512695, 35.42351150512695, 35.36919021606445, 35.33754348754883, 35.33754348754883, 34.757572174072266, 34.58403396606445, 33.78534698486328, 33.78534698486328, 33.78534698486328, 33.78534698486328, 33.78534698486328, 33.78534698486328, 33.78534698486328, 33.74782180786133, 33.74782180786133, 33.514278411865234, 33.514278411865234 ], "content": [ "I m using the node-postgres https : github.com brianc node-postgres module for node.js and I have a problem inserting data .", "I just started playing around with node.js with postgres using node-postgres .", "What are your versions of Node.js and node-postgres", "I m building an app in node.js using node-postgres .", "@wildplasser the node code is using node-postgres module to pool connections .", "Node v6.2 on Windows 10 PG node-postgres v4.4.2 .. . .. . Postgres 9.5 on Ubuntu 14.04 Trusty VirtualBox .. . .. . I m using the PG node-postgres module to connect to Postgres on Ubuntu in a virtual-machine .", "im using postgres with node", "We re working on a Node Express web app with a Postgres database using the node-postgres https : github.com brianc node-postgres package .", "Using Node.js and the node-postgres module https : github.com brianc node-postgres to communicate with a database I m attempting to write a function that accepts an array of queries and callbacks and executes them all asynchronously using the same database-connection .", "The interface in node.js that I used can be found here https : github.com brianc node-postgres .. . .. . try changing pg : to postgres : .. . .. . This was scraped from another stackoverflow article : Play with Postgres through Node.js http : stackoverflow.com questions 9205496 play-with-postgres-through-node-js", "I am having a problem with my query function using node-postgres https : github.com brianc node-postgres .", "How to print Postgresql schema via node-postgres or Knex.js", "Connection pooling is implemented for each tenant using node-postgres module .", "I m using https : github.com brianc node-postgres pg module .", "Perhaps another bug within node-postgres .", "https : github.com brianc node-postgres issues 1000", "How can I achieve this using the node-postgres package", "So can I use named parameters with node-postgres module", "EDIT : I m using the socket.io and node-postgres modules", "Read more about it here github.com brianc node-postgres wiki pg https : github.com brianc node-postgres wiki pg", "Because of the increasing number of databases we are soon hitting the max connections limit of postgres .", "I am not sure whether this is problem with how I use node-postgres or if it s because I was spamming postgres .", "I am using Node pg to connect and use my Postgres Database .", "It appears that node-postgres doesn t accept a hashtag in your password .", "I saw http : www.connectionstrings.com postgresql and read the documentation on https : github.com brianc node-postgres .", "The node code is just an enhanced version of brianc s basic client pooling example https : github.com brianc node-postgres roughly like.. .", "I m using a postgres database node-postgres and currently have the application configured with a connection-string for the remote database .", "I am trying to use node-postgres to hook my app up to Postgres .", "Is there some way of having node-postgres accept the question marks instead or an utility that can convert to postgres style params", "I have a node.js program calling a Postgres Amazon RDS micro instance function get jobs within a transaction 18 times a second using the node-postgres package by brianc .", "brianc author of node-postgres commented here https : github.com brianc node-postgres issues 856 that .. . .. . The only way to do sync queries is to use pg-native https : github.com brianc node-pg-native and use the sync variant of the methods .", "as stated in the github page : https : github.com brianc node-postgres .", "my version of postgres is 9.4 node-pg is 4.4.3 .. . .. . Thanks", "What is node-postgres and why is it not in the tags as it appears to be the core of your question", "Is there some way of having node-postgres accept the question marks instead", "I m trying to run two parameterised insert queries using node-postgres https : github.com brianc node-postgres : the first one specifies the primary-key column the second doesn t .", "I read about the Postgres parse-array issue https : github.com brianc node-postgres issues 10 and this stackoverflow question on parameterised arrays in node-postgres : .. . .. . node-postgres : how to execute WHERE col IN dynamic value list query", "Now I normally do not insert the data manually but using node-postgres in a node server .", "@joop It looks like this is a node.js interface to postgres .", "In the docs github.com brianc node-postgres wiki pg https : github.com brianc node-postgres wiki pg it says : use the pg object to create pooled clients .", "I managed to get all of those variations working in node-postgres unparameterized .", "Confirmation https : github.com brianc node-postgres issues 82 issuecomment-18756081 .", "Please test and confirm since I don t use node-postgres myself .", "There is a breaking change in Node v6 so you need to upgrade pg node-postgres to v6.0.1 from v4.4.2 that you said you are using .", "I recently switched from MySQL to postgres as my database for an node.js project .", "I m writing a Node.js web server that uses a Postgres database .", "I m writing a node app with React using node-postgres and superagent for backend calls .", "I m currently using postgres in node to query all users who have a certain tag associated with their account like so note : I m using node-postgres https : github.com brianc node-postgres : .. . .. . tagName is then passed into the WHERE clause .", "I use Postgres functions from node js to insert update or fetch data .", "node-postgres is not going to throw a not connected error because it is designed to queue queries until the connection is ready .", "I m assuming you re using the latest version of node-postgres in which the connection-pooling has been greatly improved .", "This lacks any quoting of the values in arr and node-postgres does not provide any quoting methods .", "Good day I have the following issue : my node.js server which is running node-postgres to communicate with a database gives the error read ECONNRESET when a client asks for it to query the database .", "I tried both https : github.com brianc node-postgres wiki Client .. . .. . new pg.Client ...password : C digo .. . .. . and .. . .. . conString postgres : ...C digo@ .. . .. . I know that both ODBC Driver PostgreSQL UNICODE and JDBC Unicode true support UTF in connection-string .", "the array formats described by Erwin work in node-postgres literally as follows : .. . .. . the tl : dr of javascript quoting http : stackoverflow.com a 244842 .. . .. . to parameterize them in node-postgres : based on this answer http : stackoverflow.com a 10829760 1526366", "Thank you and it looks like there is a way to pass an array of values according to the node-postgres FAQ https : github.com brianc node-postgres wiki FAQ question 11 .", "I m currently using node-postgres https : github.com brianc node-postgres to query my DB like so : .. . .. . I want to return the lowercase of these names so I ve tried this : .. . .. . ...but this just returns null in-place of each name .", "Is there any way to get executable query from query with parameters.Actually its weird but i want to store executable query in database.A complete query without parameters 1 2 3 .. . .. . i am using node-postgres https : github.com brianc node-postgres .. . .. . this is what i need", "However the node-postgres extras https : github.com brianc node-postgres wiki Extras page mentions multiple sql generation tools and for example Squel.js https : hiddentao.github.io squel parameters parameters can be used to construct sql-in a way very close like what you re looking for :", "Are you using node-postgres directly or via pg-promise https : github.com vitaly-t pg-promise", "I want to promisify node-postgres pg.connect method along with the inner connection.query method provided in the callback .", "And why is postgres returning it in this manner", "I am using node-postgres to connect to a Postgres database from NodeJS it gives a strange error Cannot read property rows of undefined after running the program for 30 seconds after the first request to the server .", "I m using PostgreSQL 9.5 for the database and node for the server .", "you should use this form of client.query with callback supplied github.com brianc node-postgres wiki https : github.com brianc node-postgres wiki Client parameterized-query-with-optional-callback-supplied - this will give you all rows in the result .", "Using node-postgres the following snippet works fine : .. . .. . but the if I change the above to : .. . .. . yields - Unhandled rejection error : syntax-error at or near .", "any way to pass parameters in a way the node-postgres will accept without having to create an additional array from my array + non-array elements .", "My question was asking if there was a way to use the node-postgres library in way that cleaned up our params creation code before the query .", "I found out later that pg.defaults.poolSize 0 may not disable pooling as expected https : github.com brianc node-postgres issues 319 .", "I m still getting the issue with drained not appearing in the expected place but obviously that is more an issue with the node-postgres library than with the looping syntax .", "Hard-coding the list of ids in the query template seems not viable either as node-postgres does not provide any value escaping methods .", "Example .. . .. . With node-postgres a complete JavaScript example looks like : .. . .. . Performance .. . .. . One of the best ways to understand the performance of a SQL query is to look at how the database processes it .", "We are using the node-postgres https : github.com brianc node-postgres pg https : www.npmjs.com package pg on NPM for our app but were having issues so we decided to go back to the examples on the Wiki : .. . .. . https : github.com brianc node-postgres wiki Example .. . .. . When we run the example each http-request inserts two records into the Postgres visit table .", "I have this in mongo : .. . .. . and I did this in postgresql : .. . .. . But the for-loop doesn t work as expected in the postgres .", "https : github.com caolan async .. . .. . Using async I would rewrite the code as : .. . .. . see also async.forEachSeries but I don t think it s needed in this case because the node-postgres client is going to run the queries in series anyways .", "node-fiber https : github.com laverdet node-fibers", "This is my first time using node-postgres superagent and React so any help is appreciated .", "If executing 2 inserts instead of 1 will danger the performance of your application then node-postgres isn t for you at all .", "I am using pg-promise npm package but this uses the normal node-postgres adapter under the hood .", "Prepared Statements within node-postgres are not suitable for bulk inserts because they do not support multi-query statements .", "I ve tried that aswell I changed the postgres : to pg : after postgres : didn t work .", "But now I have uninstalled node pg module and installed node pg module again .", "So Postgres is getting : .. . .. . .. . repeated every 55ms .", "but please tell me if this is the wrong approach for Postgres", "becasue pg-promise module could not support all postgres versions .", "Are you sure you are using Postgres", "What version of Postgres are you using", "I am trying to do some big bulk inserts to Postgres via node-postgres When the bindings array exceeds 65536 values then passes to postgres the rest of values and when the query it runs I take the error .. . .. . Any thoughts", "While I m able to reach my remote postgres database from my local pgAdmin III OSX client so far I ve been unable to connect to my database through node.js .", "Asking this because : .. . .. . 1 . perhaps there s a better way to use the node-postgres package we re using it incorrectly and .. . 2 . if this is the correct way to solve this type of issue then this code supplements the answer in the question referenced above .", "Merely making node wait a minute between polling sessions doesn t have the same effect so there are obviously resources that the Postgres backend associated with the pooled connection is keeping .", "Used this way node-postgres creates up to 10 connections the default and what we re using and re-uses them to prevent the expensive database-connection set-up and destroy processes .", "I just used the example from the github repo doc of node-postgres : .. . .. . And these are the errors I get every time I try to start my server : .. . .. . Help would be greatly appreciated", "Check here : https : github.com brianc node-postgres blob master lib defaults.js L27 .. . .. . You can increase default pool size by setting pg.defaults.poolSize : .. . .. . .. . .. . Update : Execute another query after freeing a connection .", "This seems like a very common use-case so my guess is that I m actually overlooking something and not that it is not possible to use the common IN values SQL operator with node-postgres .", "If anybody has solved this problem in a more elegant manner than those I listed above or if I m really missing something about node-postgres please help .", "I am quite certain it must be possible in postgres .", "or an utility that can convert to postgres style params", "http : stackoverflow.com questions 10720420 node-postgres-how-to-execute-where-col-in-dynamic-value-list-query .. . .. . But the answer didn t seem to be there .", "According to this bug report it supports arrays now https : github.com brianc node-postgres issues 129 issuecomment-48633017 so the FAQ might be outdated ." ] }
{ "confidence": [ 71.12678527832031, 70.77363586425781, 69.67010498046875, 65.26383972167969, 63.985687255859375, 62.685646057128906, 61.621849060058594, 58.319664001464844, 57.98289108276367, 56.963096618652344, 56.22002029418945, 56.21222686767578, 55.92240905761719, 55.822998046875, 54.208255767822266, 53.703941345214844, 53.65538787841797, 53.570011138916016, 52.80610656738281, 52.71049118041992 ], "content": [ "Question : While booting my Node.js app I want to make a couple of synchronous calls to the PostgreSQL database to check some things before continuing the control-flow . How can I achieve this using the node-postgres package .. . Answer : brianc author of node-postgres commented here https : github.com brianc node-postgres issues 856 that .. . .. . The only way to do sync queries is to use pg-native https : github.com brianc node-pg-native and use the sync variant of the methods . Using pure javascript client it is impossible to do sync queries because of how node works . Hope this helps.. .", "Question : null .. . Answer : I m using https : github.com brianc node-postgres pg module . Apparently I can t consume a Unicode password to connect to the db . From the same location psql with connection parameters goes OK . With Node.js it gives ne password authentication failed for user . When I check with console.log I see exactly what I expect . If I change a password to ASCII both in the db and the connection-string everythin works well . But I need the old Unicode password to be consumed.. . I tried both https : github.com brianc node-postgres wiki Client .. . .. . new pg.Client ...password : C digo .. . .. . and .. . .. . conString postgres : ...C digo@ .. . .. . I know that both ODBC Driver PostgreSQL UNICODE and JDBC Unicode true support UTF in connection-string . I find nothing on Node.js pg module UTF support . Please help . I saw http : www.connectionstrings.com postgresql and read the documentation on https : github.com brianc node-postgres . Please help with the question not with bugs in my DNA . Thank you Comment : would github.com bnoordhuis node-iconv https : github.com bnoordhuis node-iconv be helpful . .", "Question : We are using postgres in a multi-tenant nodejs set up . Each client has a separate database and a separate node process . Connection pooling is implemented for each tenant using node-postgres module . Because of the increasing number of databases we are soon hitting the max connections limit of postgres . increasing max connections indefinitely is not an option due to connection overheads . Should there be a change in the architecture for large number of databases Any pointers would be appreciated . .. . Answer : The approach you describe cannot scale : the number of databases will always be the limiting factor . You definitely need to redesign the system . And the correct approach will depend entirely on the project s requirements . Pointers for designing a system in general - that s a very broad subject . You can start with Practical Approach to Computer Systems Design and Architecture http : www.codeproject.com Articles 16105 A-Practical-Approach-to-Computer-Systems-Design-an and from thence research it further following your project s requirements .", "Question : I m using the node-postgres https : github.com brianc node-postgres module for node.js and I have a problem inserting data . The function : .. . .. . No new data appears in the database . The query.on error and query.on end events are never fired . Come to think of it I m beginning to doubt if the query is even triggered tho I can t see why it shouldn t . The only log I get is : .. . .. . So how should I proceed in debugging this .. . Answer : Your calling client.end before your queries can execute . node-postgres is not going to throw a not connected error because it is designed to queue queries until the connection is ready . https : github.com brianc node-postgres wiki Client method-connect .. . .. . Try this : .. . .. . All the above does is keep track of the number of queries you ve issued and when they have all ended then calls client.end and handle listId .. . .. . This can be tedious and error prone thus a few libraries exist to make asyc flow easier . My favorite is async it works in the browser and in node . https : github.com caolan async .. . .. . Using async I would rewrite the code as : .. . .. . see also async.forEachSeries but I don t think it s needed in this case because the node-postgres client is going to run the queries in series anyways . Comment : I went with the async module . Works fine the strange thing is it worked fine at some point as it was implemented in the question .", "Question : Node v6.2 on Windows 10 PG node-postgres v4.4.2 .. . .. . Postgres 9.5 on Ubuntu 14.04 Trusty VirtualBox .. . .. . I m using the PG node-postgres module to connect to Postgres on Ubuntu in a virtual-machine . I was able to connect using Navicat no problem but those same credentials didn t work when I was connecting with NodeJS . The postgres log shows this : .. . .. . I added this line to my pg hba.conf file and now it works but can anyone explain why md5 isn t working Comment : What are your versions of Node.js and node-postgres .. . Answer : There is a breaking change in Node v6 so you need to upgrade pg node-postgres to v6.0.1 from v4.4.2 that you said you are using . https : github.com brianc node-postgres issues 1000", "Question : While booting my Node.js app I want to make a couple of synchronous calls to the PostgreSQL database to check some things before continuing the control-flow . How can I achieve this using the node-postgres package .. . Answer : I think this would be applicable . node-fiber https : github.com laverdet node-fibers", "Question : While booting my Node.js app I want to make a couple of synchronous calls to the PostgreSQL database to check some things before continuing the control-flow . How can I achieve this using the node-postgres package .. . Answer : Given that the call is inherently asynchronous you ll need to manage it either via callbacks the defacto Node style async or via promises Q when.js Bluebird etc.. . Please note that wrt to the accepted answer callbacks are not the only way to do this .", "Question : I am trying to learn databases and nodejs . I want to ask how can I translate the following from mongod to postgresql using nodejs . I tried : .. . .. . I am not sure my translations . In the first query when using mongo the Stuff will be an array and I have to do some calculations with it but in node-postgres Will it be an array or I have to specify something Right now I can t find the appropriate syntax to search in QueryString . In the second query I am not sure at all if it is right or how can I write it . .. . Answer : So it seems that this works :", "Question : I recently switched from MySQL to postgres as my database for an node.js project . While I m able to reach my remote postgres database from my local pgAdmin III OSX client so far I ve been unable to connect to my database through node.js . I m sure that the credentials I entered for pgAdmin and my node.js were exactly the same . The other thing I ve tried was setting my local ipadress to trust in stead of md5 in the pg hba.conf at my database server . Is there anything I did wrong My favourite search-engine came up with some worrying hits about resetting my local os . I just used the example from the github repo doc of node-postgres : .. . .. . And these are the errors I get every time I try to start my server : .. . .. . Help would be greatly appreciated Comment : Hm what does a host hostname get you from the command-line on that server Is that one of its IPs and does it listen to it The error would seem the host does not know that it should be the hostname you think it should be called.. . On a side note : I see only examples with postgres : not pg : I don t know if that matters.. . Comment : Thanks for your reply Wrikken . The output for the db server is : Host hostname not found : 3 NXDOMAIN . The db server is a VPS . I supposed that shouldn t matter . Comment : Well so I mean : the hostname you enter is.. . not the servers hostname It tells you it cannot translate the name to an IP so fails . So enter the proper one perhaps or go for localhost if you know it to be the same server the code is running on as mentioned in an answer below . If that also fails : try to give the proper IP address . Comment : I tested it on the db server aswell . It appeared to be the password . Thanks for your Dutch help your insights helped me get there Comment : Dutch help That s the first time I heard that phrase . As a Dutchman I don t know what to think of it .. . Answer : The interface in node.js that I used can be found here https : github.com brianc node-postgres .. . .. . try changing pg : to postgres : .. . .. . This was scraped from another stackoverflow article : Play with Postgres through Node.js http : stackoverflow.com questions 9205496 play-with-postgres-through-node-js Comment : I ve tried that aswell I changed the postgres : to pg : after postgres : didn t work . Forgot to mention that", "Question : While booting my Node.js app I want to make a couple of synchronous calls to the PostgreSQL database to check some things before continuing the control-flow . How can I achieve this using the node-postgres package .. . Answer : The only way to synchronize calls is to nest them in callbacks : .. . .. . This can be a pain and would be trivial in some other languages but it is the nature of the beast . Comment : nice comment : but it is the nature of the beast.. . Doubt this is a beast though : Comment : So there is no way to reuse code i.e have a function that makes a pg query and returns the results so I can call that function from different places . Is this possible Thanks", "Question : I m building an app in node.js using node-postgres . I don t know how to update more than one record at once . Here is my code : .. . .. . But I ve got a problem - console : .. . .. . events.js : 160 throw er Unhandled error event .. . .. . error : invalid input syntax for integer : 23 12 43 .. . .. . What can I do in that case What kind of data use the length of var id will be not the same every time . Greetings Rafa .. . EDIT : I think that a change of data will work in javascript the input must be 23 12 43 but instead is 23 12 43 but I don t know how to make that . Comment : Are you using node-postgres directly or via pg-promise https : github.com vitaly-t pg-promise Comment : I ve just saw pg-promise and it s looking nice I will definietly try that Comment : with pg-promise you can format id-s in your query like this : WHERE id ANY 2 : csv . .. . Answer : It looks like you want to use ANY : .. . .. . This is due Postgresql itself not the library : see this https : www.postgresql.org message-id 1187290651.24679.10.camel@dogma.ljc.laika.com and this https : github.com brianc node-postgres issues 1008 .. . .. . See also this question : Oracle : ANY vs . IN https : stackoverflow.com questions 2298550 oracle-any-vs-in", "Question : I have a node.js program calling a Postgres Amazon RDS micro instance function get jobs within a transaction 18 times a second using the node-postgres package by brianc . The node code is just an enhanced version of brianc s basic client pooling example https : github.com brianc node-postgres roughly like.. . So Postgres is getting : .. . .. . .. . repeated every 55ms . get jobs is written with temp-tables something like this .. . .. . I ve used the temp table pattern http : stackoverflow.com a 27084540 2036135 because I know that jobs will always be a small extract of rows from really big table 1 in hopes that this will scale better than a single query with multiple joins and multiple where conditions . I used this to great effect with SQL Server and I don t trust any query optimiser now but please tell me if this is the wrong approach for Postgres The query runs in 8ms on small tables as measured from node ample time to complete one job poll before the next one starts . Problem : After about 3 hours of polling at this rate the Postgres server runs out-of-memory and crashes . What I tried already.. . .. . .. . If I re-write the function without temp-tables Postgres doesn t run out-of-memory but I use the temp table pattern a lot so this isn t a solution . If I stop the node program which kills the 10 connections it uses to run the queries the memory frees up . Merely making node wait a minute between polling sessions doesn t have the same effect so there are obviously resources that the Postgres backend associated with the pooled connection is keeping . If I run a VACUUM while polling is going on it has no effect on memory consumption and the server continues on its way to death . Reducing the polling frequency only changes the amount of time before the server dies . Adding DISCARD ALL after each COMMIT has no effect . Explicitly calling DROP TABLE jobs DROP TABLE jobs extra after RETURN query instead of ON COMMIT DROP s on the CREATE TABLE s . Server still crashes . Per CFrei s suggestion added pg.defaults.poolSize 0 to the node code in an attempt to disable pooling . The server still crashed but took much longer and swap went much higher second spike than all the previous tests which looked like the first spike below . I found out later that pg.defaults.poolSize 0 may not disable pooling as expected https : github.com brianc node-postgres issues 319 . Swap memory usage on Postgres server http : i.stack.imgur.com q1tzO.png .. . .. . On the basis of this http : www.postgresql.org docs 9.2 static routine-vacuuming.html : Temporary tables cannot be accessed by autovacuum . Therefore appropriate vacuum and analyze operations should be performed via session SQL commands . I tried to run a VACUUM from the node server as some attempt to make VACUUM an in session command . I couldn t actually get this test working . I have many objects in my database and VACUUM operating on all objects was taking too long to execute each job iteration . Restricting VACUUM just to the temp-tables was impossible - a you can t run VACUUM in a transaction and b outside the transaction the temp-tables don t exist . : P EDIT : Later on the Postgres IRC forum a helpful chap explained that VACUUM isn t relevant for temp-tables themselves but can be useful to clean up the rows created and deleted from pg attributes that TEMP TABLES cause . In any case VACUUMing in session wasn t the answer . DROP TABLE .. . IF EXISTS before the CREATE TABLE instead of ON COMMIT DROP . Server still dies . CREATE TEMP TABLE .. . and insert into .. . select.. . instead of CREATE TEMP TABLE .. . AS instead of ON COMMIT DROP . Server dies . So is ON COMMIT DROP not releasing all the associated resources What else could be holding memory How do I release it Comment : Can you show the Node code that you re using to perform the query Comment : Does this bug continues when you use require pg-native instead of pg What about if you create a new connection every time you ask for a pool connection pg.defaults.poolSize 0 . Comment : @robertklep I ve added the code . @ CFrei will report back once we ve tested - it takes a while for each cycle . Comment : I don t understand this node-js stuff Does this mean that you start a fresh connection to the DBMS every 55ms and do not close it properly Comment : @wildplasser the node code is using node-postgres module to pool connections . Used this way node-postgres creates up to 10 connections the default and what we re using and re-uses them to prevent the expensive database-connection set-up and destroy processes . Read more about it here github.com brianc node-postgres wiki pg https : github.com brianc node-postgres wiki pg .. . Answer : Use CTEs to create partial result sets instead of temp-tables . The planner will evaluate each block in sequence the way I wanted to achieve with temp-tables . I know this doesn t directly solve the memory leak issue I m pretty sure there s something wrong with Postgres implementation of them at least the way they manifest on the RDS configuration . However the query works it is query planned the way I was intending and the memory usage is stable now after 3 days of running the job and my server doesn t crash . I didn t change the node code at all .", "Question : null .. . Answer : Good day I have the following issue : my node.js server which is running node-postgres to communicate with a database gives the error read ECONNRESET when a client asks for it to query the database . HOWEVER this only happens when the server and by extension the connection is idle for too long 1 hour I believe not sure though . Is there a way to avoid this My solution does require the connection to the database to stay permanently up as the clients messages can be sparse but still very important . EDIT : I m using the socket.io and node-postgres modules", "Question : i am new in node.js and postgresql . am allready connected with postgres db and execute some test code . after am going to use prepared statements.am create a sample login script . if user exist it return username else return message invalid username or password . if username and password is correct it return username . but no data will present then could not return message . my openion is that the control will crashed after executing cliend.end function . this is my code .. . .. . if row is empty not return to callback . if row result is not empty its working fine. . How.. . any idea.. . Comment : try close instead of end .. . Answer : Your code .. . .. . means that the callback will be called everytime the query fetches 1 row from the database . In the case-when the query has 0 results the callback will never be called . Comment : i need to retrun all rows . Comment : if any ideas to return all rows in a single callback Comment : you should use this form of client.query with callback supplied github.com brianc node-postgres wiki https : github.com brianc node-postgres wiki Client parameterized-query-with-optional-callback-supplied - this will give you all rows in the result .", "Question : I m writing a Node.js web server that uses a Postgres database . I used to connect on each new request like this : .. . .. . But after a few requests I noticed out-of-memory errors on Heroku when trying to connect . My database has only 10 rows so I don t see how this could be happening . All of my database access is of this form : .. . .. . Assuming that the memory error was due to having several persistent connections to the database I switched to a style I saw in several node-postgres examples of connecting only once at the top of the file : .. . .. . But now my requests hang indefinitely when I try to execute a query after the connection is disrupted . I simulated it by killing a Postgres server and bringing it back up . So how do I do one of these 1 . Properly pool Postgres connections so that I can reconnect every time without running out-of-memory . 2 . Have the global client automatically reconnect after a network failure . .. . Answer : I m assuming you re using the latest version of node-postgres in which the connection-pooling has been greatly improved . You must now check the connection back into the pool or you ll bleed the connections : .. . .. . As for error-handling on a global connection 2 but I d use the pool : .. . .. . The missing docs for all this is on the GitHub wiki https : github.com brianc node-postgres wiki .", "Question : I am converting an existing project from MySQL to Postgres . There are quite a few raw SQL literals in the code that use as a placeholder e.g . But I get this error : .. . .. . I don t want to convert all my existing SQL from to postgres-style operators like 1 . Is there some way of having node-postgres accept the question marks instead or an utility that can convert to postgres style params Note that some sort of Regex-based hack is not acceptable because question marks can be inside quotes or backslash escaped to any depth . Comment : Using a in a query is not MySQL but rather the app layer e.g . Java . This should not need to be changed most likely . Can you show us this query in the context of the code Comment : What version of Postgres are you using Because the documentation mentions using postgresql.org docs 9.1 static ecpg-commands.html https : www.postgresql.org docs 9.1 static ecpg-commands.html as well as this random SO question stackoverflow.com questions 10659737 http : stackoverflow.com questions 10659737 how-can-i-use-a-query-with-placeholder-inside-quotes-perl-postgresql Comment : What is node-postgres and why is it not in the tags as it appears to be the core of your question Comment : @joop It looks like this is a node.js interface to postgres . Which makes my comment irrelevant . .. . Answer : Is there some way of having node-postgres accept the question marks instead NO . And there is no direct correspondence between and 1 syntax because the latter implies parameter re-use while doesn t allow it . For example using implies that you have 3 formatting parameters while 1 2 2 implies that you have two formatting parameters . or an utility that can convert to postgres style params Not likely since there is no direct correspondence the conversion is possible only one-way which would make such an utility fairly useless . You can replace everything yourself with a single regular expression replacing each with + index + 1 . I don t want to convert all my existing SQL from to postgres-style operators like 1 . You don t really have much choice in this . It has to be done . Besides 1 is way more flexible than due to parameter re-use plus optional extensions . For example pg-promise https : github.com vitaly-t pg-promise extends them very nicely with various formatting modifiers that are needed frequently : : json : csv etc.. . .. . .. . Note that some sort of Regex-based hack is not acceptable because question marks can be inside quotes or backslash escaped to any depth . You will likely spend less time converting your SQL by hand than the time to write an utility for the one-way proper conversion .", "Question : Using Node.js and the node-postgres module https : github.com brianc node-postgres to communicate with a database I m attempting to write a function that accepts an array of queries and callbacks and executes them all asynchronously using the same database-connection . The function accepts a two-dimensional array and calling it looks like this : .. . .. . And the function iterates over the array creating a query for each sub-array like so : .. . .. . When I ran the above code I expected to see output like this : .. . .. . However the output bizarrely appears like so : .. . .. . Not only is the second function getting called for both requests it also seems as though the drain code is getting called before the client s queue of queries is finished running...yet the second query still runs perfectly fine even though the client.end code ostensibly killed the client once the event is called . I ve been tearing my hair out about this for hours . I tried hardcoding in my sample array thus removing the for-loop and my code worked as expected which leads me to believe that there is some problem with my loop that I m not seeing . Any ideas on why this might be happening would be greatly appreciated . .. . Answer : The simplest way to properly capture the value of the q variable in a closure in modern JavaScript is to use forEach : .. . .. . If you don t capture the value your code reflects the last value that q had as the callback function executed later in the context of the containing function . forEach by using a callback function isolates and captures the value of q so it can be properly evaluated by the inner callback . Comment : Ahh thank you so much this worked perfectly . I m still getting the issue with drained not appearing in the expected place but obviously that is more an issue with the node-postgres library than with the looping syntax .", "Question : I m fairly new to pg and trying to figure out what the best approach is to loading a set of posts and their associated comments together . For example : I m trying to fetch a 10 posts and comments associated with all those posts like facebooks wall where you see a feed of posts and comments loaded on the same page . My Schema looks something like this : .. . .. . I tried to load both posts and comments on the same postgres function doing the follow : .. . .. . unfortunately it duplicated the posts N times where comment exists where N is the number of comments a post has . However the first solution is that I can always filter it out in Node after fetching the data .. . .. . Also when I try to use group-by posts.id to make it easier to traverse in node I get the following error : .. . .. . The second thing I can try is to send an array of post ids I want to load and have pg function load and send them back but I can t quite the query right : .. . .. . to call it : .. . .. . However even when trying to get value from one index I get the following error : .. . .. . Finally the last solution is to simple make N seperate calls of postgres where N is the number of posts with comments so if I have 5 posts with comments I make 5 calls to postgres with post id and select from Comments table . I m really not sure what to do here any help would be appreciated . Thanks Comment : The first solution is the simplest and fastest . The other will need two queries and two trips to the server . About duplicated posts that is the way it is with relational databases and it is a problem better dealt with in the presentation layer . Comment : are you using only the sql Comment : im using postgres with node Comment : @ClodoaldoNeto is there anyway to use group-by without having that aggregate error show up Comment : Would you like to have an array of records for each post .. . Answer : To have all comments as an array of records for each post : .. . .. . Or one array for each comment column :", "Question : The plpgsql function : .. . .. . The node-postgres query + test array : .. . .. . Output from node server : .. . .. . err : error : array value must start with or dimension information .. . result : undefined .. . .. . I also tried cast the parameter in the client query like testarray 1 : : int which returned the same error . I changed the function argument to anyarray int and the output error changed : .. . .. . err : error : invalid input syntax for integer : 1 2 3 4 5 .. . result : undefined .. . .. . As well as a couple other variations . I seek the variation that produces no error and returns 5 . I read about the Postgres parse-array issue https : github.com brianc node-postgres issues 10 and this stackoverflow question on parameterised arrays in node-postgres : .. . .. . node-postgres : how to execute WHERE col IN dynamic value list query http : stackoverflow.com questions 10720420 node-postgres-how-to-execute-where-col-in-dynamic-value-list-query .. . .. . But the answer didn t seem to be there . .. . Answer : Based on the answer you posted this might work for you : Comment : It produces a new error from postgresql : syntax-error at or near Comment : Right I forgot it needs to be enclosed by quotes . Updated . Comment : that didn t work either . what did work is : client.query select testarray 1 : : int ta ...etc Comment : This poses an extreme security risk Comment : @MilesRout can you clarify The joined params are server generated - is the problem the length of the passed params Array", "Question : I just started playing around with node.js with postgres using node-postgres . One of the things I tried to do is to write a short js to populate my database using a file with about 200 000 entries . I noticed that after sometime less than 10 seconds I start to get Error : Connection terminated . I am not sure whether this is problem with how I use node-postgres or if it s because I was spamming postgres . Anyway here is a simple code that shows this behaviour : .. . .. . It fails after about 18 000-20 000 queries . Is this the wrong way to use client.query I tried changing the default client number but it didn t seem to help . client.connect doesn t seem to help either but that was because I had too many clients so I definitely think client pooling is the way to go . Thanks for any help .. . Answer : I m guessing that you are reaching max-pool-size . Since client.query is asynchronous prolly all the available connections are used before they are returned . Default Pool size is 10 . Check here : https : github.com brianc node-postgres blob master lib defaults.js L27 .. . .. . You can increase default pool size by setting pg.defaults.poolSize : .. . .. . .. . .. . Update : Execute another query after freeing a connection . The basic idea is since you are enqueuing a large number of queries with relatively small connection pool size you are reaching max-pool-size . Here we make new query only after an existing connection is freed . Comment : Thanks . I did change it to 25 but it didn t help my original code . Haven t tried it with this one though . I referred to it as default client number .. . oops .. . or was that something else Comment : @DanielSutantyo : how are changing default client number Comment : So I tried both pg.defaults.poolsize 25 maybe even more and pg.defaults.poolIdleTimeout 60000 The first one definitely increase the number of entries I could put in but not by much . Comment : @DanielSutantyo : can you try something like I mentioned in the updated answer The basic idea is to make another query only after freeing a used connection . Comment : Thanks . I am a bit swamped with things until start of next week but I will give it a go ASAP . Anyway nice to learn about queue and release . I also tried an implementation with npm-async library but got the same problem ." ] }
[ "yes-answer-long", "yes-answer-short" ]
postgresql
UNK_RELATION
clearcase@clearcase@110
clearcase -- clearcase is a commercial cvcs centralized version-control system with : decentralized option : @placeholder multi-site with vobs version object base replicationnetwork access to versioned data : dynamic views.it is currently managed by ibm after being run by rational .
{ "confidence": [ 54.80686950683594, 51.27254104614258, 49.88703918457031, 49.19392013549805, 48.9953498840332, 48.74527359008789, 48.45661926269531, 48.19428634643555, 48.19428634643555, 48.181983947753906, 48.0817985534668, 47.95667266845703, 47.875797271728516, 47.875797271728516, 47.17448425292969, 47.023292541503906, 46.93694305419922, 46.68277359008789, 46.42544174194336, 46.27504348754883, 46.1358642578125, 45.8997917175293, 45.36836624145508, 45.257774353027344, 45.248085021972656, 45.13665008544922, 45.00421905517578, 44.96025848388672, 44.92286682128906, 44.91230010986328, 44.89570617675781, 44.83418273925781, 44.675392150878906, 44.448143005371094, 44.15582275390625, 44.152286529541016, 44.152286529541016, 44.025230407714844, 44.015872955322266, 43.89910125732422, 43.71236801147461, 43.68497085571289, 43.676483154296875, 43.26388168334961, 43.10796356201172, 43.10595703125, 43.058284759521484, 43.002784729003906, 42.9356575012207, 42.931434631347656, 42.86273956298828, 42.51472091674805, 42.51472091674805, 42.459495544433594, 42.18196105957031, 42.15728759765625, 42.01015853881836, 42.01015853881836, 41.96220016479492, 41.95316696166992, 41.7566032409668, 41.661930084228516, 41.49577713012695, 41.46540451049805, 41.432472229003906, 41.432472229003906, 41.36182403564453, 41.31313705444336, 41.21303939819336, 41.197242736816406, 41.161495208740234, 41.13495635986328, 41.13495635986328, 41.051795959472656, 40.651485443115234, 40.39808654785156, 40.37638854980469, 40.34949493408203, 40.33738327026367, 40.33738327026367, 40.321502685546875, 40.321502685546875, 40.281917572021484, 40.23100662231445, 40.21134948730469, 40.11163330078125, 39.94557189941406, 39.826812744140625, 39.702171325683594, 39.502471923828125, 39.48653793334961, 39.47686004638672, 39.272979736328125, 39.10292053222656, 39.05511474609375 ], "content": [ "centralized -replicated VCS : ClearCase is halfway between the centralized VCS world one or several centralized repos or VOBS - Version Object Bases - every developer must access to commit and the distributed VCS world .", "My OS is Windows 2003 and the Rational clearcase explorer version is 8.0.0.15 .", "What is your ClearCase version", "java.lang.NullPointerException .. . .. . Eclipse Platform Version : 4.3.2 .. . .. . Eclipse ClearCase Integration Version : 2.2.35.201406121752 .. . .. . Rational ClearCase Remote Client Version : 7.1.1 .. . .. . Thanks", "Nobody but IBM has access to the ClearCase source code .", "I am new to clearcase and software development using version-control system .", "I am using clearcase for version management currently .", "We use ClearCase as our Version Control Tool .", "We use ClearCase in our project for version-control .", "Provider name : IBM Plugin name : Rational ClearCase SCM Adapter Plugin ID : com.rational.clearcase Version : 7.6.0.v201105111445", "What version of ClearCase are you using", "The softwares that i installed are : IBM Rational Clearcase 7.0 Eclipse Galileo 3.5 and clearcase 2.2.3 plugin for it .", "Rational ClearCase Explorer 8.0.0.7", "Is there something similar in Rational clearcase", "You best bet is to use the IBM Rational ClearTeam Explorer CTE version 8.0.x previously known as the ClearCase Remote Client CCRC in version 7.x of ClearCase .", "@TamirGefen Rational ClearCase Explorer 7.1.2.13", "It depends on the exact version of ClearCase .", "So which IBM java version comes with ClearCase 8.0.x", "The installation update should be similar for newer version of Eclipse but do check the Rational ClearCase System requirements matrix http : www-03.ibm.com software products en clearcase tab othertab1 to see if your version of Eclipse is supported .", "I have a clearcase project spanning multiple vobs .", "We installed ClearCase 7.1.1 version .", "The documentation for the interface can be accessed through ClearCase help Start Programs Rational ClearCase ClearCase Help where there s an entry for ClearCase Automation Library CAL .", "Because I m currently struggling to learn IBM Rational ClearCase I d like to hear your professional opinion .", "It really depends on : .. . .. . what is your ClearCase version 7", "It should be for base clearcase not for UCM .", "If the base UI is the ClearCase Explorer then you would type .. . .. . provided your PATH include C : path to rational clearcase bin .. . .. . To launch the ClearCase Home base seen in Tabs are missing from ClearCase Home Base GUI on Microsoft Windows http : www-01.ibm.com support docview.wss uid swg21403466 type : .. . .. . That will launch : .. . .. .", "What are the core concepts of the Clearcase version-control system every developer should know", "We recently upgraded to Clearcase version 8.0.1.8 .", "A branch in ClearCase has a starting point and will have version of its own only once changes are versioned checkout checkin .", "Our ClearCase environment is too big around 300 vobs .", "No the help page Configuring non-ClearCase access on Linux or the UNIX system http : publib.boulder.ibm.com infocenter cchelp v7r0m0 index.jsp topic com.ibm.rational.clearcase.books.cc admin.doc non-cc-access.htm clearly states : .. . .. . Non-ClearCase access is not supported on hosts running Linux or the UNIX system and Rational ClearCase LT or on any Rational ClearCase Windows host .", "What ClearCase version are you using", "Yes you can for any view snapshot or dynamic UCM or base ClearCase .", "After importing these dynamic views in windows clearcase explorer all the 50 VOBs are appearing under each and every dynamic view though majority of the irrelevant VOBs contains just lost+found directory under it .", ".. . .. . For a full ClearCase client installation : .. . .. . You will find the SCM adapter at IBM in Rational ClearCase SCM Adapter For Eclipse Version 7.6.0.0 http : www-01.ibm.com support docview.wss uid swg24025674 .", "I am using clearcase version 8.0.0.6 .", "In Clearcase I have version tree A---- B---- C .", "With a dynamic view you cannot remove a file without ClearCase knowing about it since a dynamic view is an encapsulation of the file system managed entirely by ClearCase .", "If not it is a base ClearCase one not this is separate for the nature of the view : dynamic or snapshot : you can have dynamic or snapshot-view both for UCM or for base ClearCase .", "I found a good article explaining these views : wiki IBM Rational ClearCase http : en.wikipedia.org wiki IBM Rational ClearCase Views", "@Tamir We use only Base ClearCase and not going to combine with UCM ClearCase .", "You can download the files http : www.ibm.com developerworks rational library content 03July 2500 2834 ClearCase clearcase 5Fplugins.html you need from IBM .", "the official IBM ClearCase for Eclipse plugin referred to above or the IBM Rational ClearTeam Explorer .", "We use ClearCase UCM which has multiple Vobs 10 .", "What version of ClearCase and CCRC are you using", "is this possible in base clearcase", "I got a requirement to find out Differential SLOC in between two CM Labels of ClearCase Version Control System .", "We researched a lot to resolve the issue but as per IBM this is a bug in a particular version of clearcase .", "It depends on the version of ClearCase that you are using .", "Clearcase view is dynamic hosted on unix .", "Use the ClearCase Navigator ClearCase Details view or ClearCase Search Results view .", "@VonC We are using Base ClearCase .", "It supports both base ClearCase and UCM .", "At that site the SCM of choice is ClearCase .", "In base ClearCase there is a SVN blame -style command called Annotate that shows who wrote each line in a versioned element .", "I created a snapshot-view using Rational ClearCase explorer .", "@Vonc i am using clearcase 8.0.0 version", "@AlexisB What ClearCase version are you using", "Is it possible to have Teamcity build a clearcase project spanning multiple vobs", "The ReportBuilder is found under the Administration folder All Programs IBM Rational ClearCase XXX Administration ReportBuilder .", "ClearCase is perfectly usable if your willing to also use another version-control system on top of it", "Currently I m a ClearCase administrator .", "I m also curious why anyone would choose ClearCase over the rest of the ones out there - my guess is for integration with other Rational IBM stuff .. . .. . EDIT .. . .. . I would ask ClearCase IBM .", "Variants for ClearCase and ClearCase LT objects .", "Not so for ClearCase where a branch is a way to reference a version number .", "For ClearCase an id refers to an element : a directory or a file whatever its version is .", "Due to customer requirement we must migrate to either PVCS or Rational ClearCase Team System is not an option .", "IBM recommends having staff to keep ClearCase going .", "I am using base ClearCase .", "But the ClearCase plugin allows for using an existing dynamic view .", "OS : Windows XP sp2 ClearCase : : Rational Clear case remote client Version : 7.1.2", "@NIMISHDESHPANDE may be he she didn t get your exact version of ClearCase", "I want to compare the clearcase file with its previous version programmatically in C .", "I am using Rational clearcase explorer to view VOB .", "I was wondering how to integrate Fortify with IBM WebSphere Rational Application Manager or Clearcase", "Depending on your ClearCase version this might help : ibm.com developerworks rational library 07 0703 nellis http : www.ibm.com developerworks rational library 07 0703 nellis", "I was used to manage base ClearCase views and UCM views referring the same Vobs actually both can coexist .", "Nothing change compared with Base ClearCase .", "If you require Snapshot Views or are using a pre-8.0 version of ClearCase you should use the ClearCase SCM Adapter plugin .", "If the Eclipse project is where the ClearCase view is then the ClearCase options checkouts version tree merge .. . will be available .", "@Joshua : clearcase", "Not so in ClearCase .", "I mention the same issue in Clearcase issue while add file to source control http : stackoverflow.com a 12075051 6309 and ClearCase .", "Continuing my previous post : Provide version to independent files in clearcase http : stackoverflow.com questions 29467305 provide-version-to-independent-files-in-clearcase .", "As illustrated in Rational ClearCase : clearmake -C gnu and GNUmake diferences .", "@user972301 what version of ClearCase are you using by the way", "See About Firewalls and ClearCase http : www-01.ibm.com support docview.wss uid swg21117638 .. . .. . IBM Rational ClearCase is known to operate correctly through firewalls in internal networks if the following conditions are met : .. . .. . Port 371 UDP and TCP is passed through to any all ClearCase server hosts from the allowed hosts .", "when I tried to access it throws an error like Encountered an improper argument in Rational clearcase explorer dialog box .", "I installed CTE plugin version 8.0.0 into Clearcase - and of course I see the dynamic views just fine .", "It s just that all the information is there fore ClearCase to determine which version would obviously be the correct one after the rebase .", "Check your ClearCase version and complete your question with the output of that command .", "Meaning a file may be referenced by ClearQuest or by some ClearCase activity but not be visible directly with ClearCase in the dynamic view .", "The ClearCase plugin for Jenkins https : wiki.jenkins-ci.org display JENKINS ClearCase+Plugin already create a view snapshot or dynamic one .", "Can anyone help me how to find time and date when the ClearCase UCM VOBS are last accessed", "Then create dynamic view using clearcase explorer ." ] }
{ "confidence": [ 87.23921203613281, 80.47867584228516, 76.32478332519531, 73.83303833007812, 72.55120086669922, 71.58145904541016, 70.95256042480469, 70.75039672851562, 70.58393859863281, 70.511474609375, 69.87715911865234, 67.8295669555664, 67.79718017578125, 67.47542572021484, 67.24888610839844, 67.105224609375, 66.22972106933594, 66.0185775756836, 65.89701843261719, 65.72785949707031 ], "content": [ "Question : I am new to clearcase and software development using version-control system . I am using clearcase for version management currently . I use eclipse IDE for software development . I installed clearcase plugin for eclipse over the internet from sourceforge.net website . Some how the plugin does not work . The softwares that i installed are : IBM Rational Clearcase 7.0 Eclipse Galileo 3.5 and clearcase 2.2.3 plugin for it . I am not able to checkin or checkout files using the plugin . Can some one give me detailed step-by-step procedure for using the plugins What kind of environment to be setup .. . Answer : You will find how top install the plugin in this SO question http : stackoverflow.com questions 2462979 problems-with-clear-case-plugin-eclipse 2463223 2463223 but I would recommend the official IBM ClearCase for Eclipse plugin http : www.ibm.com developerworks rational downloads 07 cc eclipse3 2 clearcase plugins.html 7.5 not the sourceforge one http : sourceforge.net projects eclipse-ccase . If you see a ClearCase menu the plugin is installed . BUT : in order to be able to checkout a file within your project you need to have it within a ClearCase view snapshot or dynamic . That means the .project and .classpath needs to be right above your source directory within your project . And not in your workspace . If only your sources are in a ClearCase view but your .project and .classpath are elsewhere then all the files within your project won t appear as versioned blue background and you won t be able to checkout checkin them . Eclipse project with ClearCase http : i.stack.imgur.com pLYZi.png Comment : Hi Vonc Thank you very much . I am able to see the clearcase menu in eclipse . i created a dynamic view in clear case and mounted the required vobs on it . Can you tell me how to create the C++ project in eclipse so the .project and .classpath are set correctly . Comment : I m assuming you are using the ClearCase SCM Adapter from IBM i.e . the official IBM ClearCase for Eclipse plugin referred to above or the IBM Rational ClearTeam Explorer . If you are trying to access one or more Eclipse projects that someone from your team has already put in a VOB you can use the File -- Import -- Existing Projects into Workspace or better if your team created a project set file File -- Import -- Team Project Set . If you are creating a new Project don t Use default location but supply a VOB pathname in the Location text box .", "Question : I am new to clearcase and software development using version-control system . I am using clearcase for version management currently . I use eclipse IDE for software development . I installed clearcase plugin for eclipse over the internet from sourceforge.net website . Some how the plugin does not work . The softwares that i installed are : IBM Rational Clearcase 7.0 Eclipse Galileo 3.5 and clearcase 2.2.3 plugin for it . I am not able to checkin or checkout files using the plugin . Can some one give me detailed step-by-step procedure for using the plugins What kind of environment to be setup .. . Answer : You best bet is to use the IBM Rational ClearTeam Explorer CTE version 8.0.x previously known as the ClearCase Remote Client CCRC in version 7.x of ClearCase . CTE is an Eclipse plugin that ships with ClearCase . In ClearCase version 7.x CCRC only supports web views . Web views are copy based views that communicate with the ClearCase server via http . They perform well in WAN environments . In version 8.0 the ClearTeam Explorer formerly CCRC adds support for Dynamic views . In 8.0 the ClearTeam Explorer supports both Web and Dynamic views . If you require Snapshot Views or are using a pre-8.0 version of ClearCase you should use the ClearCase SCM Adapter plugin .", "Question : What are the core concepts of the Clearcase version-control system every developer should know Comment : To any moderator please don t delete this question pretty please . I understand it isn t a good fit to the current SO standards but this represents 12 years of experience on that tool ClearCase and should bring lasting added value for the poor souls stuck with that VCS . .. . Answer : Core concepts centralized -replicated VCS : ClearCase is halfway between the centralized VCS world one or several centralized repos or VOBS - Version Object Bases - every developer must access to commit and the distributed VCS world . But it also supports a replicated mode allowing you to replicate a repo in a distant site MultiSite ClearCase sending deltas and managing ownership . the license fees attached with that is quite steep though .. . This is not a true decentralized model since it is does not allow for parallel concurrent evolutions : The branches are mastered in one VOB or another you can only check-in to the master VOB for the branches mastered there though you have readonly access to any branch at any replica . linear version storage : each file and directory has a linear history there is no direct relationship between them like the DAG VCS Directed Acyclic Graph http : en.wikipedia.org wiki Directed acyclic graph where the history of a file is linked to the one of a directory linked to a commit . That means .. . .. . when you compare two commits you have to compare the list of all files and directories to find the delta since commits are not atomic across files or directories meaning there is no single name for all the changes to all the files that make up a logical delta . That also means a merge http : publib.boulder.ibm.com infocenter cchelp v7r0m0 index.jsp topic com.ibm.rational.clearcase.hlp.doc cc main about merge base cc.htm must find a common base contributor http : publib.boulder.ibm.com infocenter cchelp v7r0m0 index.jsp topic com.ibm.rational.clearcase.hlp.doc cc main about merge base cc.htm not always the same as a common ancestor through history exploration see next point . Git is at the opposite end of that spectrum being both decentralized and DAG-oriented : .. . .. . if a node of its graph has the same id as a node of a different commit it does not have to explore further : all the sub-graphs are guaranteed to be identical .. . the merge of two branches is actually the merge of the content of two nodes in a DAG : recursive and very quick for finding a common ancestor .. . .. . alt text http : publib.boulder.ibm.com infocenter cchelp v7r0m0 topic com.ibm.rational.clearcase.hlp.doc cc main images merg base contrib.gif .. . .. . 3-way merging : to merge two versions ClearCase must find a common based contributor in their linear history which can be fairly long for complex version tree http : groups.google.com group comp.software.config-mgmt browse thread thread aaed6a7dfb14ba0e branch sub-branch sub-sub branch .. . and the basic ClearCase merge http : www.tips5.com how-merge-works-in-clearcase command merges a file or directory but it is not recursive . It only affects a singe file or a single directory without its files ct findmerge is recursive .. . .. . file-centric as opposed to the other recent VCS more repository centric : that means the commit is file by file not set of modified files : the transaction is at the file level . A commit of several files is not atomic . Almost every other modern tool is repository centric with an atomic commit transaction but first-generation systems like RCS SCCS CVS and most other older systems do not have that feature . id-managed : each file and directory has a unique id meaning they can be renamed at will : their history will not change since the id remains for the element . Plus a directory will detect in its history any addition suppression of file . When a file is removed rmname it does not know it : only the directory is notified and creates a new version in its history with a list of sub-elements not including the file removed . Create two files with the same size and content they will get the same id in Git -- a SHA1 key -- and will be stored only once in the Git repo Not so in ClearCase . Plus If two files with the same path and name are created in two different branches their id being different means those two files will never be merged : they are called evil twins .. . .. . branches are first-class citizens : most VCS consider a branch and a tag as the same : a single point in the history from which a new linear history can grow branch or from where a description is attached tag . Not so for ClearCase where a branch is a way to reference a version number . Any version number starts at 0 just referenced in ClearCase to 1 2 3 and so on . Each branch can contain a new list of version numbers 0 1 2 3 again . This is different from other systems where the version number is unique and always growing like the revisions in SVN or is just unique like the SHA1 keys in Git . path-accessed : to access a certain version of a file directory you need to know its extended path composed of branches and versions . It is called an extended path name : myFile@@ main subBranch Version . Git does refer to everything through id -- SHA1-based -- : version or commit tree or version of a directory and blob or version of a file or rather of a content of a file . So it is id-accessed or id-referenced . For ClearCase an id refers to an element : a directory or a file whatever its version is . both pessimistic lock and optimistic lock : reserved or unreserved checkouts in ClearCase : even a pessimistic lock reserved checkout is not a true pessimistic one since other users can still checkout that file albeit in unreserved mode : they can change it but will have to wait for the first user to commit his file checkin or cancel the request . Then they will merge their checkout version of that same file . Note : a reserved checkout can release its lock and be made unreserved either by the owner or the administrator .. . .. . cheap branching : a branch does not trigger a copy of all files . It actually triggers nothing : any file not checkout will stay in its original branch . Only modified files will have their new versions stored in the declared branch . flat-file storage : the VOBs are stored in a proprietary format with simple files . This is not a database with an easy query language . local or network workspace access : .. . .. . local workspace is through checkout to the hard-drive update of a snapshot-view . network workspace is through dynamic view combining versioned files and directories access through network no local copy instant access and local files the ones which are checked out or the private files . The combination of distant versioned and local private files allows a dynamic view to appears like a classic hard drive whereas actually any file written is stored in the associated view storage . centralized deported storage : view storage is there to keep some data and avoid some or any communication with the central referential . a workspace can have : .. . .. . a scattered storage : like the .svn subdirectories all over the place .. . a centralized storage : like the view storage in ClearCase they contain information about the files displayed by the view and that storage is unique for a view . a deported storage : the storage is not part of the view workspace itself but can be located elsewhere on the computer or even outside on the LAN WAN .. . .. . Git has no storage per se . Its .git is actually all the repository meta-data oriented : any key-value can be attached to a file or a directory but that couple of data is not historized itself : if the value changes it overrides the old value . meaning the mechanism is actually weaker than the properties system of SVN where properties can have an history .. . Git on the other end is not too keen on meta-data .. . .. . system-based protection : the owner and the rights associated with a file directory or repositories are based on the rights-management of the underlying system . There is no applicative account in ClearCase and the group of users are directly based on the Windows or Unix existing group which is quite challenging in an heterogeneous environment with Windows clients and a Unix VOB server SVN is more like server-based protection where the Apache server can get a first level of protection but must be completed with hooks to have a finer grain of rights . Git has no direct rights management and must be controlled by hooks during push or pull between repositories .. . .. . hooks available : any ClearCase action can be the target of a hook called trigger . It can be a pre or post operation . CLI managed : cleartool is the Command Line Interface from which all actions can be made . Comment : See also stackoverflow.com questions 449549 http : stackoverflow.com questions 449549 how-to-leverage-clearcases-features 449810 449810 Comment : Excellent explanation VonC . Upped +1 unfortunately cannot up it more . This is what I was looking for . Can we communicate over email Please let me know . Comment : @vicky21 . Sure . write to vonc at laposte dot net Comment : @Jonathan : thank you for all the edits corrections . I should not try to write long article this late in the night Comment : NP : It was a good answer before I tinkered with it you ve improved it still more with your latest edits . Well done .", "Question : I am using Rational clearcase explorer to view VOB . I was created my dynamic view in view server But I am not able to access my directory or folder . when I tried to access it throws an error like Encountered an improper argument in Rational clearcase explorer dialog box . Comment : PS : The vob is mounted . But the Network drive which has vob is in disconnected state . I don t know why it is shows disconnected after mount vob s . .. . Answer : In a ClearCase Explorer when accessing any folder you must first access the vob . That means you need to make sure the vob is mounted : .. . .. . If the vob is visible but a folder is not accessible you need to check its status as seen from its parent folder : .. . .. . That will give you a clue as to why you cannot access the subfolder . As mentioned in the technote Encountered an improper argument error displayed in ClearCase Native GUI http : www-01.ibm.com support docview.wss uid swg21635518 it can be a right issue : .. . .. . If a principal has not been granted access to a VOB an attempt to access the VOB from IBM Rational ClearCase Explorer returns the error Encountered an improper argument . .. . Resolving the problem .. . .. . This error might imply insufficient permissions . .. . To determine the effective ACL on the object use the command .. . .. . .. . .. . For ClearCase 8 you also have this bug http : www-01.ibm.com support docview.wss uid swg1PM90756 : .. . .. . When accessing a file or directory in the IBM Rational ClearCase GUIs for example ClearCase Explorer or the Version Tree Browser that has permissions of 770 you will receive an error : Encountered an improper argument rather than Access Denied or Permission Denied if you are not a member of the group that owns the element . .. . A fix is available in ClearCase versions 8.0.0.8 and 8.0.1.1 Comment : Hi vonc Thanks for the reply. . The vob is mounted . But the Network drive which has vob is in disconnected state . I don t know why it is shows disconnected after mount vob s . can you please Help me Comment : @MohamedHanish What ClearCase Doctro mentions What version of ClearCase are you using Comment : @MohamedHanish I meant ClearCase Doctor like the one you see in www-01.ibm.com support docview.wss uid swg21366273 http : www-01.ibm.com support docview.wss uid swg21366273 Comment : Sorry for late reply . I am using clearcase version 8.0.0.6 .", "Question : Because I m currently struggling to learn IBM Rational ClearCase I d like to hear your professional opinion . I m particularly interested in advantages disadvantages compared to other version-control-systems like Subversion or Git . Comment : Other than the price Comment : Rationale over comPlicated pain in the arse dodgy junk . Comment : If you re considering integrating CC into your development-environment I can offer only one piece of advice : don t . Comment : If you need an argument to convince people not to use clearcase you can say that all the good developers hate it . I know I wouldn t work at any place who used clearcase as their source control . Heck I would gladly suffer the pain of VSS to avoid clearcase . Comment : The only thing I haven t decided yet is if ClearCase is worse than RCS . It might be . .. . Answer : You can find a good comparison between ClearCase and Git in my SO answer : .. . What are the basic ClearCase concepts every developer should know http : stackoverflow.com questions 645008 what-are-the-basic-clearcase-concepts-every-developer-should-know illustrating some major differences and some shortcomings of ClearCase .. . .. . .. . .. . File-centric operations .. . .. . The most single important shortcoming of ClearCase is its old file-centric approach as opposed to repository -centric like in SVN or Git or Perforce.. . .. . That means each checkout or check-in is done file per file . The atomicity of operation is at file levels . Combine that with a very verbose protocol and a network with potentially several nodes between the developer workstation and the VOB server and you can end up with a fairly slow and inefficient file server which ClearCase is at its core . File-per-file operations means : slow recursive operations like recursive checkout http : stackoverflow.com questions 33577 how-do-i-perform-a-recursive-checkout-using-clearcase or recursive add to source control http : stackoverflow.com questions 138321 how-can-i-use-clearcase-to-add-to-source-control-recursively even by clearfsimport . A fast LAN is mandatory to mitigate the side-effects of that chatty protocol . Centralized VCS .. . .. . The other aspect to take into account is its centralized aspect even though it can be distributed with its multi-site replicated VOB feature .. . If the network does not allow access to the VOBs the developers can : .. . .. . still work within snapshot views but with hijacked files only .. . wait for the restoration of the network if they are using dynamic views .. . .. . Expensive Distributed VCS option .. . .. . You can have some distributed VCS feature by replicating a Vob . But : .. . .. . you need a special kind of license to access it . that license is expensive and add to the cost of the regular license .. . any vob that uses the replicated vob admin vob admin pvob .. . must be replicated as well meaning some projects not directly concerned with a distributed development will still have to pay multi-site license.. . .. . .. . Old and not user-friendly GUI .. . .. . the GUI is very old school and impractical mid-90 s MFC look completely synchronous GUI meaning you have to wait for a refresh before clicking elsewhere : when browsing baselines you cannot quickly look for one in particular . the GUI on Unix is not exactly the same than on Windows the latest 7.1 version is better but not there yet .. . the installation process is quite complicated although the latest Installer Manager introduced by CC7.1 is now a coherent GUI on Windows or Unix and does simplify the procedure .. . the only real rich application has only been developed for CCRC the Remote Client .. . .. . UCM inconsistencies and in coherencies .. . .. . As mentioned in How to Leverage ClearCase s features http : stackoverflow.com questions 449549 how-to-leverage-clearcases-features dynamic views are great a way to see data through the network without having to copy them to the disk but the main feature remain UCM : it can be a real asset if you have big project with complex workflow . Some shortcomings on that front : .. . .. . the dependencies between components is not well managed for a depth superior to one because of the bug of parasite baseline http : www.ibm.com developerworks forums thread.jspa threadID 74125 .. . UCM still has some in coherencies and inconsistencies as documented in CM Crossroads http : www.cmcrossroads.com component option com 5Ffireboard func view id 58775 catid 31 Itemid 593 .. . .. . Limited policies with Base ClearCase .. . .. . Using ClearCase without using UCM means having to define a policy to : .. . .. . create branch otherwise anyone can create any branch and you end up with a gazillon of them with merge workflow nightmare .. . put labels otherwise you forget to label some files or you put a label where you were not supposed to or you move gasp a label from one version to another : at least UCM baselines cannot be moved .. . define changeset . ChangeSets only exist with UCM activities . With Base ClearCase you are reduced to clever cleartool find requests.. . .. . .. . No application rights .. . .. . ClearCase right management is entirely built on system rights . That means you need to register your user to the correct system group which is not always easy to do when you have to enter a ticket to your IT service in order for them to make the proper registration . Add to that an heterogeneous environment users on Windows and server on Unix and you need to register your user on Unix as well as Windows with the same login group name . Unless you put some sort of LDAP correspondence between the two world like Centrify http : www.centrify.com products overview.asp .. . .. . No advanced API .. . .. . only CLI is complete cleartool is the ClearCase Command Line Interface meaning that any script in Perl or other language consists in parsing the output of those cleartool commands .. . ClearCase Automation Library CAL http : stackoverflow.com questions 268595 how-do-i-get-latest-clearcase-label-programmatically-from-c 269624 269624 exists but is quite limited .. . Java API exists but only for web views for the CCRC client . View Storages not easily centralized backed up .. . .. . The View storages are the equivalent of the .svn of SubVersion exept there is only one view storage per view instead of many .svn in all the directories of a SubVersion workspace . That is good . What is bad is that each operations within a view a simple ls checkout checking .. . will trigger a network request to the view server process that manages your view server . 2 options : .. . .. . declare your view storage on your workstation : great for scalability you can have as many view as you want without taxing the LAN : all communications are directly done on your workstation . BUT if that machine dies on you you loose your views . declare your view storage on a centralized server : that means all view server process will be created there and that all operations on a view by any user will have to communicate with that server . It can be done if the infrastructure is right special high-speed LAN dedicated-server constant monitoring but in practice your LAN will not support this mode . The first mode means : you have to backup yourself your work in progress private files or checked-out files .. . The second mode means : your workstation can be unavailable you can just log on another a get back your views execpt for the private files of a snapshot-view .. . .. . .. . .. . Side discussion about dynamic views : .. . .. . To add to the dynamic view aspect it has one advantage it s dynamic and one shortcoming it s dynamic . Dynamic views are great for setting a simple environment to quickly share a small development between a small team : for a small development effort a dynamic view can help 2 or 3 developers to constantly stay in touch one with another seeing instantly when one s commit breaks something in the other views . For more complex development effort the artificial isolation provided by snapshot-view is preferable you see changes only when you refresh - or update - your snapshot-view .. . For real divergent development effort or course a branch is still required to achieve true code isolation merges will be required at some point which ClearCase handles very well albeit slowly file-by-file .. . .. . The point is you can use both for the right reasons . Note : by small team I do not mean small project . ClearCase is best used for large project but if you want to use dynamic views you need to setup up task branches in order to isolate a small development effort per branch : that way a small team a subset of your large team can work efficiently sharing quickly its work between its members . If you use dynamic views on a main branch where everyone is doing anything then any check-in would kill you as it could introduced some build breaks unrelated with your current development effort . That would then be a poor usage of dynamic views and that would forget its other usages : .. . .. . additional way of accessing data in addition of snapshot views meaning it is a great tool to just see the files you can for example use a dynamic view to tweak its config spec until you see what you want and then copy those select rules into your usual snapshot-view .. . a side view to make merges : you work with your snapshot-view but for merges you can use your dynamic sister-view sister as in same config spec in order to avoid having a failed merge because of checked-out files on which you would be currently working on your snapshot-view or because of a snapshot-view not completely up-to-date . Once the merge is complete you update your regular snapshot-view and resume your work . Developing directly in a dynamic view is not always the best option since all non-checked-out files are read over the network . That means the dll or jar or exe needed by your IDE would be accessed over the network which can slow down considerably the compilation process . Possible solutions : .. . .. . one snapshot-view with all in it .. . a snapshot-view with dll or jar or exe in it files which do not changes every five minutes : one update per day and dynamic view with only the sources visible . Comment : I still don t get what s so great about dynamic views . I admit I don t have to do updates anymore but if someone breaks the build I immediately have to work with that broken build and cannot just not update till it s fixed again . Comment : @VonC s point was that it works in a small team . Small teams by nature check in early and often with small changes in each commit . Therefore it should not be difficult to figure out who broke it and what they did . However why would small teams buy ClearCase The cost and workflows of other options are better suited than the dated ClearCase . Comment : I m on a small team . We use Clearcase because its a company standard . Dynamic views basically waste a day for me each and every time someone else commits . Comment : Also if you are EVER having developers make commits directly to a main branch then no VCS will help the fact that you don t have a development-process that makes any sense . Comment : Hi . This is a message from the distant future 2014 . Unfortunately Clear Case still exists . This is a message to John Connor : it must be destroyed back in 1991 before it grows out of control", "Question : I am using Eclipse 3.2.0 and Rational clear case client 7.1.2 on my local machine . I want to install plugin for same Rational clear case client 7.1.2 on eclipse . Can someone please give me download link for Rational clear case client 7.1.2 plugin and also gide me in integrating it with eclipse Thanks Tushar . .. . Answer : For a CCRC installation ClearCase Remote Client which comes with its own Eclipse-based RCP - Rich client Platform - for ClearCase : .. . .. . See Installing or updating CCRC for Eclipse and RSA http : www-01.ibm.com support docview.wss uid swg21215611 and its process here https : publib.boulder.ibm.com infocenter cchelp v7r1m2 index.jsp topic com.ibm.rational.clearcase.cc ms install.doc topics t install ccrc eclipse.htm .. . .. . CCRC update-site http : i.stack.imgur.com SLech.gif .. . .. . See also the compatibility matrix between Eclipse and CCRC .. . .. . The CCRC plugin is stored within your CCRC server at : http : computer-name ccrc update where computer-name is the name of the computer that has Rational ClearCase and the CM Server for Rational ClearCase Remote Client installed on it . .. . .. . For a full ClearCase client installation : .. . .. . You will find the SCM adapter at IBM in Rational ClearCase SCM Adapter For Eclipse Version 7.6.0.0 http : www-01.ibm.com support docview.wss uid swg24025674 . For Eclipse versions 3.2.2 to 3.3.x inclusive : .. . .. . Download the zip file appropriate for your operating-system . Extract the contents of the file to a directory in your file system . In Eclipse select Help Software Updates Manage Configuration . In the Product Configuration window click the Add an Extension Location link in the Eclipse platform pane . The Browse for Folder dialog prompts you to choose an extension location expand the My Computer entry and navigate to the directory that contains the contents of the extracted zip file . Expand the Eclipse folder and click OK . The Install Update dialog prompts you to restart the workbench . Click Yes . In the Eclipse window click Window Customize Perspective . In the Customize Perspective dialog box click the Commands tab ensure that the ClearCase option under the Available command groups column is checked and click OK . See more at : .. . .. . Clearcase plugin for eclipse usage http : stackoverflow.com questions 3393758 clearcase-plugin-for-eclipse-usage 3393857 3393857 .. . Problems with ClearCase plugin eclipse http : stackoverflow.com questions 2462979 problems-with-clear-case-plugin-eclipse 2463223 2463223 .. . What ClearCase plugin to use with eclipse http : stackoverflow.com questions 1175248 what-clearcase-plugin-to-use-with-eclipse 1175738 1175738 Comment : I allready installed plugin for V 7.6.0 but it is giving me eror : : Could not connect to Rational Clearcase . Please ensure that the proper version of ClearCase is installed with the proper patches . Consult the ClearCase SCM Adapter documentation for futher details . Provider name : IBM Plugin name : Rational ClearCase SCM Adapter Plugin ID : com.rational.clearcase Version : 7.6.0.v201105111445 Comment : @user1852552 What is your OS and Os version What is your ClearCase version Are you using ClearCase or CCRC ClearCase Remote Client Comment : OS : Windows XP sp2 ClearCase : : Rational Clear case remote client Version : 7.1.2 Comment : @user that is your issue : the SCM adapter is for a full ClearCase installation not for RTC . Comment : but can I get plugin for version 7.1.2 becouse currently client installed is of V 7.1.2 and plugin that I am having is of V 7.6.0 so it s mismatch . I want to try with plugin V 7.1.2 on eclipse .", "Question : Because I m currently struggling to learn IBM Rational ClearCase I d like to hear your professional opinion . I m particularly interested in advantages disadvantages compared to other version-control-systems like Subversion or Git . Comment : Other than the price Comment : Rationale over comPlicated pain in the arse dodgy junk . Comment : If you re considering integrating CC into your development-environment I can offer only one piece of advice : don t . Comment : If you need an argument to convince people not to use clearcase you can say that all the good developers hate it . I know I wouldn t work at any place who used clearcase as their source control . Heck I would gladly suffer the pain of VSS to avoid clearcase . Comment : The only thing I haven t decided yet is if ClearCase is worse than RCS . It might be . .. . Answer : Dynamic Views . Must admire a fully functional translucent file system . One big benefit is that the Intellectual Property is always in the corporate network . A laptop can be lost stolen and no source code in jeopardy . Another is the instant access to source code and changed files no time is ever spent downloading anything . It serves well for the purpose it has .", "Question : This is a follow-up question of ClearCase snapshot views on ClearTeam Explorer http : stackoverflow.com q 23362051 6309 about the actual installation . I installed CTE plugin version 8.0.0 into Clearcase - and of course I see the dynamic views just fine . Now I would like to see snapshots as well . I see the discussion on ccrc.zip and ccrc extension.zip . And Rational ClearCase Release Notes version 8.0.1.x http : Rational 20ClearCase 20Release 20Notes 20version 208.0.1.x .. . .. . So do I need to update CTE 8.0.0 already installed to 8.0.1.6 Do I also somehow install ccrc.zip and ccrc extension.zip . I am using Helios version of Eclipse and find that IBM documents lacking on newer versions of Eclipse . .. . Answer : do I need to update CTE 8.0.0 already installed to 8.0.1.6 .. . .. . Yes or the CTE plugin wouldn t be able to display snapshot views . But that assume that your ClearCase web server is also at least at 8.0.1.6 . The installation update should be similar for newer version of Eclipse but do check the Rational ClearCase System requirements matrix http : www-03.ibm.com software products en clearcase tab othertab1 to see if your version of Eclipse is supported .", "Question : I am new to ClearCase . I have used rational synergy before . We use ClearCase in our project for version-control . In my old project I have used rational synergy in which we used to create tasks for any modifications in the files . I got to know that we have activities in ClearCase which I want to use in our projects . As of now we just check-out the files and modify and checkin the changes . But when I check my ClearCase -- Actions I don t see the option - WorkOn to start creating an activity . We are currently using the following version of ClearCase : .. . .. . Please tell me if i need to install anything else .. . Answer : The work on would be setact man page http : publib.boulder.ibm.com infocenter cchelp v7r0m0 topic com.ibm.rational.clearcase.cc ref.doc topics ct setactivity.htm : .. . .. . To check on what activity you are currently working lsact man page http : publib.boulder.ibm.com infocenter cchelp v7r0m0 index.jsp topic com.ibm.rational.clearcase.cc ref.doc topics ct lsactivity.htm : .. . .. . .. . .. . To check if a view is an UCM one or not : .. . .. . If there is a stream attached to your view it is an UCM one . If not it is a base ClearCase one not this is separate for the nature of the view : dynamic or snapshot : you can have dynamic or snapshot-view both for UCM or for base ClearCase . another way is : .. . .. . The config spec for an UCM view is automatically generated and quite more complex than the one for a base ClearCase view . Comment : How Do I check if my view is a UCM view or not Comment : @user2256404 I have edited my answer to address your comment . Comment : Thanks for your ans VonC one more doubt I right-click on one of the folders in my view . and the option UCM below tools is disabled Does this mean my view is not a UCM view Comment : If I want to chage this view or create further views with UCM is the effort required more for the administrator Comment : @user2256404 it is possible that your view isn t an UCM one but always rely on the command-line to make sure .", "Question : I am new to clearcase and software development using version-control system . I am using clearcase for version management currently . I use eclipse IDE for software development . I installed clearcase plugin for eclipse over the internet from sourceforge.net website . Some how the plugin does not work . The softwares that i installed are : IBM Rational Clearcase 7.0 Eclipse Galileo 3.5 and clearcase 2.2.3 plugin for it . I am not able to checkin or checkout files using the plugin . Can some one give me detailed step-by-step procedure for using the plugins What kind of environment to be setup .. . Answer : If you are unable see your view in the MyView of the eclipse . To resolve this issue you have to remove .ccase wvreg lockfile from currently logged in user-profile .", "Question : We are using base clear case with dynamic views on Linux . In our environment some custom script is responsible so ct mkview is not working . I need either - provide to Hudson plugin a custom script for creating a view - tell to plugin to reuse existing view w o calling to ct mkview .. . .. . I did not find any of these options . Can you help me Here are my current settings : .. . .. . alt text http : i.stack.imgur.com S933q.jpg .. . .. . Thank you .. . Answer : As I have detailed in Hudson integration with UCM ClearCase http : stackoverflow.com questions 1892508 hudson-integration-with-ucm-clearcase 1892699 1892699 you can use an existing dynamic view even if it is non-UCM . You need to click on Advanced Options to access to that part . That being said make sure the user associated with the Hudson session is registered in the right groups primary or secondary groups of the Vobs that account needs to access in order to be able to read even checkout files in said Vobs . .. . .. . Turns out the OP did have the right Hudson ClearCase plugin http : wiki.hudson-ci.org display HUDSON ClearCase+Plugin did access the Advanced Options part but : .. . .. . Use dynamic view option .. . and the Let Hudson manage the view lifecycle . That second option isn t needed when you have a dynamic view already created outside of Hudson and if you want that view to be reused as is . Comment : I do not see an option Use existing dynamic view in my hudson last version Base CC : Comment : @user20391 : Even by clicking on Advanced Option What is the last field you see in the job setting page Comment : Under use dynamic views : View root Let Hudson manage the view lifecycle Windows dynamic view storage directory Unix dynamic view storage directory Use time rule in config spec Do Not Reset Config Spec Comment : user20391 : so.. . in other word you don t have the Hudson ClearCase plugin installed wiki.hudson-ci.org display HUDSON ClearCase+Plugin http : wiki.hudson-ci.org display HUDSON ClearCase+Plugin and that might explain your issue . Comment : @7dr3am7 it is the path within the Hudson workspace as in G : hudson workspace myjob myuser mynode myjob . See issue 6227 issues.hudson-ci.org browse HUDSON-6227 http : issues.hudson-ci.org browse HUDSON-6227 for more details on that field .", "Question : My project uses clearcase 8 . we have around 10 dynamic views streams . Each dyanamic view contains 5 VOBs . After importing these dynamic views in windows clearcase explorer all the 50 VOBs are appearing under each and every dynamic view though majority of the irrelevant VOBs contains just lost+found directory under it . Once I have manually unmounted all of the irrelevant VOBs from the corresponding dynamic views but after a restart of my PC all the VOBs are appearing again every where . I don t want to view all the 50 VOBs in each dynamic view . Is there a solution for this issue PS : - I am not a clearcase admin expert . Please suggest . .. . Answer : Firstly you can cleartool umount https : publib.boulder.ibm.com infocenter cchelp v7r0m0 topic com.ibm.rational.clearcase.cc ref.doc topics ct mount.htm all vobs with .. . .. . Secondly you can mount them without making them persistent : .. . .. . Through the GUI they are generally mounted as persistent like if you did : .. . .. . That means they are recorded in the Windows registry in oprder to be mounted again automatically at the next Windows session . If you mount them through a script without the -persistent option you won t have that problem . Finally know that if one of your dynamic view need a vob then you need to mount it obviously . But that same vob will then be visible on all your dynamic views it will be mounted at least even if no version in it is selected by the other views config spec . To resolve that you can add-in another dynamic view which shouldn t see a particual vob : .. . .. . you can use and not in a config spec even in Windows .. . .. . That will make that vob invisible for that dynamic view while still being mounted and available for the first dynamic view which needs it . Comment : Thank you VonC . When i right-click on my windows dynamic view i can only see foundation baselines i dont see any place where i can amend the config spec to add element aVob .. . -none . please suggest . Comment : @Subba I am more a command-line of guy than a GUI user But even with the GUI when selecting properties on a dynamic view you can access the Config Spec tab in which you can add any rule you like . Example in command-line of config spec modification : stackoverflow.com a 15656418 6309 http : stackoverflow.com a 15656418 6309 stackoverflow.com a 1346985 6309 http : stackoverflow.com a 1346985 6309 . The last link brings actually more details on how and where put that non-selection rule in your config spec .", "Question : Because I m currently struggling to learn IBM Rational ClearCase I d like to hear your professional opinion . I m particularly interested in advantages disadvantages compared to other version-control-systems like Subversion or Git . Comment : Other than the price Comment : Rationale over comPlicated pain in the arse dodgy junk . Comment : If you re considering integrating CC into your development-environment I can offer only one piece of advice : don t . Comment : If you need an argument to convince people not to use clearcase you can say that all the good developers hate it . I know I wouldn t work at any place who used clearcase as their source control . Heck I would gladly suffer the pain of VSS to avoid clearcase . Comment : The only thing I haven t decided yet is if ClearCase is worse than RCS . It might be . .. . Answer : We are just migrating off CC onto Git for many of the reasons given here . I would like to add one reason to stay away from CC or any other commercial source control system . Your vital business data is hostage to ClearCase . You can t get it out . Your vital business data is the code its version history and all metadata such as commit comments who checked in and when . All software will have a limited useful life . You should always ask yourself when you introduce a new system that swallows important business data whether it is code bugs customer data or what not : How do I get my data out again If you can t answer that question you should not introduce that system . When we migrated out we lost most of our history and all of our metadata . Essentially we only have history corresponding to released versions but information about what changes were done in response to what customer requests is lost we have that data in the customer support and bug ticket-system so it is not completely lost but the coupling to the source code is gone . This will be somewhere between a nuisance and a problem for us on short to medium term . In a couple of years time it is not important anymore but perhaps for 1-3 years it will matter . There are commercial tools to migrate CC to other SCM but they were not deemed adequate to our needs and I doubt it would have been feasible . The minimal export we did took long enough . The lesson learnt is : Never entrust vital business data to proprietary systems .", "Question : Because I m currently struggling to learn IBM Rational ClearCase I d like to hear your professional opinion . I m particularly interested in advantages disadvantages compared to other version-control-systems like Subversion or Git . Comment : Other than the price Comment : Rationale over comPlicated pain in the arse dodgy junk . Comment : If you re considering integrating CC into your development-environment I can offer only one piece of advice : don t . Comment : If you need an argument to convince people not to use clearcase you can say that all the good developers hate it . I know I wouldn t work at any place who used clearcase as their source control . Heck I would gladly suffer the pain of VSS to avoid clearcase . Comment : The only thing I haven t decided yet is if ClearCase is worse than RCS . It might be . .. . Answer : ClearCase is perfectly usable if your willing to also use another version-control system on top of it personally I find using mercurial ontop of CC to work quite well .", "Question : Because I m currently struggling to learn IBM Rational ClearCase I d like to hear your professional opinion . I m particularly interested in advantages disadvantages compared to other version-control-systems like Subversion or Git . Comment : Other than the price Comment : Rationale over comPlicated pain in the arse dodgy junk . Comment : If you re considering integrating CC into your development-environment I can offer only one piece of advice : don t . Comment : If you need an argument to convince people not to use clearcase you can say that all the good developers hate it . I know I wouldn t work at any place who used clearcase as their source control . Heck I would gladly suffer the pain of VSS to avoid clearcase . Comment : The only thing I haven t decided yet is if ClearCase is worse than RCS . It might be . .. . Answer : I m trying to consolidate a few comments into an actual post here . I m not really here to persuade you that one is better than the other except by way of making a few points : .. . .. . If you re comparing git and ClearCase I respectfully submit that you need to better define your needs - if you are considering ClearCase for a good reason the git probably isn t even in the equation - it s far too new to trust for enterprise-level source control imo . ClearCase introduces a lot of concepts into the version-control space that other systems don t have so it can be pretty daunting and confusing . Especially if the only experience you have is reading the documentation as appears to be the case for a few people here . ClearCase is definitely not well suited to huge code bases supported by developers who are not on a LAN with a VOB server . You can have many replicated multi-site VOB servers to get them close to remote developers but this isn t necessarily practical if those remote sites are just a single developer . Do you want file versioning or repository versioning This is a pretty important question and one that will necessarily filter out an entire set of tools making your job easier . Repository versioning has a lot of advantages and it s not new like some posters claimed - commercial tools like Perforce have been around for more than a dozen years and there may have been tools that did repository versioning even before Perforce but it isn t a panacea . With a sufficiently large installation of any source control system you re going to need help . When considering tools you need to consider how easy it will be to find people to help you either job applicants who have experience or consultants who will be there at a moments notice to address any issues . There s no such thing as a maintenance-free SCM system and assuming you have one will get you into more trouble than picking one that requires too much administration . Don t pay too much attention to people who talk about how bad dynamic views are - bad SCM policies are bad regardless of the tool you re using . Your configuration-management policies and practices have to be separate from your choice of tool - no tool will stop people from smashing all over your codebase if you don t define sensible branching-and-merging policies . If someone suggests that having developers directly commit onto main is ever a sensible idea you might want to walk away from that conversation . ClearCase is a fine tool but it is a complicated tool . There is no getting around this - it does not have an easy install mode . : - From a technical standpoint there s nothing that git or SVN can do that ClearCase cannot although often the terminology is different since Open Source projects tend to just invent new taxonomy where there already existed one but some things are definitely easier harder for a given system depending on their design . ClearCase snapshot views are basically the same thing you would have if you checked out a repository from SVN or CVS - it s a local copy of the source code on your machine with pointers back into the central server for tools to query version history etc . You can work with these views without any network connection to the ClearCase server at all once they have been created and you can recycle them to avoid downloading your entire repository again when you want to move to work on another branch for example . Dynamic Views are basically a ClearCase invention and the standard operating mode for a LAN . They appear the same as checking out an SVN repository but they don t actually copy any files until you make changes . In this way the view is available immediately but it obviously cannot be worked with if the main clearcase server is unavailable and is unpleasant to work with over a high-latency connection . They also have the convenience of being able to be mounted as a network-drive on any machine with access to the server on which they were created so if your windows workstation dies you can just log onto another one mount your view and get back to work since all the files are stored either in the VOB server for files you haven t modified on this branch or the view server for files you have created or modified just in this view . Also and this deserves its own paragraph....clearmerge is nearly worth the price of admission alone . It s hands down the best merge tool that I ve ever used in my life . I firmly believe a lot of bad practice in SCM has developed because of a lack of high-quality merge tools so CVS users never learned to use branches properly and this fear of branching has propagated to the current day for no particularly good reason . Ok all that being said if you re looking for reasons not to use ClearCase they re not hard to find although I think that s the wrong way to go about it . Really you should need to come up with good reasons TO use ClearCase not reasons for NOT using ClearCase . You should come into any SCM situation assuming that ClearCase is too much tool or too complicated a tool for the job and then see if you have some situation that encourages you to use it anyhow . Having IBM or Rational logos is not a good reason. . : - .. . .. . I would not even consider ClearCase unless you could say yes to all the following statements : .. . .. . You do now or will eventually have more than 50 developers working on the same codebase . Most of those developers are centrally located or have high-throughput low-latency connections to a central location . You have a set of SCM policies and can identify how to use ClearCase to enforce those policies really you should consider this for any tool .. . Money really is no object Comment : if your windows workstation dies you can just log onto another one : only if your view storage was not on your workstation and centralized view storage is not always possible due to the additional stress it puts on the network each view operation then involving a network access Comment : OK clearmerge is a good tool I ll grant you that But no way is it worth the price of the entire system - either in dollars or in sanity . Comment : @VonC : on an even halfways well designed LAN dynamic views don t cause significant network traffic say compared to windows boxes smb ing all over the place all the time . In my experience it s more efficient and more convenient than having a CVS or SVN checkout exported to NFS and mounted somewhere else . Comment : I worked with this on a team in which all of your stipulations were true . We found it flexible powerful and somewhat cumbersome .", "Question : I created a snapshot-view using Rational ClearCase explorer . After creating it I tried compiling my code and got an MVFS error : .. . .. . When I searched the IBM website for the sake of eliminating this error I found out that a snapshot-view does not use the MVFS . Why am I getting this error when Snapshot view does not use MVFS Comment : What is your OS What version of ClearCase are you using Comment : Sorry for not specifying the most important things My OS is Windows 2003 and the Rational clearcase explorer version is 8.0.0.15 . Comment : What is the exact path you are in and the command you type when you see that error message Comment : The path is xmalviv view NBA axess aup2 refsys aup aup61 and the command which I give is clearmake.exe all . .. . Answer : Recently there was a development in the solution of this issue We escalated this issue to IBM with the help of our client . They suggested us to use Dynamic views and we used them . To our surprise it was working fine and we are able to generate the executables . But the fact still remains that we are not able to use snapshot views NOTE : This comment is just to share my knowledge and experience regarding this issue . :", "Question : Because I m currently struggling to learn IBM Rational ClearCase I d like to hear your professional opinion . I m particularly interested in advantages disadvantages compared to other version-control-systems like Subversion or Git . Comment : Other than the price Comment : Rationale over comPlicated pain in the arse dodgy junk . Comment : If you re considering integrating CC into your development-environment I can offer only one piece of advice : don t . Comment : If you need an argument to convince people not to use clearcase you can say that all the good developers hate it . I know I wouldn t work at any place who used clearcase as their source control . Heck I would gladly suffer the pain of VSS to avoid clearcase . Comment : The only thing I haven t decided yet is if ClearCase is worse than RCS . It might be . .. . Answer : Possibly the worst software ever made . I will not work for any firm that uses rational anything . Aside from CC completely crashing and restarting my workstation frequently on dynamic builds . What happens when you are pushing something to source control and CC does what it does best crash Is your code then put in lost+found backed up somewhere maybe No it is gone forever . So if you are ever in the god-awful situation of using this giant piece of expensive software keep duplicates of everything . Good job Rational IBM . Way to capture the most important part of source control reliability . Die slow .", "Question : I started coding a test client with CM API recently from my desktop . While trying to retrieve the provider it throws this exception : .. . .. . Code line : .. . .. . StpProvider provider StpProvider ProviderFactory.createProvider CcProvider.PROVIDER CLASS callback .. . .. . PROVIDER CLASS is com.ibm.rational.stp.client.internal.core.StpProviderImpl .. . .. . Exception : .. . .. . ...CRVAP0055E internal-error : The attempt to instantiate the domain subprovider com.ibm.rational.stp.client.internal.cq.CqJniSubprovider threw an exception . See nested exceptions for details . .. . CRVAP0049E internal-error : Cannot instantiate protocol provider : cqjniproxy Not found in java.library.path ...java.lang.reflect.InvocationTargetException : at com.ibm.rational.stp.cs.internal.util.StpExceptionImpl.realException StpExceptionImpl.java : 493 at com.ibm.rational.stp.cs.internal.util.StpExceptionImpl . StpExceptionImpl.java : 572 at com.ibm.rational.stp.cs.internal.util.StpExceptionImpl . StpExceptionImpl.java : 538 at com.ibm.rational.stp.client.internal.core.CoreProvider . CoreProvider.java : 2879 at com.ibm.rational.stp.client.internal.core.CoreProvider . CoreProvider.java : 2772 at com.ibm.rational.stp.client.internal.core.StpProviderImpl . StpProviderImpl.java : 36 at com.ibm.rational.stp.client.internal.core.StpProviderImpl . StpProviderImpl.java : 45 at sun.reflect.NativeConstructorAccessorImpl.newInstance0 Native Method at sun.reflect.NativeConstructorAccessorImpl.newInstance NativeConstructorAccessorImpl.java : 56 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance DelegatingConstructorAccessorImpl.java : 39 at java.lang.reflect.Constructor.newInstance Constructor.java : 527 at javax.wvcm.ProviderFactory.createProvider ProviderFactory.java : 93 at web.mrs.cmapi.Main.getCCProvider Main.java : 53 at web.mrs.cmapi.Main.main Main.java : 31 .. . .. . I have found few pages on IBM website that mention if any other resources like BIRT or CQ Reporting server is already using CM API provider then I will get this exception but as I am currently testing it on my desktop no such instances are running unless i am missing something . Below links has this information : .. . .. . https : www.ibm.com developerworks community forums html topic id 77777777-0000-0000-0000-000014430264 .. . .. . http : www-01.ibm.com support docview.wss uid swg21577252 .. . .. . Our current clearcase Clearquest version installed is 8.0.0.10 .. . .. . I truly appreciate all the help anyone can provide as this will be very useful in fixing several issues we currently face with cleartool from command-prompt . .. . Answer : The technote you mention states : .. . .. . CRVAP0049E Cannot instantiate protocol provider : cqjniproxy Not found in java.library.path .. . .. . This error occurs when two different web-applications attempt to access ClearQuest using the JNI adapter of the Change Management CM API .. . .. . For example if both BIRT and the ClearQuest Report Server for Crystal Reports are deployed to the same web server only one of the server applications can run reports that use a Change Management API JNI data source whichever connects first until profile restart . In your case you might need to install as in this thread https : jazz.net forum questions 152110 unable-to-access-clearquest-database-from-rational-insight-dataservices-1111 the ClearQuest Adapter and ClearQuest Client libraries : see Creating Rational ClearQuest and Rational RequisitePro shared-libraries http : pic.dhe.ibm.com infocenter rentrpt v1r1m1 index.jsp topic 2Fcom.ibm.rational.raer.install.doc 2Ftopics 2Ft postinstall rids sharedlibs.html .. . .. . Maybe there is an option in the ClearTeam server to specify that you are not using and don t need ClearQuest at all . As the OP Karteek Dasari http : stackoverflow.com users 4012224 karteek-dasari comments below http : stackoverflow.com questions 25689009 ibm-clearcase-cm-api-provider-instantiation-throws-exception-cannot-instantiate 25689207 comment52919694 25689207 : .. . .. . the root cause is an additional CCRC WAN Server needed to be installed for Clearcase client which provides additional jars which are needed for the provider to instantiate . Also the provider class will be NETWORK PROVIDER CLASS . See : .. . .. . Installing CCRC WAN server https : www-01.ibm.com support knowledgecenter SSSH27 8.0.1 com.ibm.rational.clearcase.cc ms install.doc topics t install ccrc wan svr.htm .. . How to access a web dynamic or snapshot-view with Rational ClearCase CM API http : www-01.ibm.com support docview.wss uid swg21382733 : .. . .. . ClearCase 8 : CCRC view .. . .. . ClearCase 8 : Dynamic view Comment : Thanks for answering . I will try this . Comment : I found the root cause to be an additional CCRC WAN Server needed to be installed for Clearcase client which provides additional jars which are needed for the provider to instantiate . Also the provider class will be NETWORK PROVIDER CLASS . Comment : @KarteekDasari Great I have included your conclusion in the answer for more visibility . I have also added IBM docs and technotes to illustrate those parameters .", "Question : My project uses clearcase 8 . we have around 10 dynamic views streams . Each dyanamic view contains 5 VOBs . After importing these dynamic views in windows clearcase explorer all the 50 VOBs are appearing under each and every dynamic view though majority of the irrelevant VOBs contains just lost+found directory under it . Once I have manually unmounted all of the irrelevant VOBs from the corresponding dynamic views but after a restart of my PC all the VOBs are appearing again every where . I don t want to view all the 50 VOBs in each dynamic view . Is there a solution for this issue PS : - I am not a clearcase admin expert . Please suggest . .. . Answer : you can create a bat file and use it to mount a list of VOB s using cleartool mount vobname Comment : Did you upvote 18 of my ClearCase answers Because if you did your upvote were all reversed cancelled as in meta.stackexchange.com q 193963 6309 http : meta.stackexchange.com q 193963 6309 Comment : They should not have been . I actually had free time to go through a bunch of topics that interest me almost all ClearCase . I trully meant the up vote . I even marked some of the topics as favorites since it is stuff that I want to keep until I can move the data into my permanent notes . You got the bulk of the upvotes since your posts are typically quite detailed and you usually answer questions . I also added answer two or three answers to some posts . I guess next time I have to spread it out over several days which means it probably will not happen which is unfortunate . Comment : Thank you anyway But yes serial upvoting is frowned upon here . 3 to 5 upvotes max is safe not too close one from another . Upvote or not thank you for your interest .", "Question : Clearcase in unix allows export views which non-clearcase users can mount via nfs . Can a similar feat be achieved with the windows version I want to use windows filesharing on a dynamic view so that the MVFS will be mounted on one system and all other computers could simply use windows filesharing to mount it readonly if that matters . .. . Answer : No the help page Configuring non-ClearCase access on Linux or the UNIX system http : publib.boulder.ibm.com infocenter cchelp v7r0m0 index.jsp topic com.ibm.rational.clearcase.books.cc admin.doc non-cc-access.htm clearly states : .. . .. . Non-ClearCase access is not supported on hosts running Linux or the UNIX system and Rational ClearCase LT or on any Rational ClearCase Windows host . I would rather try and use a snapshot-view on Windows which you can then share regular windows folder share on your disk in order for others to access . Comment : OK thanks for the second time today @VonC" ] }
[ "yes-answer-long", "yes-answer-short" ]
clearcase
UNK_RELATION
eclipse-virgo@eclipse@71
eclipse-virgo -- eclipse-virgo is a java application server based the @placeholder equinox osgi runtime that allows for modular application development using osgi primitives as well as offering a smooth transition path for traditional web-applications .
{ "confidence": [ 73.54005432128906, 67.44718933105469, 67.17520904541016, 66.08374786376953, 64.72567749023438, 64.58609771728516, 63.44044876098633, 61.548614501953125, 60.141361236572266, 59.919578552246094, 59.678558349609375, 59.50236511230469, 58.724308013916016, 57.6353874206543, 57.43162536621094, 56.93706130981445, 56.73748016357422, 56.727516174316406, 56.66937255859375, 56.343414306640625, 56.2452507019043, 56.02622604370117, 55.82809829711914, 54.85354232788086, 54.69672393798828, 54.36660385131836, 53.869117736816406, 53.869117736816406, 53.26015090942383, 52.80596160888672, 50.42939758300781, 50.20746612548828, 50.10407638549805, 49.77730941772461, 49.68695068359375, 49.358211517333984, 48.93572235107422, 48.55662536621094, 48.49171829223633, 48.44593048095703, 48.44593048095703, 48.18728256225586, 48.00322723388672, 47.9700927734375, 47.329200744628906, 47.21913146972656, 47.21913146972656, 47.102630615234375, 46.88584899902344, 46.88584899902344, 46.692684173583984, 46.43077087402344, 46.17463684082031, 46.124488830566406, 45.71015167236328, 45.577178955078125, 45.49505615234375, 45.41399383544922, 45.21247100830078, 45.145233154296875, 45.145233154296875, 45.145233154296875, 45.10954284667969, 45.0308837890625, 44.97496032714844, 44.674110412597656, 44.47586441040039, 44.417869567871094, 44.41081237792969, 44.41081237792969, 44.14493942260742, 44.09165573120117, 44.077571868896484, 43.85310363769531, 43.85310363769531, 43.66691970825195, 43.652503967285156, 43.40804672241211, 43.40544509887695, 43.17730712890625, 43.17730712890625, 42.76885986328125, 42.76885986328125, 42.76885986328125, 42.76885986328125, 42.57965850830078, 42.52195739746094, 42.52195739746094, 42.33761215209961, 42.12372970581055, 42.07350158691406, 42.067848205566406, 41.86042022705078, 41.855831146240234, 41.855831146240234, 41.84162902832031, 41.75328063964844, 41.410850524902344, 41.271732330322266, 41.23995590209961 ], "content": [ "The Greenpages app is a sample web application available in Eclipse Virgo site that provides a example of using OSGI and Spring DM together and can be deployed in Virgo container .", "I m developing a module on an OSGi application using Spring MVC and Virgo Webserver .", "From the Virgo proposal : .. . .. . Gemini .. . .. . Virgo provides a runtime enterprise application model on top of Equinox with integrated application and provisioning support .", "following situation : We are developing an OSGi-application and the final porduct should be using Eclipse Virgo .", "I am using the Eclipse Virgo 3.6.1 OSGi container which runs on Tomcat 7.0.31 .", "Does Virgo support Web-Fragment OSGI", ".. . .. . Resources : .. . .. . eclipse - virgo http : www.eclipse.org proposals virgo", "I am migrating my application from standard war to virgo-osgi modularity bundles .", "I am trying to integrate restlet in an application using Eclipse Virgo as the application server .", "The application will be deployed on Eclipse Virgo http : www.eclipse.org virgo server Tomcat variant as I m planing to take advantage of the OSGI framework makes some of the business logic easier to implement but this is out of the scope of this question .", "I m trying to start Eclipse Virgo Server on Windows 2012 Server env .", "I am using the eclipse-virgo server with embedded tomcat .", "Does Eclipse Virgo have a minimum memory requirement", "I use osgi container virgo i m not very good in that .", "Some application servers such as Virgo Glassfish IBM Websphere etc directly support OSGi deployment but they support it in different ways .", "Virgo tools limits the maximum Dynamic Web Module version of Web Application Bundles to the old 2.5 .. . .. . It seems that my Virgo server version 3.6.2 is using Tomcat 7 that is able to manage more recent servlet specifications I need 3.0 .. . .. . I m beginning to think that Virgo tool are not as actively mantained as Virgo server is .", "In the other hand Eclipse Virgo is a OSGi runtime built on the Equinox container that includes a bunch of technologies like Gemini Logback P2 or servlet containers like Jetty or Tomcat .", "I found in virgo using different namespace http : www.springframework.org schema osgi-compendium for load properties file as configuration .", "But there are some options you could try with arquillian-container-osgi https : github.com arquillian arquillian-container-osgi : .. . .. . If you are using Virgo Nano you should be fine with the Equinox module .", "If I recall on Eclipse Virgo you need to configure it specially to expose a JMX MBean for OSGi at least in glashfish I think you had to", "For development I use Virgo server .", ".. . .. . I am integrating RequireJS on an OSGi-based Virgo server environment though the details are irrelevant .", "I tried to move my web application from Virgo Tomcat server to Virgo Jetty server to get better support for websockets .", "I am currently working on my osgi project using these : .. . .. . Spring MVC 3.1.1.RELEASE .. . Eclipse Virgo 3.6.3.RELEASE as the osgi environment .. . .. . At this point I m having trouble using json .", "Hey .. . What is difference between Eclipse Virgo and Eclipse Gemini", "As Virgo is based on OSGi I had to use the org.restlet.osgi libraries and the newest version restlet 2.2.3 that doesn t rely on Java 1.7 because the latest Virgo release complains about bundles depending on Java 1.7 .", "From Choose Integration Wizard selecting Eclipse Virgo Next .. . 2 .", "Am trying to configure an Eclipse Virgo Tomcat Apache instance via Vagrant .", "I am developing bundles in Eclipse Virgo but I have faced customers in the past who insist on using a specific application server such as WebLogic .", "Details of note : .. . .. . Virgo : 2.1 .. . Eclipse : 3.6", "1 eclipse.org virgo documentation https : www.eclipse.org virgo documentation virgo-documentation-3.6.4.RELEASE docs virgo-user-guide htmlsingle virgo-user-guide.html configuring-kernel 2 eclipse.org virgo documentation https : www.eclipse.org virgo documentation virgo-documentation-3.6.4.RELEASE docs virgo-user-guide htmlsingle virgo-user-guide.html configuring-framework-properties", "I m looking to get started with Eclipse Virgo so I grabbed the required plugins for Eclipse based on the Programmer Guide .", "However even in application servers with no OSGi support it is possible to embed OSGi within a traditional Java EE deployment artifact such as a WAR or EAR file .", "The web application is successfully deployed and started but i didn t found the application under the same URL like in Virgo Tomcat .", "In fact tools documentation talks about Juno and Indigo releases and Kepler is going to be replaced in 5 days as stable release .. . .. . Are Virgo tools a commonly used way to develop against the Virgo server in eclipse", "I have a cluster of 3 nodes with Hazelcast instances running an app on top of a Virgo OSGi container.The persistence is done using cassandra .", "Are you deploying the unmodified WAR file or already a modular OSGi web application bundle WAB", "Virgo was one of them .", "Neil s right in general but if you pick app servers that directly support OSGi deployment you can in principle develop application bundles which will run on Virgo as well as other app servers .", "I have Tomcat Virgo Server .", "Gemini isn t a server at all but Virgo is .", "I m trying to build very simple app that saving data to DB run as osgi-bundle under Virgo .", "The STS 3.7.2 distribution is based on Eclipse Mars 4.5 so you need to try the Virgo tooling snapshot update-site .", "In my case it was virgo-tomcat-server-3.6.1.RELEASE serviceability logs log.log .", "Any ideas here how to get the webconsole integrated into the Eclipse Virgo Jetty install", "Basically I don t see ANYTHING pertaining to the virgo repository -- I would have thought I would see a Jetty or perhaps an OSGI tab but nothing .", "Thanks Claus for the hint -- I added the jolokia-war-1.1.5.war and the Gemini Management bundle to my local virgo and I now see the OSGI tab .", "Folks I m trying to get the apache Felix webconsole running on an eclipse Virgo 3.0.3 installation -- I need the extra details it provides that the standard virgo admin doesn t .", "Can i use same way in virgo environment", "Please help me how to use in virgo .", "Please see Virgo Concepts https : www.eclipse.org virgo documentation virgo-documentation-3.6.3.RELEASE docs virgo-user-guide html ch02s04.html for more details .", "I try to get restlet to use the Eclipse Virgo web server for delivering the REST APIs but it seems like whatever I tried doesn t work .", "Spring DM is dead for a long time already you should be using the Eclipse Virgo classes not the old Spring DM ones .", "Use virgo tomcat and skip using WebSocket .", "Of course I can start the restlet own web server on a separate port than the Eclipse Virgo one but I had no success using its web server .", "The reason was : .. . .. . I need to put akka-actor 2.10-2.2-M3.jar along with akka-osgi 2.10-2.2-M3.jar to my osgi virgo deploy folder .", "I copied JARS to server pickup folder and tried to deploy the services in VIRGO .", ": .. . .. . Troubleshooting class loading issues with Virgo http : hsiliev.blogspot.de 2010 12 troubleshooting-class-loading-issues-in.html .. . Virgo Shell Commands http : eclipse.org virgo documentation virgo-documentation-3.6.3.RELEASE docs virgo-user-guide html ch08s02.html clhas clload .. .", "I have two projects : .. . .. . One where I create a web bundle with Virgo Server with this manifest.mf : .. . .. . The project deployment on virgo server works find .", "I m trying to run iDempiere on Virgo .", "Where Virgo takes the target-platform", "Virgo doesn t use a target-platform .", "Although I didn t use Virgo in a long time I guess it is because the installation is missing a standard OSGi HTTP service which is required for the Felix web-console bundle to work .", "I m trying to design a solution that allows a single Virgo application to provide backwards compatibility for integrating with multiple versions of an external service provider .", "Other application servers have no built-in support for OSGi .", "Virgo supports Web bundles so you can embed a Restlet application in it leveraging the extension org.restlet.ext.servlet .", "I am developing a plugin for the OSGI application using maven to compile .", "Unfortunately Virgo Tomcat Server does not produce file catalina.log like pure Tomcat server .", "Should the port be the JMX port that virgo is configured for", "I am facing problem to integrate velocity with virgo .", "Add the org.joda.time bundle to the project references so Eclipse can resolve the depenencies http : stackoverflow.com questions 6461902 resolving-workspace-dependencies-for-virgo-in-eclipse .. . .. . 4 .", "Did you already try the hints given in the Virgo FAQ https : wiki.eclipse.org Virgo FAQ How can I diagnose class loading problems.3F", "I m tring to get a rest service running in my raspberry-pi with Virgo Nano application server .", "I just need to deploy it in virgo server but unfortunately receive this exception .", "What can I do to impossible to deploy my server on Virgo", "Have you checked the log file in .. . virgo serviceability logs log.log", "1 http : www.eclipse.org virgo documentation virgo-documentation-3.6.4.RELEASE docs virgo-programmer-guide htmlsingle virgo-programmer-guide.html developing-applications-configuration-artifacts .. . .. . 2 http : www.eclipse.org gemini blueprint documentation reference 1.0.2.RELEASE html compendium.html compendium : cm", "I want to migrate my web app from standard war to WAB using Virgo Tomcat Server .", "Eclipse Gemini provides the feature of dependency-injection through Spring for OSGi bundles .", "See : http : www.eclipse.org virgo samples .", "But there were no specific sample for Virgo Nano .", "I m trying to get CXF DOSGi to run in Virgo .", "Virgo is unable to resolve the dependencies on org.ops4j.pax.logging.pax-logging-service .", "Why my Manifesto does not want to deploy to Virgo", "All files as you write added to virgo .", "You can use the Virgo Shell Commands http : eclipse.org virgo documentation virgo-documentation-3.6.2.RELEASE docs virgo-user-guide html ch08s02.html as described in this blog http : hsiliev.blogspot.com 2010 12 troubleshooting-class-loading-issues-in.html to analyze class loading issues .", "I m using the bundle list with the cxf distribution to create a plan in Virgo .", "using virgo to deploy the app .. . @preauthorize annotations on the method impl are not working .", "I m using equinox weaving to do aspect across bundles in Virgo tomcat I followed the weaving sample http : www.eclipse.org equinox incubator aspects equinox-aspects-quick-start.php .", "Then it s probably best to ask on the Virgo forum where the Virgo users hang out .", "Also can you please tell where we provide exact virgo instance startup.sh as we are having two virgo instances running in remote linux server .", "Server : virgo-tomcat-server-3.6.1.RELEASE .. . .. . Problem : .. . When I try to deploy war file I see this exception : .. . .. . The most interesting part is : Check the logs for more details . .. . .. . No Virgo Tomcat Server log file contains required details .", "The generated Dockerfile should give you an impression what has to be done to run your JAX-RS application within Virgo : .. . .. . install Java 7 .. . download Virgo Jetty Server 3.6.3.RELEASE .. . .. . Add JavaSE-1.7 to the profile : .. . .. . Switch the Jetty port to 9090 : .. . .. . Add required Jetty bundles to VIRGO HOME repository ext .. . .. . Add required JAX-RS dependencies to VIRGO HOME repository usr .. . .. . Add the packaged example bundle to VIRGO HOME repository usr : .. . .. . Tell Virgo to pick up your application : .. . .. . Regards florian", "How classes from Eclipse Virgo I need to use and how I need to do that the right way to make everything work using BundleContext listener", "I am using Eclipse Virgo and I am trying to get annotation driven transaction management running but I keep running into the same issue .", "Is there a way to use OSGi on every Java EE appliction server", "Did you try the Virgo Shell Commands http : eclipse.org virgo documentation virgo-documentation-3.6.3.RELEASE docs virgo-user-guide html ch08s02.html described in this blog http : hsiliev.blogspot.de 2010 12 troubleshooting-class-loading-issues-in.html as suggested in our FAQ https : wiki.eclipse.org Virgo FAQ How can I diagnose class loading problems.3F", "Next I started two new projects in my Eclipse workspace both configured as Virgo bundles call these A and B .", "Convince virgo to upgrade to Jetty 9 - as WebSocket support in Jetty 8.1.3 which is what ships with Virgo 3.6.3-RELEASE is too old of a WebSocket implementation to be useful .", "I added those to a remote virgo but I don t know the PORT PATH USERID PW admin sprinsource" ] }
{ "confidence": [ 108.47888946533203, 104.04023742675781, 102.86109161376953, 99.51872253417969, 96.32920837402344, 91.0466537475586, 88.83416748046875, 88.39611053466797, 87.27594757080078, 84.89706420898438, 81.99716186523438, 79.98981475830078, 79.94709777832031, 79.8489990234375, 78.9786148071289, 77.10057830810547, 77.02116394042969, 76.245849609375, 76.04623413085938, 75.00294494628906 ], "content": [ "Question : Hey .. . What is difference between Eclipse Virgo and Eclipse Gemini I understand what OSGI does in general . .. . Answer : From the Virgo proposal : .. . .. . Gemini .. . .. . Virgo provides a runtime enterprise application model on top of Equinox with integrated application and provisioning support . The Gemini project at Eclipse.org provides implementations of enterprise capabilities that can be exploited by such applications . The Virgo kernel provides just the foundational capabilities and depends solely on the Gemini Blueprint Service project . The Virgo server distribution pre-integrates the Gemini Web Container and Blueprint Service projects . Additional capabilities provided by Gemini projects can easily be added to the Virgo Server simply by deploying the appropriate bundle provided by those projects . .. . .. . Resources : .. . .. . eclipse - virgo http : www.eclipse.org proposals virgo Comment : Honestly I didn t understand a thing : It is so theoretical . Easy words and examples are better . Comment : You can see things like this . Gemini isn t a server at all but Virgo is . The gemini implementation can be used as a part of Virgo but it also can be used as a part of any other web server . Virgo is a packaging of modules and gemini is one of these modules . Comment : So the short answer is : Gemini is more enterprisy", "Question : I am developing bundles in Eclipse Virgo but I have faced customers in the past who insist on using a specific application server such as WebLogic . Is there a way to use OSGi on every Java EE appliction server Comment : Does this answer http : stackoverflow.com questions 12582709 osgi-and-application-servers help you .. . Answer : Currently no . Some application servers such as Virgo Glassfish IBM Websphere etc directly support OSGi deployment but they support it in different ways . Other application servers have no built-in support for OSGi . However even in application servers with no OSGi support it is possible to embed OSGi within a traditional Java EE deployment artifact such as a WAR or EAR file . Some example code for embedding OSGi is shown in a blog post http : njbartlett.name 2011 03 07 embedding-osgi.html I wrote some time ago . Comment : Neil s right in general but if you pick app servers that directly support OSGi deployment you can in principle develop application bundles which will run on Virgo as well as other app servers . You just have to deploy the bundles in app server specific ways . That s a benefit of OSGi being a standard . Comment : Thanks Glyn . I did indeed mean that the deployment aspects differ between these servers but totally agree that the code can be portable .", "Question : Hey .. . What is difference between Eclipse Virgo and Eclipse Gemini I understand what OSGI does in general . .. . Answer : Eclipse Gemini provides the feature of dependency-injection through Spring for OSGi bundles . In the other hand Eclipse Virgo is a OSGi runtime built on the Equinox container that includes a bunch of technologies like Gemini Logback P2 or servlet containers like Jetty or Tomcat . An alternative for Gemini could be Apache Aries 1 and an alternative for Virgo could be Apache Karaf 2 .. . .. . 1 https : aries.apache.org .. . 2 http : karaf.apache.org", "Question : I am migrating my application from standard war to virgo-osgi modularity bundles . Before we used tomcat application server with war deployed . We load all properties file from tomcat lib folder as class path loading . Can i use same way in virgo environment I found in virgo using different namespace http : www.springframework.org schema osgi-compendium for load properties file as configuration . I do not want to use that way for now . I prefer same as class path loading . Please help me how to use in virgo . Thank you regards gopy .. . Answer : Considering that in OSGi each bundle has its own classpath nothing would prevent you from putting your property files in the same bundle or any other type of resource for the matter including even non-OSGi-fied JARs http : wiki.osgi.org wiki Bundle-ClassPath and reading it like you would usually do in a single-classpath environment . Having said that reading your properties through the Compendium Services benefits you with the same modularity benefits that porting your WAR had as the property file s would be considered a separate bundle of artifact type configuration in Eclipse Virgo terms that you can modify in runtime and refresh independently for the changes to take effect according to your design . Comment : Hi Hesham thank you for the reply Yes for bundle i am using compendium services to load properties but i deployed 4 more traditional war files which is using common properties files . before i copied common properties file in tomcat lib folder which is treated as common classpath to all war files . i do not want to put properties file inside each war file .", "Question : I am trying to integrate restlet in an application using Eclipse Virgo as the application server . As Virgo is based on OSGi I had to use the org.restlet.osgi libraries and the newest version restlet 2.2.3 that doesn t rely on Java 1.7 because the latest Virgo release complains about bundles depending on Java 1.7 . I try to get restlet to use the Eclipse Virgo web server for delivering the REST APIs but it seems like whatever I tried doesn t work . Of course I can start the restlet own web server on a separate port than the Eclipse Virgo one but I had no success using its web server . Is it at all possible Update .. . .. . There is also Spring involved into the story so I think this will make things even more interesting . The Spring related configuration is below : .. . .. . I am now getting this exception : .. . Answer : In fact you don t necessary need the extension org.restlet.ext.osgi to make work Restlet within an OSGi container . As a matter of fact with the OSGi edition all Restlet jars contain valid MANIFEST files even before version 2.2 . Virgo supports Web bundles so you can embed a Restlet application in it leveraging the extension org.restlet.ext.servlet . You can have a look at the following link for more details : https : github.com restlet restlet-tutorial blob master modules org.restlet.tutorial.markdown 02 Server Side 04 Server Deployment 02 Servlet Deployment.md . Otherwise I would be interested in having more details about the errors you have when trying to use Restlet in such context . Edited Following the new elements added in the question .. . .. . You should configure the Restlet servlet for Spring . This servlet would replace the one from Spring itself DispatcherServlet . The listener ContextLoaderListener must remain since it s used to manage the Spring application context within the Web bundle . Here is a sample of configuration for this servlet : .. . .. . The servlet will look for a bean named myComponent in your Spring application context . Here is a sample of configuration of Restlet within this application context : .. . .. . Hope it helps you Thierry Comment : Thanks for your explanation . I followed the tutorial without much success . This is probably because I have to make things work with Spring as well . I updated the question can you please take a look Comment : I updated my answer to describe how to configure Restlet in your context . Hope it will fix your issue Comment : I am getting this thing : Caused by : java.lang.ClassNotFoundException : net.sf.cglib.proxy.Factory no matter what I try . I know it s an OSGi thing but no matter what I did to make it see the cglib dependency I failed . Comment : Can you provide the full exception stack to see from where it s thrown Thanks Comment : I updated the question as I was not able to put the entire stacktrace in the comment .", "Question : I would like to know if is possible to integrate virgo with arquillian for testing web app Is Thanks .. . .. . Junior .. . Answer : from the list of modules http : arquillian.org modules there is currently no explicit Arquillian support for Virgo out of the box available . But there are some options you could try with arquillian-container-osgi https : github.com arquillian arquillian-container-osgi : .. . .. . If you are using Virgo Nano you should be fine with the Equinox module . Otherwise you could give the Remote Container Setup a try and use OSGi Enterprise JMX . Hope this helps florian", "Question : The Greenpages app is a sample web application available in Eclipse Virgo site that provides a example of using OSGI and Spring DM together and can be deployed in Virgo container . See : http : www.eclipse.org virgo samples . I was able to run the app with no errors . But as soon as I try to implement the org.springframework.osgi.context.event.OsgiBundleApplicationContextListener interface everything goes wrong and I start getting this error : .. . .. . java.lang.IllegalArgumentException : required property bundleContext has not been set .. . .. . OsgiBundleApplicationContextListener interface provides a way to listening BundleContext events . See : http : docs.spring.io osgi docs current api org springframework osgi context event OsgiBundleApplicationContextListener.html .. . .. . My code : .. . .. . public class ApplicationContextObserver implements OsgiBundleApplicationContextListener private transient int countRefreshed 0 private transient int countClosed 0 .. . .. . .. . .. . And the declared beans : .. . .. . To get things worst sometimes this error does not appear at all but the listener do not get called when I deploy another bundle in the container . What is going wrong if possible can you attach a running example using Virgo Container SpringDM and this listener Comment : Spring DM is dead for a long time already you should be using the Eclipse Virgo classes not the old Spring DM ones . Comment : OK . I can remove SpringDM from classpath but I need to keep Spring core itself since my project is Spring-based . How classes from Eclipse Virgo I need to use and how I need to do that the right way to make everything work using BundleContext listener Can you provide any maven project example Thanks .. . Answer : Please have a look at Migrating from Spring Dynamic Modules to Eclipse Gemini Blueprint http : www.eclipse.org gemini blueprint documentation migration . More details can be found in Eclipse Gemini Blueprint Reference Guide http : www.eclipse.org gemini blueprint documentation reference 1.0.2.RELEASE html index.html especially section 8.3 . Extender Configuration Options http : www.eclipse.org gemini blueprint documentation reference 1.0.2.RELEASE html app-deploy.html app-deploy : extender-configuration .", "Question : Folks I m trying to get the apache Felix webconsole running on an eclipse Virgo 3.0.3 installation -- I need the extra details it provides that the standard virgo admin doesn t . I uploaded the full org.apache.felix.webconosle-3.1.8.jar to the pickup dir . This virgo Jetty is running at port 8098 but when I do : host : 8098 system-console I am getting the 404 not found . Any ideas here how to get the webconsole integrated into the Eclipse Virgo Jetty install Thanks .. . Answer : Although I didn t use Virgo in a long time I guess it is because the installation is missing a standard OSGi HTTP service which is required for the Felix web-console bundle to work . You need to install a bundle that exports such a service based on the Jetty bundle you are using .", "Question : null .. . Answer : Folks I DLd hawtio to play with and I have installed the jolokia-osgi-bundle-1.1.5.jar inside an eclipse Virgo Jetty 3.0.3 container but when I start hawtio as http : localhost : 8190 hawtio I set it to start with that port I don t see any special tab -- I just see Dashboard Wiki JMX Connect LOGS and Maven . I also tried the jolokia-war-1.1.5.war file but still see nothing in the tags bar . I went to connect and tried LOCAL saw my Virgo PID and did the Start Agent but when I click on the link after the agent was deployed I see errors about id : nnnnnnnnn is not a function and id : nnnnnnnnn is not a function LocalDashboardFunction . Basically I don t see ANYTHING pertaining to the virgo repository -- I would have thought I would see a Jetty or perhaps an OSGI tab but nothing . Any ideas Comment : If I recall on Eclipse Virgo you need to configure it specially to expose a JMX MBean for OSGi at least in glashfish I think you had to Comment : Thanks Claus for the hint -- I added the jolokia-war-1.1.5.war and the Gemini Management bundle to my local virgo and I now see the OSGI tab . The next issue I have is that I can t seem to get the REMOTE connections to work . I added those to a remote virgo but I don t know the PORT PATH USERID PW admin sprinsource to use . Should the port be the JMX port that virgo is configured for Comment : Also since the Virgo I m using has JETTY in it why don t I see the Jetty tab showing Comment : You need to enable JMX on Jetty also for it to be manageable . Comment : The remote tab is for connection remotely to other JVMs that has jolokia agent running . The url is for the jolokia agent .", "Question : I have a few questions about my server OSGi JAX-RS . I built the server using the configuration of this tuturial : .. . .. . http : eclipsesource.com blogs 2014 02 04 step-by-step-how-to-bring-jax-rs-and-osgi-together .. . .. . My project compiles without problems in eclipse with these settings . When I try to arrange it using MANIFEST.MF in Virgo I get the following message : .. . .. . My questions : .. . .. . 1 . Where Virgo takes the target-platform 2 . Why my Manifesto does not want to deploy to Virgo 3 . What can I do to impossible to deploy my server on Virgo Thank you for all the answers . .. . Answer : to 1 . Virgo doesn t use a target-platform . Please see Virgo Concepts https : www.eclipse.org virgo documentation virgo-documentation-3.6.3.RELEASE docs virgo-user-guide html ch02s04.html for more details . to 2 . It seems you are trying to deploy the Manifest file alone . You will have to create a bundle first before deploying your application via admin console . to 3 . I migrated the example you mentioned above to Virgo a year ago when I was looking for an example for Dockerizor https : github.com eclipsesource dockerizor . There is a short instruction https : github.com eclipsesource dockerizor blob master examples jax-rs-example.md available online . The generated Dockerfile should give you an impression what has to be done to run your JAX-RS application within Virgo : .. . .. . install Java 7 .. . download Virgo Jetty Server 3.6.3.RELEASE .. . .. . Add JavaSE-1.7 to the profile : .. . .. . Switch the Jetty port to 9090 : .. . .. . Add required Jetty bundles to VIRGO HOME repository ext .. . .. . Add required JAX-RS dependencies to VIRGO HOME repository usr .. . .. . Add the packaged example bundle to VIRGO HOME repository usr : .. . .. . Tell Virgo to pick up your application : .. . .. . Regards florian Comment : All files as you write added to virgo . But I have a problem with gradler . I type the following command : gradlew build osgi.rest.example gradler returns me the message : FAILURE : Build failed with an exception . What went wrong : Project osgi.rest.example not found in root project dockerizor What is wrong Comment : A blind guess is that you need to change into the examples folder . Could that be Comment : @wojas Were you able to run the example", "Question : I am using the eclipse-virgo server with embedded tomcat . I want to use a custom session manager which I have created and it is present in an osgi-bundle . I have configured the osgi-bundle as a fragment with the catalina bundle being the fragment host . Also in my context.xml I have configured the session manager by specifying the fully qualified class name . The problem is that on startup I get a ClassNotFoundException for my session manager . I have tried adding my jar to the lib folder and modifying the config.ini to make my jar load up on startup but that did not help .. . .. . In this scenario what should I do to ensure that my class is found on startup . .. . Answer : You can use the Virgo Shell Commands http : eclipse.org virgo documentation virgo-documentation-3.6.2.RELEASE docs virgo-user-guide html ch08s02.html as described in this blog http : hsiliev.blogspot.com 2010 12 troubleshooting-class-loading-issues-in.html to analyze class loading issues . You can lists all bundles that can load a class for example . Have a look at the Virgo FAQ How to add imports to 3rd party bundles if need be .", "Question : Virgo tools limits the maximum Dynamic Web Module version of Web Application Bundles to the old 2.5 .. . .. . It seems that my Virgo server version 3.6.2 is using Tomcat 7 that is able to manage more recent servlet specifications I need 3.0 .. . .. . I m beginning to think that Virgo tool are not as actively mantained as Virgo server is . In fact tools documentation talks about Juno and Indigo releases and Kepler is going to be replaced in 5 days as stable release .. . .. . Are Virgo tools a commonly used way to develop against the Virgo server in eclipse Are they been slowly forgotten by users developers .. . Answer : With the Eclipse Kepler release June 26 2013 4 projects were removed . Virgo was one of them .", "Question : I m looking to get started with Eclipse Virgo so I grabbed the required plugins for Eclipse based on the Programmer Guide . Next I started two new projects in my Eclipse workspace both configured as Virgo bundles call these A and B . Then I created a new class com.foo.Bar in bundle B . I modified the Manifest of bundle B to export com.foo saved . Last I imported com.foo in bundle A . Bundle A s manifest has an error : .. . .. . Import-Package : com.foo 0.0.0 oo could not be resolved .. . .. . What do I need to do to configure Eclipse to resolve dependencies using the projects in my workspace I ve already tried adding bundle B to the build path of bundle A but this makes no difference . It s worth noting that adding bundle B to the build path of bundle A even if it had worked isn t a suitable solution because the dependency-management needs to be done differently . Details of note : .. . .. . Virgo : 2.1 .. . Eclipse : 3.6 .. . Answer : Given that : .. . .. . 1 . MANIFEST.MF must be located in src META-INF MANIFEST.MF .. . 2 . EclipseRT OSGi Bundle is one of the project facets .. . 3 . A Virgo Web Server Runtime must also be specified use the Runtimes tab in the Project Facets window .. . .. . Steps to resolve dependencies : .. . .. . 1 . Open properties on bundle B right-click - Properties .. . 2 . Choose Project References .. . 3 . Check the checkbox next to bundle A", "Question : I have Tomcat Virgo Server . I am deploying couple of OSGi bundles . I want to expose settings through properties so the service within bundle can read it though Java System.getProperty String API . Is it possible .. . Answer : You should use OSGis ConfigurationAdmin for doing this . You can deploy your properties files into VIRGO HOME pickup and then consume the properties from ConfigurationAdmin Service over the configurations pid . Virgo recognizes your properties files in its pickup folder and automatically exposes them over the ConfigurationAdmin Service . You could also list your properties files in a plan file if you use plans to deploy your bundles as an application . Please refer to the official documentation on the Virgo Documentation Page 1 for further details . And if you are using Spring Blueprint you can stick to the property placeholder as you are used to . Just use the osgix namespace handlers and do something like this : .. . .. . As by default the persistent-id or pid is the name of your properties file . For further reference have a look at Gemini Blueprint Documentation as well 2 . 1 http : www.eclipse.org virgo documentation virgo-documentation-3.6.4.RELEASE docs virgo-programmer-guide htmlsingle virgo-programmer-guide.html developing-applications-configuration-artifacts .. . .. . 2 http : www.eclipse.org gemini blueprint documentation reference 1.0.2.RELEASE html compendium.html compendium : cm", "Question : I am facing problem to integrate velocity with virgo . I used apache velocity with my web application . i am using .. . .. . com.springsource.org.apache.velocity-1.6.2.jar .. . .. . please find my configurations below .. . .. . MANIFEST.MF .. . .. . Exception is .. . .. . I checked my osgi console with ss command velocity library is already installed .. . .. . Help me to solve this problem . This is dragging my work more than a days . Thank-you in advance . Gopy .. . Answer : Did you try the Virgo Shell Commands http : eclipse.org virgo documentation virgo-documentation-3.6.3.RELEASE docs virgo-user-guide html ch08s02.html described in this blog http : hsiliev.blogspot.de 2010 12 troubleshooting-class-loading-issues-in.html as suggested in our FAQ https : wiki.eclipse.org Virgo FAQ How can I diagnose class loading problems.3F", "Question : I m tring to get a rest service running in my raspberry-pi with Virgo Nano application server . I was googling for sample code for OSGi bundle for rest service so I can play with the code and write my own rest service . But there were no specific sample for Virgo Nano . Can some one can point me to a good sample . .. . Answer : Be aware that Virgo Nano doesn t include servlet container such as Tomcat or Jetty so you will need the HttpService to bind your REST services . You can try with OSGI JAX-RS Connector from EclipseSource . Check here http : eclipsesource.com blogs 2012 01 23 an-osgi-jax-rs-connector-part-1-publishing-rest-services", "Question : My problem is web-fragment bundle is not working . I have two projects : .. . .. . One where I create a web bundle with Virgo Server with this manifest.mf : .. . .. . The project deployment on virgo server works find . I can even test it on localhost : 8080 hello . However when I create another bundle project Web Fragment with this manifest.mf : .. . .. . Deployment works but has no binding with hello context path or first-maven-virgo-project web bundle . What s wrong in my project Does Virgo support Web-Fragment OSGI Thanks . .. . Answer : Make sure you are deploying your file with a jar extension and not a war extension .", "Question : null .. . Answer : I m using equinox weaving to do aspect across bundles in Virgo tomcat I followed the weaving sample http : www.eclipse.org equinox incubator aspects equinox-aspects-quick-start.php . It worked fine in eclipse target-platform . But when I deployed into virgo it didn t work . I modified config.ini like below .. . .. . No exception occrred when starting Virgo and bundles state were correct .. . .. . I found some difference in consoles . When starting in eclipse target-platform next tow statements displayed in consoles .. . .. . But when starting in Virgo just the second one displayed . I considered maybe the hook didn t start correctly but i m not sure . Anyone can help me", "Question : following situation : We are developing an OSGi-application and the final porduct should be using Eclipse Virgo . To get in touch with OSGi and Spring i am now investigating the OSGi Blueprint concept . I am trying to use the maven-pax-plugin and Gemini Blueprint Spring-DM but when i run mvn pax : provision i get the following error : .. . .. . So how can i enable Gemini Blueprint or Spring DM with pax .. . Answer : Do you have any proxy settings I think the proxy is not allowing you to download the jars .", "Question : null .. . Answer : I am converting an existing application over to OSGI and have ran in to the following issue : .. . .. . As you can see it is continually trying to load the DTMManager over and over again . I have made it through the rest of the errors in my logs and this is the final thing that I see . I have tried many things to get this to load and from what I have read it should be loaded by the parent class loader from the bootloader as per the config file . I see the entry for org.osgi.framework.bootdelegation and it does include those packages : .. . .. . Any help would be awesome Thanks Comment : In which stage of the conversion does this error happen Are you deploying the unmodified WAR file or already a modular OSGi web application bundle WAB Comment : Deploying a partially converted WAR that virgo converts to a wab at runtime due to manifest headers . I am using the maven bundler to get my dependencies specified as embedded artifacts still in the lib directory . Comment : I assume you added the Bundle-Classpath header like Bundle-Classpath : foo.jar bar.jar WEB-INF classes" ] }
[ "yes-answer-long", "yes-answer-short" ]
eclipse
UNK_RELATION
phalanger@implementation@41
phalanger -- phalanger is a managed php @placeholder for the microsoft .net platform .
{ "confidence": [ 50.410377502441406, 50.24216842651367, 50.15251922607422, 49.16256332397461, 48.842254638671875, 48.184200286865234, 47.456787109375, 47.37847137451172, 46.35435485839844, 45.60650634765625, 45.60650634765625, 45.60650634765625, 45.60650634765625, 43.95039367675781, 43.63880157470703, 43.60285186767578, 43.53227996826172, 43.53227996826172, 43.53227996826172, 43.21216583251953, 43.11860275268555, 42.71669006347656, 42.41267776489258, 42.140419006347656, 41.76136016845703, 41.76136016845703, 41.76136016845703, 41.67342758178711, 41.67342758178711, 41.67342758178711, 41.67342758178711, 41.67342758178711, 41.67342758178711, 41.67342758178711, 41.67342758178711, 41.2412223815918, 41.15346908569336, 41.15346908569336, 41.15346908569336, 41.15346908569336, 41.088768005371094, 40.70690155029297, 40.63140106201172, 40.629737854003906, 40.629737854003906, 40.629737854003906, 40.541805267333984, 39.845741271972656, 39.694583892822266, 39.694583892822266, 39.575279235839844, 39.382991790771484, 39.382991790771484, 39.382991790771484, 39.382991790771484, 39.382991790771484, 39.382991790771484, 39.31584548950195, 39.185523986816406, 38.665565490722656, 38.665565490722656, 38.46134948730469, 38.25136947631836, 38.08136749267578, 37.88460922241211, 37.88460922241211, 37.86713790893555, 37.76756286621094, 37.412513732910156, 37.3682861328125, 37.20668029785156, 36.59971618652344, 36.59971618652344, 36.59971618652344, 36.37559127807617, 36.37559127807617, 36.37559127807617, 36.37559127807617, 36.37559127807617, 36.37559127807617, 36.37559127807617, 36.37559127807617, 36.37559127807617, 36.37559127807617, 36.164085388183594, 36.16136169433594, 36.16136169433594, 36.16136169433594, 36.16136169433594, 36.16136169433594, 36.16136169433594, 36.16136169433594, 36.16136169433594, 36.16136169433594, 36.16136169433594, 36.16136169433594, 36.16136169433594, 36.0776481628418, 36.0776481628418, 36.0776481628418 ], "content": [ "PHP application compiled with Phalanger needs Phalanger runtime PhpNetCore.dll and PhpNetClasslibrary.dll .", "I ve been trying to get codeigniter working on .Net platform with the use of Phalanger .", "Is it Phalanger 4.0", "I m trying to use the PHP Phalanger curl library php curl.mng.dll in a .NET application .", "Phalanger uses .NET to resolve assemblies .", "Phalanger is a complete PHP compiler .", "Im using phalanger to compile php scripts at runtime in the .net environment .", "Phalanger works as a compiler and runtime for PHP .", "Phalanger compiles code into .NET assemblies .", "VS.php is only PHP extension nothing to do with Phalanger .", "I am using Phalanger as PHP compiler .", "Is Phalanger php compiler stable enough for production environment", "So is it possible or Phalanger just compile php files", "For this i need to install Phalanger .. . .. . I have got following error while installing Phalanger .. . .. . Phalanger is not a valid short file name .. . .. . I am stuck with this error .", "I ve upgraded to Phalanger 4.0 but the problem still persisted .", "With Phalanger you ll connect to MySQL in the same way as in PHP the PHP code is the same .", "Phalanger will import .. . .. . according to the documentation .", "But Phalanger does not come with this extension .", "The problem seems to lie with Phalanger .", "source : .. . .. . http : www.codeproject.com Articles 17311 Phalanger-PHP-for-NET-Introduction-for-NET-develop", "My Phalanger PHP solution uses PDO and SQLite .", "mcrypt is not yet reimplemented as managed Phalanger extension .. . if you know some opensource alternative I can help with porting to Phalanger Extension .", "Then I compiled it using phalanger command and put all phalanger dll into the bin as described on their wiki .", "Note : This answer applies to Phalanger master branch at the time of writing https : github.com DEVSENSE Phalanger tree e13ea87f1a635c577a409d48276f31b097a670a6 and prior versions since circa 2011 .", "the word phalanger is in the title tag and in the description .", "PhpNetCore.IL.dll was removed from Phalanger recently .", "Phalanger failed to identify COM Object .", "I have installed VS.php and Phalanger for developing a PHP project in Visual Studio .", "Phalanger Tools and PHP Tools are built on top of MSBuild and supports this extensibility naturally .", "I want to protect php code by compiling it before deployment using Phalanger .", "But maybe Im wrong considering this statement : Implement Phalanger extension in PHP langage .", "I d like to use php so I have found Phalanger .", "It seams you have PHP Tools for Visual Studio not Phalanger Tools .", "Also it is possible you installed PHP Tools in addition to Phalanger Tools .", "Phalanger is server-side compiler of php code and js is client-side script .", "Calling a .NET model from PHP compiled using Phalanger is quite easy because the PHP code can access .NET objects .", "Using .NET on the backend and PHP using Phalanger on the frontend looks like a good scenario .", "How would I go about importing a .net library that was written before hand into a PHP project in Phalanger", "I have searched online and found a reference to Phalanger which seems to be a tool to develop php using .Net .", "Doesn t phalanger make the more or less complete .net stack available to your php scripts", "I tried a tutorial from Phalanger with a Webbrowser and it works", "Phalanger comes with Phalanger Tools for Visual Studio https : visualstudiogallery.msdn.microsoft.com 419916fb-ec89-4f18-ba97-75cf66037797 .", "I need to embed some resource in a pure compiled dll written in php using phalanger .", "And their reply at the time was that Phalanger was no longer developed .", "Phalanger 3.0 do not support mysqli .", "Phalanger does not have a support for pthreads .", "PHP programmer are reluctant to install VS before they see that Phalanger really works .", ".NET interoperability overview of Phalanger 3.0 http : www.php-compiler.net blog 2012 net-interoperability-overview-of-phalanger-3-0 blog post describes how to use scripts compiled in standard mode .", "I ve just noticed you are using Phalanger 3.0 .. . try 4.0 latest preview at pub.devsense.com phptools Phalanger.4.0.Tools.1.15.7667.msi http : pub.devsense.com phptools Phalanger.4.0.Tools.1.15.7667.msi . .", "There is issue with Phalanger perl regexp implementation github.com DEVSENSE Phalanger blob master Source ClassLibrary https : github.com DEVSENSE Phalanger blob master Source ClassLibrary RegExpPerl.cs and class names are translated to file paths incorrectly .", "Placing such hello word example in Phalanger homepage can be very useful for those new to Phalanger .", "Phalanger integration now is also built on top of it .", "I just installed Phalanger on VS 2008 .", "Plus learning about this phalanger stuff is fun .", "Try to uninstall both and install Phalanger Tools only .", "I ve tried Bambalam BamCompiler PHC-Win and Phalanger .", "Where does Phalanger look for dll s listed there", "The other tutorial http : www.codeproject.com Articles 17311 Phalanger-PHP-for-NET-Introduction-for-NET-develop 5 1 I found is just as old .", "You must not install regular PHP when using Phalanger .", "However it is still in development - since Phalanger is complete opensource reimplementation of PHP to .NET there are differences or it is just a bug .", "Is it possible do code-coverage for manual-testing on a .NET server which has phalanger for compiling php code", "Add the reference into web.config into .. . .. . Phalanger will import all the objects from the assembly and you can use them from PHP using classic PHP syntax since Phalanger 3.0 e.g :", "How to compile and run following script using Phalanger .", "We have had an app sitting around which was written in PHP and runs on Phalanger .", "However full obfuscation of generated DLL is a part of proprietary Phalanger extension which can be obtained from DEVSENSE support http : www.devsense.com services phalanger .", "But after digging through their Phalanger svn and the files located in .. . .. . C : Program Files Phalanger 3.0 Wrappers .. . .. . I found the mcrypt file .", "As described on phalanger features a compiled dll should work but its not working .", "PHP.Core.ScriptContext is in PhpNetCore.dll .. . VS Express has no support for 3rd party plugins - this means you cannot install Phalanger Tools plugin that utilize Phalanger PHP projects and editor features but it won t affect C editor experience", "After this question http : stackoverflow.com questions 12845562 phalanger-and-php-library-for-net I found a good up to-date example to follow here http : www.php-compiler.net blog 2012 net-interoperability-overview-of-phalanger-3-0 .", "Phalanger comes with mechanism which generates managed code .mng around the native-code .", "First of all update to Phalanger 4.0 github.com DEVSENSE Phalanger https : github.com DEVSENSE Phalanger codeplex page if closed for years Then you have to setup handlers in web.config .", "I can t seem to find any documentation about how to actually use existing non-.Net libraries with Phalanger .", "Phalanger promises the ability to tap into all the .NET libraries however I can t seem to access many .", "Phalanger does not support the COM extension since it features complete .NET interoperability instead .", "Does any one had any success using Phalanger to obfuscate php code for deployment", "Phalanger allows compilation of PHP scripts into Multi Script Assemblies http : wiki.php-compiler.net Multi Script Assembly .", "Yes since PHP does not have nested classes Phalanger developers had to specify how to access them .", "In this way when configuring Phalanger you are actually using that .mng file which internally passes calls to the native PHP extension .", "i installed Phalanger 3.0 on visual studios the php is working fine but how to create database and connect to database", "Under Apache PHP I can with XDebug but I don t know if Phalanger supports debugging .", "Write a simple hello world http : stackoverflow.com questions 18849763 hello-world-in-phalanger-php-compiler and prove whether it works or not .", "I used Phalanger to create a .dll from my PHP file using pure mode and added it as a reference in my project .", "I have searched the internet but all I found was references to Phalanger and tools that covert c code into php .", "This means Phalanger does not handle js either in php files or in standalone js files .", "So continuing on my mission to compile a functioning PHP project to a .Net dll using Phalanger I m once again running into problems accessing the SQLite database .", "You can only request for this feature the Phalanger team on codeplex .", "Phalanger is used in many commercial projects already http : wiki.php-compiler.net References .", "Can you please mention some site that use Phalanger", "But another question is whether Phalanger Tools displays what it should .", "Yes Phalanger will load only libraries specified in classLibrary configuration section .", "Also this means you don t have Phalanger installed using setup.exe .", "I installed Phalanger not in standard program files but in another directory .", "Has anyone been successful getting Joomla running under IIS Phalanger", "Would be good to know if anyone has Joomla working with Phalanger ok .", "If you still suspect something is hinky with your Phalanger compiler then test it .", "Or how can I make Phalanger to accept required extension", "I m just starting out with Phalanger and hit a road block .", "This question is old but the part of the Phalanger code Php.Core.Emit.AddResourceFile method responsible for this hasn t changed since this was asked .", "Also please tell me how to get assemblies hpNetCore.IL.dll PhpNetCore.dll PhpNetClassLibrary.dll and PhpNetXmlDom.dll that are required for Installation-Free Phalanger web", "First of all you can update to Phalanger 4.0 which has several Mono-related fixes ." ] }
{ "confidence": [ 64.00924682617188, 60.522918701171875, 60.30914306640625, 59.607521057128906, 59.4947509765625, 58.87098693847656, 58.443328857421875, 58.38133239746094, 58.28313446044922, 57.338714599609375, 56.6555061340332, 56.09272003173828, 56.034629821777344, 55.94377899169922, 55.880149841308594, 55.47392272949219, 55.08424377441406, 54.282814025878906, 54.18446350097656, 54.125083923339844 ], "content": [ "Question : How to use a php-extension like mcrypt My first thought was to find mcrypt.php and simply include it context.Include mcrypt.php false but of course that doesn t exist since it is written in C . .. . I was reading over Writing compiled PHP extensions in PHP http : www.php-compiler.net blog 2012 php-extension-in-php post from the blog but that seems to be about creating your own extension for use in .net . But maybe Im wrong considering this statement : Implement Phalanger extension in PHP langage . When you take your PHP library and compile it using Phalanger the result is DLL working as any other extension But even still phpc phalanger php compiler is not going to compile c code as far as I know though I haven t tried . these are the calls my php class is trying to make : mcrypt module open mcrypt enc get key size mcrypt enc get block size Comment : .NET has its own set of crypto libraries . Can t you use those Comment : trying not to the php classes im trying to use are provided by a vendor . So im trying to keep those intact and have my front end asp.net . Plus learning about this phalanger stuff is fun . in the end if it cant be done thats what i will have to do .. . Answer : Jakub M ek s answer is definitely right and if this post helps you please vote him up as well . However I wanted to simplify what he said as his advice still took me some time to understand what he was saying . Also please Jakub if you get a chance to read this correct me if Im wrong about anything . First thing that got me about his answer was this file .. . .. . php mcrypt.mng .. . .. . mng what is that But after digging through their Phalanger svn and the files located in .. . .. . C : Program Files Phalanger 3.0 Wrappers .. . .. . I found the mcrypt file . Also with some help from the php chat room I got a clue as to what the mng was Managed Code http : en.wikipedia.org wiki Managed code . So after adding the file as a reference as well as editing the web.config file to include it as Jakub shows .. . .. . These lines must be feeding into Phalanger to load this extension when compiling I think know . After that everything seems to compile and run fine Thanks Jakub Comment : Right . Just to clarify that .mng file Phalanger is completely in C managed code - still it is needed to support some legacy PHP extensions which are in C language native-code . Phalanger comes with mechanism which generates managed code .mng around the native-code . In this way when configuring Phalanger you are actually using that .mng file which internally passes calls to the native PHP extension .", "Question : How to use a php-extension like mcrypt My first thought was to find mcrypt.php and simply include it context.Include mcrypt.php false but of course that doesn t exist since it is written in C . .. . I was reading over Writing compiled PHP extensions in PHP http : www.php-compiler.net blog 2012 php-extension-in-php post from the blog but that seems to be about creating your own extension for use in .net . But maybe Im wrong considering this statement : Implement Phalanger extension in PHP langage . When you take your PHP library and compile it using Phalanger the result is DLL working as any other extension But even still phpc phalanger php compiler is not going to compile c code as far as I know though I haven t tried . these are the calls my php class is trying to make : mcrypt module open mcrypt enc get key size mcrypt enc get block size Comment : .NET has its own set of crypto libraries . Can t you use those Comment : trying not to the php classes im trying to use are provided by a vendor . So im trying to keep those intact and have my front end asp.net . Plus learning about this phalanger stuff is fun . in the end if it cant be done thats what i will have to do .. . Answer : mcrypt is not yet reimplemented as managed Phalanger extension .. . if you know some opensource alternative I can help with porting to Phalanger Extension . For now you can use native alternative so you would have to run in x86 . Simply open your .config web.config for web app or create app.config for desktop app and add following Comment : Thanks this eventually got me to where I needed to go . Read my answer below if you want further details . I would mark this as the answer however there where some steps left out and I think myn might be easier for future readers .", "Question : I ve been trying to get codeigniter working on .Net platform with the use of Phalanger . This is just an test exercise and I want to actually convert Codeigniter into dll so that I can remove source code from wwwroot inetpub folder and just put compiled dll into the web root folder at the time of publishing . While doing it I get codeigniter default page running on IIS successfully using phalanger . Then I compiled it using phalanger command and put all phalanger dll into the bin as described on their wiki . So now I have compiled dll as well source code into the web root . Which is also working fine . The moment I move source of codeigniter php files including folder system application out of webroot it stops working . As described on phalanger features a compiled dll should work but its not working . Instead everytime we access page it is loading it from the php file . Does any one has any idea how to convert it to dll and host only dll on and not the source code . Or I m missing something here . Any help in this regard is appreciated . .. . Answer : Phalanger actually loads scripts from bin WebPages.dll and additional DLLs specified in configuration . And only if the script is not found in provided DLLs it looks at filesystem . The problem can be caused by the fact it only works within inclusion statements include require include once require-once . File system functions work with filesystem only and it is common practise in PHP to check for various files existence and content . Mostly to check if configuration is present plugins are loaded parse additional comments from script etc . So you can remove all .php files that are in DLL already but you should leave these files which CodeIgniter uses through fs functions . Comment : Okay I got it . Can you share some example link for some simple few page php application not necessarily on codeigniter so I can have an idea .", "Question : I want my console program simply be run using Phalanger . I did not use IIS or .net in any way . Is it possible to use Phalanger in the same way that we use php.exe -f hello.php How to compile and run following script using Phalanger . Comment : Compiling PHP Are you sure you have picked the right language for your task See also : stackoverflow.com questions 1408417 can-you-compile-php-code http : stackoverflow.com questions 1408417 can-you-compile-php-code Comment : This seems like the kind of question best answered by reading the first chapter of the Phalanger documentation . What have you tried and how did it fail Comment : @delnan It seems the manual only used IIS to run php codes . Comment : Here is the basic info about console applications in Phalanger wiki.php-compiler.net Console application http : wiki.php-compiler.net Console application wiki.php-compiler.net Phpc.exe http : wiki.php-compiler.net Phpc.exe Phalanger compiles using phpc.exe utility . Specify target : exe parameter to build executable file . List any reference to .NET or extension library by adding r : .. . parameter . .. . Answer : Phalanger works as a compiler and runtime for PHP . The easiest way is to install Phalanger Tools for Visual Studio which allows you to create build and debug console-application . Anyway without Visual Studio first you have to compile the code .. . .. . Optionally if you have more files in your project you should list them all and specify the entering script file .. . .. . Which compiles everything .php in current directory and subdirectories and specifies hello.php to be the entering script file . This creates an executable file hello.exe . After you succeed with this basic example you may be interested in using some PHP extensions like GD2 . This can be done by adding following parameter r : PhpNetGd2 Version 3.0.0.0 Culture neutral PublicKeyToken 2771987119c16a03 which is the full name of the library containing GD2 functionality . Comment : Thanks for the answer . Placing such hello word example in Phalanger homepage can be very useful for those new to Phalanger . PHP programmer are reluctant to install VS before they see that Phalanger really works .", "Question : null .. . Answer : I want to integrate wordpress with .Net . For this i need to install Phalanger .. . .. . I have got following error while installing Phalanger .. . .. . Phalanger is not a valid short file name .. . .. . I am stuck with this error . Comment : what installer do you run Comment : Windows default installer Comment : Also please tell me how to get assemblies hpNetCore.IL.dll PhpNetCore.dll PhpNetClassLibrary.dll and PhpNetXmlDom.dll that are required for Installation-Free Phalanger web Comment : And where did you download the setup package Comment : Is it Phalanger 4.0 Is it from CodePlex or Visual Studio gallery Does it include Tools for VS", "Question : null .. . Answer : I m trying to access WMI using COM objects with PHP . The method below works very well with PHP on browser but I can t make it work when the PHP file compiled as a Windows console-application . I ve tried Bambalam BamCompiler PHC-Win and Phalanger . Bambalam failed to work but didn t return any error messages . Phalanger failed to identify COM Object . I noticed that the required PHP Extension is called php com dotnet.dll . But Phalanger does not come with this extension . I tried to add it to the extensions library but Phalanger Extutil fails to make a wrapper for it note that php com dotnet.dll s version I copied to the extensions folder does not match with the other extensions file version . How can I use COM object and with which PHP compiler under Windows Or how can I make Phalanger to accept required extension Comment : No offence but if you need to access COM objects from compiled code it sounds like PHP might be the wrong choice of language . Comment : @Simba In this case I will have to but thank you . Comment : Doesn t phalanger make the more or less complete .net stack available to your php scripts That should also include System.Management.ManagementClass and Microsoft.Management.Infrastructure haven t tried it though Comment : @VolkerK you re saying I should access WMI with .NET code in my PHP code I don t know how to do that yet but it s a good suggestion . Thank you . Comment : Phalanger does not support the COM extension since it features complete .NET interoperability instead . Basically any C sample of using COM objects from C rewritten to PHP syntax should work . To use WMI System.Management.ManagementClass and Microsoft.Management.Infrastructure are the best way .", "Question : To enable better collaboration between some UI guy who know HTML and the backend guy who know .NET we re thinking of an architecture where we use an MVC web app and use phalanger as the view engine . Integrating phalanager as a view model looks fairly easy apart from one point . I m not sure how to pass the model to the page script . Any ideas how this might be achieved One idea would be to calling a static .NET method from the php script but it feels a bit hacky . I d like be able to just pass the parameter to the script and have the script be able to pick it up in a variable . .. . Answer : Using .NET on the backend and PHP using Phalanger on the frontend looks like a good scenario . I think that the best option is to implement the model in .NET and use PHP to implement controllers and views either directly or using some PHP framework . Calling a .NET model from PHP compiled using Phalanger is quite easy because the PHP code can access .NET objects . Assuming you have a C DLL containing a namespace DemoDataLayer with the following type : .. . .. . Then you can reference the C library from the Phalanger website using web.config and use PHP extensions provided by Phalanger to use the Data class as-if it was a standard PHP object : .. . .. . To configure the reference you ll need to add the C DLL to the bin directory and include it in classLibrary element . The import namespace syntax used above is a Phalanger-specific language extension for using .NET namespaces that needs to be turned on using PhpClr feature : Comment : Thanks for the answer Tomas but I was hoping to do it the other way round : have the .NET code call the php script and pass it parameter to automatically create a binding like categories to minimize the amount of php .net code that had to be written . Is this possible Comment : @Robert : Yes there is some way to do that too I ll need to check for the details . The question is how do you want to instantiate the PHP code If you re using ASP.NET MVC I assume you d like to have something like return PhpView foo.php in your controller There is no support for this currently but it sounds interesting and it could surely be done Comment : I have my own mvc like framework which has it s own F ish way of invoking views but basically you d do something like return PhpView foo.php to invoke the php view . I ve been looking at it right now and it looks difficult as all the stuff relating to compilation of scripts is marked as internal . Looks like it d need to make a custom build of phalanger and change some visibility settings .", "Question : I have three php classes Im trying to use in my .net application . I used Phalanger to take those three classes and make a .dll file using this command : .. . .. . Which of course outputted Client.dll as well as a Client.pdb files . From there I went to VS2012 and created a new asp.net application and added the Client.dll as a reference . However I do not see the public methods from any of the classes and the object browser window shows : .. . .. . Client Client Base Types Object so that I only have the methods of type Object .. . .. . I have tried this http : tomasp.net blog ducktyping-in-phalaner.aspx method tutorial to get it to work which involves casting a custom interface onto your object however I get the error : .. . .. . the type or namespace name ScriptContext could not be found .. . .. . Which of course means that it doesnt know what or where ScriptContext . However this tutorial is from 2007 so I dont know if its just to far out of date or where I should get that class from The other tutorial http : www.codeproject.com Articles 17311 Phalanger-PHP-for-NET-Introduction-for-NET-develop 5 1 I found is just as old . It says : .. . .. . If you want to use existing PHP source developed for standard interpreter without modifications you have to use legacy mode but when you want to develop new PHP project you can consider using pure mode .. . .. . But I cannot find the step for legacy mode within the document and would prefer that over trying the pure mode so that I dont have to change edit my existing php code . I did try pure mode however it wouldn t compile phalanger compile with the command above adding the DynamicObject.php class to the command . How can I get to my public methods within the php class .. . Answer : creates DLL in legacy standard mode . This DLL contains weird namespaces needed for compatibility with PHP semantics . these namespaces separate code from different script files . .NET interoperability overview of Phalanger 3.0 http : www.php-compiler.net blog 2012 net-interoperability-overview-of-phalanger-3-0 blog post describes how to use scripts compiled in standard mode . Command line option pure+ tells compiler to create so-called pure mode assembly . In this mode compiler concatenates all the source files and compiles them as one as C does without any weird namespaces . If you specify Export attribute above the PHP class declaration resulting DLL will look as it would be compiled from C code and you will be able to reference it and use its classes normally . Comment : If you have a phalanger project in visual-studio go to properties and change Mode to Pure . Comment : Great link thanks Part of my problem however is that I cannot find the class ScriptContext . The doc mentions that VS express edition isn t support so is that why I do not see that class Comment : PHP.Core.ScriptContext is in PhpNetCore.dll .. . VS Express has no support for 3rd party plugins - this means you cannot install Phalanger Tools plugin that utilize Phalanger PHP projects and editor features but it won t affect C editor experience Comment : Thank you I didnt realize that I had to browse to it at the C : Program Files Phalanger 3.0 Bin folder for that . Comment : If you get a chance please check out my followup question about the fact that phalanger isnt seeing my php classes stackoverflow.com questions 12901567 http : stackoverflow.com questions 12901567 phalanger-cant-find-my-php-classes", "Question : Zend framework is just a collection of PHP classes . Phalanger is a complete PHP compiler . So why I can not port Zend Framework-based application to Phalanger I got the following error whene I run the app in Phalanger : .. . .. . line 13 : .. . .. . error : Comment : So.. . what does line 13 look like Comment : @Alex Howansky updated .. . Answer : Phalanger is a complete PHP compiler+runtime and in the result it should compile and run any PHP script including Zend Framework . However it is still in development - since Phalanger is complete opensource reimplementation of PHP to .NET there are differences or it is just a bug . I suggest to report the misbehaviour at http : phalanger.codeplex.com workitem list basic ideally with small test case that points out the difference between PHP and Phalanger .", "Question : I need to embed some resource in a pure compiled dll written in php using phalanger . These are txt files tha I set in visual-studio as Embedded Resource . My problem is that I cannot use the Assembly class to get the resource using GetManifestResourceStream . I tried code like this : use System Reflection Assembly .. . .. . My question is : how do I get access to embedded resources in phalanger Many thanks .. . Answer : This question is old but the part of the Phalanger code Php.Core.Emit.AddResourceFile method responsible for this hasn t changed since this was asked . I faced the same problem and solved it in almost non-hacky way . You have to provide alternative name res : path to filename alternative-name for this to work though . Straightforward GetManifestResourceStream as suggested by Jakub does not work because Phalanger does not use System.Reflection.Emit.ModuleBuilder.DefineManifestResource like I think it should when supplied with unrecognized file-format . It uses ModuleBuilder.DefineResource which returns ResourceWriter instead that only really suited for .resources files . And this is what dictates the requirement to use ResourceReader when you need to read your resource . Note : This answer applies to Phalanger master branch at the time of writing https : github.com DEVSENSE Phalanger tree e13ea87f1a635c577a409d48276f31b097a670a6 and prior versions since circa 2011 . Noted because it looks like a bug especially the need to use both original and alternative names .", "Question : We have had an app sitting around which was written in PHP and runs on Phalanger . As a result we integrated some .NET element into it . However how we seem to be suffering of issues caused by the .NET assemblies as it can no longer recognize them after updating to the latest version . If we downgrade the version to about a year ago it works fine . However we would like to be able to use the .NET assemblies with the latest version . An example of something that causes issues is : .. . .. . the compiler complains that : .. . .. . Does anyone have any ideas who is using the latest version of Phalanger .. . Answer : List is PHP keyword and it is not valid PHP identifier . However Phalanger has additional configuration option which allows to use such keywords in identifiers . Add following into your .config file : phpNet compiler set name LanguageFeatures add value CSharpTypeNames .. . .. . This allows compiler to treat disallowed PHP keywords as identifier . Comment : Works perfectly thank you Is the a location on your wiki where all of this is listed", "Question : I want to compile a PHP application where I ve used css files and javascript code . I ve choosed to work with Phalanger but I can t find any tutorial that mention how to compile such aplication . So is it possible or Phalanger just compile php files .. . Answer : Phalanger is server-side compiler of php code and js is client-side script . This means Phalanger does not handle js either in php files or in standalone js files . Js code in php files is simply outputted to the response as it would using regular php . You can consider using additional tools for optimizing and minimizing js files .", "Question : Is it possible do code-coverage for manual-testing on a .NET server which has phalanger for compiling php code .. . Answer : Phalanger compiles code into .NET assemblies . If you specify debug option PDB files are generated as well . That is all you need to run code-coverage . So ensure your web.config contains following .. . .. . Note this will produce debug build of DLL files . Currently Phalanger has no option to build in Release with PDB files .", "Question : I have installed VS.php and Phalanger for developing a PHP project in Visual Studio . I am able to debug the PHP project successfully now I am looking for to add bootstrap as a package through nuget . By using Manage NuGet Packages for solution option when I choose to install bootstrap package the VS show following mesasge . bootstrap could not be installed because it is not compatible with any project in the solution . The package doesn t target any framework . .. . .. . Its a phpproj PHP project created from VS.php extension how can i use nuget with phpproj type project . .. . Answer : VS.php is only PHP extension nothing to do with Phalanger . Phalanger comes with Phalanger Tools for Visual Studio https : visualstudiogallery.msdn.microsoft.com 419916fb-ec89-4f18-ba97-75cf66037797 . It cannot co-exist with VS.php since both provide PHP Editor functionality . Then if you create new Phalanger Web Project it should allow you such features as NuGet . Comment : I am using Phalanger as PHP compiler . I am not using PHP tools because Vs.PHP and PHP tools conflicts as they both target the same configuration setting . My question is about adding nuget to phpproj of Vs.PHP the Phalanger is mentioned to complete info about my environment i m not saying this is due to Phalanger because I m aware its a compiler and its role will come at the time of compile . The issues seems to be with Visual Studio and Vs.PHP integration . Comment : VS.Php integration uses deprecated format of phpproj files not msbuild and does not support such features . You may contact jcx soft . to implement such features . Phalanger Tools and PHP Tools are built on top of MSBuild and supports this extensibility naturally .", "Question : How to use a php-extension like mcrypt My first thought was to find mcrypt.php and simply include it context.Include mcrypt.php false but of course that doesn t exist since it is written in C . .. . I was reading over Writing compiled PHP extensions in PHP http : www.php-compiler.net blog 2012 php-extension-in-php post from the blog but that seems to be about creating your own extension for use in .net . But maybe Im wrong considering this statement : Implement Phalanger extension in PHP langage . When you take your PHP library and compile it using Phalanger the result is DLL working as any other extension But even still phpc phalanger php compiler is not going to compile c code as far as I know though I haven t tried . these are the calls my php class is trying to make : mcrypt module open mcrypt enc get key size mcrypt enc get block size Comment : .NET has its own set of crypto libraries . Can t you use those Comment : trying not to the php classes im trying to use are provided by a vendor . So im trying to keep those intact and have my front end asp.net . Plus learning about this phalanger stuff is fun . in the end if it cant be done thats what i will have to do .. . Answer : It s not that complicated install and use MCrypt . For nix users PHP.net provides a source of information in this page http : br2.php.net manual en mcrypt.installation.php . But for Windows there is not too much information . However it s easy too . You just have copy the file libmcrypt.dll from a PHP Binary save it in ext directory and enable it : .. . .. . Note : In WINDOWS environment PHP EXtensions are usually anemd as php so you have to rename the DLL or the PHP.INI line above . After that restart Apache . But before you do this check your phpinfo first because some packages and or distributions comes with a pre-compiled static MCrypt . Run it and check for with-mcrypt static and or MCrypt group with mcrypt support enabled Comment : sorry but this is not what im trying to do . Im using phalanger to compile php scripts at runtime in the .net environment . Quite different then using php on a server like Apache or even IIS Comment : It s not what you said in the first topic . You aked how to use I pointed you the PHP Manual . You asked how to compile I told you usually you don t need it . I offered my help over your explanations . I fmy help was not good consider revising you explanations AND your tags . Comment : the word phalanger is in the title tag and in the description . the fact that you do not know what it is does not mean its my fault . i did not vote you down . i merely pointed out that your explanation was not what i needed", "Question : Is Phalanger php compiler stable enough for production environment Does it need some extra server requirements Web Host Can it be deployed using only .dll files .. . Answer : Phalanger is used in many commercial projects already http : wiki.php-compiler.net References . It is marked as beta only because it does not implement several PHP 5.4 functions yet . It can be deployed standalone without a need of installing : Installation-Free Phalanger web http : www.php-compiler.net p 354 .. . .. . To ensure your environment is optimized to work smoothly with Phalanger I would recommend to take a look on support page http : www.php-compiler.net support Comment : Can you please mention some site that use Phalanger Comment : e.g . sites built on jadu.co.uk http : www.jadu.co.uk php-compiler.net http : www.php-compiler.net devsense.com http : www.devsense.com wiki.php-compiler.net http : wiki.php-compiler.net functional-programming.net http : functional-programming.net", "Question : Has anyone been successful getting Joomla running under IIS Phalanger I have gone through the Phalanger 3.0 installation followed the instructions on making Joomla a app that runs using the Phalanger compiler but for some reason I get an error before the app even starts up : .. . .. . I was running Joomla 2.5 on IIS MySQL prior to installing Phalanger 3.0 so I am wondering if it s an issue with the Phalanger compiler not interpreting the PHP right Would be good to know if anyone has Joomla working with Phalanger ok . Comment : Are you able to put a breakpoint in the PHP code This would need some debugging .. . Comment : Under Apache PHP I can with XDebug but I don t know if Phalanger supports debugging . The code worked fine under IIS ISAPI interface but it would be helpful to step through the code for sure . Comment : I ve just noticed you are using Phalanger 3.0 .. . try 4.0 latest preview at pub.devsense.com phptools Phalanger.4.0.Tools.1.15.7667.msi http : pub.devsense.com phptools Phalanger.4.0.Tools.1.15.7667.msi . . Comment : @JakubM ek I tried with 3.0 AND 4.0 and the error persists . .. . Answer : The error is telling you that the class JLogEntry hasn t been defined yet it has been referenced by something the expects it to be defined . This means a dependency wasn t satisfied . Your log.php is dependant on a file that defines the JLogEntry class . The JLogEntry class is defined in entry.php according to this : .. . .. . http : www.reference.joomlademo.de nav.html classes index.html .. . .. . and this : .. . .. . http : www.reference.joomlademo.de nav.html classes index.html .. . .. . So for whatever reason you re not satisfying that dependency . If I was on your system I d poke around for that file check if it exists is corrupt correctly versioned or otherwise prevented from being executed . If you still suspect something is hinky with your Phalanger compiler then test it . Write a simple hello world http : stackoverflow.com questions 18849763 hello-world-in-phalanger-php-compiler and prove whether it works or not . Infact do it in the same file after backing up the file to prove whether it s executing . The compiler is working at some level or else it wouldn t be showing you error messages . Edit : .. . .. . According to @highcore the Phalanger 3.0 compiler fails to implement regular expressions in the way Joomla expects . Joomla relies on this to resolve the filenames it will include . Thus entry.php is never included leaving JLogEntry undefined . The suggested work around is to avoid reg ex and split the file names . Comment : @highcore Rather than this providing you a canned fix for your problem this answer is an attempt to point you in the direction of discovering one . It certainly seems you are not alone : forum.joomla.org viewtopic.php t 680673 http : forum.joomla.org viewtopic.php t 680673 Comment : @CandledOrange I ve been in contact with Phalanger support and it seems this is an error in the compiler which incorrectly parses a certain regular expression used by joomla to resolve filenames which causes the incorrect file name to try to be included and therefore the classes are missing . I ve been too busy to post an answer myself but I already found a workaround by manually splitting the words without using regex Comment : @highcore Ah well it seems I ve arrived to late to help . Good luck . Comment : Yep . There is issue with Phalanger perl regexp implementation github.com DEVSENSE Phalanger blob master Source ClassLibrary https : github.com DEVSENSE Phalanger blob master Source ClassLibrary RegExpPerl.cs and class names are translated to file paths incorrectly .", "Question : null .. . Answer : I m having a problem with Phalanger 3.0 running as a console app on Mono 4.0.1 .. . .. . Program.php .. . .. . Compile .. . .. . Run .. . .. . Output .. . .. . Is there any configurations am I missing or is it normal Comment : First of all you can update to Phalanger 4.0 which has several Mono-related fixes . Comment : Then it is possible in configuration app.config or machine.config there is globalization fileEncoding which causes Phalanger to look for empty encoding name . Comment : I ve upgraded to Phalanger 4.0 but the problem still persisted . Comment : Thanks Jakub The config globalization fileEncoding does the trick", "Question : I have installed Phalanger from http : phalanger.codeplex.com and installed Phalanger Tools from the built-in market-place function in my Visual Studio 2012 Ultimate distribution . After doing this every time I boot start Visual Studio I get a dialog-box with the error : .. . .. . If I examine ActivityLog.xml I find the following errors all other elements omitted : .. . .. . Does anyone have a take on what I could do to relieve this .. . Answer : It seams you have PHP Tools for Visual Studio not Phalanger Tools . Also it is possible you installed PHP Tools in addition to Phalanger Tools . Try to uninstall both and install Phalanger Tools only . Comment : Alright I see they might be conflicting sadly it did not resolve the problem . I uninstalled PHP Tools for Visual Studio I cannot find a reference to anything only called PHP tools . Please advice . Comment : Ok so I ve got PHP working in my project now even though my Visual Studio distribution is still behaving like an angry bull throwing errors around .", "Question : I have been working on PHP application built using CodeIgniter framework which needs to be deployed on client site . I want to protect php code by compiling it before deployment using Phalanger . For testing this I ve created a demo project on CodeIgniter with just one function and controller . Now I just need to protect the controller method I ve created on the top of CodeIgniter while leaving rest of CodeIgniter as it is . I have tried several ways and also tried to find how to do it on google but there isn t any good material on how to use Phalanger . Does any one had any success using Phalanger to obfuscate php code for deployment Any tutorial or help will be good . Thanks Comment : I know it doesn t help you but I work for a company that uses Phalanger in production for very large clients with great success . Not for obfuscation but because the client for some strange reason doesn t want to use a real server operating-system : .. . Answer : Phalanger allows compilation of PHP scripts into Multi Script Assemblies http : wiki.php-compiler.net Multi Script Assembly . However full obfuscation of generated DLL is a part of proprietary Phalanger extension which can be obtained from DEVSENSE support http : www.devsense.com services phalanger . Comment : The docs say In PHP project Simply setup your script library as it is described above and use standard include statement to include scripts from script library . Note scripts in script libraries has priority over scripts on file system . include file.php I have generated a dll file . Now how do I add the phalenger runtime for web projects for php Or do I use this as a PHP extension in php.ini wiki.php-compiler.net Multi Script Assembly In PHP project http : wiki.php-compiler.net Multi Script Assembly In PHP project" ] }
[ "yes-answer-long", "yes-answer-short" ]
implementation
UNK_RELATION
wpr@etw@201
wpr -- included in the windows assessment and deployment kit windows adk or the windows sdk windows performance recorder wpr is a performance recording tool that is based on event tracing for windows @placeholder .
{ "confidence": [ 67.33406829833984, 62.24616241455078, 57.0754508972168, 54.28937530517578, 54.16142654418945, 52.62571716308594, 50.21147537231445, 47.89455795288086, 47.267852783203125, 46.70701599121094, 46.07526397705078, 45.170127868652344, 43.63935852050781, 43.63935852050781, 42.68037414550781, 42.63008499145508, 41.32190704345703, 37.12017059326172, 36.84840774536133, 36.7772216796875, 36.687171936035156, 35.068138122558594, 30.857664108276367, 30.857664108276367, 29.426206588745117, 29.323381423950195, 27.34392547607422, 26.925582885742188, 23.005516052246094, 18.594575881958008, 18.594575881958008, 18.594575881958008, 18.303895950317383, 15.526918411254883, 15.526918411254883, 15.526918411254883, 15.526918411254883, 15.526918411254883, 15.526918411254883, 14.918923377990723, 14.347457885742188, 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.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, 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 ], "content": [ "I am new to Windows Performance Recorder WPR and want to know if there is a way to change the names of the trace files when I run a RebootCycle .", "We are going to use Windows Performance Recorder to capture FileIO and Network metrics .", "Currently Windows 10 TH2 version of WPR It is not supported to change the file name only the path .", "Microsoft provides a demo WPR Profile in C : Program Files x86 Windows Kits 10 Windows Performance Toolkit SampleWPRControlProfiles.wprp .. . .. . It shows how to configure to log to file LoggingMode File .. . .. . To validate the WPRP file open it in Visual Studio extract the latest WPRControlProfiles.xsd from the windowsperformancerecordercontrol.dll https : blogs.msdn.microsoft.com matthew van eerde 2016 02 09 getting-the-schema-for-windows-performance-recorder-profiles and load it in Visual Studio https : msdn.microsoft.com en-us library windows hardware hh448223.aspx .. . .. . 1 .", "On HoloLens you use the Device Portal s Performance Tracing page rather than wpr but all I needed was a functional wprp .", "With Windows Performance Recorder https : msdn.microsoft.com en-us library windows hardware hh448205.aspx it is possible to achieve this in the WPR Profile https : msdn.microsoft.com en-us library windows hardware hh448210.aspx with a second EventCollectorId https : msdn.microsoft.com en-us library windows hardware hh448093.aspx entry which has an EventProviders https : msdn.microsoft.com en-us library windows hardware hh448199.aspx entry where stackwalking is enabled .", "Run it via C : Program Files x86 Windows Kits 10 Windows Performance Toolkit wpr.exe -start network.wprp and next C : Program Files x86 Windows Kits 10 Windows Performance Toolkit wpr.exe -stop NetworkData.etl", "They may add it in newer WPR version .", "I want to use the WPR profile Network .", "Is there a way to extract call stack addresses from a wpr trace", "When you now run Windows Performance Recorder to capture the data : .. . .. . stop the recording .. . .. . open the trace with Windows Performance Analyzer https : msdn.microsoft.com en-us library windows hardware hh448170.aspx load the debug-symbols https : msdn.microsoft.com en-us library windows hardware hh448108.aspx you can see the stacks for the Exception data but not for Jit or GC events : .. . .. .", "Using WPR on my PC I can choose Networking I O activity which will show events like Microsoft-Windows-TCPIP when I analyze in WPA .", "I can list the profile details with wpr -profiledetails Network .", "The keyword 0x10000 is related to perfstatus events from WPR : .. . .. . Here is the complete manifest :", "Activating stacks for user mode events has this syntax : PROVIDER : KEYWORD : LEVEL : stack .. . .. . You have to activate stacks this way : .. . .. . C : Program Files x86 Windows Kits 8.1 Windows Performance Toolkit xperf.exe -start UserLogger -on Microsoft-Windows-Kernel-Network : : : stack +Microsoft-Windows-Networking-Correlation : : : stack +Microsoft-Windows-TCPIP : : : stack -buffersize 2048 -f User.etl", "Here is an WPRP file that captures Microsoft-Windows-TCPIP and Microsoft-Windows-Kernel-Network events .", "I ve tried the following with no success even on Windows .", "According the reply of the Mirosoft employee Paul E Long to this topic https : social.technet.microsoft.com Forums office en-US 86ac7248-a85e-4d57-838b-8782f112fe23 how-to-read-wpr-etl-file-with-custom-manifest- forum messageanalyzer 36b6f488-aad7-48c2-afe3-d4ec2c8b46fa is the GUID for the control that WPR and WPRUI use to enable providers .", "When you run this under Windows 7 or Windows 8 Build 9200 the last EventLogger for the provider is used with the specified keywords and stack options .", "I need to create a file logging mode in windows-10 .", "On Windows 8.1 Windows Server 2012 R2 and later event payload scope and stack walk filters can be used by the EnableTraceEx2 function and the ENABLE TRACE PARAMETERS and EVENT FILTER DESCRIPTOR structures to filter on specific conditions in a logger session .", "The command I am using right now is : .. . .. . wpr -start GeneralProfile -filemode -onoffscenario RebootCycle -onoffresultspath C : traces -numiterations 1 .. . .. . With the above command WPR generates boot and shutdown trace files with the filename in a format something like : .. . .. . Machine-Name.Date.Time.RebootCycle 1.Boot.etl .", "Since Windows 7 it is possible to activate callstacks for usermode events https : msdn.microsoft.com en-us magazine ee412263.aspx .", "Here you should create 2 WPRP profiles and detect the Windows version and run the correct profile .", "In this demo profile I created one EventProvider EventProvider DotNETRuntime for provider Microsoft-Windows-DotNETRuntime without stacks to capture JIT and GC data and an other EventProvider EventProvider DotNETRuntime Stack for provider Microsoft-Windows-DotNETRuntime with stacks to capture stacks for Exceptions and Loader Events .", "Yes this is possible since Windows 8.1 with the type entry in EVENT FILTER DESCRIPTOR https : msdn.microsoft.com en-us library windows desktop aa363758 28v vs.85 29.aspx when it is set to EVENT FILTER TYPE STACKWALK https : msdn.microsoft.com en-us library windows desktop aa363758 28v vs.85 29.aspx when you call EnableTraceEx2 .", "I am creating a Diagnostic Capture Plan for the investigation of a performance problem .", "In order to do this I need to create a custom profile in windows-10-universal apps so that I may change default logging mode from Memory to File and also change buffer settings .", "According to https : randomascii.wordpress.com 2013 11 04 exporting-arbitrary-data-from-xperf-etl-files wpaexporter.exe should be the right tool to do so .", "I manage to prepare a profile with the right data but unfortunately wpaexporter keep trying to translate addresses even if -symbols is not given to the command-line generating some useless .. . .. . warnings .", "This is annoying because part of our application use some Delphi code that can not generate symbols in a Microsoft compatible format .", "With addresses we would be able to find the Delphi symbols in the call stack using map files .", "Later use the WPRP file with WPR.exe : .. . .. . Run your app and to stop recording run this : .. . .. . Now analyze the ETL file with WPA.exe or Perfview .", "However I m struggling with one particular detail .", "The output includes the providers and the keywords .", "Most providers have names and so I can display the keyword details with logman query providers -n provider name .", "Some providers have no name e.g .", "36b6f488-aad7-48c2-afe3-d4ec2c8b46fa : 0x10000 : 0xff .. . .. . How can I display the meaning of the keywords", "Thanks and regards...Paul", "Each event write call will go through this array quickly to find out whether the stack should be captured or not .", "The provided filter includes a EVENT FILTER EVENT ID structure that contains an array of event IDs and a Boolean value that indicates whether to enable or disable stack capturing for the specified events .", "I did read .. . .. . Capture callstack and events in Xperf http : stackoverflow.com questions 25793538 capture-callstack-and-events-in-xperf 28654045 28654045 .. . .. . and other sources but the most straightforward thing I d like to do is simply display the Stack column in WPA s Generic events graph .", "WPA Generic events graph http : i.stack.imgur.com 5Q6BX.png .. . .. . Why is it not there", "Sure because stack information is not available but why", "I do know xperf -help stackwalk but what s listed is not what I m looking for .", "For example .. . .. . is not possible to get the callstack for network events .", "Why", "I must be missing something .", "Thanks", "Thanks but this doesn t add a Stack column to the Generic Events graph .", "I only get an additional separate Stacks graph .", "It s ok but not where I d expect it i.e .", "in the Generic Events window .", "My question was related to Generic Events in general not only to user mode providers .", "Maybe other kernel flags do not have corresponding user mode provider do they", "so it s not clear for me yet.In addition if I do it this way symbols are missing again .", "Do we have to add a minimum set of providers to get symbol support", "generic events user mode events .", "Click on Open View Editor and activate he stack column here .", "symbols are missing because NETWORKTRACE is not enough .", "Use NETWORK which captures PROC THREAD+LOADER both MUST be used all the time", "Sorry but this is not right because networktrace is a kernel flag and the events are shown in the generic events graph .", "Anyway I ll just have to accept but not understand that there s no Stack column in that graph .", "Regarding symbols I found out meanwhile too thanks .", "there are stacks if you activate them .", "I use this often .", "But for network there is no stack option .", "Here you have to activate the usermode providers that I told you .", "btw use xperf -help stackwalk to see which stacks you can enable for kernel-mode events", "This causes the trace files to have a different name each time I run my command but I want to have pre-defined names like boot.etl and shutdown.etl .", "How can I do this", "I asked this Microsoft an got a reply today .", "I m trying to capture an etl trace on the HoloLens with my own events and some generic networking events .", "I can t figure out how to see these events on a HoloLens or successfully put them in my wprp file .", "My own events work fine .", "Please help .", "do you need more information help", "Thank you for your reply but we changed our approach and now using Metro logs .", "Open your .wprp file in Visual Studio .", "2 .", "In the main menu choose XML and then choose Schemas .. . .. . 3 .", "In the XML Schemas dialog that appears choose Add .. . .. . 4 .", "Choose the WPRControlProfiles.xsd schema .", "This works fine but sometimes activating stacks for all tasks Events in a provider is not needed and it would be nice to only activate stacks for some specific Tasks .", "Is this possible", ".. . When stack walking is enabled for a provider then the stack is captured for all the events generated by the provider .", "Most of the time the user is only interested in stack from only certain number of events .", ".. . This feature allows enabling or disabling stack walking on a list of events .", "WPA dotNetRuntime Events some withStacks http : i.stack.imgur.com XdjLm.png .. . .. . Attention ." ] }
{ "confidence": [ 91.75585174560547, 87.08985137939453, 86.37398529052734, 82.3382568359375, 78.1202621459961, 51.91877746582031, 38.40977478027344 ], "content": [ "Question : I am new to Windows Performance Recorder WPR and want to know if there is a way to change the names of the trace files when I run a RebootCycle . The command I am using right now is : .. . .. . wpr -start GeneralProfile -filemode -onoffscenario RebootCycle -onoffresultspath C : traces -numiterations 1 .. . .. . With the above command WPR generates boot and shutdown trace files with the filename in a format something like : .. . .. . Machine-Name.Date.Time.RebootCycle 1.Boot.etl . This causes the trace files to have a different name each time I run my command but I want to have pre-defined names like boot.etl and shutdown.etl . How can I do this .. . Answer : I asked this Microsoft an got a reply today . Currently Windows 10 TH2 version of WPR It is not supported to change the file name only the path . They may add it in newer WPR version .", "Question : I m trying to capture an etl trace on the HoloLens with my own events and some generic networking events . Using WPR on my PC I can choose Networking I O activity which will show events like Microsoft-Windows-TCPIP when I analyze in WPA . I can t figure out how to see these events on a HoloLens or successfully put them in my wprp file . I ve tried the following with no success even on Windows . My own events work fine . .. . Answer : Here is an WPRP file that captures Microsoft-Windows-TCPIP and Microsoft-Windows-Kernel-Network events . Run it via C : Program Files x86 Windows Kits 10 Windows Performance Toolkit wpr.exe -start network.wprp and next C : Program Files x86 Windows Kits 10 Windows Performance Toolkit wpr.exe -stop NetworkData.etl Comment : On HoloLens you use the Device Portal s Performance Tracing page rather than wpr but all I needed was a functional wprp . Thanks", "Question : I am creating a Diagnostic Capture Plan for the investigation of a performance problem . We are going to use Windows Performance Recorder to capture FileIO and Network metrics . However I m struggling with one particular detail . I want to use the WPR profile Network . I can list the profile details with wpr -profiledetails Network . The output includes the providers and the keywords . Most providers have names and so I can display the keyword details with logman query providers -n provider name . Some providers have no name e.g . 36b6f488-aad7-48c2-afe3-d4ec2c8b46fa : 0x10000 : 0xff .. . .. . How can I display the meaning of the keywords Thanks and regards...Paul .. . Answer : According the reply of the Mirosoft employee Paul E Long to this topic https : social.technet.microsoft.com Forums office en-US 86ac7248-a85e-4d57-838b-8782f112fe23 how-to-read-wpr-etl-file-with-custom-manifest- forum messageanalyzer 36b6f488-aad7-48c2-afe3-d4ec2c8b46fa is the GUID for the control that WPR and WPRUI use to enable providers . The keyword 0x10000 is related to perfstatus events from WPR : .. . .. . Here is the complete manifest :", "Question : I need to create a file logging mode in windows-10 . In order to do this I need to create a custom profile in windows-10-universal apps so that I may change default logging mode from Memory to File and also change buffer settings . Please help . Comment : do you need more information help Comment : Thank you for your reply but we changed our approach and now using Metro logs . .. . Answer : Microsoft provides a demo WPR Profile in C : Program Files x86 Windows Kits 10 Windows Performance Toolkit SampleWPRControlProfiles.wprp .. . .. . It shows how to configure to log to file LoggingMode File .. . .. . To validate the WPRP file open it in Visual Studio extract the latest WPRControlProfiles.xsd from the windowsperformancerecordercontrol.dll https : blogs.msdn.microsoft.com matthew van eerde 2016 02 09 getting-the-schema-for-windows-performance-recorder-profiles and load it in Visual Studio https : msdn.microsoft.com en-us library windows hardware hh448223.aspx .. . .. . 1 . Open your .wprp file in Visual Studio . 2 . In the main menu choose XML and then choose Schemas .. . .. . 3 . In the XML Schemas dialog that appears choose Add .. . .. . 4 . Choose the WPRControlProfiles.xsd schema . Later use the WPRP file with WPR.exe : .. . .. . Run your app and to stop recording run this : .. . .. . Now analyze the ETL file with WPA.exe or Perfview .", "Question : Since Windows 7 it is possible to activate callstacks for usermode events https : msdn.microsoft.com en-us magazine ee412263.aspx . This works fine but sometimes activating stacks for all tasks Events in a provider is not needed and it would be nice to only activate stacks for some specific Tasks . Is this possible .. . Answer : Yes this is possible since Windows 8.1 with the type entry in EVENT FILTER DESCRIPTOR https : msdn.microsoft.com en-us library windows desktop aa363758 28v vs.85 29.aspx when it is set to EVENT FILTER TYPE STACKWALK https : msdn.microsoft.com en-us library windows desktop aa363758 28v vs.85 29.aspx when you call EnableTraceEx2 . On Windows 8.1 Windows Server 2012 R2 and later event payload scope and stack walk filters can be used by the EnableTraceEx2 function and the ENABLE TRACE PARAMETERS and EVENT FILTER DESCRIPTOR structures to filter on specific conditions in a logger session . .. . When stack walking is enabled for a provider then the stack is captured for all the events generated by the provider . Most of the time the user is only interested in stack from only certain number of events . .. . This feature allows enabling or disabling stack walking on a list of events . The provided filter includes a EVENT FILTER EVENT ID structure that contains an array of event IDs and a Boolean value that indicates whether to enable or disable stack capturing for the specified events . Each event write call will go through this array quickly to find out whether the stack should be captured or not . With Windows Performance Recorder https : msdn.microsoft.com en-us library windows hardware hh448205.aspx it is possible to achieve this in the WPR Profile https : msdn.microsoft.com en-us library windows hardware hh448210.aspx with a second EventCollectorId https : msdn.microsoft.com en-us library windows hardware hh448093.aspx entry which has an EventProviders https : msdn.microsoft.com en-us library windows hardware hh448199.aspx entry where stackwalking is enabled . In this demo profile I created one EventProvider EventProvider DotNETRuntime for provider Microsoft-Windows-DotNETRuntime without stacks to capture JIT and GC data and an other EventProvider EventProvider DotNETRuntime Stack for provider Microsoft-Windows-DotNETRuntime with stacks to capture stacks for Exceptions and Loader Events . When you now run Windows Performance Recorder to capture the data : .. . .. . stop the recording .. . .. . open the trace with Windows Performance Analyzer https : msdn.microsoft.com en-us library windows hardware hh448170.aspx load the debug-symbols https : msdn.microsoft.com en-us library windows hardware hh448108.aspx you can see the stacks for the Exception data but not for Jit or GC events : .. . .. . WPA dotNetRuntime Events some withStacks http : i.stack.imgur.com XdjLm.png .. . .. . Attention . When you run this under Windows 7 or Windows 8 Build 9200 the last EventLogger for the provider is used with the specified keywords and stack options . Here you should create 2 WPRP profiles and detect the Windows version and run the correct profile .", "Question : null .. . Answer : According to https : randomascii.wordpress.com 2013 11 04 exporting-arbitrary-data-from-xperf-etl-files wpaexporter.exe should be the right tool to do so . I manage to prepare a profile with the right data but unfortunately wpaexporter keep trying to translate addresses even if -symbols is not given to the command-line generating some useless .. . .. . warnings . This is annoying because part of our application use some Delphi code that can not generate symbols in a Microsoft compatible format . With addresses we would be able to find the Delphi symbols in the call stack using map files . Is there a way to extract call stack addresses from a wpr trace", "Question : I did read .. . .. . Capture callstack and events in Xperf http : stackoverflow.com questions 25793538 capture-callstack-and-events-in-xperf 28654045 28654045 .. . .. . and other sources but the most straightforward thing I d like to do is simply display the Stack column in WPA s Generic events graph . WPA Generic events graph http : i.stack.imgur.com 5Q6BX.png .. . .. . Why is it not there Sure because stack information is not available but why I do know xperf -help stackwalk but what s listed is not what I m looking for . For example .. . .. . is not possible to get the callstack for network events . Why I must be missing something . Thanks .. . Answer : Activating stacks for user mode events has this syntax : PROVIDER : KEYWORD : LEVEL : stack .. . .. . You have to activate stacks this way : .. . .. . C : Program Files x86 Windows Kits 8.1 Windows Performance Toolkit xperf.exe -start UserLogger -on Microsoft-Windows-Kernel-Network : : : stack +Microsoft-Windows-Networking-Correlation : : : stack +Microsoft-Windows-TCPIP : : : stack -buffersize 2048 -f User.etl Comment : Thanks but this doesn t add a Stack column to the Generic Events graph . I only get an additional separate Stacks graph . It s ok but not where I d expect it i.e . in the Generic Events window . My question was related to Generic Events in general not only to user mode providers . Maybe other kernel flags do not have corresponding user mode provider do they so it s not clear for me yet.In addition if I do it this way symbols are missing again . Do we have to add a minimum set of providers to get symbol support Comment : generic events user mode events . Click on Open View Editor and activate he stack column here . symbols are missing because NETWORKTRACE is not enough . Use NETWORK which captures PROC THREAD+LOADER both MUST be used all the time Comment : Sorry but this is not right because networktrace is a kernel flag and the events are shown in the generic events graph . Anyway I ll just have to accept but not understand that there s no Stack column in that graph . Regarding symbols I found out meanwhile too thanks . Comment : there are stacks if you activate them . I use this often . But for network there is no stack option . Here you have to activate the usermode providers that I told you . Comment : btw use xperf -help stackwalk to see which stacks you can enable for kernel-mode events" ] }
[ "yes-answer-long", "yes-answer-short" ]
etw
UNK_RELATION
sbt-revolver@scala@104
sbt-revolver -- sbt-revolver is a plugin for sbt enabling a super-fast development turnaround for your @placeholder applications .
{ "confidence": [], "content": [] }
{ "confidence": [], "content": [] }
[ "yes-answer-long", "yes-answer-short" ]
scala
UNK_RELATION
svn-externals@svn@145
svn-externals -- svn : externals allow a part of an external subversion repository to be checked out within another working copy by setting the @placeholder : externals property on a directory in that working copy .
{ "confidence": [ 75.82496643066406, 75.76819610595703, 73.0833511352539, 72.15135192871094, 68.5459976196289, 66.8948745727539, 64.52490997314453, 64.52490997314453, 64.20919036865234, 64.07527160644531, 64.07527160644531, 64.07527160644531, 64.07527160644531, 64.07527160644531, 64.07527160644531, 63.272220611572266, 62.862945556640625, 62.40869140625, 62.37416458129883, 61.477840423583984, 61.19181823730469, 60.76005554199219, 60.56956481933594, 60.40494155883789, 59.739036560058594, 59.52523422241211, 59.136497497558594, 59.129337310791016, 59.093475341796875, 58.965675354003906, 58.848079681396484, 58.31547927856445, 58.1080207824707, 55.99977111816406, 55.90753173828125, 55.803314208984375, 55.421424865722656, 55.25432586669922, 55.04323196411133, 54.60748291015625, 54.57262420654297, 54.13932800292969, 54.13673400878906, 54.13673400878906, 54.13673400878906, 53.79179382324219, 53.60011291503906, 53.341217041015625, 53.078330993652344, 53.0699462890625, 52.97541046142578, 52.25799560546875, 52.13928985595703, 52.13928985595703, 51.40610885620117, 51.29345703125, 51.19952392578125, 50.77861785888672, 50.74070739746094, 50.74070739746094, 50.26055145263672, 50.124263763427734, 49.57941436767578, 49.430870056152344, 49.283424377441406, 49.283424377441406, 49.24720764160156, 48.59946060180664, 48.420166015625, 48.316688537597656, 47.924198150634766, 47.616844177246094, 47.582557678222656, 47.508155822753906, 47.508155822753906, 47.11458969116211, 47.07667922973633, 46.983116149902344, 46.629554748535156, 46.34775924682617, 46.095314025878906, 46.095314025878906, 46.095314025878906, 46.06536102294922, 45.61940002441406, 45.61940002441406, 45.61940002441406, 45.61940002441406, 45.61940002441406, 45.61940002441406, 45.61940002441406, 45.61940002441406, 45.36620330810547, 45.161067962646484, 44.833717346191406, 44.55519104003906, 44.1923828125, 44.1923828125, 44.143272399902344, 44.027862548828125 ], "content": [ "I m using Mercurial to talk to a Subversion repository and the repository is currently using SVN externals to pull in another repository .", "Out of all the checked out folders only one has svn-externals in it .", "svn cp --ignore-externals A B", "Directory externals must create a subdirectory because a directory external basically creates a brand new independent working copy .", "This way if you move your Subversion repository to another system or change from http to svn your externals will still work .", "You will either need to check out your tag remove the externals and commit or do the copy within your working copy and edit to remove the externals prior to commit .", "Did the command not run or did it copy but with the externals", "You are misunderstanding what --ignore-externals is for on the copy subcommand .", "So as i know in SVN the solution is resolved with externals .", "I have idea about how to set svn-externals .", "I need to reach that one particular folder and edit svn-externals .", "I need to reach that one particular folder and edit svn-externals .", "My folder structure is : OuterFolder has two svn-externals 1 .", "EDIT : Partial Solution .. . .. . SVN Externals can be pulled down just fine .", "ideally hg svn updateexternals would pull the externals in as hg sub repositories .", "This is done via externals and those externally referenced projects have externals themselves .", "I have a branch A with externals .. . .. . I need to copy the content without the externals to a tag B .", "I ve a svn repo say : test1 with externals say : test2 .", "SVN of course supports this through the concept of Externals which allow you point to directories or files even on a different repository .", "The one that is internal is not available for externals .", "hgsubversion works really well for communicating with the repository but it doesn t seem to work with SVN Externals .", "You can do externals file-by-file using file externals .", "Is the current directory . the svn working copy directory that you need to set a property to", "It copied with externals .", "This question : SVN post-commit hook to modify externals http : stackoverflow.com questions 15392176 svn-post-commit-hook-to-modify-externals kinda gets there but the answer is mostly advice to move away from externals I m already convinced .", "Am trying to set svn-externals directly to a repository url from the command-line .", "In order to do a build I checkout a svn repository which has multiple folders.One of folders has properties - svn-externals pointing to a particular tag number I need to edit the svn-externals to point to a different tag number .", "There are a few Subversion commands that change the commit without requiring a working copy : svn cp svn mkdir and svn delete .", "Is there a way to see the externals - or at least hints that there are externals - in the web-frontend", "Maybe externals are not the answer .", "Our solution is to recursively either A replace all externals with a branch of what they referred to or B setup a branch of external X in foo branches externals foo X that s referenced by project branches foo with foo branches externals foo X itself referring to foo branches externals foo XX .", "Obviously : have SVN-externals which will be accessible from both or any amount of locations .", "But branching a project in this setting is a real pain in the erm neck because it s not enough to pin a project s externals when those themselves then refer to unpinned externals .", "Relative paths to externals simply are more robust but they are only available within a single repository .", "Why not remove the file externals completely keeping the files themselves so you d have to svn add them svn commit and then do the conversion", "I have been looking into SVN externals using a structure as follows : .. . .. . Main .. . Base .. . .", "Externals are just svn checkouts so you can check them out manually .", "Hgsubversion can convert directory externals to sub-repos but apparently not file referencing externals .", "Path to svn repo path to svn repos gem name trunk .. . .. . I try to do it but it remove all another externals and add my gem : I need to append this gem to existing externals list .", "- If you execute this command in PowerShell you will edit externals property of desired folder .", "Yet the externals property seems to be set correctly when I do svn propget svn : externals project .. . .. . What am I doing wrong", "I only use externals for projects linked to more than one repository .", "dschmidt@dschmidt-Latitude-E6320 : home share Users dschmidt Projects pharma test externals svn propget svn : externals -R .", "So is there a magical spell I can cast on svn to get it to replace my existing directories with these externals", "From my point of view the externals concept is svn is somehow similar to the concept of workspace definition in TFS .", "I d recommend not serving your site out of an svn working copy .", "As far as I could figure out one could use SVN externals but the commands I tried failed so far e.g .", "These two have special meaning for SVN but there are other as well with prefix different from svn : .. . .. . Downside to a SVN external is that if it belongs-to a different repository then it is not possible to commit changes in both root working copy and external s WC in a single action .", "When you re checking out the SVN parent whether the externals have moved or not you expect it to compile and work .", "Today another option is available : bzr-externals plugin https : launchpad.net bzr-externals .", "Ignore the fact that there are discrepencies in the externals or .. . 2 .", "There are two ways of handling this : .. . .. . Always use some revision or tag with your externals directories : .. . .. . Like this : .. . .. . which will tie the externals to a specific revision or : .. . .. . which will tie the externals to a specific tag .", "I ve tried svn up --set-depth immediates but that doesn t seem to get the externals .", "But in my SVN Repo Browser I can only see one of all those externals being linked in .", "I tried using .. . .. . svn-checkout --force https : myrepo trunk . .. . .. . svn revert -R . .. . .. . Which did the checkout however I am using some svn-externals which take the place of some existing directories .", "You can t use file-externals with cross-repository definition : only files in the same repository can be used .. . 3 .", "And you have a small repository for each customer with possibility to easily copy a design version to start another one by svn copy .", "You might be interested in this question http : stackoverflow.com questions 2570289 making-mercurial-subrepositories-behave-like-subversion-externals", "You should be doing that anyway unless you are ignoring the strong advice from the SVN documentation telling you to use explicit revision numbers in your externals .", "Now we incorporate classes into project as svn-externals in form : classes classdir1@1234 class1 classes classdir13@81 otherclass .. . .. . and so on .", "We are forced to reconfigure all of the externals each time we do such a release though create corresponding branches in all of the dependencies as well and then reconfigure all of the externals across all projects to ensure that the externals are referencing the correct branches .", "When you copy one working-copy path to another it prevents svn from processing all the svn : externals properties on copied items to check out their targets .", "The current idea we have looks like .. . .. . Now we d like the itg-app repository to have an externals reference to the itg-common repository .", "Well you could do a dump-and-reload of the repo filtering out the revisions that added the externals add the files the externals would have brought in and commit then do the conversion .", "I have tried submodules but I cant simulate exactly the externals behavior .", "@michael sorry I had my terminology wrong : - Externals", "Older versions could only do externals at the folder level but newer versions are capable of doing externals at the file level .", "As prodigitalson said http : stackoverflow.com questions 7911270 how-does-one-setup-correlated-subversion-externals-should-one 7911304 7911304 already an external in SVN basically is considered a totally different piece of software with its own release cycles branches tags etc .", "I m attempting to add the svn : externals definition on the Project1 folder so that my .dll files are downloaded to that folder forming the following structure .. . .. . But the externals property refuses to let me specify that I want to download them to the folder I am currently setting the externals property on .", "That works but I then need to overwrite for example the images in the Customer 1 Base Images folder with the customer specific ones and when I set up the externals for that it complains Customer 1 Base Images is not a working copy root .", "In my SVN repo I have the following structure : .. . .. . And I want to include the shared folder as an external within the project folder so I have : .. . .. . So I defined an external property on the project folder like this : .. . .. . I commit the change and update the project working copy and the code is checked out including the shared folder .", "This didn t work because externals can t be in the same repo as their links .", "seem like you need Vendor branch http : svnbook.red-bean.com en 1.1 ch07s05.html .. . .. . Read this http : stackoverflow.com questions 1634698 svn-externals-yes-or-no rq 1 discussion", "Why do you create externals to the source of the libraries", "Can t have multiple externals with the same target folder .", "Yes that is the known issue of subversion externals are not created unless depth infinity http : subversion.tigris.org issues show bug.cgi id 3311 .", "To make life easier I followed a colleague s advice and set up a new folder on SVN all and specified all of the other projects trunk folders as externals :", "I understand from other posts that the concept of externals is not explicitly supported in TFS but Bart Wullems posted something on his blog suggesting that it might be possible to simulate this behavior using Project Linker http : bartwullems.blogspot.com 2010 08 simulating-svn-externals-feature-in-tfs.html .", "I want to move away from externals sub-repos anyway so I thought I could flatten them out as part of a svnsync .", "There are lots of webpages out there suggesting hackish ways to make svn-externals look like git-submodules http : fredericiana.com 2010 01 12 using-svn-repositories-as-git-submodules .", "Now in principle we could create these externals but problems arise whenever we would try to merge .", "At some spots we re down to three layers of recursive externals and we already know that there will be more in the future .", "The problem is that the customer cannot have access to our internal repo that we use via externals in the shared repo .", "Lastly I haven t tried setting the externals property on Top-level Checkout partially because I think it will still tell me it can t create the directory but mostly because that is not a viable solution for this project .", "You may have to modify it a bit if your externals are in a different format .", "Is there something that would operate only on the properties specifically my externals settings", "Is the problem that you have to change the externals on the origin branches all the time", "Creating one branch and running the process to set up its externals .", "Copying from that branch to make branch 2 and then running the process to modify the externals .", "Using file externals is one options but there are too many files almost 25 .", "File externals was my initial idea and 25 files are not really that much .", "We use the externals approach at my current job and it isn t great .", "TortoiseSVN : externals definitions http : i.stack.imgur.com pnkEo.png .. . .. . When I check all out it dutifully pulls out all external projects .", "- shared subversion.advanstar.com veterinary branchtest shared https : subversion.advanstar.com veterinary branchtest shared dschmidt@dschmidt-Latitude-E6320 : home share Users dschmidt Projects pharma test externals cd trunk dschmidt@dschmidt-Latitude-E6320 : home share Users dschmidt Projects pharma test externals trunk svn-merge testexternals shared svn : E160013 : pharma svn bc 62 testexternals shared path not found", "This : .. . .. . Will allow me to save it but then when I try to update and get my externals it breaks with .. . .. . Can t make directory Top Level Checkout Project1 : The filename directory name or volume label syntax is incorrect .", "For tests and experimenting I used open repository Proving Ground for externals on Assembla https : www.assembla.com code subversion-troubleshoot-b subversion nodes which have PEG-ed revision in tags and not PEG-ed in trunk .", "All that code is worked on constantly and we like to let externals reference the trunk of the projects they refer to because automatic testing takes the edge off that and managing releases of all those recursive externals would require efforts we simply cannot afford .", "Imagine half a dozen externals in foo half of which have their own externals some recursing three or even more layers and you reach the point where project XXX is littered with branches created for projects it shouldn t even know about .", "How can I tell it to download the .dlls to the local folder that I m setting the externals to without it wanting to create a subfolder every time", "Following scenario : We are working on a project with a customer and have an shared SVN-Repository where our customer has access ." ] }
{ "confidence": [ 106.52149963378906, 103.93718719482422, 103.49083709716797, 102.87149047851562, 102.44837951660156, 98.60200500488281, 98.52564239501953, 97.70346069335938, 95.27244567871094, 95.18206024169922, 92.97168731689453, 92.78083038330078, 91.66555786132812, 90.69480895996094, 90.47940826416016, 89.962158203125, 88.15032958984375, 86.47844696044922, 84.96317291259766, 84.71760559082031 ], "content": [ "Question : I have a Subversion repository called repo . Inside of repo are trunk and branches directories . Within branches there are several dozen release branches e.g . 1.0 1.1 . These branches directories contain a relatively large application . I want to add an external at the root of repo called myExternal . When I define the external the only way to get SVN to create the myExternal directory is to run svn up from the root of repo . However this will also cause the entire contents of branches to be checked out which is unacceptable we have many developers that need to get myExternal added to their copy of repo and can t have all of them checking out gigabytes of unneeded branches . I ve tried svn up --set-depth immediates but that doesn t seem to get the externals . Is there any way to tell svn to fetch myExternal without fetching all of branches Using SVN 1.7 . .. . Answer : Yes that is the known issue of subversion externals are not created unless depth infinity http : subversion.tigris.org issues show bug.cgi id 3311 . I think there is no way as to redesign your directory structure so that myExternal is attached not to the repo but to its subfolders e.g . set on trunk and every folder in branches . Or you can create a script that at first fetches immediates of repo and then fetches externals set on repo which it may get by reading properties of repo : svn propget svn : externals .", "Question : I m using Mercurial to talk to a Subversion repository and the repository is currently using SVN externals to pull in another repository . hgsubversion works really well for communicating with the repository but it doesn t seem to work with SVN Externals . Is there a way to configure it to work with this EDIT : Partial Solution .. . .. . SVN Externals can be pulled down just fine . In your repository add a new file called .hgsvnexternals if Windows is complaining about not having a file name when you create it try running copy .hgignore .hgsvnexternals . It is finicky about whitespace and should contain text like the following sample : .. . .. . There s a space at the beginning of the line and between the name and the URL . If the spacing isn t right nothing works . After adding this to the file go back to the command-line and run : .. . .. . It should then fetch the external from Subversion . The new problem is that hg status will now show all of the new files with in front of them . Q : Do you hg add them to the repository or add the external files to .hgignore Trying either option leads to the same problem . I can t hg push my changes to the clone s master . Comment : What is SVN Extension I ve never heard of it.. . Comment : @michael sorry I had my terminology wrong : - Externals Comment : You might be interested in this question http : stackoverflow.com questions 2570289 making-mercurial-subrepositories-behave-like-subversion-externals Comment : ideally hg svn updateexternals would pull the externals in as hg sub repositories . .. . Answer : It works but only with standard layout that is trunk branches tags clones . We need to get some bugs fixed against standard layout before it ll work . Look for some new docs in the next few days or check the hgsubversion maillist archives http : groups.google.com group hgsubversion for the patch threads on externals .", "Question : null .. . Answer : I m in the process of converting a subversion based project to mercurial using the hgsubversion extension . The subversion repo has a directory with an svn : externals properties that references two files from another project . Hgsubversion can convert directory externals to sub-repos but apparently not file referencing externals . I want to move away from externals sub-repos anyway so I thought I could flatten them out as part of a svnsync . Since this is going to be a one-shot convert and I don t mind tweaking the subversion history I was thinking I could de-reference or un-externalize the files as part of the sync process . I need the resultant mirror to contain the external files without the property svn : external on the directory containing the files . I m thinking this could be done as a commit hook . But I can t figure how to change the commit in progress just how to abort it . This question : SVN post-commit hook to modify externals http : stackoverflow.com questions 15392176 svn-post-commit-hook-to-modify-externals kinda gets there but the answer is mostly advice to move away from externals I m already convinced . Of course if I ve made too many assumptions about the best way to migrate from svn to hg please feel free to make alternative suggestions . Comment : Why not remove the file externals completely keeping the files themselves so you d have to svn add them svn commit and then do the conversion Comment : @SameerSingh I want to remove them . I want to remove the svn : externals from history but keep the files that they reference . I ll edit my question . Comment : Well you could do a dump-and-reload of the repo filtering out the revisions that added the externals add the files the externals would have brought in and commit then do the conversion . An example can be found here http : stackoverflow.com questions 11679926 how-to-use-svndumpfilter-to-exclude-a-certain-revision . Comment : @SameerSingh That sounds workable assuming the revision that added the externals didn t do anything else or if it did I replicate that in the newly inserted commit . Basically it sounds like this is a pretty manual process . Thank you for the insight .", "Question : I have a branch A with externals .. . .. . I need to copy the content without the externals to a tag B . How to proceed I tried .. . .. . It did not work . Please note that A and B are complete https paths . Comment : In what way didn t it work Did the command not run or did it copy but with the externals Comment : It copied with externals . Comment : Does it work properly if you put the command option before the file path arguments i.e . svn cp --ignore-externals A B .. . Answer : You are misunderstanding what --ignore-externals is for on the copy subcommand . This flag only affects working-copy operations . When you copy one working-copy path to another it prevents svn from processing all the svn : externals properties on copied items to check out their targets . It does not prevent svn from copying the properties themselves those get copied along with the folders they have been set on . Removing those properties would be a change to the copied objects and svn does not change objects while it copies them . You will either need to check out your tag remove the externals and commit or do the copy within your working copy and edit to remove the externals prior to commit .", "Question : I have the following local folder structure : .. . .. . For which I want to add a svn : externals property to the Project1 for some .dll files that live in my repository . I use TortoiseSVN to set the property if it matters I don t think it does . I m attempting to add the svn : externals definition on the Project1 folder so that my .dll files are downloaded to that folder forming the following structure .. . .. . But the externals property refuses to let me specify that I want to download them to the folder I am currently setting the externals property on . For example if my property looks like this : .. . .. . It will create SomeFolder under Project1 and put the .dlls there . If I do this .. . .. . It complains it s invalid . This : .. . .. . Will allow me to save it but then when I try to update and get my externals it breaks with .. . .. . Can t make directory Top Level Checkout Project1 : The filename directory name or volume label syntax is incorrect . How can I tell it to download the .dlls to the local folder that I m setting the externals to without it wanting to create a subfolder every time Lastly I haven t tried setting the externals property on Top-level Checkout partially because I think it will still tell me it can t create the directory but mostly because that is not a viable solution for this project . Anyone know how to do this Comment : If you don t want to tinker with advanced features of NTFS and want to use only what SVN has to offer then you must either bring the complete directory which you say you don t want or each file separately as per Ben s answer . .. . Answer : I forgot to add comments and stuff to this question . I read some in depth stuff on the svn : externals documentation and found that it must create a sub-folder . That s ridiculous limitation to have IMO but it is what it is . I ended up putting the external on the top-level folder in this case . It hasn t broken anything to my knowledge but I also haven t worked on that particular project in a while now . The other devs haven t complained . Also I m leaving this question unanswered because there is no solution to the problem yet . Comment : That s outdated information then . You can do externals file-by-file using file externals . Directory externals must create a subdirectory because a directory external basically creates a brand new independent working copy . This is also similar to how Subrepositories work in systems like Mercurial and Git . Comment : I didn t want to specify each file separately . That would require me to make a change to the external every time a new file is added . Comment : You should be doing that anyway unless you are ignoring the strong advice from the SVN documentation telling you to use explicit revision numbers in your externals .", "Question : null .. . Answer : In my SVN repo I have the following structure : .. . .. . And I want to include the shared folder as an external within the project folder so I have : .. . .. . So I defined an external property on the project folder like this : .. . .. . I commit the change and update the project working copy and the code is checked out including the shared folder . However my SVN client Versions for Mac marks the folder myRepo project shared as Unversioned not as an external . Yet the externals property seems to be set correctly when I do svn propget svn : externals project .. . .. . What am I doing wrong", "Question : I have two repositories A and B with LaTeX files projects . Repository A contains a bibliography file mybib.bib and I would like to use this file in repository project B as well . I created a symbolic link in repository B to mybib.bib but if my colleague checks out B the file is not found . How can I teach svn to follow the symbolic link the file mybib.bib in repository A As far as I could figure out one could use SVN externals but the commands I tried failed so far e.g . svn-propset svn : externals path to mybib.bib https : host of repos A . leads to svn : E195005 : Invalid svn : externals property on path to repos B : target path to mybib.bib is an absolute path or involves . . .. . .. . Also does a solution if it exists work if the file mybib.bib would not be under version-control in some repository already or would this require a totally different approach Related topics are .. . but neither addresses the problem for non-experienced SVN external users : SVN external file workaround http : stackoverflow.com questions 5134566 svn-external-file-workaround Can we set a single file as external in Subversion http : stackoverflow.com questions 1355956 can-we-set-a-single-file-as-external-in-subversion How do I properly remove an svn : externals and replace it with a local non-external copy of the same directory http : stackoverflow.com questions 1044649 how-do-i-properly-remove-an-svnexternals-and-replace-it-with-a-local-non-exter .. . Answer : 1 . non-experienced SVN users must read SVN Book before or better - instead asking questions .. . 2 . You can t use file-externals with cross-repository definition : only files in the same repository can be used .. . 3 . Second answer in first linked question http : stackoverflow.com a 5134729 960558 contain clear answer on your question .. . 4 . Reading SVN Book http : svnbook.red-bean.com nightly en svn.advanced.externals.html will help you to write correct svn : externals definition : now it s inversed in REMOTE LOCALPATH Comment : answers should be with more patience.. .", "Question : We have a couple of Zend Framework applications that we d like to keep in separate subversion repositories . However these applications share the same database abstraction-layer and several of the same common components . We d like to share the common bits between the apps somehow . The current idea we have looks like .. . .. . Now we d like the itg-app repository to have an externals reference to the itg-common repository . The problem is we want e.g . itg-app trunk common to be linked to itg-common trunk itg-app branches foo common to be linked to itg-common branches foo etc . That is the general pattern is itg-app BRANCH common - itg-common BRANCH . Now in principle we could create these externals but problems arise whenever we would try to merge . E.g . merging from trunk to branches production would overwrite the svn : externals property to make branches production common to point to itg-common trunk . Does this make sense If it does is there some way around this problem If it does not why not and what should we do instead .. . Answer : Does this make sense If it does is there some way around this problem If it does not why not and what should we do instead As prodigitalson said http : stackoverflow.com questions 7911270 how-does-one-setup-correlated-subversion-externals-should-one 7911304 7911304 already an external in SVN basically is considered a totally different piece of software with its own release cycles branches tags etc . According to this model you should not have unpinned externals into some trunk at all but have them all pinned to either a tag or a revision . That s a pretty restricted model of using code from external sources but that s what SVN supports . Stray from this and you are on your own . See below for my personal war story about that . Another thing I would reconsider if I was you is referring to a different repository . IME referring to an external relatively to the current project or repository root is much better than using absolute paths . Just consider the possibility that you might ever change the protocol from svn : to say https : . I have seen this happening to a company and despite heavily relying on scripting to change all the externals this transition was a mess everyone involved keeps having nightmares about . Relative paths to externals simply are more robust but they are only available within a single repository . .. . .. . The company I am working for has just faced a similar problem . We have a lot of code that is shared between different products . This is done via externals and those externally referenced projects have externals themselves . At some spots we re down to three layers of recursive externals and we already know that there will be more in the future . All that code is worked on constantly and we like to let externals reference the trunk of the projects they refer to because automatic testing takes the edge off that and managing releases of all those recursive externals would require efforts we simply cannot afford . But branching a project in this setting is a real pain in the erm neck because it s not enough to pin a project s externals when those themselves then refer to unpinned externals . Whenever you need to branch project foo to foo which via an external refers to project X which in turn via an external refers to project XX you would need an foo branch of XX which is an external in an foo branch of X which is an external of foo itself . Imagine half a dozen externals in foo half of which have their own externals some recursing three or even more layers and you reach the point where project XXX is littered with branches created for projects it shouldn t even know about . Our solution is to recursively either A replace all externals with a branch of what they referred to or B setup a branch of external X in foo branches externals foo X that s referenced by project branches foo with foo branches externals foo X itself referring to foo branches externals foo XX . However setting this up when creating foo is impossibly complex and offers more than enough chances for making silly mistakes so we employ scripting to recursively descent the project and its externals and do all that .", "Question : I m using VisualSVNServer . I ve a svn repo say : test1 with externals say : test2 . Everything fine so far when I checkout test1 test2 is automatically checked out to and placed inside my working copy of test1 . Good . But when looking into test1 using the web-frontend of VisualSVNServer I see no hint that there is an external linked to that repo . Is that the correct behaviour Is there a way to see the externals - or at least hints that there are externals - in the web-frontend Cheers and thanks Wolfgang .. . Answer : The web interface of VisualSVN Server 3.5 does not display external items added via svn : externals . However this feature may be added in future server updates .", "Question : I have a Subversion repository called repo . Inside of repo are trunk and branches directories . Within branches there are several dozen release branches e.g . 1.0 1.1 . These branches directories contain a relatively large application . I want to add an external at the root of repo called myExternal . When I define the external the only way to get SVN to create the myExternal directory is to run svn up from the root of repo . However this will also cause the entire contents of branches to be checked out which is unacceptable we have many developers that need to get myExternal added to their copy of repo and can t have all of them checking out gigabytes of unneeded branches . I ve tried svn up --set-depth immediates but that doesn t seem to get the externals . Is there any way to tell svn to fetch myExternal without fetching all of branches Using SVN 1.7 . .. . Answer : Externals are just svn checkouts so you can check them out manually . You could also use a command like this . You may have to modify it a bit if your externals are in a different format . Comment : svn propget svn : externals xargs -L1 svn co in my case worked Comment : svn propget svn : externals sed -e s . sed -e s g xargs -L1 svn co - worked for me Comment : I should have clarified that we already were simply checking out manually . My intention was to see if there was a native way to do this with the initial checkout", "Question : In order to do a build I checkout a svn repository which has multiple folders.One of folders has properties - svn-externals pointing to a particular tag number I need to edit the svn-externals to point to a different tag number . I want to pass this new tag number as a parameter . How can I achieve this using powershell . .. . Answer : Note the trailing dot . You can read a bit more about Externals Definitions here http : svnbook.red-bean.com en 1.7 svn.advanced.externals.html . Comment : I have idea about how to set svn-externals . What I am trying to do is how to edit using powershell . Out of all the checked out folders only one has svn-externals in it . I need to reach that one particular folder and edit svn-externals . How can I achieve this using powershell . I have idea about the svn commands Comment : I need to reach that one particular folder and edit svn-externals . How can I achieve this using powershell . - If you execute this command in PowerShell you will edit externals property of desired folder . This command is sufficient for your task . Comment : Thank you so much for your reply . My folder structure is : OuterFolder has two svn-externals 1 . FolderA pointing to repositoryA tags 1.0 2 . FolderB pointing to repositoryB tags 2.0 I want them to change to 1 . FolderA pointing to repositoryA tags 1.1 2 . FolderB pointing to repositoryB tags 2.1 I tried like below.. . but they are not updated . svn-propset svn : externals OuterFolder FolderA https : repositoryA tags 1.1 . svn-propset svn : externals OuterFolder FolderB https : repositoryB tags 2.1 . Am I doing right Comment : but they are not updated . - svn : externals property is not updated After executing your commands what do you get when execute : svn propget svn : externals", "Question : I have a website that I need to deploy to about 30 customers . They are all the same apart from the branding . Using SVN I would like to have one base version of the product and then just the different branded content images CSS for each customer . That way when I maintain the base product I don t have to replicate that change for each customer . Deployment would just be a case of updating and releasing . Sounds simple but I am having problems achieving this in SVN . I have been looking into SVN externals using a structure as follows : .. . .. . Main .. . Base .. . . . Images .. . Customer 1 .. . .. . Base .. . Custom .. . Images .. . Customer 2 .. . .. . Base .. . Custom .. . Images .. . .. . and then using externals pointing the Customer Base folders to the main base folder . That works but I then need to overwrite for example the images in the Customer 1 Base Images folder with the customer specific ones and when I set up the externals for that it complains Customer 1 Base Images is not a working copy root . It does appear to have overwritten the image with the customer one though . Maybe externals are not the answer . Comment : Real tree of your repository and output of svn pl -v will be better for understanding your troubles Comment : Branding in your case is adding or replacement of core resources .. . Answer : In your case the interface is clearly separeted from the functionality . A possibility is the following if I well understood your problem : .. . .. . Manage your application in a dedicated SVN repository as usual with your trunk branches and tags . And manage your design versions in another repository with for example the following structure : .. . .. . With this separation it s easy to you to manage the version number of your main application . And you have a small repository for each customer with possibility to easily copy a design version to start another one by svn copy .", "Question : Could someone share some info or reference links which sheds some in-depth information on how SVN handles external folders files . I did get some links from SO and some other sites but none of them explain it in detail . I am developing a generic API that need to support most of the available CM tools SVN PTC Integrity TFS etc . Regards Joe . Comment : Are you sure that you ask about externals definitions svn : externals which are in-depth described in the SVNBook svnbook.red-bean.com en 1.8 svn.advanced.externals.html http : svnbook.red-bean.com en 1.8 svn.advanced.externals.html Comment : As far as I know there s no such thing as shared file or folder in SVN so to me this question makes no sense . Comment : @Dialecticus I guess he s asking about externals definitions but in such case these 3 questions are invalid . Comment : Or it is just that in SVN every file and folder in the repository can be considered shared as it is called by Joe . Comment : @Robert reading manual is still the best way to get proper answer to the question IMHO . .. . Answer : Must read the documentation . svn : externals is just a property of the folder and other property for instance is svn : ignore . These two have special meaning for SVN but there are other as well with prefix different from svn : .. . .. . Downside to a SVN external is that if it belongs-to a different repository then it is not possible to commit changes in both root working copy and external s WC in a single action . If external actually belongs-to the same repository as the root WC then TortoiseSVN does some magic to actually make it possible to commit them in single action . svn : externals property can pin the revision of the working copy but this feature is usually only used for tagging http : svnbook.red-bean.com en 1.7 svn.branchmerge.tags.html folders .", "Question : I have the following local folder structure : .. . .. . For which I want to add a svn : externals property to the Project1 for some .dll files that live in my repository . I use TortoiseSVN to set the property if it matters I don t think it does . I m attempting to add the svn : externals definition on the Project1 folder so that my .dll files are downloaded to that folder forming the following structure .. . .. . But the externals property refuses to let me specify that I want to download them to the folder I am currently setting the externals property on . For example if my property looks like this : .. . .. . It will create SomeFolder under Project1 and put the .dlls there . If I do this .. . .. . It complains it s invalid . This : .. . .. . Will allow me to save it but then when I try to update and get my externals it breaks with .. . .. . Can t make directory Top Level Checkout Project1 : The filename directory name or volume label syntax is incorrect . How can I tell it to download the .dlls to the local folder that I m setting the externals to without it wanting to create a subfolder every time Lastly I haven t tried setting the externals property on Top-level Checkout partially because I think it will still tell me it can t create the directory but mostly because that is not a viable solution for this project . Anyone know how to do this Comment : If you don t want to tinker with advanced features of NTFS and want to use only what SVN has to offer then you must either bring the complete directory which you say you don t want or each file separately as per Ben s answer . .. . Answer : IF these DLL files reside in the same repository you can specify the full name of each file rather than a directory in which to place them . This is called a file external . So your rule would look like :", "Question : I have tried to find some information to my problem but no luck . So hoping you can help me . Following scenario : We are working on a project with a customer and have an shared SVN-Repository where our customer has access . Additionally we have an internal repository where some common code is . We are using some of the internal files and put them in the shared repo by an svn-external . This works at our site where we have access to both repos but not at our customer that receives an error because he can not access our internal repo . How would you take care of this Is there a way to have a server-side external Or can I somehow copy the files to the shared repo Thanks in advance Joerg .. . Answer : seem like you need Vendor branch http : svnbook.red-bean.com en 1.1 ch07s05.html .. . .. . Read this http : stackoverflow.com questions 1634698 svn-externals-yes-or-no rq 1 discussion Comment : Hi the situation described with vendor branches is not exactly our situation because all of the repos are ours . So we have them under our control . The problem is that the customer cannot have access to our internal repo that we use via externals in the shared repo .", "Question : null .. . Answer : I have a folder in my subversion repository that point to an external resource . Updating the folder works fine but when I try to merge the folder into another folder I get the following error : svn : E160013 : pharma svn bc 29 branchtest shared path not found Any ideas would be appreciated . Comment : Please show external definition and full merge command Comment : dschmidt@dschmidt-Latitude-E6320 : home share Users dschmidt Projects pharma test externals svn propget svn : externals -R . - shared subversion.advanstar.com veterinary branchtest shared https : subversion.advanstar.com veterinary branchtest shared dschmidt@dschmidt-Latitude-E6320 : home share Users dschmidt Projects pharma test externals cd trunk dschmidt@dschmidt-Latitude-E6320 : home share Users dschmidt Projects pharma test externals trunk svn-merge testexternals shared svn : E160013 : pharma svn bc 62 testexternals shared path not found", "Question : I want to migrate from VSS to SVN and the reason of my question lies behind the logic which these 2 systems use . My enterprise project has single-source but few files from UI jsp pages etc . are different . So as in VSS we have branched them and after getting the general the CompanyA s webresources are replaced with the general equivalence of these resources . So as i know in SVN the solution is resolved with externals . But I have a problem . Consider my project structure is like this : .. . .. . sources - which are common .. . webresources - general Webresources .. . - webresources services service1 jsp service1View.jsp .. . - webresources services service2 jsp service2Content.jsp .. . .. . .. . webresources.CompanyA - this directory has only specific branches for companyA .. . - webresources services service1 jsp service1View.jsp .. . webresources.CompanyB- this directory has only specific branches for companyB .. . - webresources services service2 jsp service2Content.jsp .. . .. . .. . Can I have external which point to a single file from company s specific directory and gets the other content of that directory from the general directory Or in SVN when it points the same path the external content replaces the local checked out folder Comment : skip svn and move straight to git much better . .. . Answer : The answer partially depends on the version of Subversion that you re using . Older versions could only do externals at the folder level but newer versions are capable of doing externals at the file level . Even if you are using the latest version I recommend doing your externals at the folder level anyway . You ll typically end up with a lot less maintenance work than if you have to update your externals metadata any time you add remove rename a file . In your specific case you could store all of the company-specific files in a folder named something like webresources services service1 jsp client and have Subversion populate that directory using svn : externals .", "Question : I m using bzr to access a Subversion repository . Which is great but the repository uses quite a few svn : externals properties to bring in code from related projects . Bzr-svn doesn t support svn : externals http : bazaar-vcs.org BzrForeignBranches Subversion limitations yet . Is there a good way to work around this limitation .. . Answer : Today another option is available : bzr-externals plugin https : launchpad.net bzr-externals . Check it Comment : bzr-externals won t look at the actual svn : externals file properties though will it Comment : @jelmer No I don t think it does and quickly scanning it s launchpad page it doesn t mention svn other than saying it s like svn-extenals . Comment : @jelmer no it works at bzr commands level .", "Question : Could someone share some info or reference links which sheds some in-depth information on how SVN handles external folders files . I did get some links from SO and some other sites but none of them explain it in detail . I am developing a generic API that need to support most of the available CM tools SVN PTC Integrity TFS etc . Regards Joe . Comment : Are you sure that you ask about externals definitions svn : externals which are in-depth described in the SVNBook svnbook.red-bean.com en 1.8 svn.advanced.externals.html http : svnbook.red-bean.com en 1.8 svn.advanced.externals.html Comment : As far as I know there s no such thing as shared file or folder in SVN so to me this question makes no sense . Comment : @Dialecticus I guess he s asking about externals definitions but in such case these 3 questions are invalid . Comment : Or it is just that in SVN every file and folder in the repository can be considered shared as it is called by Joe . Comment : @Robert reading manual is still the best way to get proper answer to the question IMHO . .. . Answer : As Dialecticus already commented there is no such thing as a shared folder or a shared file in Subversion . You can bring something else in your working copy using svn : externals but that doesn t really make it shared . If you are wrapping your own api around it you could just as well use multiple working copies in a single tree.. . As that is really all what an external adds you : making it easy to checkout and update from multiple locations .", "Question : I am currently trying to create a pre-commit hook that prevent user to tag a version of code with external that are not tags . I am just trying to figure out a way to get the external that are specify in a transaction but cant figure out how . The command svnlook dont seem to be able to return anything that remotely look like externals modification . And with the svn command it seem to be the transaction that I am unable to specify . I have no idea what command to use in my pre-commit hook . I am currently in windows but making a python script to be able to test this on our linux server . What I tested so far is the following : .. . .. . In my repository C : TestReposLocal I have one external that is the trunk of another repository . This repository is displayed with the svn propget command but I need to know with the current transaction in a pre-commit if this external is something else than a Tag . Any help would be gladly receive . Tnx Comment : The real solution to your problem starts with getting rid of svn : exterals for the reasons you re encountering and more Comment : That would be difficult . We are a compagny and we each sector have a repository to put our stuff in them . We each have a version of our repository and are modified frequently . And our SDK is a melting pot of every part the compagny is working on . When we release a tag we tag every external and release a version containing only tags . Which is why I need to have a pre-commit that validate that external are tags . Comment : @thekbb - don t fix the things which are not broken And don t dictate policy for company which you don t own Comment : I m not dictating policy - just making the observation that svn : externals are very very rarely used in a way that makes things easier . Without knowing more it s hard to recommend an alternative.. . However the OP did mention an SDK it seems odd that the source of an SDK would be needed . .. . Answer : Well I can t see really your trouble-point here .. . .. . Any almost any operation in pre-commit hook with transaction and local repo can be performed with svnlook .. . svnlook have subcommand propget with can operate on transaction level and extract any property from any path inside repo transaction in this case and you must already know there you can meet externals inside repo-tree .. . you can identify correct needed format of externals from any previous revision inside repo .. . .. . Edit .. . .. . OK I see : additional details is needed here . For tests and experimenting I used open repository Proving Ground for externals on Assembla https : www.assembla.com code subversion-troubleshoot-b subversion nodes which have PEG-ed revision in tags and not PEG-ed in trunk . In order to use svnlook locally I just svnrdump ed it into local repository . Nearest equivalent to getting property from transaction is getting it from committed revision . Tag 1.0.1 was created with r7 .. . .. . where : .. . .. . 1 . rep is relative-path to repository on local filesystem .. . 2 . tags 1.0.1 is path inside repository for which I previously know that it should have definition .. . 3 . -r 7 is revision which I want to test .. . .. . Tag was created from trunk in which external is not binded to specific revision .. . .. . You ll have to see difference in specification now .. . .. . WARNING : format of externals-definition will be different in case of using ancient pre 1.4 SVN-clients and can be slightly different can t recall exact details in case of using CLI-version of SVN or SVN-integration from IDE definitions above I created with TortoiseSVN but it will be your part of job .. . .. . I order to apply business logic of hook only when it needed for commits in tags only and finish commits faster you have also check in hook at early stages additional condition - is this commit tag-related or not . It s again svnlook and dirs-changed subcommand .. . .. . dirs-changed for commit into tags .. . .. . dirs-changed for commit into other location .. . .. . you can grep tags in good OS do some tricks in Windows operate according to results .. . .. . PS : Don t forget replace -r with -t on production and store transaction-id+repo-path which you ll get as parameters for hook Comment : My problem is that I cant seem to figure out how to write the command-line properly for a transaction . In my above example I wrote : svnlook propget C : TestReposLocal svn : externals I was missing trunk at the end . This is to be able to validate a already existing path in the repository . What I am trying to do is to be able to see which externals are being commit in a transaction I guess the line should look like svnlook propget C : TestReposLocal svn : externals -t 12-2c or whatever the transaction number is . But this does not work . It always say property name missing ." ] }
[ "yes-answer-long", "yes-answer-short" ]
svn
UNK_RELATION
jackcess@ms-access@77
jackcess -- jackcess is a pure java library for reading from and writing to @placeholder databases .
{ "confidence": [ 52.51251220703125, 49.63405227661133, 48.52002716064453, 47.595603942871094, 45.457210540771484, 44.79011917114258, 44.79011917114258, 44.26288604736328, 43.99563980102539, 43.11086654663086, 43.052703857421875, 41.62456130981445, 41.35348129272461, 41.35348129272461, 41.35348129272461, 40.63862991333008, 40.233802795410156, 39.26429748535156, 38.99330520629883, 38.99330520629883, 38.99330520629883, 38.99330520629883, 38.99330520629883, 38.99330520629883, 38.75017547607422, 38.62086868286133, 38.51068878173828, 38.189414978027344, 37.87928009033203, 37.87928009033203, 37.87928009033203, 37.87928009033203, 37.87928009033203, 37.87928009033203, 37.857872009277344, 37.475563049316406, 37.475563049316406, 37.475563049316406, 37.475563049316406, 37.475563049316406, 35.79631042480469, 35.79631042480469, 35.79631042480469, 35.79631042480469, 35.79631042480469, 35.79631042480469, 35.79631042480469, 35.600730895996094, 35.257659912109375, 34.682281494140625, 34.682281494140625, 34.682281494140625, 34.682281494140625, 34.682281494140625, 34.682281494140625, 34.682281494140625, 34.682281494140625, 34.682281494140625, 34.37639617919922, 34.10521697998047, 34.10521697998047, 34.02782440185547, 33.997798919677734, 33.921478271484375, 33.831512451171875, 33.34709167480469, 33.34709167480469, 33.34709167480469, 33.169227600097656, 33.169227600097656, 33.15656280517578, 33.04404067993164, 32.991188049316406, 32.82615661621094, 32.82615661621094, 32.80744934082031, 32.80744934082031, 32.606666564941406, 32.15225601196289, 31.780853271484375, 31.775676727294922, 31.731639862060547, 31.6560001373291, 31.489974975585938, 31.489974975585938, 31.489974975585938, 31.489974975585938, 31.489974975585938, 31.489974975585938, 31.489974975585938, 31.489974975585938, 31.489974975585938, 31.489974975585938, 31.489974975585938, 31.489974975585938, 31.489974975585938, 31.489974975585938, 31.489974975585938, 31.472261428833008, 31.225582122802734 ], "content": [ "According to the Jackcess FAQ http : jackcess.sourceforge.net faq.html jdbc the Jackcess driver doesn t support JDBC : .. . .. . Does Jackcess provide a JDBC driver for Microsoft Access databases", "There is this Java library called Jackcess http : jackcess.sourceforge.net .", "The only Java library I found online is Jackcess .", "It uses Jackcess to do the actual reading and writing of the Access database file but UCanAccess is a pure Java JDBC driver so you can use SQL instead of having to write directly to the Jackcess API .", "And the winner is.. . Jackcess", "is this Jackcess responsibility or Ucanaccess", "What s the ucanaccess jackcess version", "I m currently working on a Java application with the purpuose of reading a Microsoft Access file using Jackcess open-source library .", "How delete-row from table with help jackcess", "You can t do that with Jackcess .", "There is currently no implementation of the JDBC API included with the Jackcess library .", "Just to be sure I will try replacing the jackcess version that came with ucanaccess with the jackcess that comes from their own site .", "I am using jackcess-2.1.1 .", "Jackcess 1.2.6 is a very old version .", "You can t delete rows with Jackcess .", "I need to work with an MS Access file in Java using Jackcess .", "The following works on any platform with Java and Jackcess http : jackcess.sourceforge.net .. . .. . .. . ..and the following code works in Java on Windows without Jackcess but requires the Access Database Engine .. .", "I was advised to get Jackcess and I have included it in my library .", "15.2 secondes for ODBC and 6.1 secondes for Jackcess .", "I m using Jackcess to help with database connectivity .", "I am using the Jackcess API with an Access database .", "- Actually you can delete rows using Jackcess .", "Jackcess does not return all values as strings .", "It seems the Jackcess encrypt is not able to open the file supplied .", "There have been a few attempts to use Jackcess to build JDBC drivers for Access databases but most of the projects have not progressed very far before becoming inactive .", "I m using jackcess-2.1.2.jar jackcess-encrypt-2.1.0 and bcprov-jdk15on-152.jar from bouncycastle.org .. . .. . As UCanAccess uses Jackcess internally I m getting the same error with all my other attempts .", "From the Jackcess forum thread https : sourceforge.net p jackcess discussion 456474 thread 7e1cb80a the solution is to wrap the call to setMaxLength method :", "Jackcess normally expects to work with strongly-typed Java objects .", "No need for a jackcess opener for a specific character set .", "The jackcess is 2.0.4 which is the most recent version .", "The underlying issue will be fixed in the next release of Jackcess 2.0.9 .", "If Jackcess is a dependency of UCanAccess why does it needs password", "Or why does Jackcess doesn t require password too", "If the file is not encrypted then Jackcess does not require a password to open it .", "possible duplicate of Jackcess DatabaseBuilder.open fails http : stackoverflow.com questions 29844258 jackcess-databasebuilder-open-fails", "at this point in time jackcess does not support creating foreign key indexes .", "I have a Jackcess table and everything is working just fine .", "BUT I can t find anything on how to change a column name in the Jackcess table .", "a column is named RELATION but when Jackcess converts it the name is changed to xRelation .", "Jackcess cannot alter the structure of the table after it has been created .", "Related : Bug report http : sourceforge.net p jackcess bugs 109 .", "I am using Jackcess API in my Eclipse plugin project .", "I added jackcess-2.1.0.jar file under resources lib .", "I am working with Jackcess to read and categorize an access database .", "is telling you that Jackcess thinks the file you are trying to open contains no bytes .", "However that would not affect the order in which the rows are exported by Jackcess anyway .", "I am creating an MS Access database with B4A was : basic4android and Jackcess .", "Ucanaccess does the conversion from the constraints that it has just read with jackcess and the constraints on hsqldb .", "Making this support separate from the main Jackcess library allows users to avoid including unnecessary libraries .", "Jackcess can also manipulate an .accdb file created by Access 2013 .", "Verify that you are using Jackcess version 2.1.3 with your project .", "Note that jackcess-2.1.3.jar is available in the lib folder of the UCanAccess distribution .", "Note that jackcess-2.1.3.jar is available in the lib folder of the UCanAccess distribution .", "Jackcess will need to be able to open the database file so .. . .. . 1 .", "Therefore Jackcess itself has no way of managing multiple concurrent users .", "Ref : here http : sourceforge.net p jackcess bugs 116 .", "The Jackcess API is a direct implementation of the features available for interacting with an Access database .", "For the folks that are using the new version of Jackcess v : 2.1.2 here is the answer : .. . .. . Thanks", "In Jackcess the column types are represented by a Java enum named DataType . Any help is greatly appreciated .", "When using exportWriter with a Cursor http : jackcess.sourceforge.net apidocs com healthmarketscience jackcess util ExportUtil.html exportWriter com.healthmarketscience.jackcess.Cursor 20java.io.BufferedWriter 20boolean 20java.lang.String 20char 20com.healthmarketscience.jackcess.util.ExportFilter Jackcess will export the rows in the order defined by the Cursor .", "Jackcess only supports indexes on Text fields in an Access database when the database is using the General sort order ref : here http : sourceforge.net p jackcess bugs 86 .", "I ve spent the last two days reading up and learning about Jackcess and UcanAccess libraries .", "If you really wanted to avoid coding the database password into a UCanAccess application then you could always .. . .. . open the database file with Jackcess first .. . use Jackcess calls to retrieve the database password .. . close the Jackcess connection to the database and then .. . supply the database password when opening the UCanAccess connection to the database .", "And Jackcess does not do silly things like removing leading zeros from text fields that look like numbers .", "I need to create a table using jackcess library which consist of foreign key reference column and primary-key column with auto-increment", "I am using jackcess for the conncetivity to my access database .", "link on files http : sourceforge.net projects jackcess files page .", "I am using the Jackcess API to copy my database to into a file .", "In the jackcess cookbook http : jackcess.sourceforge.net cookbook.html I found one example to create-table but it is not covering the above cases .", "The reason I want to change the column name is that I have a ResultSet which is converted to Microsoft Access using Jackcess .", "I was able to remove the older jackcess from the class path by creating a new JRE System Library but it still gives the same error .", "Simply put I am unfamiliar with the API for Jackcess - I have tried searching to see if there is a method that would do this but have failed .", "Note that when applying a database password to a newer-format .accdb database the file really is encrypted so both Jackcess and UCanAccess require the correct password along with the additional component Jackcess Encrypt plus dependencies to open it .", "So I used the ImportUtil in the Jackcess library to directly export the ResultSet to my Access database .", "On Jackcess Homepage there is only this Information with the link-to Bouncy Castle : The encryption support requires an additional library Bouncy Castle .", "Yes you don t have to replace the correct jackcess jar 2.0.4 but remove the wrong one from your classpath .", "In fact Jackcess provides a way to retrieve the database password from an unencrypted but password protected .mdb file .", "To use Jackcess you must have at least the following items in the build path for your Java project or on your CLASSPATH : .. . .. . the Jackcess JAR file itself and .. . .. . the JAR files for its two mandatory compile-time dependencies http : jackcess.sourceforge.net dependencies.html from Apache : commons-lang and commons-logging .", "Jackcess cookbook http : jackcess.sourceforge.net cookbook.html tells me the first step to using this library is this : .. . .. . or as @Gord suggests .. . .. . but I m stuck at this very first step .", "Please execute this using jackcess : .. . .. . This may help to understand and solve .", "I am trying to write a simple Java program to extract the tables and columns from Access databases .", "Using the Jackcess cookbook I ve got the following : .. . .. . However when I try to run it I get the following output with stacktrace : .. . .. . I ve tried googling but haven t found anyone else having the same problem with Jackcess what am I doing wrong", "Here s how I got Jackcess working starting with a fresh install of NetBeans 7.4 on Windows 8 : .. . .. . I downloaded the latest Jackcess JAR file via the Looking for the latest version", "Transfer bad.accdb to the good machine and have that copy of your Jackcess app try to open bad.accdb .", "Is there a particular reason why you are not using the current version http : sourceforge.net projects jackcess files latest download source files", "You really should use a current 2.x version of Jackcess if at all possible .", "So the code .. . .. . will cause Jackcess to throw .. . .. . java.io.IOException : Empty database file .. . .. . when it tries to do DatabaseBuilder.open dbFile .", "Jackcess provides very limited functionality for querying the data so your best option is to go through the table with an iterator or streams .", "Ref : here http : jackcess.sourceforge.net apidocs com healthmarketscience jackcess Table.html deleteRow com.healthmarketscience.jackcess.Row", "You can easily see if Jackcess really is returning a string by printing row.get CURRENTGAC .getClass .getName and seeing if it says java.lang.String .", "Additional information re : your sample file .. . .. . Jackcess is returning CURRENTGAC as String because it is a Text field in the table : .. . .. .", "So is there a way with Jackcess to output my alphanumberic fields with the around every field or should I consider something else", "I just read in the documentation that Jackcess supports the text datatype but does the export keep the datatype in .csv format", "I m not aware of a way to force Jackcess to enclose all text fields in double quotes when exporting .", "How can I update the Access field with a Double value using B4A and Jackcess", "One of the elements record value I presume contains the string null and Jackcess won t accept that as a Double value .", "so the problem is opening the database with MS Access - it kind of lock it read-only that s what the Jackcess says", "I didn t create DSN I use jackcess directly with the directory of the .accdb file : String dbFileSpec src database.accdb", "I need to read Data from an encrypted Access 97 Database and tried out Jackcess and UCanAccess .", "I work with an MS-Access table in Java using Jackcess : .. . .. . Is there a way to get the table sorted ordered by one or more column s" ] }
{ "confidence": [ 65.89781188964844, 58.62480163574219, 54.72219467163086, 51.84852600097656, 51.84282302856445, 51.0059814453125, 50.95686340332031, 50.35209274291992, 49.83256530761719, 49.79628372192383, 49.69110107421875, 49.22179412841797, 48.58086013793945, 48.099395751953125, 47.83705139160156, 47.259368896484375, 47.256263732910156, 46.93122863769531, 46.53282928466797, 46.29539108276367 ], "content": [ "Question : After taking the advise from the helpful users here I have made some changes to my code . What am I missing to get this driver to load I was advised to get Jackcess and I have included it in my library . and I am using java-8 I am not getting past .. . .. . before it throws a bunch of exceptions . These are the exception errors I am getting : Comment : Have you tried using UCanAccess ucanaccess.sourceforge.net site.html http : ucanaccess.sourceforge.net site.html stackoverflow.com questions 21955256 http : stackoverflow.com questions 21955256 manipulating-an-access-database-from-java-without-odbc .. . Answer : You re trying to access a DB using JDBC . According to the Jackcess FAQ http : jackcess.sourceforge.net faq.html jdbc the Jackcess driver doesn t support JDBC : .. . .. . Does Jackcess provide a JDBC driver for Microsoft Access databases .. . .. . Unfortunately no . The Jackcess API is a direct implementation of the features available for interacting with an Access database . There is currently no implementation of the JDBC API included with the Jackcess library . While this library would be a great foundation for a JDBC driver implementing the JDBC API is currently outside the scope of this project . There have been a few attempts to use Jackcess to build JDBC drivers for Access databases but most of the projects have not progressed very far before becoming inactive . The UCanAccess project http : ucanaccess.sourceforge.net site.html however is a currently active open-source project which provides a JDBC driver built on top of Jackcess . More info about how to use Jackcess s proprietary DB API is available here http : jackcess.sourceforge.net . Comment : I suppose that means I really am going to have to find another method for creating a log in then . Thank you so much Comment : Glad it helps . An accept would be appreciated Comment : oh hey It let do the accept . The last one I did wouldn t let me .", "Question : I am writing a Java application that creates some data for the user and needs to generate an Access file that the user can then download and open with MS Access . The user has MS Access 2013 . The only Java library I found online is Jackcess . However in their documentation and in their API as well they only go up to V2010 . Will the file generated with File Format V2010 be opened by Access 2013 Based on research so far - no . Are there any other solutions that will allow a Java program to create an Access 2013 file Please share All help with Java + Access 2013 out there is for connecting to an Access 2013 database . I don t need to connect I just need to create a file that the user will import . Comment : So give it a try and you will see it it works . Comment : Wanted to get a head start while waiting for the Access 2013 installation.. . Comment : Thanks . Changing content-type didn t help . And I separated the follow up into it s own question stackoverflow.com questions 27196153 http : stackoverflow.com questions 27196153 jackcess-mdb-file-corrupted-during-servlet-write-to-the-client Comment : Use byteRead fis.read buffer . You forgot to fill the buffer . You used the read version to read byte by byte without a buffer . Comment : Thank you vanje you re right . I was staring at it for hours and didn t see it . I upvoted your answer in the other thread . .. . Answer : Yes an Access 2010-format file FileFormat.V2010 created by Jackcess can be opened in Access 2013 . Jackcess can also manipulate an .accdb file created by Access 2013 . I have done both of those tasks and they worked fine for me . If you haven t done so already you might consider using UCanAccess http : ucanaccess.sourceforge.net site.html . It uses Jackcess to do the actual reading and writing of the Access database file but UCanAccess is a pure Java JDBC driver so you can use SQL instead of having to write directly to the Jackcess API . For more information see .. . .. . Manipulating an Access database from Java without ODBC http : stackoverflow.com q 21955256 2144390 Comment : Thanks I have good news and bad news . The good news is that I can create a 2010 mdb file on the server-side and when this file is FTP d to the client Access 2013 on the client-side can open it . The bad news is that I need to transfer this file through the servlet and when that is done Access cannot open it . So FTP ing works but servlet transfer does not . I m updating the original message with the upload code . Thank you", "Question : I am trying to write a simple Java program to extract the tables and columns from Access databases . Using the Jackcess cookbook I ve got the following : .. . .. . However when I try to run it I get the following output with stacktrace : .. . .. . I ve tried googling but haven t found anyone else having the same problem with Jackcess what am I doing wrong .. . Answer : On further investigation discovered the code above is not at fault . When I moved the Access database to a different folder the code above works perfectly without stacktracing . My first thought was file-permissions I checked my user had read-write access to the database and the C : temp folder which it did . Turned out it was my corporate virus scan McAfee doing some sort of on access scan that was breaking it . As I am not allowed to disable the virus scanner I m going to move all my work into folders inside C : users username as the virus scan allows me to access these . So much for having local admin permission it didn t help .", "Question : I m currently working on a Java application with the purpuose of reading a Microsoft Access file using Jackcess open-source library . The Java application will later present the tables contained in the Access file . Here is my code so far : .. . .. . These are my imports : .. . .. . Also I ve added these Jar files to my referenced librarys : .. . .. . commons-lang-2.4.jar commons-logging-1.1.jar jackcess-2.0.2.jar .. . .. . When I run my application I get this error message The System.out.println works as intended : .. . .. . I ve tested with older versions of the same Access file but the problem persists . Is this a library related problem Or am I missing something else Comment : why don t you use jdbc there must be a driver for ms-access Comment : I am working on this too . I want both to work tho . .. . Answer : Jackcess only supports indexes on Text fields in an Access database when the database is using the General sort order ref : here http : sourceforge.net p jackcess bugs 86 . According to the related Microsoft Office support page http : office.microsoft.com en-ca access-help select-settings-for-how-data-is-displayed-and-stored-in-your-database-HA010341912.aspx : .. . .. . To reset the sort order for an existing database select the language you want to use and then run a compact operation on the database . So for Access 2010 that would presumably mean selecting File Options from the Access ribbon bar choosing General or General - Legacy for the New database sort order on the General tab .. . screenshot http : i.stack.imgur.com II5CV.png .. . .. . .. . then performing a Compact and Repair on the database . Note : If Windows is using a non-English locale then the procedure described above might not rectify the problem . See this answer http : stackoverflow.com a 31972659 2144390 for details . Comment : This solved my problem . Thanks alot for your help", "Question : I need to read Data from an encrypted Access 97 Database and tried out Jackcess and UCanAccess . I m using jackcess-2.1.2.jar jackcess-encrypt-2.1.0 and bcprov-jdk15on-152.jar from bouncycastle.org .. . .. . As UCanAccess uses Jackcess internally I m getting the same error with all my other attempts . the last line invokes an error here is the Stack Trace : Comment : double check if the library versions are compatible Comment : I m using java version 1.8.0 25 and the newest Bouncy Castle libraries for JDK 1.5 to 1.8 but also tried those for JDK 1.4 . On Jackcess Homepage there is only this Information with the link-to Bouncy Castle : The encryption support requires an additional library Bouncy Castle . Making this support separate from the main Jackcess library allows users to avoid including unnecessary libraries . I could not get any Information about dependencies or required compatible Versions . Comment : To clarify : You re talking about an Access 97 file that is protected with a database password . In other words if you open the database in Access you are only prompted for a password not a username and password . Is that correct Comment : The password ist stored in User Group rights . If I open the file with msaccess user I only need to enter the username and have to leave password empty . .. . Answer : It turns out that while jackcess-encrypt is source compatible with bouncycastle 1.52 it is not binary compatible . See this feature request https : sourceforge.net p jackcessencrypt feature-requests 2 for more details . Basically for now you need to use a version of bouncycastle 1.50 or lower . UPDATE : as of the 2.1.1 release of jackcess-encrypt both older pre 1.52 and newer 1.52+ versions of bouncycastle should work correctly . Comment : Thank you very very much . It WORKS : -", "Question : I am trying to use UCanAccess to read data from a MS Access database in Mac OSX.8 . I believe that I have set everything up according to the UCanAccess directions http : ucanaccess.sourceforge.net site.html and those provided by Gord Tompson in a StackOverflow answer http : stackoverflow.com questions 21955256 manipulating-an-access-database-from-java-without-odbc 21955257 21955257 . This is the error that I am getting : .. . .. . Exception in thread main java.lang.IncompatibleClassChangeError : Found class com.healthmarketscience.jackcess.Database but interface was expected .. . .. . .. . at net.ucanaccess.jdbc.DBReference . DBReference.java : 149 .. . at net.ucanaccess.jdbc.DBReferenceSingleton.loadReference DBReferenceSingleton.java : 57 .. . at net.ucanaccess.jdbc.UcanaccessDriver.connect UcanaccessDriver.java : 100 .. . at java.sql.DriverManager.getConnection DriverManager.java : 582 .. . at java.sql.DriverManager.getConnection DriverManager.java : 207 .. . at openACCDB.OpenACCDB.main OpenACCDB.java : 13 .. . .. . My build path includes the following : .. . .. . This is my code : .. . Answer : It looks like you have a old conflicting jackcess version in your classpath jackcess1.x.x besides the correct one : com.healthmarketscience.jackcess.Database is an interface since jackcess2.0.0 . You should remove that jackcess1 jar . Comment : The jackcess is 2.0.4 which is the most recent version . It is the commons-logging that is 1.1.1 . Just to be sure I will try replacing the jackcess version that came with ucanaccess with the jackcess that comes from their own site . But I am not hopeful . Comment : Yes you don t have to replace the correct jackcess jar 2.0.4 but remove the wrong one from your classpath . There couldn t be another cause of the exception you re getting you have another jackcess 1.x.x jar in your classpath or something dirty in your environment . Comment : I found the old jackcess 1.2.14.3 it is being used by the GDAL framework for my QGIS installation . I am now trying to figure out how to remove it from the JRE library in Eclipse . I seem to only have the ability to entirely switch libraries but I do not have another that will work with ucanaccess . Do you have any further advice Comment : I was able to remove the older jackcess from the class path by creating a new JRE System Library but it still gives the same error . The only way I was able to resolve this was by manually removing the older file from its folder . Comment : In your build path you need the jars you mentioned and a cleaned JRE you can do the dowload from an official source . Maybe the QGIS installation parts shouldn t be shared with other kind of projects .", "Question : This question already has an answer here : .. . .. . unsupported collating sort order when trying to read from Access using Jackcess Java questions 20719417 unsupported-collating-sort-order-when-trying-to-read-from-access-using-jackces 1 answer .. . .. . I have in my project a Ms Access database which worked fine before now after formatting my computer I ve run my project and It worked but when I opened the database with MsAccess 2007 and closed it . It won t get updated with the Java project . I still have copies of database which wasn t opened with MsAccess and it works fine if I use it . so the problem is opening the database with MS Access - it kind of lock it read-only that s what the Jackcess says Comment : have you created DSN for database connectivity Comment : I didn t create DSN I use jackcess directly with the directory of the .accdb file : String dbFileSpec src database.accdb .. . Answer : I found the answer of one of the posts It s the version of MsAccess It made the sort order French despite of General . Here the answer by @Gord Thompson : unsupported collating sort order when trying to read from Access using Jackcess Java http : stackoverflow.com questions 20719417 unsupported-collating-sort-order-when-trying-to-read-from-access-using-jackces", "Question : I have a Jackcess table and everything is working just fine . BUT I can t find anything on how to change a column name in the Jackcess table . The reason I want to change the column name is that I have a ResultSet which is converted to Microsoft Access using Jackcess . a column is named RELATION but when Jackcess converts it the name is changed to xRelation . it must be some kind of Blacklisted word.. . I want to change the column name back to RELATION and changing RELATION itself to something else is not an option . How can I do this .. . Answer : Jackcess cannot alter the structure of the table after it has been created . So if you want that column to be named Relation instead of xRelation you will probably need to .. . .. . explicitly create the table first e.g . using TableBuilder with Relation as the column name and then .. . use ImportUtil.importResultSet to import into the table you created : .. . .. . That form of importResultSet http : jackcess.sourceforge.net apidocs com healthmarketscience jackcess util ImportUtil.html importResultSet java.sql.ResultSet 20com.healthmarketscience.jackcess.Database 20java.lang.String 20com.healthmarketscience.jackcess.util.ImportFilter 20boolean will import into an existing table instead of creating a new one .", "Question : null .. . Answer : I need to create a table using jackcess library which consist of foreign key reference column and primary-key column with auto-increment How can I specify default values for all the columns like Date Timestamps In the jackcess cookbook http : jackcess.sourceforge.net cookbook.html I found one example to create-table but it is not covering the above cases . How can I implement the above Comment : Welcome to StackOverflow . Thanks and other chit-chat read help tour http : stackoverflow.com tour should never be included in a question . Comment : you should be able to do everything except the foreign key reference . at this point in time jackcess does not support creating foreign key indexes .", "Question : I have installed Jackcess 2.0.4 API on my Ubuntu 14.04 server IP : 192.168.0.130 . And now i want to access a Microsoft Access 2010 DB on a Windows 2003 R2 server IP : 192.168.0.125 . How do i do this .. . Answer : Jackcess will need to be able to open the database file so .. . .. . 1 . The database file will need to be in a shared folder on the Windows server and .. . .. . 2 . The Ubuntu server will have to be set up to mount the Windows share most likely using steps similar to those described here : .. . .. . MountWindowsSharesPermanently https : wiki.ubuntu.com MountWindowsSharesPermanently .. . .. . Once that s done Java code running on the Ubuntu server should be able to use Jackcess to manipulate the Access database file by opening it from the mounted location . For example if you ve configured the Ubuntu server to make the Windows share available at mnt windowsshare then Jackcess would simply open the database file in that folder : .. . .. . IMPORTANT NOTE : .. . .. . Jackcess reads and writes Access database files .accdb and .mdb files directly . It does not use the Access Database Engine ACE Jet and does not try to recreate the multi-user support that ACE Jet provides . Therefore Jackcess itself has no way of managing multiple concurrent users . Ref : here http : sourceforge.net p jackcess discussion 456474 thread 295b0032 limit 50 . If the Access database resides on a Windows share then there is at least the possibility that some other user or process might try to update the database while Jackcess has the file open . If that happens you could very well experience strange errors or perhaps even corruption of the database file .", "Question : I am using the Jackcess API with an Access database . I open the database and get a specific table . How can I get the data rows from this table which matches a list of ids For example get all the rows from the table where id is in List . In this particular case I want to delete the rows . .. . Answer : Jackcess provides very limited functionality for querying the data so your best option is to go through the table with an iterator or streams . Comment : yeah but what after this how can I write the query like for each row if id component id return it Comment : You don t know how to write an if clause and add to a list based on that Comment : My aim is to delete the data from the table and for that I need to write a delete query Comment : Why didn t you say so . You can t do that with Jackcess . You ll need to create a new table and leave the missing values out . Comment : You can t delete rows with Jackcess . - Actually you can delete rows using Jackcess . Ref : here http : jackcess.sourceforge.net apidocs com healthmarketscience jackcess Table.html deleteRow com.healthmarketscience.jackcess.Row", "Question : Recently I ve had been using testing both solutions to get some data from Access MDB file . And I perceived that Jackcess doesn t need password to access the database s data while UCanAccess only works if I insert the password if the database has . So wtf really happens If Jackcess is a dependency of UCanAccess why does it needs password Or why does Jackcess doesn t require password too Thanks Comment : wtf may be perceived as something unpolite.. . anyway if you really want to protect with a password your access file you have to encrypt it . If not just a code weak code based block will be applied by the upper layer API implementations MS Access via ODBC or GUI UCanAccess . .. . Answer : When a database password is assigned to an older-format .mdb database the file is not actually encrypted . Older versions of the MS Access application had a separate option to encrypt the file but even that protection was pretty weak . If the file is not encrypted then Jackcess does not require a password to open it . In fact Jackcess provides a way to retrieve the database password from an unencrypted but password protected .mdb file . As suggested in the comment to your question the UCanAccess development team decided to remain consistent with the other higher-level data-access methods and require that the user supply the correct password while opening the database . If you really wanted to avoid coding the database password into a UCanAccess application then you could always .. . .. . open the database file with Jackcess first .. . use Jackcess calls to retrieve the database password .. . close the Jackcess connection to the database and then .. . supply the database password when opening the UCanAccess connection to the database . Note that when applying a database password to a newer-format .accdb database the file really is encrypted so both Jackcess and UCanAccess require the correct password along with the additional component Jackcess Encrypt plus dependencies to open it .", "Question : I need help in a routine I ve written to dump the content of a class which represent a database-table to a new database-table in MS Access . My code is the following : .. . .. . When I try to save the table to the actual database I get the exception : .. . .. . DataTypes were saved before using the same database I am writing I am basically updating the database using the code : .. . .. . What am I doing wrong .. . Answer : From the Jackcess forum thread https : sourceforge.net p jackcess discussion 456474 thread 7e1cb80a the solution is to wrap the call to setMaxLength method : Comment : Thanks for coming back to update this . After running some test code I had just reached the same conclusion . Comment : Yes : Thanks for the effort . Comment : The underlying issue will be fixed in the next release of Jackcess 2.0.9 . Ref : here http : sourceforge.net p jackcess bugs 116 . Once that has been released the above workaround will no longer be required . Comment : The issue was fixed in version 2.0.9 released today .", "Question : I am working with Jackcess to read and categorize an access database . It s simply meant to open the database loop through each line and print out individual row data to the console which meet certain conditions . It works fine except for when I try to read numeric values . My code is below . This code is built into a Swing GUI and gets executed when a jbutton is pressed . When the code is run I get the following error : .. . .. . java.lang.ClassCastException : java.lang.String cannot be cast to java.lang.Double .. . .. . The following condition looks to be what is throwing the error . row.getDouble CURRENTGAC 12.00 .. . .. . It appears that when the data is read from the database the program is reading everything as a string even though some fields are numeric . I was attempting to cast this field as a double but java doesn t seem to like that . I have tried using the Double.parseDouble and Double.valueOf commands to try converting the value as mentioned here http : stackoverflow.com questions 5769669 convert-string-to-double-in-java but without success . My question is how can I convert these fields to numeric values Is trying to type cast the way to go or is there a different method I m not aware of You will also notice in the code that I created a cursor but am not using it . The original plan was to use it for navigating through the database but I found some example code from the jackcess webpage and decided to use that instead . Not sure if that was the right move or not but it seemed like a simpler solution . Any help is much appreciated . Thanks . EDIT : .. . .. . To ensure the program was reading a string value from my database I input the following code .. . .. . row.get CURRENTGAC .getClass .getName .. . .. . The output was java.lang.String so this confirms that it is a string . As was suggested I changed the following code .. . .. . The ouput to the console from these changes is below .. . .. . 9.85 11.76 9.57 12.98 10.43 13.08 10.53 11.46 .. . This output although looks numeric is still of the string type . So when I tried to run it with my conditional statement which is commented out in the updated sample code I still get the same java.lang.ClassCastException error that I was getting before . Comment : You can easily see if Jackcess really is returning a string by printing row.get CURRENTGAC .getClass .getName and seeing if it says java.lang.String . If that is the case then have your application print String.format s row.getString CURRENTGAC and edit http : stackoverflow.com posts 30261961 edit your question to show us what it looks like . Comment : Apologies for the delay . My computer was having some security issues that were beyond the scope of this program but are now fixed . My edits are now posted . Thanks for your assistance . .. . Answer : Jackcess does not return all values as strings . It will retrieve the fields columns of a table as the appropriate Java type for that Access field type . For example with a test table named Table1 .. . .. . .. . .. . the following Java code .. . .. . .. . .. . produces : .. . .. . If you are unable to get Double.parseDouble to parse the string values from your database then either .. . .. . they contain funny characters that are not apparent from the samples you posted or .. . you re doing it wrong . Additional information re : your sample file .. . .. . Jackcess is returning CURRENTGAC as String because it is a Text field in the table : .. . .. . TableDesign.png http : i.stack.imgur.com 63wWN.png .. . .. . The following Java code .. . .. . .. . .. . produces .. . Comment : Here is a sample http : wikisend.com download 544616 myDatabase.accdb of the database I am working with . I believe I was coding similarly to your example but I could still very well could be doing it wrong . That s pretty much the point for posting it to this forum . If you can find any additional funny characters please let me know how you found those also . Comment : @Rucker06 The CURRENTGAC string values are perfectly fine and parse correctly . I have update my answer . Comment : Thanks for the help . It works now .", "Question : So I have a program that selects a DB and exports it as a csv . It appears when I export the DB the tab delimitation does not keep any data types . The csv ideally should keep text fields as instead of just . Although the fields are numbers they have no need to be treated as numbers . This lack of formatting causes a small issue with sorting and I can see jackcess supports data types but will I need to use the cursor to keep these datatypes or can I still use the exportFile function Comment : What do you mean by a small issue with sorting True Jackcess does not put text delimiters around every text field only the ones that contain commas but many other applications export to CSV that way . And Jackcess does not do silly things like removing leading zeros from text fields that look like numbers . Comment : The output from my program puts the first account 0 as the 10th account and everything else besides the first ten are in perfect order . So is there a way with Jackcess to output my alphanumberic fields with the around every field or should I consider something else I just read in the documentation that Jackcess supports the text datatype but does the export keep the datatype in .csv format Comment : 1 What is the field type of the field on which you want to order the results 2 Does that field have an index on it Comment : The field does not have an index and it is alphanumeric but for my purposes every field could be treated as text so long as the first field is sorted ascending alphanumerically . .. . Answer : I m not aware of a way to force Jackcess to enclose all text fields in double quotes when exporting . However that would not affect the order in which the rows are exported by Jackcess anyway . When using exportFile http : jackcess.sourceforge.net apidocs com healthmarketscience jackcess util ExportUtil.html exportFile com.healthmarketscience.jackcess.Database 20java.lang.String 20java.io.File Jackcess will export the rows in natural order which is the order in which the rows physically exist in the table often but not always the order in which the rows were inserted into the table . When using exportWriter with a Cursor http : jackcess.sourceforge.net apidocs com healthmarketscience jackcess util ExportUtil.html exportWriter com.healthmarketscience.jackcess.Cursor 20java.io.BufferedWriter 20boolean 20java.lang.String 20char 20com.healthmarketscience.jackcess.util.ExportFilter Jackcess will export the rows in the order defined by the Cursor . So if the field on which you want to sort the output has an index on it then you can create an IndexCursor and use exportWriter with that Cursor to dump the rows to CSV . If the field on which you want to sort the output does not have an index on it and you are unable or unwilling to create such an index in the Access database then another approach would be to use the UCanAccess http : ucanaccess.sourceforge.net site.html JDBC driver to create a ResultSet based on an SQL statement that has an ORDER BY clause then use something like opencsv http : opencsv.sourceforge.net to dump the ResultSet to CSV . Comment : Thank you . I needed to use the Cursor and to solve the issue of string values I just have another function with some regex that puts before and after commas . Maybe not the most efficient but I just need it to work and it does in less than a second so I cant complain .", "Question : I am not much familiar with Java but I try to accomplish this task in R my fav There is this Java library called Jackcess http : jackcess.sourceforge.net . I want to connect to this library and open an MS Access 2003 .mdb file in it . Jackcess cookbook http : jackcess.sourceforge.net cookbook.html tells me the first step to using this library is this : .. . .. . or as @Gord suggests .. . .. . but I m stuck at this very first step . I have installed Java and rJava and set up everything about directories . This is my code in R .. . .. . Edit : I found out I had two problems one solved one still not . up to this part everything is ok but I have some problems from now on : .. . .. . 1 Correctly calling a method from Jackcess without signature mismatch neither of these work : .. . .. . I get this error : .. . .. . well I found the answer to this step I just needed a semicolon at the end of class definition string . 2 Calling the open method correctly my first round of try : .. . .. . and I get this error : .. . .. . I googled and found out that Jackcess depends on some library called commons-logging http : commons.apache.org proper commons-logging download logging.cgi so downloading and adding it to classpath solves THAT problem .. . .. . 3 Calling the open method correctly my second round of try : with commons-logging in classpath .. . .. . this gives me this error : .. . .. . Any Ideas for this error NOTE : some answers were suggested before my edits so they may seem irrelevant now but I have used them in the steps I explained above . Comment : In this question I use low-level rJava functions that need explicit type specification in JNI . It is recommended that beginners use higher level functions like J in rJava package . I think rJava needs a good vignette .. . Answer : The following code shows an alternate approach in Java using the .setFile and .open methods of a real DatabaseBuilder object : .. . .. . Try something similar in rJava and see if it works for you . Edit re : updated question .. . .. . You mentioned that you added Apache commons-logging http : commons.apache.org proper commons-logging to your CLASSPATH but Jackcess also relies on Apache commons-lang http : commons.apache.org proper commons-lang v2.x not v3.x so try downloading that and including it in your CLASSPATH as well . Comment : The problem seems to lie in matching signatures . for example I tried to run your 3rd line in rJava : .jcall dbbo method setFile L DatabaseBuilder file anything I write the signiture does not match . Comment : .jmethods dbbo setFile 1 public com.healthmarketscience.jackcess.DatabaseBuilder com.healthmarketscience.jackcess.DatabaseBuilder.setFile java.io.File so what should my .jcall be Comment : I had added some commons logging v.2.0 back sometime but I had other errors and I deleted it . But yes your edit solves the last problem remained in my question .", "Question : I work with an MS-Access table in Java using Jackcess : .. . .. . Is there a way to get the table sorted ordered by one or more column s Couldn t find anything in the docs . Thanks for any hint . .. . Answer : I was having this same issue here but it helped . For the folks that are using the new version of Jackcess v : 2.1.2 here is the answer : .. . .. . Thanks", "Question : I am using Jackcess API in my Eclipse plugin project . I added jackcess-2.1.0.jar file under resources lib . I included the jar under my Binary build and in build.properties . I successfully make a connection using connection-string but my DatabaseBuilder.open call is not executing . My code is .. . .. . When I run the class in debug mode and I reach DatabaseBuilder.open call it fails . Here is my project structure : .. . .. . My project structure http : i.stack.imgur.com zdDEr.png .. . .. . Can anyone tell me the possible reason for it Comment : An exception is being thrown and you re swallowing it Comment : No exception is thrown I am catching the exceptions but no exception is thrown I think Comment : Jackcess 1.2.6 is a very old version . Is there a particular reason why you are not using the current version http : sourceforge.net projects jackcess files latest download source files Comment : There is no particular reason actually it was implemented as long ago but it works in web environment from a maven project it works but now I want to integrate it in an rcp application and there its not working Comment : You really should use a current 2.x version of Jackcess if at all possible . .. . Answer : The .open method of DatabaseBuilder expects to open an existing well-formed Access database file . The .createTempFile method of java.io.File creates a 0-byte file . So the code .. . .. . will cause Jackcess to throw .. . .. . java.io.IOException : Empty database file .. . .. . when it tries to do DatabaseBuilder.open dbFile . Instead you should DatabaseBuilder.create to convert the 0-byte file into a real Access database file like this", "Question : This question already has an answer here : .. . .. . How do I fix a NoSuchMethodError questions 35186 how-do-i-fix-a-nosuchmethoderror 13 answers .. . .. . I m trying to update a record in MS Access database using UCanAccess but I get this message when i try to do it : .. . .. . net.ucanaccess.jdbc.UcanaccessSQLException : UCAExc : : : 3.0.5 java.lang.NoSuchMethodError : com.healthmarketscience.jackcess.Table.isAllowAutoNumberInsert Z .. . .. . Code : .. . .. . Does anyone know what the problem is DELETE query works fine Comment : Where is currentBookId defined Comment : @Tilak In the MainWindow class as public static int currentBookId 0 Comment : Verify that you are using Jackcess version 2.1.3 with your project . Note that jackcess-2.1.3.jar is available in the lib folder of the UCanAccess distribution . Comment : @Gord thank you very much It helped .. . Answer : Answered by Gord Thompson : .. . .. . Verify that you are using Jackcess version 2.1.3 with your project . Note that jackcess-2.1.3.jar is available in the lib folder of the UCanAccess distribution .", "Question : I am using jackcess for the conncetivity to my access database . But I am following exception .. . .. . I have used jdbc but it is not working either . How can solve my problem .. . Answer : Here s how I got Jackcess working starting with a fresh install of NetBeans 7.4 on Windows 8 : .. . .. . I downloaded the latest Jackcess JAR file via the Looking for the latest version link on files http : sourceforge.net projects jackcess files page . I saved it in the folder .. . .. . C : Users Public Java .. . .. . As listed on the Project Dependencies http : jackcess.sourceforge.net dependencies.html page for Jackcess I downloaded the ZIPped binaries for the two required dependencies : commons-lang http : commons.apache.org proper commons-lang download lang.cgi v2.x and commons-logging http : commons.apache.org proper commons-logging download logging.cgi v1.x . I unpacked the ZIP files into the above folder so it now contained two sub-folders .. . .. . C : Users Public Java commons-lang-2.6 .. . C : Users Public Java commons-logging-1.1.3 .. . .. . I launched NetBeans and created a new Project for a Java Application named myJackcessTest . I expanded the Project in the tree view right-clicked Libraries chose Add JAR Folder.. . and added the three JAR files : .. . .. . Libraries.png http : i.stack.imgur.com pDcu4.png .. . .. . Once that was done I created my little test app.. . .. . .. . ...and when I hit F6 it ran fine :" ] }
[ "yes-answer-long", "yes-answer-short" ]
ms-access
UNK_RELATION
wpr@deployment@47
wpr -- included in the windows assessment and @placeholder kit windows adk or the windows sdk windows performance recorder wpr is a performance recording tool that is based on event tracing for windows etw .
{ "confidence": [ 67.33406829833984, 62.24616241455078, 57.0754508972168, 54.28937530517578, 54.16142654418945, 52.62571716308594, 50.21147537231445, 47.89455795288086, 47.267852783203125, 46.70701599121094, 46.07526397705078, 45.170127868652344, 43.63935852050781, 43.63935852050781, 42.68037414550781, 42.63008499145508, 41.32190704345703, 37.12017059326172, 36.84840774536133, 36.7772216796875, 36.687171936035156, 35.068138122558594, 30.857664108276367, 30.857664108276367, 29.426206588745117, 29.323381423950195, 27.34392547607422, 26.925582885742188, 23.005516052246094, 18.594575881958008, 18.594575881958008, 18.594575881958008, 18.303895950317383, 15.526918411254883, 15.526918411254883, 15.526918411254883, 15.526918411254883, 15.526918411254883, 15.526918411254883, 14.918923377990723, 14.347457885742188, 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.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, 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 ], "content": [ "I am new to Windows Performance Recorder WPR and want to know if there is a way to change the names of the trace files when I run a RebootCycle .", "We are going to use Windows Performance Recorder to capture FileIO and Network metrics .", "Currently Windows 10 TH2 version of WPR It is not supported to change the file name only the path .", "Microsoft provides a demo WPR Profile in C : Program Files x86 Windows Kits 10 Windows Performance Toolkit SampleWPRControlProfiles.wprp .. . .. . It shows how to configure to log to file LoggingMode File .. . .. . To validate the WPRP file open it in Visual Studio extract the latest WPRControlProfiles.xsd from the windowsperformancerecordercontrol.dll https : blogs.msdn.microsoft.com matthew van eerde 2016 02 09 getting-the-schema-for-windows-performance-recorder-profiles and load it in Visual Studio https : msdn.microsoft.com en-us library windows hardware hh448223.aspx .. . .. . 1 .", "On HoloLens you use the Device Portal s Performance Tracing page rather than wpr but all I needed was a functional wprp .", "With Windows Performance Recorder https : msdn.microsoft.com en-us library windows hardware hh448205.aspx it is possible to achieve this in the WPR Profile https : msdn.microsoft.com en-us library windows hardware hh448210.aspx with a second EventCollectorId https : msdn.microsoft.com en-us library windows hardware hh448093.aspx entry which has an EventProviders https : msdn.microsoft.com en-us library windows hardware hh448199.aspx entry where stackwalking is enabled .", "Run it via C : Program Files x86 Windows Kits 10 Windows Performance Toolkit wpr.exe -start network.wprp and next C : Program Files x86 Windows Kits 10 Windows Performance Toolkit wpr.exe -stop NetworkData.etl", "They may add it in newer WPR version .", "I want to use the WPR profile Network .", "Is there a way to extract call stack addresses from a wpr trace", "When you now run Windows Performance Recorder to capture the data : .. . .. . stop the recording .. . .. . open the trace with Windows Performance Analyzer https : msdn.microsoft.com en-us library windows hardware hh448170.aspx load the debug-symbols https : msdn.microsoft.com en-us library windows hardware hh448108.aspx you can see the stacks for the Exception data but not for Jit or GC events : .. . .. .", "Using WPR on my PC I can choose Networking I O activity which will show events like Microsoft-Windows-TCPIP when I analyze in WPA .", "I can list the profile details with wpr -profiledetails Network .", "The keyword 0x10000 is related to perfstatus events from WPR : .. . .. . Here is the complete manifest :", "Activating stacks for user mode events has this syntax : PROVIDER : KEYWORD : LEVEL : stack .. . .. . You have to activate stacks this way : .. . .. . C : Program Files x86 Windows Kits 8.1 Windows Performance Toolkit xperf.exe -start UserLogger -on Microsoft-Windows-Kernel-Network : : : stack +Microsoft-Windows-Networking-Correlation : : : stack +Microsoft-Windows-TCPIP : : : stack -buffersize 2048 -f User.etl", "Here is an WPRP file that captures Microsoft-Windows-TCPIP and Microsoft-Windows-Kernel-Network events .", "I ve tried the following with no success even on Windows .", "According the reply of the Mirosoft employee Paul E Long to this topic https : social.technet.microsoft.com Forums office en-US 86ac7248-a85e-4d57-838b-8782f112fe23 how-to-read-wpr-etl-file-with-custom-manifest- forum messageanalyzer 36b6f488-aad7-48c2-afe3-d4ec2c8b46fa is the GUID for the control that WPR and WPRUI use to enable providers .", "When you run this under Windows 7 or Windows 8 Build 9200 the last EventLogger for the provider is used with the specified keywords and stack options .", "I need to create a file logging mode in windows-10 .", "On Windows 8.1 Windows Server 2012 R2 and later event payload scope and stack walk filters can be used by the EnableTraceEx2 function and the ENABLE TRACE PARAMETERS and EVENT FILTER DESCRIPTOR structures to filter on specific conditions in a logger session .", "The command I am using right now is : .. . .. . wpr -start GeneralProfile -filemode -onoffscenario RebootCycle -onoffresultspath C : traces -numiterations 1 .. . .. . With the above command WPR generates boot and shutdown trace files with the filename in a format something like : .. . .. . Machine-Name.Date.Time.RebootCycle 1.Boot.etl .", "Since Windows 7 it is possible to activate callstacks for usermode events https : msdn.microsoft.com en-us magazine ee412263.aspx .", "Here you should create 2 WPRP profiles and detect the Windows version and run the correct profile .", "In this demo profile I created one EventProvider EventProvider DotNETRuntime for provider Microsoft-Windows-DotNETRuntime without stacks to capture JIT and GC data and an other EventProvider EventProvider DotNETRuntime Stack for provider Microsoft-Windows-DotNETRuntime with stacks to capture stacks for Exceptions and Loader Events .", "Yes this is possible since Windows 8.1 with the type entry in EVENT FILTER DESCRIPTOR https : msdn.microsoft.com en-us library windows desktop aa363758 28v vs.85 29.aspx when it is set to EVENT FILTER TYPE STACKWALK https : msdn.microsoft.com en-us library windows desktop aa363758 28v vs.85 29.aspx when you call EnableTraceEx2 .", "I am creating a Diagnostic Capture Plan for the investigation of a performance problem .", "In order to do this I need to create a custom profile in windows-10-universal apps so that I may change default logging mode from Memory to File and also change buffer settings .", "According to https : randomascii.wordpress.com 2013 11 04 exporting-arbitrary-data-from-xperf-etl-files wpaexporter.exe should be the right tool to do so .", "I manage to prepare a profile with the right data but unfortunately wpaexporter keep trying to translate addresses even if -symbols is not given to the command-line generating some useless .. . .. . warnings .", "This is annoying because part of our application use some Delphi code that can not generate symbols in a Microsoft compatible format .", "With addresses we would be able to find the Delphi symbols in the call stack using map files .", "Later use the WPRP file with WPR.exe : .. . .. . Run your app and to stop recording run this : .. . .. . Now analyze the ETL file with WPA.exe or Perfview .", "However I m struggling with one particular detail .", "The output includes the providers and the keywords .", "Most providers have names and so I can display the keyword details with logman query providers -n provider name .", "Some providers have no name e.g .", "36b6f488-aad7-48c2-afe3-d4ec2c8b46fa : 0x10000 : 0xff .. . .. . How can I display the meaning of the keywords", "Thanks and regards...Paul", "Each event write call will go through this array quickly to find out whether the stack should be captured or not .", "The provided filter includes a EVENT FILTER EVENT ID structure that contains an array of event IDs and a Boolean value that indicates whether to enable or disable stack capturing for the specified events .", "I did read .. . .. . Capture callstack and events in Xperf http : stackoverflow.com questions 25793538 capture-callstack-and-events-in-xperf 28654045 28654045 .. . .. . and other sources but the most straightforward thing I d like to do is simply display the Stack column in WPA s Generic events graph .", "WPA Generic events graph http : i.stack.imgur.com 5Q6BX.png .. . .. . Why is it not there", "Sure because stack information is not available but why", "I do know xperf -help stackwalk but what s listed is not what I m looking for .", "For example .. . .. . is not possible to get the callstack for network events .", "Why", "I must be missing something .", "Thanks", "Thanks but this doesn t add a Stack column to the Generic Events graph .", "I only get an additional separate Stacks graph .", "It s ok but not where I d expect it i.e .", "in the Generic Events window .", "My question was related to Generic Events in general not only to user mode providers .", "Maybe other kernel flags do not have corresponding user mode provider do they", "so it s not clear for me yet.In addition if I do it this way symbols are missing again .", "Do we have to add a minimum set of providers to get symbol support", "generic events user mode events .", "Click on Open View Editor and activate he stack column here .", "symbols are missing because NETWORKTRACE is not enough .", "Use NETWORK which captures PROC THREAD+LOADER both MUST be used all the time", "Sorry but this is not right because networktrace is a kernel flag and the events are shown in the generic events graph .", "Anyway I ll just have to accept but not understand that there s no Stack column in that graph .", "Regarding symbols I found out meanwhile too thanks .", "there are stacks if you activate them .", "I use this often .", "But for network there is no stack option .", "Here you have to activate the usermode providers that I told you .", "btw use xperf -help stackwalk to see which stacks you can enable for kernel-mode events", "This causes the trace files to have a different name each time I run my command but I want to have pre-defined names like boot.etl and shutdown.etl .", "How can I do this", "I asked this Microsoft an got a reply today .", "I m trying to capture an etl trace on the HoloLens with my own events and some generic networking events .", "I can t figure out how to see these events on a HoloLens or successfully put them in my wprp file .", "My own events work fine .", "Please help .", "do you need more information help", "Thank you for your reply but we changed our approach and now using Metro logs .", "Open your .wprp file in Visual Studio .", "2 .", "In the main menu choose XML and then choose Schemas .. . .. . 3 .", "In the XML Schemas dialog that appears choose Add .. . .. . 4 .", "Choose the WPRControlProfiles.xsd schema .", "This works fine but sometimes activating stacks for all tasks Events in a provider is not needed and it would be nice to only activate stacks for some specific Tasks .", "Is this possible", ".. . When stack walking is enabled for a provider then the stack is captured for all the events generated by the provider .", "Most of the time the user is only interested in stack from only certain number of events .", ".. . This feature allows enabling or disabling stack walking on a list of events .", "WPA dotNetRuntime Events some withStacks http : i.stack.imgur.com XdjLm.png .. . .. . Attention ." ] }
{ "confidence": [ 91.75585174560547, 87.08985137939453, 86.37398529052734, 82.3382568359375, 78.1202621459961, 51.91877746582031, 38.40977478027344 ], "content": [ "Question : I am new to Windows Performance Recorder WPR and want to know if there is a way to change the names of the trace files when I run a RebootCycle . The command I am using right now is : .. . .. . wpr -start GeneralProfile -filemode -onoffscenario RebootCycle -onoffresultspath C : traces -numiterations 1 .. . .. . With the above command WPR generates boot and shutdown trace files with the filename in a format something like : .. . .. . Machine-Name.Date.Time.RebootCycle 1.Boot.etl . This causes the trace files to have a different name each time I run my command but I want to have pre-defined names like boot.etl and shutdown.etl . How can I do this .. . Answer : I asked this Microsoft an got a reply today . Currently Windows 10 TH2 version of WPR It is not supported to change the file name only the path . They may add it in newer WPR version .", "Question : I m trying to capture an etl trace on the HoloLens with my own events and some generic networking events . Using WPR on my PC I can choose Networking I O activity which will show events like Microsoft-Windows-TCPIP when I analyze in WPA . I can t figure out how to see these events on a HoloLens or successfully put them in my wprp file . I ve tried the following with no success even on Windows . My own events work fine . .. . Answer : Here is an WPRP file that captures Microsoft-Windows-TCPIP and Microsoft-Windows-Kernel-Network events . Run it via C : Program Files x86 Windows Kits 10 Windows Performance Toolkit wpr.exe -start network.wprp and next C : Program Files x86 Windows Kits 10 Windows Performance Toolkit wpr.exe -stop NetworkData.etl Comment : On HoloLens you use the Device Portal s Performance Tracing page rather than wpr but all I needed was a functional wprp . Thanks", "Question : I am creating a Diagnostic Capture Plan for the investigation of a performance problem . We are going to use Windows Performance Recorder to capture FileIO and Network metrics . However I m struggling with one particular detail . I want to use the WPR profile Network . I can list the profile details with wpr -profiledetails Network . The output includes the providers and the keywords . Most providers have names and so I can display the keyword details with logman query providers -n provider name . Some providers have no name e.g . 36b6f488-aad7-48c2-afe3-d4ec2c8b46fa : 0x10000 : 0xff .. . .. . How can I display the meaning of the keywords Thanks and regards...Paul .. . Answer : According the reply of the Mirosoft employee Paul E Long to this topic https : social.technet.microsoft.com Forums office en-US 86ac7248-a85e-4d57-838b-8782f112fe23 how-to-read-wpr-etl-file-with-custom-manifest- forum messageanalyzer 36b6f488-aad7-48c2-afe3-d4ec2c8b46fa is the GUID for the control that WPR and WPRUI use to enable providers . The keyword 0x10000 is related to perfstatus events from WPR : .. . .. . Here is the complete manifest :", "Question : I need to create a file logging mode in windows-10 . In order to do this I need to create a custom profile in windows-10-universal apps so that I may change default logging mode from Memory to File and also change buffer settings . Please help . Comment : do you need more information help Comment : Thank you for your reply but we changed our approach and now using Metro logs . .. . Answer : Microsoft provides a demo WPR Profile in C : Program Files x86 Windows Kits 10 Windows Performance Toolkit SampleWPRControlProfiles.wprp .. . .. . It shows how to configure to log to file LoggingMode File .. . .. . To validate the WPRP file open it in Visual Studio extract the latest WPRControlProfiles.xsd from the windowsperformancerecordercontrol.dll https : blogs.msdn.microsoft.com matthew van eerde 2016 02 09 getting-the-schema-for-windows-performance-recorder-profiles and load it in Visual Studio https : msdn.microsoft.com en-us library windows hardware hh448223.aspx .. . .. . 1 . Open your .wprp file in Visual Studio . 2 . In the main menu choose XML and then choose Schemas .. . .. . 3 . In the XML Schemas dialog that appears choose Add .. . .. . 4 . Choose the WPRControlProfiles.xsd schema . Later use the WPRP file with WPR.exe : .. . .. . Run your app and to stop recording run this : .. . .. . Now analyze the ETL file with WPA.exe or Perfview .", "Question : Since Windows 7 it is possible to activate callstacks for usermode events https : msdn.microsoft.com en-us magazine ee412263.aspx . This works fine but sometimes activating stacks for all tasks Events in a provider is not needed and it would be nice to only activate stacks for some specific Tasks . Is this possible .. . Answer : Yes this is possible since Windows 8.1 with the type entry in EVENT FILTER DESCRIPTOR https : msdn.microsoft.com en-us library windows desktop aa363758 28v vs.85 29.aspx when it is set to EVENT FILTER TYPE STACKWALK https : msdn.microsoft.com en-us library windows desktop aa363758 28v vs.85 29.aspx when you call EnableTraceEx2 . On Windows 8.1 Windows Server 2012 R2 and later event payload scope and stack walk filters can be used by the EnableTraceEx2 function and the ENABLE TRACE PARAMETERS and EVENT FILTER DESCRIPTOR structures to filter on specific conditions in a logger session . .. . When stack walking is enabled for a provider then the stack is captured for all the events generated by the provider . Most of the time the user is only interested in stack from only certain number of events . .. . This feature allows enabling or disabling stack walking on a list of events . The provided filter includes a EVENT FILTER EVENT ID structure that contains an array of event IDs and a Boolean value that indicates whether to enable or disable stack capturing for the specified events . Each event write call will go through this array quickly to find out whether the stack should be captured or not . With Windows Performance Recorder https : msdn.microsoft.com en-us library windows hardware hh448205.aspx it is possible to achieve this in the WPR Profile https : msdn.microsoft.com en-us library windows hardware hh448210.aspx with a second EventCollectorId https : msdn.microsoft.com en-us library windows hardware hh448093.aspx entry which has an EventProviders https : msdn.microsoft.com en-us library windows hardware hh448199.aspx entry where stackwalking is enabled . In this demo profile I created one EventProvider EventProvider DotNETRuntime for provider Microsoft-Windows-DotNETRuntime without stacks to capture JIT and GC data and an other EventProvider EventProvider DotNETRuntime Stack for provider Microsoft-Windows-DotNETRuntime with stacks to capture stacks for Exceptions and Loader Events . When you now run Windows Performance Recorder to capture the data : .. . .. . stop the recording .. . .. . open the trace with Windows Performance Analyzer https : msdn.microsoft.com en-us library windows hardware hh448170.aspx load the debug-symbols https : msdn.microsoft.com en-us library windows hardware hh448108.aspx you can see the stacks for the Exception data but not for Jit or GC events : .. . .. . WPA dotNetRuntime Events some withStacks http : i.stack.imgur.com XdjLm.png .. . .. . Attention . When you run this under Windows 7 or Windows 8 Build 9200 the last EventLogger for the provider is used with the specified keywords and stack options . Here you should create 2 WPRP profiles and detect the Windows version and run the correct profile .", "Question : null .. . Answer : According to https : randomascii.wordpress.com 2013 11 04 exporting-arbitrary-data-from-xperf-etl-files wpaexporter.exe should be the right tool to do so . I manage to prepare a profile with the right data but unfortunately wpaexporter keep trying to translate addresses even if -symbols is not given to the command-line generating some useless .. . .. . warnings . This is annoying because part of our application use some Delphi code that can not generate symbols in a Microsoft compatible format . With addresses we would be able to find the Delphi symbols in the call stack using map files . Is there a way to extract call stack addresses from a wpr trace", "Question : I did read .. . .. . Capture callstack and events in Xperf http : stackoverflow.com questions 25793538 capture-callstack-and-events-in-xperf 28654045 28654045 .. . .. . and other sources but the most straightforward thing I d like to do is simply display the Stack column in WPA s Generic events graph . WPA Generic events graph http : i.stack.imgur.com 5Q6BX.png .. . .. . Why is it not there Sure because stack information is not available but why I do know xperf -help stackwalk but what s listed is not what I m looking for . For example .. . .. . is not possible to get the callstack for network events . Why I must be missing something . Thanks .. . Answer : Activating stacks for user mode events has this syntax : PROVIDER : KEYWORD : LEVEL : stack .. . .. . You have to activate stacks this way : .. . .. . C : Program Files x86 Windows Kits 8.1 Windows Performance Toolkit xperf.exe -start UserLogger -on Microsoft-Windows-Kernel-Network : : : stack +Microsoft-Windows-Networking-Correlation : : : stack +Microsoft-Windows-TCPIP : : : stack -buffersize 2048 -f User.etl Comment : Thanks but this doesn t add a Stack column to the Generic Events graph . I only get an additional separate Stacks graph . It s ok but not where I d expect it i.e . in the Generic Events window . My question was related to Generic Events in general not only to user mode providers . Maybe other kernel flags do not have corresponding user mode provider do they so it s not clear for me yet.In addition if I do it this way symbols are missing again . Do we have to add a minimum set of providers to get symbol support Comment : generic events user mode events . Click on Open View Editor and activate he stack column here . symbols are missing because NETWORKTRACE is not enough . Use NETWORK which captures PROC THREAD+LOADER both MUST be used all the time Comment : Sorry but this is not right because networktrace is a kernel flag and the events are shown in the generic events graph . Anyway I ll just have to accept but not understand that there s no Stack column in that graph . Regarding symbols I found out meanwhile too thanks . Comment : there are stacks if you activate them . I use this often . But for network there is no stack option . Here you have to activate the usermode providers that I told you . Comment : btw use xperf -help stackwalk to see which stacks you can enable for kernel-mode events" ] }
[ "yes-answer-long", "yes-answer-short" ]
deployment
UNK_RELATION
solution-explorer@visual-studio@107
solution-explorer -- the solution-explorer in visual-studio is a window that shows the files present in a @placeholder solution .
{ "confidence": [ 57.63307571411133, 57.63307571411133, 56.62562942504883, 56.47051239013672, 56.41393280029297, 55.81255340576172, 55.81255340576172, 55.207191467285156, 53.6882209777832, 53.6882209777832, 51.867698669433594, 51.61321258544922, 50.95945739746094, 50.859310150146484, 50.63118362426758, 50.09424591064453, 50.09424591064453, 50.08924865722656, 49.963035583496094, 49.732139587402344, 49.72425842285156, 49.72425842285156, 49.72425842285156, 49.11589813232422, 48.62845993041992, 48.49281692504883, 48.142513275146484, 48.089073181152344, 47.90373611450195, 47.90373611450195, 47.88932418823242, 47.665130615234375, 47.40253448486328, 47.334251403808594, 46.69367599487305, 46.69367599487305, 46.14616012573242, 46.13816452026367, 45.7681770324707, 45.7681770324707, 45.58510971069336, 45.58510971069336, 45.58510971069336, 45.58510971069336, 45.45784378051758, 45.34000015258789, 45.34000015258789, 45.268802642822266, 45.268802642822266, 45.268802642822266, 45.25385284423828, 45.22264862060547, 44.93230438232422, 44.5581169128418, 43.76458740234375, 43.76458740234375, 43.76458740234375, 43.76458740234375, 43.76458740234375, 43.76458740234375, 43.76458740234375, 43.76458740234375, 43.76458740234375, 43.734886169433594, 43.734886169433594, 43.734886169433594, 43.6818962097168, 43.448280334472656, 43.448280334472656, 43.395652770996094, 42.803001403808594, 42.803001403808594, 42.7191047668457, 42.341487884521484, 42.29631423950195, 42.19007873535156, 42.004573822021484, 41.914363861083984, 41.914363861083984, 41.914363861083984, 41.6290283203125, 41.6290283203125, 41.6290283203125, 41.6290283203125, 41.6290283203125, 41.6290283203125, 41.6290283203125, 41.575130462646484, 41.52866744995117, 41.52866744995117, 41.52866744995117, 41.41787338256836, 41.38391876220703, 41.33266830444336, 40.0110969543457, 40.00988006591797, 40.00969696044922, 40.00969696044922, 40.00969696044922 ], "content": [ "The Solution Explorer in Visual Studio is a nice tool for getting an overview of the code .", "I think Visual Studio displays them as entries in solution-explorer .", "Is there a way to collapse all the files at once in the Solution Explorer http : en.wikipedia.org wiki Microsoft Visual Studio Other tools window in Visual Studio", "By default Visual Studio will track active items in Solution Explorer via the setting : Tools Options Projects and Solutions General Track Active Item in Solution Explorer .", "This question already has an answer here : .. . .. . Visual Studio 2015 is crashing when searching from Solution Explorer questions 31742067 visual-studio-2015-is-crashing-when-searching-from-solution-explorer 4 answers .. . .. . Certain searches in Solution Explorer are causing Visual Studio to crash : .. . .. . Other searches work fine .", "There is an icon in solution-explorer in visual-studio-2013 that gives you the capability .", "In visual-studio-2013 there is a button in solution-explorer - Collapse All", "There s a file nesting extension in the Visual Studio gallery that allows you to nest un-nest files in Solution Explorer .", "Solution Explorer http : i.stack.imgur.com MrKjI.png .. . .. . Web.csproj File : .. . .. . Visual Studio has changed the relative-path of all files to absolute .", "Is there any way to force Solution Explorer in Visual Studio 2010 to sort files alphabetically but in order .h .inl and .cpp", "In the Visual Studio 2012 solution-explorer I see a list of all my script files .", "Simply highlight the two files right-click in Solution Explorer and choose group .", "solution-explorer http : i.stack.imgur.com YiWpU.png .. . .. .", "In the Solution-explorer files are currently sorted alphabetically .", "If I open a new Visual Studio instances and open any project the solution-explorer is not visible if I try to open it via View - Solution Explorer nothing happens .", "Since update 4 many files are duplicated in the solution-explorer .", "There s a show all files button in the top row of Solution Explorer .", "In Visual Studio 2008 I can see all my project files in my Solution Explorer and these files exist in an actual diectory .", "If I click on any of these blank entries in solution-explorer visual-studio-2015 crashes .", "What are the ways if any to manually sort files in folders in Solution Explorer Visual Studio 2015", "Is there an automatic way of navigating to the current position in the Solution Explorer", "How do I refresh the Solution Explorer", "There is a refresh icon option in the top row of solution-explorer .", "You re looking for .. . .. . which you will need to change to .. . .. . This is described in How to group partial class files in Solution Explorer VS2010 http : stackoverflow.com questions 3621345 how-to-group-partial-class-files-in-solution-explorer-vs2010", "It s trivial I know but yesterday out of nowhere Visual Studio 2012 Professional started displaying Solution Explorer Team Explorer - Home etc .", "Turn that feature on by deselecting the second button to the left at the top of the Solution Explorer window labeled Show All Files .", "Source http : yassershaikh.com how-to-collapse-all-items-in-solution-explorer-in-visual-studio-with-resharper", "When I try to load the solution in Visual Studio 2008 which runs on VM it tries to auto expand all the projects in solution and files within in Solution Explorer pane .", "Build succeeds but no changes are visible in Solution Explorer : .. . .. .", "Press Shift+Alt to focus the Solution Explorer toolbar .", "Explained here : Visual Studio 2012 New Features : Solution Explorer http : blogs.msdn.com b zainnab archive 2012 06 21 visual-studio-2012-new-features-solution-explorer.aspx", "Because the Solution Explorer sorts things alphabetically I put projects into Solution Folders .", "Had the same problem with my project except the key word was delete This seemed to solve my problem : Visual Studio 2015 is crashing when searching from Solution Explorer http : stackoverflow.com questions 31742067 visual-studio-2015-is-crashing-when-searching-from-solution-explorer newreg 9ea63588a23e4bf3be64f9ca5ee5b83a answer-31972928 .", "I have a set of fonts inside my Visual Studio solution these were added using the Add existing items option in Solution Explorer .", "I was then able to successfully build the app in Visual Studio but trying to run the app caused VS to crash and then start up again still with no files in Solution Explorer .", "Visual studio is currently just displaying the project name in the solution-explorer and none of its children- but I can t expand it to see the source files etc .", "Here my issue : .. . .. . It seems the solution-explorer is not displaying the content of the expanded solution tree .", "click Show All Files in solution-explorer and import the various files", "Got the latest version but still no mapping in solution-explorer .", "So why there is no version-control on the Solution Explorer", "But for some reason my Solution Explorer View stop working .", "When I run the project the Solution Explorer view appears but with an error .", "If I unload the InstallShield project and refresh the Solution Explorer e.g .", "Here s what my Solution Explorer looks like right now : .. .", "In Visual Studio 2012 in Solution Explorer window have doubled file names sorry for no screenshots - here is the link http : floomby.ru s1 uaxC8K .", "However these new folders files are not automatically added to the project and do not show in the Solution Explorer unless you Show All Files .", "However the Solution Explorer does support grouping related files such as headers resources and code files into virtual folders .", "Check this out : hjerpbakk.com blog 2014 7 25 http : www.hjerpbakk.com blog 2014 7 25 no-content-in-solution-explorer-using-visual-studio-2013 .", "In a Visual Studio 2013 C C++ project adding a folder in the Solution Explorer does not physically create a folder under my project path on the hard disk .", "Just got Visual Studio Express 2012 for Windows Desktop and finding myself overly annoyed that the Solution Explorer doesn t accurately reflect the state of my project .", "Files named Page.aspx.cs and Page.aspx.designer.cs would typically appear hierarchically below Page.aspx in Solution Explorer .", "I know it is possible to create a new tool window when extending Visual Studio 2015 but is it possible to make the solution-explorer open something other than an MSBuild solution file", "Things like Term are what I typed while in the process of naming a class but the Solution Explorer shows them as separate classes .", "Recently I opened it with Visual Studio 2015 which found every source file but just put the entire list on the Source Files folder of solution-explorer .", "I want to see them in solution-explorer and include them in compilation .", "I wonder however why they can t be reached from the solution-explorer directly .", "Enable Track Active Item in Solution Explorer in Options Projects Solutions General .", "The classes I created Backpacker and Booking are not showing up in the solution-explorer .", "You have to manually select the Refresh button in the command bar of Solution Explorer .", "The command only works if the desired node in the solution-explorer is selected .", "Press Ctrl+ to put focus in the search-box above the Solution Explorer .", "Press the up arrow to put focus in the search-box above the Solution Explorer .", "Unfortunately this doesn t seem to work for native C++ icons in solution-explorer :", "Even it is existing project or brand new project it does not show files and folders in Solution Explorer .", "I m able to access all the files in the solution if I browse to then via source-control-explorer .", "How can I make files created by other applications appear in my Solution Explorer", "Symptoms .. . When I open a certain WPF solution in Visual Studio 2010 after the solution loads and is displayed in Solution Explorer for a moment I see the source control icons locks checkout checks etc next to the items in the solution and then they disappear except for check marks for checked out files .", "Like I said in the title of this question is it possible to attach a keyboard shortcut to collapse all items in the solution-explorer with Visual Studio 2012", "See also stackoverflow.com questions 3436222 http : stackoverflow.com questions 3436222 how-to-locate-a-file-in-solution-explorer-in-visual-studio-2010", "But what I d like to be able to do is right-click on an open tab and select a menu item to make Solution Explorer track and display that file s location in Solution Explorer .", "Suddenly my solution tab stopped working on my Visual Studio 2013 .", "I m not sure running Visual Studio in SafeMode is a solution to this problem though", "What changes need to be made to Visual Studio or the gulpfile task in order for new folders and new files to automatically add to the project and show in the Solution Explorer immediately after they are created by Gulp", "It would be very helpful for me if the Solution Explorer of visual-studio-2012 could show extended information about them similar to how it shows information for the .cs files .", "However there are some files which doesnot show up in the Solution Explorer although it shows in the local copy of drive .", "It s not as practical as Track Active Item in Solution Explorer and needs the Sync button added to Solution Navigator to be pressed or a shortcut to be set .", "I found this link where you can use resharper to attach a shortcut key : yassershaikh.com http : yassershaikh.com how-to-collapse-all-items-in-solution-explorer-in-visual-studio-with-resharper The problem is that the focus must be on an item in the solution-explorer .", "How can I make my SoundPlayer work when using the files I added in my Solution Explorer", "I m able to access all the files in the solution and open them to edit if I browse to then via source-control-explorer .", "With VS2012 viewing different files from within the IDE no longer scrolls and select the file in Solution Explorer automatically .", "Is there any way to explicitly tell it to respect the folder hierarchy on solution-explorer", "As @drescherjm pointed out the Solution Explorer is not capable of being switched to Filesystem mode .", "Copy the existing project into your new solution using Windows Explorer .", "This causes solution-explorer to temporarily become source control-enabled again .", "which causes the solution-explorer to lose source control interoperability again .", "In the Solution Explorer a we see source control icons lockers etc .", "By default VS2010 will track the current file you are editing in Solution Explorer .", "use Find in Solution Explorer extension visualstudiogallery.msdn.microsoft.com http : visualstudiogallery.msdn.microsoft.com d2fc1e94-b85c-4a15-8569-390db1e04f47 which Adds the Find in Solution Explorer menu command to the context menu of open document tabs .", "The csproj file is in your solution folder in Windows Explorer you have to open it outside of VS .", "If you want to do it manually you can right-click on your project file in solution-explorer choose Unload Project .", "Is there any way to manually arrange the projects inside solution-explorer of VS 2010+ based on the dependency dependent project on higher level", "At the top of the solution-explorer is a toggle button Show All Files this makes it include all files in the display even if they aren t included in the project .", "My sources files are regrouped in separate folders but the solution-explorer listed them all in a Source files folder .", "I can get latest through team-explorer though just not solution-explorer .", "Check this out : http : www.hjerpbakk.com blog 2014 7 25 no-content-in-solution-explorer-using-visual-studio-2013 .. . .. . To quote.. . This issue is because of a MEF cache corruption .", "Resharper .. . .. . If you use Resharper try Shift+Alt+L .. . .. . This is a nice mapping as you can use Strg+Alt+L for navigating to the solution-explorer .. . .. . Track current file all the time : .. . .. . Visual Studio 2012 : .. . .. . If you like to track your current file in the solution-explorer all the time you can use the solution from the accepted answer Tools- Options- Projects and Solutions- Track Active Item in Solution Explorer but I think this can get very annoying in large projects .", "It would be handy to extend the Tabs so that you can selectively track an item in Solution Explorer by right clicking on a tab .", "Having that turned on makes Solution Explorer jump around and is consequently confusing on large projects so I turn it off .", "What I would like is a quicker shortcut to displaying the file location in Solution Explorer ." ] }
{ "confidence": [ 60.34505081176758, 58.688621520996094, 57.54545974731445, 57.21097946166992, 57.148197174072266, 55.7232551574707, 54.91495132446289, 54.59388732910156, 54.419639587402344, 54.09940719604492, 53.82616424560547, 53.47655487060547, 53.4714469909668, 53.11666488647461, 53.11666488647461, 53.06538772583008, 52.97355270385742, 52.934165954589844, 52.56216812133789, 52.22428894042969 ], "content": [ "Question : Is there any way to force Solution Explorer in Visual Studio 2010 to sort files alphabetically but in order .h .inl and .cpp I want to have .. . .. . instead of Comment : Then that wouldn t be alphabetically Comment : @CodyGray I know that : that is why the but .. . Answer : No there is no such feature built-in . I don t know of any extension or add-in that supports this either but I imagine that you could create one . Get started with the Visual Studio SDK http : msdn.microsoft.com en-us library bb166441.aspx or browse the Visual Studio Gallery http : visualstudiogallery.msdn.microsoft.com site search for something that serves a similar purpose . However the Solution Explorer does support grouping related files such as headers resources and code files into virtual folders . Turn that feature on by deselecting the second button to the left at the top of the Solution Explorer window labeled Show All Files .", "Question : Is there a way to collapse all the files at once in the Solution Explorer http : en.wikipedia.org wiki Microsoft Visual Studio Other tools window in Visual Studio .. . Answer : In Visual Studio 2013 you can do it with right-click by Solution - Collapse All", "Question : Is there a way to collapse all the files at once in the Solution Explorer http : en.wikipedia.org wiki Microsoft Visual Studio Other tools window in Visual Studio .. . Answer : In visual-studio-2013 there is a button in solution-explorer - Collapse All enter image description here http : i.stack.imgur.com hRzWP.png Comment : This is standard in VS 2013 but unfortunately it was not in VS 2010 . Really annoying but I guess it does show progress in the newer versions .", "Question : This question already has an answer here : .. . .. . Visual Studio 2015 is crashing when searching from Solution Explorer questions 31742067 visual-studio-2015-is-crashing-when-searching-from-solution-explorer 4 answers .. . .. . Certain searches in Solution Explorer are causing Visual Studio to crash : .. . .. . Other searches work fine . I have tried rebuilding the solution resetting all settings deleting the .suo files . When I attach a debugger new instance of Visual Studio the Exception Helper says that this is an AggregateException -- not helping at all . I was unable to find further details . What can I do to debug this .. . Answer : Had the same problem with my project except the key word was delete This seemed to solve my problem : Visual Studio 2015 is crashing when searching from Solution Explorer http : stackoverflow.com questions 31742067 visual-studio-2015-is-crashing-when-searching-from-solution-explorer newreg 9ea63588a23e4bf3be64f9ca5ee5b83a answer-31972928 . I also noticed that it works fine in SafeMode . Problem line : .. . .. . Public Event ObjectDeleted ByVal aString As String .. . .. . .. . .. . The workaround is replace your delegates with event handlers : .. . .. . Public Delegate Sub MyEventHandler ByVal s As String .. . .. . And use like : .. . .. . Public Event test As MyEventHandler .. . .. . I submitted a bug to Microsoft here : https : connect.microsoft.com VisualStudio feedback details 2449669 visual-studio-crashes-when-you-type-delete-into-the-solution-explorer-search .. . .. . Also found this error : https : connect.microsoft.com VisualStudio feedback details 1606999 vs-2015-professional-crash-when-searching-from-solution-explorer .. . .. . Hope this helps : Comment : Perhaps add that SafeMode works as an answer to the linked question as well as a link-to your Connect ticket Comment : @MarianoC also noticed that SafeMode works in the linked question and I added it to the workarounds on my connect ticket . I m not sure running Visual Studio in SafeMode is a solution to this problem though", "Question : The Solution Explorer in Visual Studio is a nice tool for getting an overview of the code . But I find it annoying that I have to manually expand the file and browse its contents . Even pressing the sync button will only highlight the current file not showing where-in the file the cursor is . Is there an automatic way of navigating to the current position in the Solution Explorer What I am missing is an overview of the file I am currently editing highlighting the current location without having to manually navigate in another view . This feature exists in Eclipse and even DataFlex Studio . I am using Visual Studio 2012 . .. . Answer : If you use productivity-power-tools link https : visualstudiogallery.msdn.microsoft.com d0d33361-18e2-46c0-8ff2-4adea1e34fef you can view the classes within a file from the solution-explorer Comment : This feature is built into Visual Studio 2012 which the OP is using . Also the question isn t about the ability to display the contents of a file in Solution Explorer the question is about automatically selecting a specific type or member within those expanded contents according to the location of the caret within the active file basically making Solution Explorer behave like the Type and Member Drop Down Bars at the top of the editor window .", "Question : null .. . Answer : Using Visual Studio 2015 Community RC and Gulp 3.8.11 . Gulp easily creates tasks to create new folders and files within my Visual Studio project . However these new folders files are not automatically added to the project and do not show in the Solution Explorer unless you Show All Files . Then these folders files must be manually added as necessary . What changes need to be made to Visual Studio or the gulpfile task in order for new folders and new files to automatically add to the project and show in the Solution Explorer immediately after they are created by Gulp Thank you .", "Question : null .. . Answer : I work on around 35 40 different projects I have one project which when I open it from source-control-explorer displays blank entries when viewing it in solution-explorer . If I click on any of these blank entries in solution-explorer visual-studio-2015 crashes . I m able to access all the files in the solution if I browse to then via source-control-explorer . I ve tried disabling all my extensions I ve tried running studio in safe mode . Still happens . Has anyone came across this before or know how to fix it Screenshot of solution-explorer with blank entries showing http : i.stack.imgur.com ov9IF.png .. . .. . Edit : I ve also tried nuking my profile by running devenv.exe ResetUserData but it still happens when I open this one particular project .", "Question : Just got Visual Studio Express 2012 for Windows Desktop and finding myself overly annoyed that the Solution Explorer doesn t accurately reflect the state of my project . I keep clicking Refresh but it doesn t actually do anything . Microsoft s http : msdn.microsoft.com en-us library vstudio f1w05k2y 28v vs.100 29.aspx rather uh verbose explanation of how to use it was no help . Oddly enough my project does refresh sometimes but I can t figure out what the cause is . It s definitely not the refresh button . Here s what my Solution Explorer looks like right now : .. . my solution-explorer http : i1078.photobucket.com albums w491 evesforeva 5ecfdce6-c98a-40f3-b60f-9e3e55588918 zpsb5df8a2b.jpg .. . I ve deleted a lot of these classes . Things like Term are what I typed while in the process of naming a class but the Solution Explorer shows them as separate classes . Also some of the classes I have aren t showing up . This whole thing is really messed up and I m having trouble visualizing what my project looks like because Solution Explorer doesn t show an up-to-date outline of my classes . How do I refresh the Solution Explorer Comment : What state is it not reflecting Do you want to click Show All Files .. . Answer : There s a show all files button in the top row of Solution Explorer . Click that and you should see your missing files folders . Right click and choose Include in Project . show all files http : i.stack.imgur.com hBphI.png Comment : It s not the files that are missing . It s the classes in a single file that are messed up . Comment : I have a similar problem I think . I reverted a file from Git but don t see how to refresh that file in VS 2010 Comment : My answer above didn t work Clicking Show All Files then right-click - Include in Project Comment : For class details such as the declaration order of members toggling Show All Files twice seems to do the trick .", "Question : VS2010 had the feature that viewing a file would automatically cause Solution Explorer to scroll to that file . With VS2012 viewing different files from within the IDE no longer scrolls and select the file in Solution Explorer automatically . Is it possible to get this feature back Is there a setting somewhere If so how where Comment : See also stackoverflow.com questions 3436222 http : stackoverflow.com questions 3436222 how-to-locate-a-file-in-solution-explorer-in-visual-studio-2010 Comment : use Find in Solution Explorer extension visualstudiogallery.msdn.microsoft.com http : visualstudiogallery.msdn.microsoft.com d2fc1e94-b85c-4a15-8569-390db1e04f47 which Adds the Find in Solution Explorer menu command to the context menu of open document tabs . Comment : If you have ReSharper I posted a context menu solution here http : stackoverflow.com a 32238950 264672 .. . Answer : Yes you can find that under Tools - Options - Projects and Solutions - Track Active Item in Solution Explorer . It s off by default as you ve noticed but once it s on Solution Explorer will expand folders and highlight the current document as you switch between files . Comment : Although I checked it It doesn t work in most cases . I think it is buggy in VS 2012 . When the solution-explorer is Auto Hide mode or unpinned it looses the active file position and moves the top It is really disgusting : Comment : Upvoted This is on by default in 2010 and I HATE it Luckily you can turn it off using the method above in 2010 . Thanks Comment : @MahmoudMoravej there is a bug reported regarding that matter connect.microsoft.com VisualStudio feedback details 777003 https : connect.microsoft.com VisualStudio feedback details 777003 solution-explorer-being-in-the-auto-hide-mode-doesnt-stay-in-sync-with-the-active-item Comment : Welcome to Visual Studio land where the bugs are reported and then never fixed Seriously I m seeing this bug today and it was reported 2 years ago . Comment : If Visual Studio was perfect then who would buy Resharper", "Question : How do you extend Tabs in Visual Studio 2013 It would be handy to extend the Tabs so that you can selectively track an item in Solution Explorer by right clicking on a tab . By default Visual Studio will track active items in Solution Explorer via the setting : Tools Options Projects and Solutions General Track Active Item in Solution Explorer . Having that turned on makes Solution Explorer jump around and is consequently confusing on large projects so I turn it off . But what I d like to be able to do is right-click on an open tab and select a menu item to make Solution Explorer track and display that file s location in Solution Explorer . Basically it would be on-demand selective file tracking . I know hovering over the tab you can see the file path and locate it that way . What I would like is a quicker shortcut to displaying the file location in Solution Explorer . If there is a plugin that already does this please let me know and provide a link . Otherwise I d be interested in knowing how to do this myself . Thanks . .. . Answer : There is a button on the Solution Explorer toolbar Sync with Active Document and the corresponding command SolutionExplorer.SyncWithActiveDocument for keyboard binding .", "Question : VS2010 had the feature that viewing a file would automatically cause Solution Explorer to scroll to that file . With VS2012 viewing different files from within the IDE no longer scrolls and select the file in Solution Explorer automatically . Is it possible to get this feature back Is there a setting somewhere If so how where Comment : See also stackoverflow.com questions 3436222 http : stackoverflow.com questions 3436222 how-to-locate-a-file-in-solution-explorer-in-visual-studio-2010 Comment : use Find in Solution Explorer extension visualstudiogallery.msdn.microsoft.com http : visualstudiogallery.msdn.microsoft.com d2fc1e94-b85c-4a15-8569-390db1e04f47 which Adds the Find in Solution Explorer menu command to the context menu of open document tabs . Comment : If you have ReSharper I posted a context menu solution here http : stackoverflow.com a 32238950 264672 .. . Answer : If you need one-off sync with the solution pane then there is new command Sync with Active Document default shortcut : Ctrl+ S . Explained here : Visual Studio 2012 New Features : Solution Explorer http : blogs.msdn.com b zainnab archive 2012 06 21 visual-studio-2012-new-features-solution-explorer.aspx Comment : This also works in Visual Studio 2013 . Even the Express editions . Comment : This should be available as an option in the context menu as well Comment : I learned from another answer in this thread that there is also an icon along the top of the solution-explorer which will sync with active document . Not sure if this was introduced in 2012 or 2013 but it works in 2013 . Comment : In VS2012 not tested in 2013 2015 one can use either the Track Active .. . option or the shortcut icon . Both are not possible . You will get message Keyboard combination is bound to command SolutionExplorer.SyncWithActiveDocument which is not currently available . Comment : YMMV but I find the default key shortcut cumbersome to press so I mapped this command to the F6 key instead . Works great for me .", "Question : I have a lot of files in my current project with a custom internal extension . It would be very helpful for me if the Solution Explorer of visual-studio-2012 could show extended information about them similar to how it shows information for the .cs files . Is it possible to create an extension for the Explorer and where should I begin Thanks for the help Comment : Not trying to be snarky but did you click on the visual-studio-extensions tag you tagged this question with .. . Answer : I expect a great place to begin would be to look through Mads Kristensen s WebEssentials https : github.com madskristensen WebEssentials2013 repo . It s a great extension that adds a number of customizations to the Solution Explorer such as nesting minified js files under the originals . It should be a great place to find more specific topics to ask questions about . Comment : Thanks a lot . I will check the repo .", "Question : VS2010 had the feature that viewing a file would automatically cause Solution Explorer to scroll to that file . With VS2012 viewing different files from within the IDE no longer scrolls and select the file in Solution Explorer automatically . Is it possible to get this feature back Is there a setting somewhere If so how where Comment : See also stackoverflow.com questions 3436222 http : stackoverflow.com questions 3436222 how-to-locate-a-file-in-solution-explorer-in-visual-studio-2010 Comment : use Find in Solution Explorer extension visualstudiogallery.msdn.microsoft.com http : visualstudiogallery.msdn.microsoft.com d2fc1e94-b85c-4a15-8569-390db1e04f47 which Adds the Find in Solution Explorer menu command to the context menu of open document tabs . Comment : If you have ReSharper I posted a context menu solution here http : stackoverflow.com a 32238950 264672 .. . Answer : There are many ways to do this : .. . .. . Go to current File once : .. . .. . Visual Studio 2013 .. . .. . VS 13 has it s own shortcut to do this : Ctrl+ S Press Ctrl + Release both keys Press the S key .. . .. . You can edit this default shortcut if you are searching for SolutionExplorer.SyncWithActiveDocument in your Keyboard Settings Tools- Options- Enviornment- Keyboard .. . .. . In addition there is also a new icon in the Solution Explorer more about this here http : stackoverflow.com a 27771877 2167804 . Sync with Active Document Button in VS2013 - Solution Explorer http : i.stack.imgur.com 8RmfS.png .. . .. . Visual Studio 2012 .. . .. . If you use VS 2012 there is a great plugin to add this new functionality https : visualstudiogallery.msdn.microsoft.com 291836cc-febe-44ad-86b0-b745485110e7 from VS2013 to VS2012 : . The default shortcut is strg + alt + . I think this one is the best as navigating to the solution-explorer is mapped to strg + . Resharper .. . .. . If you use Resharper try Shift+Alt+L .. . .. . This is a nice mapping as you can use Strg+Alt+L for navigating to the solution-explorer .. . .. . Track current file all the time : .. . .. . Visual Studio 2012 : .. . .. . If you like to track your current file in the solution-explorer all the time you can use the solution from the accepted answer Tools- Options- Projects and Solutions- Track Active Item in Solution Explorer but I think this can get very annoying in large projects . Comment : For the non-Germans reading this answer replace Strg with Ctrl with for the VS2012 solution .", "Question : Is there a way to collapse all the files at once in the Solution Explorer http : en.wikipedia.org wiki Microsoft Visual Studio Other tools window in Visual Studio .. . Answer : Try free VSCommands 2010 Lite extension http : vscommands.com download . It has this and few other free features .", "Question : Is there a way to collapse all the files at once in the Solution Explorer http : en.wikipedia.org wiki Microsoft Visual Studio Other tools window in Visual Studio .. . Answer : Of course you can collapse any selected node by pressing - but I understand you are probably looking to collapse the entire tree .", "Question : This question already has an answer here : .. . .. . Why doesn t Visual Studio refresh the folders when I click the Solution Explorer refresh button questions 472316 why-doesnt-visual-studio-refresh-the-folders-when-i-click-the-solution-explorer 2 answers .. . .. . I have copied the source code from source-control-explorer to my local drive . the mapping is done and i am able to work on the code and build it . However there are some files which doesnot show up in the Solution Explorer although it shows in the local copy of drive . I tried to refresh it and i cannot get the correct folder structure in solution-explorer . Any advice how to get it .. . Answer : To see other files in the solution-explorer click the Show All Files button as shown in the image below . This will allow you to see all the files in your project folder . enter image description here http : i.stack.imgur.com v6ZBQ.png .. . .. . I hope this can help you .", "Question : Just got Visual Studio Express 2012 for Windows Desktop and finding myself overly annoyed that the Solution Explorer doesn t accurately reflect the state of my project . I keep clicking Refresh but it doesn t actually do anything . Microsoft s http : msdn.microsoft.com en-us library vstudio f1w05k2y 28v vs.100 29.aspx rather uh verbose explanation of how to use it was no help . Oddly enough my project does refresh sometimes but I can t figure out what the cause is . It s definitely not the refresh button . Here s what my Solution Explorer looks like right now : .. . my solution-explorer http : i1078.photobucket.com albums w491 evesforeva 5ecfdce6-c98a-40f3-b60f-9e3e55588918 zpsb5df8a2b.jpg .. . I ve deleted a lot of these classes . Things like Term are what I typed while in the process of naming a class but the Solution Explorer shows them as separate classes . Also some of the classes I have aren t showing up . This whole thing is really messed up and I m having trouble visualizing what my project looks like because Solution Explorer doesn t show an up-to-date outline of my classes . How do I refresh the Solution Explorer Comment : What state is it not reflecting Do you want to click Show All Files .. . Answer : Choose the project where you deleted the file and than click on show all files enter image description here http : i.stack.imgur.com zGbzO.png .. . .. . Now you will get excluded Removed files enter image description here http : i.stack.imgur.com DWXEx.png .. . .. . Right Click include in project .", "Question : VS2010 had the feature that viewing a file would automatically cause Solution Explorer to scroll to that file . With VS2012 viewing different files from within the IDE no longer scrolls and select the file in Solution Explorer automatically . Is it possible to get this feature back Is there a setting somewhere If so how where Comment : See also stackoverflow.com questions 3436222 http : stackoverflow.com questions 3436222 how-to-locate-a-file-in-solution-explorer-in-visual-studio-2010 Comment : use Find in Solution Explorer extension visualstudiogallery.msdn.microsoft.com http : visualstudiogallery.msdn.microsoft.com d2fc1e94-b85c-4a15-8569-390db1e04f47 which Adds the Find in Solution Explorer menu command to the context menu of open document tabs . Comment : If you have ReSharper I posted a context menu solution here http : stackoverflow.com a 32238950 264672 .. . Answer : If you don t have ReSharper installed and still want to use the shortcut Shift + Alt + L to move focus to the current file in Solution Explorer in Visual Studio 2013 then please follow these steps : .. . .. . 1 . Go to Tools- Options and search for Keyboard in the Search Options textbox : .. . .. . enter image description here http : i.stack.imgur.com SlJVP.png .. . .. . 2 . In the Show commands containing box type solutionexplorer and then in the list below look for the SyncWithActiveDocument command : enter image description here http : i.stack.imgur.com KKLED.png .. . .. . 3 . Click in textbox under Press short keys label and press : Shift + Alt + L and click the Assign button and you are done : enter image description here http : i.stack.imgur.com JrVTf.png .. . .. . To verify open any file in Visual Studio and press the shortcut keys Shift + Alt + L and you ll see the file in the solution-explorer . Enjoy Comment : NB : for VS2012 under the Visual C++ 6 scheme Shift + Alt + L is used for Edit.LineCut cf . here https : msdn.microsoft.com en-us library da5kh0wa v vs.110 .aspx . Comment : @KyleKanos good catch .", "Question : Just got Visual Studio Express 2012 for Windows Desktop and finding myself overly annoyed that the Solution Explorer doesn t accurately reflect the state of my project . I keep clicking Refresh but it doesn t actually do anything . Microsoft s http : msdn.microsoft.com en-us library vstudio f1w05k2y 28v vs.100 29.aspx rather uh verbose explanation of how to use it was no help . Oddly enough my project does refresh sometimes but I can t figure out what the cause is . It s definitely not the refresh button . Here s what my Solution Explorer looks like right now : .. . my solution-explorer http : i1078.photobucket.com albums w491 evesforeva 5ecfdce6-c98a-40f3-b60f-9e3e55588918 zpsb5df8a2b.jpg .. . I ve deleted a lot of these classes . Things like Term are what I typed while in the process of naming a class but the Solution Explorer shows them as separate classes . Also some of the classes I have aren t showing up . This whole thing is really messed up and I m having trouble visualizing what my project looks like because Solution Explorer doesn t show an up-to-date outline of my classes . How do I refresh the Solution Explorer Comment : What state is it not reflecting Do you want to click Show All Files .. . Answer : There is a refresh icon option in the top row of solution-explorer . check the image http : i.stack.imgur.com IKYbi.png", "Question : What are the ways if any to manually sort files in folders in Solution Explorer Visual Studio 2015 It s not convenient to have a lot of files sorted automatically alphabetically because you usually want to have them sorted according to your own custom business logic . So far the only solution I think of is to name files 01 xxx.cs 02 xxx.cs etc . in each folder . But it s of course ugly because you want your files to be named as classes and you will also have to rename them whenever they change folders . Are there any other better ways There are similar but not exactly the same questions Custom file sorting in VS2010 Solution Explorer http : stackoverflow.com questions 8948023 custom-file-sorting-in-vs2010-solution-explorer Visual studio file sorting order http : stackoverflow.com questions 7464902 visual-studio-file-sorting-order which are old or do not have answers maybe there are some new features or workarounds available as of today .. . Answer : In the Solution-explorer files are currently sorted alphabetically . The only way currently to sort files is to put them in folders projects and sort those on name . solution .. . .. . AProject .. . .. . BProject .. . .. . There are some request on the Visual-Studio feedback site mentioning that they are considering this . https : visualstudio.uservoice.com forums 121579-visual-studio-2015 suggestions 7878282-custom-project-order-in-visual-studio-solution Comment : Unfortunately the request is about sorting of projects while my question is about sorting of files in a project . Comment : @Bad its the same for files . Let me find the right feedback topic for you . Comment : @Bad I have added the answer with a more recent feedback . Although this is on projects the same goes for file order sorting ." ] }
[ "yes-answer-long", "yes-answer-short" ]
visual-studio
UNK_RELATION
aleagpu@gpu@41
aleagpu -- alea gpu is a cross-platform @placeholder development-environment for .net .
{ "confidence": [ 42.63806915283203, 40.57298278808594, 37.96488952636719, 37.74205780029297, 37.71892166137695, 36.89961242675781, 33.92881774902344, 33.92881774902344, 33.395973205566406, 33.38934326171875, 33.25188446044922, 32.55044937133789, 32.23195266723633, 31.748205184936523, 31.320722579956055, 31.152090072631836, 31.138898849487305, 31.138898849487305, 31.138898849487305, 30.844791412353516, 30.323829650878906, 30.04774284362793, 29.57610511779785, 29.57610511779785, 29.57610511779785, 29.57610511779785, 29.38644027709961, 29.38644027709961, 29.38644027709961, 29.38644027709961, 29.38644027709961, 29.38644027709961, 28.54399299621582, 28.53080177307129, 28.418716430664062, 28.101654052734375, 27.031553268432617, 27.031553268432617, 27.031553268432617, 27.025890350341797, 27.025890350341797, 27.025890350341797, 27.025890350341797, 27.025890350341797, 27.025890350341797, 26.799375534057617, 26.786184310913086, 26.786184310913086, 26.778343200683594, 25.876468658447266, 25.68622589111328, 25.581180572509766, 25.243038177490234, 25.243038177490234, 25.03372573852539, 24.62839698791504, 24.60797119140625, 24.60797119140625, 24.41779327392578, 24.341367721557617, 24.164569854736328, 24.131851196289062, 24.023948669433594, 23.963056564331055, 23.43111801147461, 22.711881637573242, 22.711881637573242, 22.711881637573242, 22.711881637573242, 22.673175811767578, 22.63494110107422, 22.62761878967285, 22.2269287109375, 22.133346557617188, 21.59231185913086, 21.556472778320312, 21.556472778320312, 21.228466033935547, 21.228466033935547, 20.859054565429688, 20.600299835205078, 20.389511108398438, 20.103784561157227, 20.103784561157227, 20.103784561157227, 20.103784561157227, 19.960094451904297, 19.81185531616211, 19.81185531616211, 19.610342025756836, 19.231338500976562, 18.984214782714844, 18.65446662902832, 18.533899307250977, 18.359167098999023, 18.34577178955078, 18.342269897460938, 18.3275146484375, 18.218910217285156, 17.97873306274414 ], "content": [ "yes but the support page directed me to stackflow to ask questions using the aleagpu tag Be part of the Alea GPU community and ask your questions on stackoverflow", "I saw this question while evaluating Alea GPU .", "Is there anything equivalent in Alea GPU and how is it used", "Extending Alea GPU with sorting primitives is still pending but in the pipeline .", "You can set two settings to get this work : .. . .. . Alea GPU will first search the natives in your Resource.Path if the native for your platform is not yet there Alea GPU will search resource assemblies from Resource.AssemblyPath and extract the natives of your platform from the resource assembly to the resource working path .", "How can we free GPU memory of an array with AleaGpu", "We will support atomicCAS and shfl xor in the upcoming version 2.1 of Alea GPU which will be released soon .", "BTW the current alea gpu uses nvidia llvm compiler from CUDA 6.0 .", "Have you contacted Alea", "From the Manual : .. . .. . Alea GPU is implemented with F so it uses the F runtime .", "Although the the Alea GPU website explains what to do install Alea through NuGet install license provides code etc .", "I am working on some GPU calculation algo using Alea GPU for the first time .", "I m new to using Alea GPU Visual Studio and F .", "Here I first list the full test code : .. . .. . In Alea GPU a worker represents a CUDA context and currently we are using the pattern that one GPU uses one dedicated thread and on that thread the CUDA context is attached .", "Of course Alea Gpu works with those types the problem you met is because you need specify the exact type .", "I cannot find these two apis atomicCAS and shfl xor in the aleagpu framework .", "I am using Alea nugget packages .", "The documentation on Alea is really sparse in some places .", "Is it possible to use the cuFFT library with Alea as wrapper", "I would like to know if this is possible if I use Alea GPU", "Having done some work implementing various ML algorithms in Alea I ve tried benchmarking some simple but essential routines in Alea .", "Possible duplicate of Alea GPU Tutorial not compiling on VS 2015 Update 2 with FSharp.Core 4.4.0.0 http : stackoverflow.com questions 36372525 alea-gpu-tutorial-not-compiling-on-vs-2015-update-2-with-fsharp-core-4-4-0-0", "With Alea GPU V2 the new version we have now two options : .. . .. . 1 .", "Alea GPU has cuBlas integrated see tutorial http : quantalea.com static app tutorial examples cublas index.html", "As it turns out I need to pass more than 16 arguments and apparently Alea GPU has a limitation for 16 arguments .", "If you use Alea GPU from C or VB you also need version 3.1 or higher of FSharp.Core.dll assembly .", "What would be the preferred way of doing a warp shuffle in Alea", "How would one go about fixing the leaks with Alea", "I would convolve two multi-dimensional array using Alea cuda .", "If so what other cuda library are usable from Alea", "The Alea Community Basic Developer library allows up to 2688 cores .", "If the Alea library sets a blockSize of 256 this is a guess that gives a gridSize of 10.5 .", "3 With AleaGpu do we have a command to free to totaly the GPUmemory", "Because Alea cuBase support fermi or higher architecture .", "I have done the following to create an Alea GPU project in Visual Studio 2012 Professional : .. . .. . 1 .", "I am getting error while compiling Alea GPU Tutorial : https : github.com quantalea AleaGPUTutorial in Visual Studio 2015 Community Update 2 with FSharp.Core version 4.4.0.0 on a .Net 4.5 runtime .", "This is because in Alea GPU Tutorial project it contains some tests of wrapper of NVIDIA libraries the cuBLAS for example .", "And Alea GPU doesn t ship native of these libraries so you need first do some configuration job to let it work .", "In other words does Alea GPU compilation procedure allows keeping the generated optimized unoptimized LLVM IR code", "Alea GPU s random module is designed follow the SPRNG library sprng.org http : www.sprng.org .", "In your mapping module both Alea code and the cublas code you should sync the worker sync the CUDA context .", "Which Alea gpu s launching time will be slower than native C code since it will do some marshaling of the kernel arguments .", "I actually knew that CUDA had asynchronous lauches by default in C++ but I assumed that it was different in Alea .", "Use Alea.CUDA.Intrinsic . default-value T see here http : quantalea.com static app manual reference alea cuda alea-cuda-intrinsic.html .", "I am guessing I did not setup Alea correctly but the troublesome thing is that everything else works for me perfectly .", "How can we copy an array with multiple dimension to the Kernel in AleaGPU", "I m trying to convert a kernel written for Cudafy to Alea .", "Is there a way to allocate multiple arrays in shared-memory in Alea", "I am trying to do this on GTX 970 and Alea is latest 2.2.0.3307 .", "Not knowing anything about aleagpu I find it odd that you would call dOutputs.Gather but not dInputs.Gather .", "It is suggested that you make the instance of GPU module or Program to be long lived since they represent the compiled GPU code .", "It surprised me to find out that Alea takes roughly 3x longer than the equivalent cuBLAS call to sgeam do the same thing .", "I think this might be a bug in disposing the GPU module .", "I m no expert on GPU programming but have a basic understanding .", "The library and or library package can place constraints on this but it doesn t decide it . Unfortunately Alea .", "Alea GPU version until 2.2 newest for now doesn t support malloc array2d yet so you have to flatten the index by row and col by yourself in kernel .", "Is AleaGPU a special case where this would be ok", "A basic AleaGPU C implementation looks like this :", "Either I am missing something or Alea is not freeing memory correctly for some reason .", "I don t really know how AleaGPU works but it looks like it expects you to return an F quotation which it then presumably compiles into GPU code .", "So in this filling operation no new GPU memory is allocated you just fill it .", "How can we use array of 10000 rows and 10000 cols instead of rows 10 and rows 5 with AleaGpu", "Dispose free the GPU memory", "I get the following exception when running Alea samples in F interactive : .. . .. . System.UnauthorizedAccessException : Access to the path C : Program Files x86 Microsoft SDKs F 4.0 Framework v4.0 Alea.CUDA.CT.Native.X86.B32.Windows is denied .", "2 Does a GC.Collect for GPU exist", "the idea is say you want 1M random numbers and you don t want create GPU memory for 1M numbers .", "So actually your timing measument includes the GPU code compiling time .. . .. . 2 .", "which means each time you do reduction you measures the time including the GPU compiling time", "cuda-memcheck 7.0 40 actually forced me to reset the PC as the GPU went out .", "Example : .. . .. . It seems in Alea you can only allocate a single array in shared-memory .", "You can have overload definitions on the GPU", "So how are higher-order-functions like these generally implemented in AleaGPU-C", "Here is a workaround by switch the CUDA context mode to Threaded and try to use use keyword to maintain the life time of GPU module GPU module is a result-of compilation so it should be kept alive as long as possible to avoid re-compiling during runtime .", "on the GPU card .. . .. . Inside the function sub if we want to free GPU memory of array dOutputs dInputs how should we do it", "that returns a DeviceMemory object which implements .NET IDisposable interface .", "No Gather just copies the data from GPU to host memory .", "The type returned by Worker.Malloc is DeviceMemory this represents one memory allocation on Gpu .", "Alea Unbound library provides optimized matrix-multiplication implementations http : quantalea.com static app tutorial examples unbound matrixmult.html .. . 2 .", "The performance of the Alea Unbound matrix-multiplication is for large matrices up to 2 times faster than the simple CUDA SDK matrixMulCUBLAS project .", "Below is 2 versions of the code : .. . .. . First the slow version : .. . .. . Now the fast version : .. . .. . Here is some information about my system : .. . .. . Name Intel R Core TM i5-4590 CPU @ 3.30GHz .. . Architecture x64 .. . Frequency 3 300 MHz .. . Number of Cores 4 .. . Page Size 4 096 .. . Total Physical Memory 8 050.00 MB .. . Available Physical Memory 902.00 MB .. . Hybrid Graphics Enabled False .. . Version Name Windows 10 Pro .. . Version Number 10.0.10586 .. . Nsight Version 5.1.0.16062 .. . Visual Studio Version 14.0 .. . .. . GPU : NVidia GTX 980 Ti .. . .. . .NET CLR : .NET 4.6 .", "I ve been trying to use Alea GPU to write the parallel Floyd-Warshall algorithm in F and basing myself on the CUDA code another user presented here .. . .. . The Floyd-Warshall algorithm in CUDA http : stackoverflow.com questions 19861532 the-floyd-warshall-algorithm-in-cuda .. . .. . I wrote the following simple implementation .. . .. . However when the following lines are ran in fsi .. . .. . The output is .. . .. . Which it should not be given that the usual iterative sequential floydwarshall .. . .. . gives me .. . .. . My question is what s happening", "The second way is to open namespace Alea.CUDA.Utilities and use the auto-opened NumericLiteralG module see here http : quantalea.com static app manual reference alea cuda alea-cuda-utilities-numericliteralg.html then in your inline generic function you can directly write things like 0G 1G etc. . .. . .. . For your second question I paste some source code of the helper warp shuffle type which includes broadcasting usage .", "That doesn t mean GPU device memory running out it means you are running out your host memory .", "3 As GPU card have a limited Memory we need to use Single Int16 Int32 instead of double .", "Like a regular code on CPU you can have more than one definition for the same function on the GPU .", "By coding a loop with using it is releasing the memory on the GPU as soon as you get out of the loop .", "But I don t think this would work for AleaGPU coding in all cases because the quoted expression in the F version is a device function .", "It means that we can work with much more function on the GPU .", "The default worker and default cublas object are built on your default GPU device .", "http : quantalea.com static app manual reference alea cuda il alea-cuda-il-ilgpumodule.html .. . .. . I know that 16 arguments sounds like a bad idea to begin with.. . What other options are there", "It uses Fody plugin to compile GPU code during MSBuild process so your appliction doesn t need to compile GPU code in runtime .", "BTW each time you call DeviceMemory.Gather it will a new a .NET array and fill it .", "Then the GPU compiling will happens in runtime so called JIT compile", "But overall kernel launching from .net is slower than the native C kernel launching : .. . .. . Also you might noticed I run this test twice and in the first time the test without pre-loaded module uses 304 ms but in the second time the test without pre-loaded module uses only 29 ms .", "In normal code I would of course wrap the things into it s own class but what can I do in GPU code", "Finally you load the PTX module into the GPU worker .", "While Alea GPU allows you to access LLVM IR in several ways : .. . .. . Method 1 .. . .. . You use the workflow-based method http : quantalea.com static app manual compilation-workflow-based gpu coding.html to code a GPU module as a template then you compile the template into an LLVM IR module then you link the LLVM IRModule optionally with some other IR modules into a PTX module .", "If that s the case because C and F quotations are two different things you probably won t be able to return a C quotation to AleaGPU in lieu of the F one .", "But note if you rely on GC to collect there is delay it is done in a GC thread and since Gpu memory is all pinned memory cannot be swapped to disk so it is recommended that you dispose it explicitly .", "By using the in-place method shown in this example you provide a .net array and let it to be filled by the data from the device ." ] }
{ "confidence": [ 59.85344696044922, 53.400447845458984, 51.08660125732422, 50.73760986328125, 49.45062255859375, 44.535247802734375, 43.16529083251953, 41.01213836669922, 40.57870101928711, 40.165199279785156, 40.03696823120117, 36.77445983886719, 36.544166564941406, 36.16945266723633, 35.98845672607422, 35.6580810546875, 35.54446792602539, 35.43820571899414, 34.37514877319336, 33.47794723510742 ], "content": [ "Question : I cannot find these two apis atomicCAS and shfl xor in the aleagpu framework . Is there a special problem using them or are they likely to be supported in the future Comment : Perhaps they were overlooked Have you contacted Alea Comment : yes but the support page directed me to stackflow to ask questions using the aleagpu tag Be part of the Alea GPU community and ask your questions on stackoverflow Our community is constantly growing . Comment : Oh ok . This seems to me to be more of a question for the devs than for the community though I mean how are we to know if it will be added Comment : Yes I agree . I have emailed their commercial support now . At least this might save someone else a mornings exploration . Comment : Release 2.1 is available and it supports atomicCAS and shfl xor . There is an issue with atomicCAS on Linux though which is going back to an issue of NVIDIA NVVM on Linux . .. . Answer : We will support atomicCAS and shfl xor in the upcoming version 2.1 of Alea GPU which will be released soon . Comment : Release 2.1 is available and it supports atomicCAS and shfl xor as mentioned here https : twitter.com EgloffDaniel status 611530934207291392 . There is an issue with atomicCAS on Linux though .", "Question : How can we copy an array with multiple dimension to the Kernel in AleaGPU How can we develop with a multiple dimension array in a Kernel Malloc don t seem to accept it .. . Answer : Alea GPU version until 2.2 newest for now doesn t support malloc array2d yet so you have to flatten the index by row and col by yourself in kernel . For host side you can make some extension method to use some CUDA Driver API P Invoke These P Invoke function is available from Alea.CUDA.dll to trasfer a pinned .NET array to or from device . So here is a quick workround I wrote :", "Question : I get the following exception when running Alea samples in F interactive : .. . .. . System.UnauthorizedAccessException : Access to the path C : Program Files x86 Microsoft SDKs F 4.0 Framework v4.0 Alea.CUDA.CT.Native.X86.B32.Windows is denied . I am using Alea nugget packages . .. . Answer : You can set two settings to get this work : .. . .. . Alea GPU will first search the natives in your Resource.Path if the native for your platform is not yet there Alea GPU will search resource assemblies from Resource.AssemblyPath and extract the natives of your platform from the resource assembly to the resource working path . By default the resouce path is set to the base directory of your assembly that is why you see it searchs in the Framework directory . For scripts you need manually set them . For more details please reference : http : quantalea.com static app manual compilation-jit compilation in detail.html Comment : thanks it worked for me", "Question : The following F code crashes on the third call with a no memory exception . Either I am missing something or Alea is not freeing memory correctly for some reason . I ve tried it in both F Interactive and Compiled . I ve also tried calling dispose manually but it did not work . Any idea why Comment : Not knowing anything about aleagpu I find it odd that you would call dOutputs.Gather but not dInputs.Gather . I assume this is the clean up which follows a call to Malloc . Comment : No Gather just copies the data from GPU to host memory . .. . Answer : GC works in a separate background-thread so if you new huge arrays frequentely it will easily throw that out-of-memory exception . In this big array case I suggest you to use a in-place modification style that will be more stable . I created a test to show that : NOTE since the array is very big you d better go to project property page in the Build tab uncheck the Prefer 32-bit to make sure it runs as 64 bit process .. . .. . Please note exception System.OutOfMemoryException ALWAYS means host memory the GPU memory will throw CUDAException if it find there is not enough memory . BTW each time you call DeviceMemory.Gather it will a new a .NET array and fill it . By using the in-place method shown in this example you provide a .net array and let it to be filled by the data from the device .", "Question : How can we free GPU memory of an array with AleaGpu on the GPU card .. . .. . Inside the function sub if we want to free GPU memory of array dOutputs dInputs how should we do it 1 Will dOutputs . Dispose dInputs . Dispose free the GPU memory 2 Does a GC.Collect for GPU exist is it necessary 3 With AleaGpu do we have a command to free to totaly the GPUmemory 3 As GPU card have a limited Memory we need to use Single Int16 Int32 instead of double . I tried : .. . .. . but .. . .. . don t to take it . I get error there is some invalid argument . How can we make worker.Launch Kernel lp .. . take Int16 Int32 and single .. . Answer : The type returned by Worker.Malloc is DeviceMemory this represents one memory allocation on Gpu . It is disposable so you can dispose it yourself or let GC to clean it . But note if you rely on GC to collect there is delay it is done in a GC thread and since Gpu memory is all pinned memory cannot be swapped to disk so it is recommended that you dispose it explicitly . To make code easier you can use C using keyword . Of course Alea Gpu works with those types the problem you met is because you need specify the exact type . Note a 1.0 is of type double and 1.0f is of type single . The reason is the kernel function is provided to worker launch method by delegate so you need specify the correct data type to help it to find the kernel method . Implicit type-conversion doesn t work here . For numeric literal you can reference here http : stackoverflow.com questions 5820721 c-sharp-short-long-int-literal-format . I did a small example code and it works : Comment : This is excellent", "Question : I tried to use the DeviceMapModule and the DeviceMap2Module for simple mapping operations . To my surprise it is about 2x slower than writing the kernel by hand . For the hand written kernel I did not do anything special . I just copied the Getting Started Square kernel and modified it to do sigmoid . Below is 2 versions of the code : .. . .. . First the slow version : .. . .. . Now the fast version : .. . .. . Here is some information about my system : .. . .. . Name Intel R Core TM i5-4590 CPU @ 3.30GHz .. . Architecture x64 .. . Frequency 3 300 MHz .. . Number of Cores 4 .. . Page Size 4 096 .. . Total Physical Memory 8 050.00 MB .. . Available Physical Memory 902.00 MB .. . Hybrid Graphics Enabled False .. . Version Name Windows 10 Pro .. . Version Number 10.0.10586 .. . Nsight Version 5.1.0.16062 .. . Visual Studio Version 14.0 .. . .. . GPU : NVidia GTX 980 Ti .. . .. . .NET CLR : .NET 4.6 . .. . Answer : I m no expert on GPU programming but have a basic understanding . I saw this question while evaluating Alea GPU . The NVidia GTX 980 Ti has 2816 cores . With a blockSize of 256 that gives a grid size of 2816 256 11 . The Alea Community Basic Developer library allows up to 2688 cores . If the Alea library sets a blockSize of 256 this is a guess that gives a gridSize of 10.5 . Could it be that the job is being split into two The first run saturating the 2688 core limit and then the rest running on 2816 - 2688 128 cores", "Question : Having done some work implementing various ML algorithms in Alea I ve tried benchmarking some simple but essential routines in Alea . It surprised me to find out that Alea takes roughly 3x longer than the equivalent cuBLAS call to sgeam do the same thing . If I was doing something more complex like matrix-multiplication where I had to juggle shared-memory this would ve been understandable but the following are just simple array transformations . DeviceUnaryTransformModule transform module s kernel is the same as from the basic transform example the only difference is that afterwards instead of gathering to host it keeps the data on the device . Also the Unbound s reduce works really poorly for me so badly in fact that there must be an error in the way I ve been using it . It is roughly 20x slower than using sgeamv twice to sum a matrix . I haven t tried comparing this with CUDA C++ but for simple things I think it should be on par with cuBLAS . I thought that the optimization flag might have been off but then found it was on by default . Any optimization tips I am missing here .. . Answer : I think there are some issues in your testing code : .. . .. . 1 . In your mapping module you should preload the GPUModule . GPUModule is JIT-compiled when the first time it is launched . So actually your timing measument includes the GPU code compiling time .. . .. . 2 . In your mapping module both Alea code and the cublas code you should sync the worker sync the CUDA context . The CUDA programming is async style . So when you launch the kernel it returns immediately without waiting for the kernel to complete . If you don t sync the worker actually you are measuring the kernel launching time not the kernel executing time . Which Alea gpu s launching time will be slower than native C code since it will do some marshaling of the kernel arguments . There are some other issues related to the kernel launching time which I will show you in following example code . 3 . Your reduce test actually load the reduce module each time which means each time you do reduction you measures the time including the GPU compiling time It is suggested that you make the instance of GPU module or Program to be long lived since they represent the compiled GPU code . So I did a test following your usage . Here I first list the full test code : .. . .. . In Alea GPU a worker represents a CUDA context and currently we are using the pattern that one GPU uses one dedicated thread and on that thread the CUDA context is attached . We call this worker with dedicated thread . So this also means each time you call a CUDA API such as kernel launching we have to switch to the worker thread . If you are doing a lot of kernel launching it is suggest to use Worker.Eval function to execute your code inside the worker thread to avoid thread switching . There is also an experimental feature of creating worker on current thread which thus avoid the thread switching but we are still optimize this usage . For more detail please reference here http : quantalea.com static app manual programming gpus-device and worker.html .. . .. . Now we first use the default worker to do a test without sync the worker thus it means we are comparing the kernel launching time only . The default worker is a worker with dedicated thread so you can see it performances better when we use Worker.Eval . But overall kernel launching from .net is slower than the native C kernel launching : .. . .. . Also you might noticed I run this test twice and in the first time the test without pre-loaded module uses 304 ms but in the second time the test without pre-loaded module uses only 29 ms . The reason is we use LLVM P Invoke to compile the kernel . And those P Invoke function are lazy function so they have some initialization when you first use it after that it becomes faster . Now we sync the worker which actually measured the real kernel executing time now they are similar . The kernel I created here is very simple but it does op on both matrix A and B : .. . .. . Now if we test them on threadless worker they will be a little bit fast since there is no thread-switching : .. . .. . Now here is test over reduce : .. . .. . Please note in this reduction test there are one memory gathering memcpyDtoH for each reduction to get the result from device to host . and this memory copy API calling automatically sync the worker because if the kernel isn t finished the value is meaningless . So if you want to compare the performance with C code you should also copy the result scalar from device to host . although it is just one CUDA api invoking but as you did it for many iterations 100 in this example it will acuumulate some timing there . Hope this answeres your question . Comment : BTW the current alea gpu uses nvidia llvm compiler from CUDA 6.0 . We will release a new version which upgrade it to CUDA 7.5 when CUDA 7.5 is released . From what I observed now this upgrading increased the performance of generated kernel . Comment : This is a great answer . I actually knew that CUDA had asynchronous lauches by default in C++ but I assumed that it was different in Alea . That was because I did not know that asychronous kernel execution acts a bit like lazy-evaluation in functional languages . I thought it was something else . Thanks .", "Question : Sort is not trivial to implement and I can t find the module in either documentation or the autocomplete . Is it not supported yet .. . Answer : Extending Alea GPU with sorting primitives is still pending but in the pipeline . In the mean time you would need to implement your own sorting kernels .", "Question : I m starting down the exciting road of GPU programming and if I m going to do some heavyweight number-crunching I d like to use the best libraries that are out there . I would especially like to use cuBLAS from an F environment . CUDAfy offers the full set of drivers from their solution and I have also been looking at Alea.cuBase which has thrown up a few questions . The Alea.cuSamples project on GitHub makes a cryptic reference to an Examples solution : For more advanced test please go to the MatrixMul projects in the Examples solution . However I can t find any trace of these mysterious projects . 1 . Does anyone know the location of the elusive MatrixMul projects in the Examples solution 2 . Given that cuSamples performs a straightfoward matrix-multiplication would the more advanced version wherever it lives use cuBLAS 3 . If not is there a way to access cuBLAS from Alea.cuBase a la CUDAfy .. . Answer : With Alea GPU V2 the new version we have now two options : .. . .. . 1 . Alea Unbound library provides optimized matrix-multiplication implementations http : quantalea.com static app tutorial examples unbound matrixmult.html .. . 2 . Alea GPU has cuBlas integrated see tutorial http : quantalea.com static app tutorial examples cublas index.html Comment : Excellent news -- thanks Daniel . : Comment : The performance of the Alea Unbound matrix-multiplication is for large matrices up to 2 times faster than the simple CUDA SDK matrixMulCUBLAS project .", "Question : null .. . Answer : When I run the random module in succession it gives me the same results . Any way I can fix this The documentation on Alea is really sparse in some places . Comment : actually you are generating random number with same seed and same stream id and it should be same . Alea GPU s random module is designed follow the SPRNG library sprng.org http : www.sprng.org . Comment : Thanks . I never head about the SPRNG library before . Also this would be a good time to ask just how expensive are these streams in terms of memory and computation Comment : the idea is say you want 1M random numbers and you don t want create GPU memory for 1M numbers . So one solution could be you use 2 streams : let rng RandomModule.Create streams 2 seed time then rng.AllocCUDAStreamBuffer will allocate memory fo 0.5M numbers . Then you rng.Fill streamId 0 buffer . It will fill the buffer with the first 0.5M numbers . set streamId 1 fills the next 0.5M numbers . So in this filling operation no new GPU memory is allocated you just fill it .", "Question : How can we free GPU memory of an array with AleaGpu on the GPU card .. . .. . Inside the function sub if we want to free GPU memory of array dOutputs dInputs how should we do it 1 Will dOutputs . Dispose dInputs . Dispose free the GPU memory 2 Does a GC.Collect for GPU exist is it necessary 3 With AleaGpu do we have a command to free to totaly the GPUmemory 3 As GPU card have a limited Memory we need to use Single Int16 Int32 instead of double . I tried : .. . .. . but .. . .. . don t to take it . I get error there is some invalid argument . How can we make worker.Launch Kernel lp .. . take Int16 Int32 and single .. . Answer : You can have overload definitions on the GPU this is excellent . Like a regular code on CPU you can have more than one definition for the same function on the GPU . By coding a loop with using it is releasing the memory on the GPU as soon as you get out of the loop . Excellent Thank you Comment : Yes overloading is good but as you just give the kernel method by name Kernel so you must give parameters of the exact type so we can find which Kernel you mean that is why the implicit-conversion of numeric stuff doesn t work here . Comment : BTW @Emmanuel could you mark the answer as accepted answer if you accept it :", "Question : null .. . Answer : I would convolve two multi-dimensional array using Alea cuda . How can I do Is it possible to use the cuFFT library with Alea as wrapper If so what other cuda library are usable from Alea If are not usable is it in your plan", "Question : null .. . Answer : Nvidia Visual Profiler recommends that I try compile with the maxregcount flag . Is there anything equivalent in Alea GPU and how is it used I am using JIT-compilation and have found the JITMaxRegisters option but it seems to have no effect on the register count per thread . With this compile option the visual profiler still says 72 registers thread are being used . Are there any equivalent to maxregcount or launch bounds that I am missing Best wishes Blaavogn", "Question : Nvidia does not allow the access to the generated LLVM IR in the compilation flow of a GPU kernel written in CUDA C C++ . I would like to know if this is possible if I use Alea GPU In other words does Alea GPU compilation procedure allows keeping the generated optimized unoptimized LLVM IR code .. . Answer : Yes you are right Nvidia doesnot show you the LLVM IR you can only get the PTX code . While Alea GPU allows you to access LLVM IR in several ways : .. . .. . Method 1 .. . .. . You use the workflow-based method http : quantalea.com static app manual compilation-workflow-based gpu coding.html to code a GPU module as a template then you compile the template into an LLVM IR module then you link the LLVM IRModule optionally with some other IR modules into a PTX module . Finally you load the PTX module into the GPU worker . While you get the LLVM IRModule you can call its method Dump to print the IR code to console . Or you can get the bitcode as byte . I suggest you read more details here : .. . .. . 1 . Workflow-Based GPU Coding http : quantalea.com static app manual compilation-workflow-based gpu coding.html .. . 2 . Workflows in Detail http : quantalea.com static app manual compilation-workflows in detail.html .. . .. . The F would be something like this : .. . .. . Method 2 .. . .. . If you are using Method-based http : quantalea.com static app manual compilation-method-based gpu coding.html or Instance-based http : quantalea.com static app manual compilation-class instance-based gpu coding.html way to code GPU module you can add event handler for LLVM IR code generated and PTX generated though Alea.CUDA.Events . The code in F will look like : .. . .. . Extend GPU function by using LLVM code .. . .. . Finally there is an undocumented way to let you directly operate on LLVM IR code to construct the functions . It is done by attribute that implemented some IR building interface . Here is a simple example that accept the parameter and print it in compile-time and return it back :", "Question : The following F code crashes on the third call with a no memory exception . Either I am missing something or Alea is not freeing memory correctly for some reason . I ve tried it in both F Interactive and Compiled . I ve also tried calling dispose manually but it did not work . Any idea why Comment : Not knowing anything about aleagpu I find it odd that you would call dOutputs.Gather but not dInputs.Gather . I assume this is the clean up which follows a call to Malloc . Comment : No Gather just copies the data from GPU to host memory . .. . Answer : I guess you got System.OutOfMemoryException right That doesn t mean GPU device memory running out it means you are running out your host memory . in your example you created a rather large array in host and you calculate it and you gather another large array as output . The point is you use different variable name x y and z to store the output array and thus GC will have no chance to free it so eventually you will run out your host memory . I did a very simple test I use the stop value 30000 instead 100000 as in your example this test only uses host code no GPU code : .. . .. . And I ran this code in F interactive which is a 32bit process I got this : .. . .. . So that means after I created 2 such large array x1 and x2 I ran out of the host memory . To further confirm this I use same variable name which gives GC the chance to collect the old array and this time it works : .. . .. . and if I add GPU kernel it still works : .. . .. . Alternatively you can try to use 64bit process . Comment : You are right . The way I tested it originally in Interactive mode is by repeatedly calling squareGPU 0.0..0.001..100000.0 without any let bindings . For some reason when you do that repeatedly on the same line it does not trigger GC . Even executing 0.0..0.001..30000.0 without any function-calls causes the memory to clog up . I wonder what is up with this Comment : Uhmm then I don t know what is wrong you can see I ran it 8 times and it works fine . Do you mind to post the test that doesn t have the host memory issue Comment : Your example works for me and does free up memory properly when the variables go out of scope . If you open the task manager while executing 0.0..0.001..30000.0 0.0..0.001..30000.0 in F Interactive not inside a function but in the main scope you will see what I mean . The memory usage should go up without being freed due to it never going out of scope . As you say in the following post the GC works in a separate thread . Thanks you for the lesson . I wish I had reps so I could actually upvote you .", "Question : I have a fairly complex kernel that I am trying to write . As it turns out I need to pass more than 16 arguments and apparently Alea GPU has a limitation for 16 arguments . http : quantalea.com static app manual reference alea cuda il alea-cuda-il-ilgpumodule.html .. . .. . I know that 16 arguments sounds like a bad idea to begin with.. . What other options are there In normal code I would of course wrap the things into it s own class but what can I do in GPU code Comment : Can you pass an array or list Comment : you pass deviceptr T s for vector data but here it was about passing different things e.g . 2 numbers 3 arrays etc . .. . Answer : In this case you can retrieve an untyped kernel object through GPUModule.GPUEntities property then put those arguments into an list of Object type then you can launch it . You can also make some extension-methods for that purpose and make them to be type safe here is an example which I use only 3 arguments for simplicity : .. . .. . Note in this example I use Action T1 T2 T3 but Action type has maximum 16 types so you might need to define your own delegate to pass more than 16 argument types .", "Question : How can we copy an array with multiple dimension to the Kernel in AleaGPU How can we develop with a multiple dimension array in a Kernel Malloc don t seem to accept it .. . Answer : This is excellent it works very well Thank you very much for your answer this is really helpful .. . .. . I didn t know that we could call from the Kernel a Not-AOTCompile function like FlattenIndex This is really interesting and helpful . It means that we can work with much more function on the GPU . With your example I added a function 3 dimensions Array to class Extension to the example running with 2 GPU : .. . .. . Xiang Thank you very much for your help I would never find a solution like that This is excellent Kinds Regards .. . .. . Emmanuel", "Question : I am getting error while compiling Alea GPU Tutorial : https : github.com quantalea AleaGPUTutorial in Visual Studio 2015 Community Update 2 with FSharp.Core version 4.4.0.0 on a .Net 4.5 runtime . Fody : An unhandled-exception occurred : Exception : Could not load file or assembly FSharp.Core Version 4.3.1.0 Culture neutral PublicKeyToken b03f5f7f11d50a3a or one of its dependencies . The system cannot find the file specified . .. . .. . StackTrace : .. . .. . It happens both in Tutorial.Cs and Tutorial.Fs project no matter how I set up the bindingRedirect option in all possible .config files . It looks like those redirects are ignored by Fody reference loading mechanism . However even setting the tutorial solution to FSharp.Core 4.3.1.0 does not allow me to compile it . The error is the same . Do you have any ideas on how to fix it Comment : fsharp.github.io 2015 04 18 fsharp-core-notes.html https : fsharp.github.io 2015 04 18 fsharp-core-notes.html Comment : all recommended settings seem to be in-place except : Do not bundle FSharp.Core with a library Do not include a copy of FSharp.Core with your library or package . If you do you will create havoc for users of your library . The decision about which FSharp.Core a library binds to is up to the application hosting of the library . The library and or library package can place constraints on this but it doesn t decide it . Unfortunately Alea . NuGet packages do have FSharp.Core 4.3.1.0 bundled with it but it is not being picked-up during build either . Comment : I can see a screenshot of the App.config Comment : I have unfortunately only VS2012 - so I can not replicate your bug . Comment : Ping me when you have time .. . Answer : I ve built it successfully few times but they were completely random and I could not figured out what caused error disappearing . Perhaps it was some combination of restarting Visual Studio as administrator many times . Also I ve tried FSharp.Core.dll from different sources with random results too : .. . .. . http : www.nuget.org packages FSharp.Core .. . Visual F Tools 4.0 RTM https : www.microsoft.com en-us download confirmation.aspx id 48179 .. . . packages Alea.CUDA tools .. . .. . Official .. . .. . In AleaGPUTutorial https : github.com quantalea AleaGPUTutorial it is written : .. . .. . Before building within Visual Studio it is recommended that you restore the packages prior to opening the solution . This is due to a known issue of using Fody with F projects . You can find further details about this issue in the installation manual especially the Remarks section http : quantalea.com static app manual compilation-installation.html . From the Manual : .. . .. . Alea GPU is implemented with F so it uses the F runtime . If you use Alea GPU from C or VB you also need version 3.1 or higher of FSharp.Core.dll assembly . If you use Visual Studio you can locate that assembly by navigating to Add Reference - Assemblies - Extensions - FSharp.Core 4.3.1.0 . Alternatively you can add FSharp.Core http : www.nuget.org packages FSharp.Core NuGet package to your project . I did exactly what is written but got only random build success again . Last Hope .. . .. . How to use FSharp.Core 4.3.0 when all you have is 4.3.1 http : blog.ploeh.dk 2014 01 30 how-to-use-fsharpcore-430-when-all-you-have-is-431 .. . .. . I had lived with the na ve assumption that when you install F 3.1 it would automatically add redirects from FSharp.Core 4.3.0.0 to 4.3.1.0 or perhaps make sure that FSharp.Core 4.3.0.0 was also available . Apparently I ve become too used to Semantic Versioning which is definitely not the versioning scheme used for F http : stackoverflow.com a 20362049 126014 Comment : Did any of those work Comment : @ginkner All of these provide random results except Last Hope which I could not try .", "Question : I am trying to build the fsharp project within the AleaGPUTutorial project in Visual Studio 2015 on Windows 10 . Under References the path of the FSharp.Core.dll is shown to be C : Program Files x86 Reference Assemblies Microsoft FSharp.NETFramework v4.0 4.3.1.0 FSharp.Core.dll . So I assume this is not related to the question about using a different version 4.4.0.0 posted recently . Also the error messages in the other question are different from what I am getting as quoted below . In the other question the error was about not able to load find 4.3.1.0 whereas what I am getting is related to AOTCompilerServer exiting unexpectedly . When I tried to clean build only the fsharp project I am not interested in the csharp one at the moment I got the following error : .. . .. . Does anybody know what I might have missed Any pointers very much appreciated . Thanks a lot in advance Comment : Possible duplicate of Alea GPU Tutorial not compiling on VS 2015 Update 2 with FSharp.Core 4.4.0.0 http : stackoverflow.com questions 36372525 alea-gpu-tutorial-not-compiling-on-vs-2015-update-2-with-fsharp-core-4-4-0-0 Comment : I think it s not the same bug . I encountered the same error working with VS2015 . It occurred only on 1 machine out of 3 though . I am currently able to work around the error by changing the binding redirect in the file Alea.CUDA.AOTCompileServer.net40.fs31.anycpu x86.exe.config in Alea.CUDA.Fody... . from bindingRedirect oldVersion 0.0.0.0-4.3.1.0 newVersion 4.3.1.0 to bindingRedirect oldVersion 0.0.0.0-4.3.1.0 newVersion 4.4.0.0 . Does this work for you Comment : @MathiasK rner It does work Thank you . Do you care to put this in as an answer and then let me mark it as the right answer Is this how it s supposed to work here Comment : @AlbertPang I guess . Good to hear that it works . .. . Answer : I am currently able to work around the error by changing the binding redirect in the file Alea.CUDA.AOTCompileServer.net40.fs31.anycpu x86.exe.config in Alea.CUDA.Fody... . from bindingRedirect oldVersion 0.0.0.0-4.3.1.0 newVersion 4.3.1.0 to bindingRedirect oldVersion 0.0.0.0-4.3.1.0 newVersion 4.4.0.0 .", "Question : null .. . Answer : I ve been trying to use Alea GPU to write the parallel Floyd-Warshall algorithm in F and basing myself on the CUDA code another user presented here .. . .. . The Floyd-Warshall algorithm in CUDA http : stackoverflow.com questions 19861532 the-floyd-warshall-algorithm-in-cuda .. . .. . I wrote the following simple implementation .. . .. . However when the following lines are ran in fsi .. . .. . The output is .. . .. . Which it should not be given that the usual iterative sequential floydwarshall .. . .. . gives me .. . .. . My question is what s happening Comment : Your question has been resolved Comment : What do you mean Comment : Your question is asked quite a long time so maybe you already found a solution . That s why I asked ." ] }
[ "yes-answer-long", "yes-answer-short" ]
gpu
UNK_RELATION
cucumber-junit@cucumber-jvm@57
cucumber-junit -- the junit integration provided by the @placeholder project .
{ "confidence": [ 49.3541259765625, 46.2065315246582, 45.29449462890625, 45.27446365356445, 44.94842529296875, 43.29881286621094, 43.26202392578125, 42.68436050415039, 42.600460052490234, 42.067562103271484, 41.334835052490234, 40.76777648925781, 40.65355682373047, 40.222572326660156, 39.631813049316406, 39.17591857910156, 39.17591857910156, 39.17591857910156, 39.17591857910156, 37.874610900878906, 37.874610900878906, 37.874610900878906, 37.681854248046875, 37.53877258300781, 36.9859733581543, 36.47881317138672, 36.31695556640625, 36.296974182128906, 35.41973876953125, 34.450069427490234, 34.450069427490234, 34.450069427490234, 33.57701110839844, 33.42463684082031, 33.42463684082031, 33.377628326416016, 32.87989044189453, 32.527793884277344, 32.03192901611328, 31.709148406982422, 31.709148406982422, 31.709148406982422, 31.709148406982422, 31.557748794555664, 31.066242218017578, 30.934764862060547, 30.934764862060547, 30.925683975219727, 30.839693069458008, 29.844036102294922, 29.519203186035156, 29.455350875854492, 29.455350875854492, 29.455350875854492, 29.455350875854492, 29.058795928955078, 28.97280502319336, 28.571359634399414, 28.017955780029297, 28.017955780029297, 28.009302139282227, 27.64170265197754, 27.64170265197754, 27.64170265197754, 27.486709594726562, 27.486709594726562, 27.486709594726562, 27.265403747558594, 27.265403747558594, 26.951444625854492, 26.451650619506836, 26.421924591064453, 26.419496536254883, 26.419496536254883, 26.393388748168945, 26.393388748168945, 26.393388748168945, 26.214078903198242, 26.091886520385742, 26.085994720458984, 26.073226928710938, 26.01791763305664, 25.761974334716797, 25.761974334716797, 25.761974334716797, 25.45175552368164, 25.40603256225586, 25.3513240814209, 25.13874626159668, 25.13874626159668, 25.13874626159668, 25.13874626159668, 25.11675262451172, 24.835737228393555, 24.777912139892578, 24.584762573242188, 24.584762573242188, 24.56148910522461, 24.56148910522461, 24.39084815979004 ], "content": [ "try with 1.1.5 for cucumber-java cucumber-junit", "I have a project with cucumber and maven also I am using the JUnit .", "Compare cucumber-java cucumber-testng and cucumber-junit .", "The problem is cucumber-junit version 1.1.8 .", "I was able to execute a test script with Selenium Cucumber Maven and JUnit framework .", "My JDK version- 1.8.0 60 JARS junit -4.12 cucumber-java-1.2.2.jar cucumber-junit-1.2.2.jar cucumber-core-1.2.2.jar gherkin-2.12.2.jar cucumber-jvm-deps-1.0.3.jar .. . .. . Note : java junit core should be in same version .", "In Simple term We need same jar version for cucumber-core cucumber-java cucumber-junit .", "I have a Cucumber-JVM JUnit Selenium setup .", "Got it - type . Reports cucumber report.json . node-modules .bin cucumber-junit cucumber report.xml", "I have a JEE application in a maven project using JUnit and Cucumber to test my code .", "but i am not able to run the test succesfully in cucumber-java cucumber-junit 1.1.6 version .", "Here are the minimum dependencies needed to get your Cucumber up running : .. . .. . -Cucumber-java 1.2.2 -Cucumber-junit 1.2.2 -Cucumber-picocontainer 1.2.2 -junit 4.12 .. . .. . Maven manages the rest of the dependencies .", "info.cukes cucumber-core 1.2.4 http : mvnrepository.com artifact info.cukes cucumber-core 1.2.4 .. . info.cukes cucumber-jvm-deps 1.0.5 http : mvnrepository.com artifact info.cukes cucumber-jvm-deps 1.0.5 .. . info.cukes gherkin 2.12.2 http : mvnrepository.com artifact info.cukes gherkin 2.12.2 .. . info.cukes cucumber-junit 1.2.4 http : mvnrepository.com artifact info.cukes cucumber-junit 1.2.4 .. . junit junit 4.12 http : mvnrepository.com artifact junit junit 4.12 .. . .. . Optional .. . .. . net.sourceforge.cobertura cobertura 2.1.1 http : mvnrepository.com artifact net.sourceforge.cobertura cobertura 2.1.1 .. . org.mockito mockito-all 1.10.19 http : mvnrepository.com artifact org.mockito mockito-all 1.10.19", "I already have a selenium code for Salesforce and am using JUnit and Cucumber to pass data .", "JUnit Approach .. . .. . If using JUnit you can run the test the same way you would run a JUnit test on the command-line : .. . .. . where RunCukesTest is the unit test that sets all the cucumber options e.g .", "Is there a way to trigger some function to run after the junit or cucumber testrunner is done", "And here is the JUnit-Test for it : .. . .. . The step is found by cucumber and gets executed .", "I m trying to run a cucumber test with JUnit and I m getting java.lang.NoClassDefFoundError exception .", "I am facing an error whenever I run the cucumber test by Junit .", "I wish to create JUnit style XML reports from Protractor - Cucumber tests so that they can be used by CI .", "Got the protractor-cucumber-junit npm library from below link but the documentation is not elaborate .", "https : www.npmjs.com package protractor-cucumber-junit .. . .. . Also the page points to a better plugin called cucumberjs-junitxml .", "This project should be the right place : github.com cucumber cucumber-jvm https : github.com cucumber cucumber-jvm", "Put junit-version instead of junit-version", "Here s a sample cucumber Junit runner template : .. . .. . Hope this helps", "junit http : i.stack.imgur.com gZKQT.png", "1 http : thomassundberg.wordpress.com 2011 11 16 testing-a-web-service-with-soapui-junit-maven-and-cucumber comment-714", "2 You can consume this json report with the cucumber-junit library https : www.npmjs.com package cucumber-junit or one of the libraries you mentioned above all are similar follow the simple instructions then simply run the below command .. . .. . It would generate the cucumber report.xml file .", "This question already has an answer here : .. . .. . What java version is needed for JUnit 4.8 questions 2737737 what-java-version-is-needed-for-junit-4-8 3 answers .. . .. . Working with Cucumber FrameWork Need to know Which Java Version required for Junit 4.1 version", "I haven t tested with other languages.The test needs use the JUnit @RunWith and Cucumber-Jvm s @Feature value featurefile.feature attributes .", "In addition I am using the Cucumber Junit runner @RunWith Cucumber.class in the test steps .", "I am able to run my cucumber runner file as JUnit without any issues .", "JUnit code : .. . .. . Exception : .. . .. . I have added the below Cucumber jar files to Eclipse and added the cucumber plugin to eclipse from thi link - http : cucumber.github.com cucumber-eclipse update-site .", "A good Tutorial for learning how to use Any scripts to fire off your Cucumber JUnit Test is here http : www.vogella.com tutorials ApacheAnt article.html .", "In my cucumber -jvm Maven junit Setup I have my testRunner file as .. . .. . I have my feature file in the above mentioned directory .", "I use a JUnit runner class as JUnit test suite .", "below are my feature file step definition file and junit-runner file .", "JUnit 4.x need at least Java 1.5 one of the reasons is that JUnit 4 uses Annotations which were introduced in Java 1.5", "I created a simple project with this structure : .. . .. . In the junit test MyFeatureTest.java I have this : .. . .. . Now https : github.com cucumber cucumber-jvm wiki IDE-support says that I should add the following line : .. . .. . I tried to modify that to .. . .. . but the annotation @Cucumber.Options isn t available at all .", "I doubt that this has anything to do with JUnit 4.12", "They are always skipped while other JUnit tests are run .", "Otherwise it won t be picked up by the junit test .", "This is a small example : .. . .. . and use it in you JUnit Test .", "I am creating an acceptance test framework for an application that accepts XML files with up to hundreds of fields using Cucumber -JVM Junit Java 8 .", "If so open a bug report telling the Cucumber project that the latest release wasn t compile correctly .", "After downloading the latest version import that gherkin jar file to the cucumber project .", "I wrote 2 java classes and 1 feature cucumber file in project .", "I am trying to write cucumber integration test cases for our APIs .", "Other have build a custom formatter for JUnit by implementing XMLJUnitResultFormatter API http : api.dpml.net ant 1.6.5 org apache tools ant taskdefs optional junit XMLJUnitResultFormatter.html explained more here - How do I configure JUnit Ant task to only produce output on failures", "Debug by install only two Java and Junit jar files different version and try to resolve NoSuchMethod error .", "You have testng and junit as well as dependencies .", "But I am using junit 4.11 and I still get the same .", "If you are using junit the class should have a Test annotation .", "And when you are running it choose run as junit instead of run as java application .", "I initiate the run by running RunSmokeTests.java using JUnit within Eclipse .", "I m trying to write integration test for DAO using cucumber .", "I don t think junit or maven guarantee the order that classes are executed but you could probably group them in a test suite : junit.sourceforge.net javadoc org junit runners Suite.html http : junit.sourceforge.net javadoc org junit runners Suite.html", "I have created some cucumber test steps and a small cucumber test case 1 which i run with junit like so : .. . .. . The cucumber features files are now automatically loaded from the classpath location in src main resources package-name .feature .. . .. . I could like to know how I can tell cucumber the location of my feature files because I need it to load them from a location outside the classpath e.g .", "JUnit Runner class is unable to locate the Steps definition file with project structure Below : src test java com testSteps TestSteps.java and JunitRunner class under src test java com cucumbertestrunner TestRunner .. . .. .", "Run your class as JUnit then you should have report.html in target folder after test you can change directory of report output by changing line .. . .. . to .. . .. . It will create folder called test-reports in your project directory .", "Remove unwanted cucumber jars .", "I didn t create a marven project and I used Eclipse Cucumber and Selenium web driver for automation scripting .", "I m trying to run Cucumber Selenium project from Jenkins configured with Maven but the browser is not opening and execution fails .", "After about an year I get stuck with cucumber-scala project of mine why not enough documentations around", "Hi guys plz help me to sove this error and run cucumber .", "See http : wiki.github.com cucumber gherkin lexingerror for more information .", "Am using cucumber feature file to pass the values into application .", "Try to use only junit so maven results won t be overwritten .", "Feature is : .. . .. . Selenium Class : .. . .. . JUnit Class : .. . .. . Step Definitions : .. . .. . Output shown is :", "In order to generate the cucumber-junit xml first you need to generate cucumber json report : .. . .. . 1 Create a separate js file you can give it any name it would be better if you put this in hooks.js with all your before after hooks .. . .. . This would create cucumber report.json file in Reports folder in your current directory .", "This isn t actually a Cucumber thing .", "The snippets provided are the Java 8 one because I include artifactId cucumber-java8 artifactId in my pom.xml not cucumber-java .", "I assume that your class file InsideSaleEndToEndTesting was containing annotations of JUnit and also glue codes functions .", "I looked up this error online and found many posts suggesting it happens when using junit 4.12 .", "Hi i am new to cucumber-java .", "Run mvn dependency : tree and search the output for cucumber .", "If that works download the sources for cucumber and compile them .", "I used cucumber-jvm to autowire Spring into Cucumber .", "Autowiring with Spring in cucumber-jvm is explained here - liminescence.blogspot.com 2013 08 http : liminescence.blogspot.com 2013 08 integration-testing-with-spring.html", "My project is not a maven project and cannot change the project structure now .", "Issue was occuring because when you place Junit class in package it will search for skeleton in that package but if you add JUnit runner class in source folder then it will be able to find the page under src folder", "I m running automation tests using cucumber-junit project and i ve roughly around 200 scenario s in my project. . now the problem is it s hard to find unused step definitions in my project as we constantly need to update features. . Is there any solution to detect step definitions that is no longer useful. . Any help much appreciated", "I m using Cucumber with Guice as DI .", "cucumber 1.2.4 has the following dependencies .", "Here is my cucumber run file .", "The minimal dependency list i needed in my pom when i had the same error in a cucumber project was :", "feature structure is : .. . .. . Also I wrote 1 jUnit java class for RunTest with Cucumber.class : .. . .. . And this is signature of my Test class with cucumber s given when and then : .. . .. . But if I try run jUnit Test I catched this exception : .. . .. . java.lang.NoSuchMethodError : gherkin.formatter.model.Scenario.getId Ljava lang String .. . .. . And I don t know in which reasons I see this exception .", "CucumberOptions http : cukes.info api cucumber-jvm javadoc cucumber api CucumberOptions.html won t help you here .", "i want to perform data driven testing in cucumber using xml file .", "i am trying to run a simple cucumber feature test .", "Since all classes are part of cucumber I suspect a bug in the release .", "I was just wondering where should i report this bug for cucumber core", "See : https : github.com cucumber cucumber-java-skeleton blob master pom.xml", "I have a cucumber scenario and the step uses assertEquals .", "In addition to Jewel s answer above do not forget to add-in your own additional spring dependencies as cucumber-spring artifact seems to only provided the Glue between Cucumber and Spring .", "I am new to cucumber .", "So this is not a cucumber issue .", "I had tried to use @BeforeClass and @AfterClass of Junit in my step definition file where all test are written in given when and then format .", "My features are in src test resources and I have a JUnit test in src test java with @RunWith Cucumber.class and @Feature Myfeature.feature attributes specified .", "The usage is explained here https : github.com cucumber cucumber-jvm blob 0aecc4d3e4c15fc34b63f848043deba2c230e35f core src main resources cucumber api cli USAGE.txt ." ] }
{ "confidence": [ 54.01093673706055, 51.72888946533203, 50.81155014038086, 50.522727966308594, 50.12830352783203, 49.630855560302734, 49.03692626953125, 48.73672866821289, 47.54358673095703, 47.535072326660156, 47.38240432739258, 47.2435188293457, 47.228355407714844, 47.2069091796875, 47.196693420410156, 46.48029708862305, 46.346553802490234, 45.90986633300781, 45.90986633300781, 45.84629821777344 ], "content": [ "Question : I wish to create JUnit style XML reports from Protractor - Cucumber tests so that they can be used by CI . Is there any detailed step on how this can be achieved Got the protractor-cucumber-junit npm library from below link but the documentation is not elaborate . https : www.npmjs.com package protractor-cucumber-junit .. . .. . Also the page points to a better plugin called cucumberjs-junitxml . The documentation for this is given at .. . .. . https : github.com sonyschan cucumberjs-junitxml .. . .. . This too is not very helpful . Questions : 1 . What are the elaborate steps to be followed after installing the plugins to get the final XML 2 . What changes need to be done in the protractor config file or any other place within the project .. . Answer : In order to generate the cucumber-junit xml first you need to generate cucumber json report : .. . .. . 1 Create a separate js file you can give it any name it would be better if you put this in hooks.js with all your before after hooks .. . .. . This would create cucumber report.json file in Reports folder in your current directory . 2 You can consume this json report with the cucumber-junit library https : www.npmjs.com package cucumber-junit or one of the libraries you mentioned above all are similar follow the simple instructions then simply run the below command .. . .. . It would generate the cucumber report.xml file . Comment : Step 1 worked . Additionally I also had to add the js file created in require of cucumberOpts . For Step 2 - what is the windows equivalent of this command I am executing on a Windows machine Comment : Got it - type . Reports cucumber report.json . node-modules .bin cucumber-junit cucumber report.xml Comment : were you able to generate the xml report Comment : yes with the type command Comment : glad it worked you could accept the answer if it solved your problem :", "Question : I am facing an error whenever I run the cucumber test by Junit . Here is the following Exception . Any help will be awesome .. . .. . NOTE : .. . .. . THERE IS NO ERROR IN THE PROJECT .. . .. . Here is how my POM.xml looks like : .. . .. . Here is the image of my project structure : enter image description here http : i.stack.imgur.com 7GR13.jpg .. . .. . And here is my RunIT.Java Class .. . Answer : You are trying to run Cucumber in java and you haven t loaded the Cucumber-java dependency How s your Cucumber supposed to execute Here are the minimum dependencies needed to get your Cucumber up running : .. . .. . -Cucumber-java 1.2.2 -Cucumber-junit 1.2.2 -Cucumber-picocontainer 1.2.2 -junit 4.12 .. . .. . Maven manages the rest of the dependencies . Make sure you have the latest dependencies and that you are not mixing and matching versions for example I ve used all 1.2.2 version .. . .. . Edit : Just noticed that your Cucumber-java is at the bottom of the pom.xml . It s a good practice to order your dependencies....all cucumber dependencies go together one after another .", "Question : Hi i am new to cucumber-java . i am trying to run a simple cucumber feature test . below are my feature file step definition file and junit-runner file . but i am not able to run the test succesfully in cucumber-java cucumber-junit 1.1.6 version . Feature file .. . .. . Stepdefinition file .. . .. . Cucumber runner file .. . .. . I am getting below error : .. . .. . POM.xml .. . .. . But when i am running with 1.0.14 version of the same i am able to run it successfully . whys is it so does 1.1.6 version has some bug in it to run TIA Comment : could you show your pom.xml . Does it work with 1.1.5 Comment : Hi Bala i ve tried with 1.1.5 too but same error . Comment : could you try adding cucumber-core dependency I am using version 1.1.5 and see if it works . I have had issues not including it although documentation says it is included automatically . Comment : try with 1.1.5 for cucumber-java cucumber-junit Comment : Hi Bala still same error it is not working it is failing while trying to create RuntimeOptions runtimeOptions runtimeOptionsFactory.create not sure why is it failing . did what you suggested . any other pointers . i still wonder why is it working in lower version 1.0.14 .. . Answer : In Simple term We need same jar version for cucumber-core cucumber-java cucumber-junit . To overcome this issue : .. . .. . Error we are getting because of the jar files and corresponding version not suitable for our JDK . I played with jar file - now issue is resolved . And also able to run and generate output . My JDK version- 1.8.0 60 JARS junit -4.12 cucumber-java-1.2.2.jar cucumber-junit-1.2.2.jar cucumber-core-1.2.2.jar gherkin-2.12.2.jar cucumber-jvm-deps-1.0.3.jar .. . .. . Note : java junit core should be in same version . Remove unwanted cucumber jars . Debug by install only two Java and Junit jar files different version and try to resolve NoSuchMethod error . Comment : This answer might have some truth in it but it s very hard to understand what you are saying . Please try to edit and rephrase your answer .", "Question : Hi i am new to cucumber-java . i am trying to run a simple cucumber feature test . below are my feature file step definition file and junit-runner file . but i am not able to run the test succesfully in cucumber-java cucumber-junit 1.1.6 version . Feature file .. . .. . Stepdefinition file .. . .. . Cucumber runner file .. . .. . I am getting below error : .. . .. . POM.xml .. . .. . But when i am running with 1.0.14 version of the same i am able to run it successfully . whys is it so does 1.1.6 version has some bug in it to run TIA Comment : could you show your pom.xml . Does it work with 1.1.5 Comment : Hi Bala i ve tried with 1.1.5 too but same error . Comment : could you try adding cucumber-core dependency I am using version 1.1.5 and see if it works . I have had issues not including it although documentation says it is included automatically . Comment : try with 1.1.5 for cucumber-java cucumber-junit Comment : Hi Bala still same error it is not working it is failing while trying to create RuntimeOptions runtimeOptions runtimeOptionsFactory.create not sure why is it failing . did what you suggested . any other pointers . i still wonder why is it working in lower version 1.0.14 .. . Answer : The error means that cucumber.runtime.RuntimeOptions has no constructor which takes a List as argument . Since all classes are part of cucumber I suspect a bug in the release . Run mvn dependency : tree and search the output for cucumber . Make sure that you have only a single version of the dependency . If your classpath is good try an older version . If that works download the sources for cucumber and compile them . Does it work now If so open a bug report telling the Cucumber project that the latest release wasn t compile correctly . Comment : where should i report the bug . I found out the bug . The bug is that in RuntimeOptionsFactory class of cucumber-core jar one import statement is missing for importing RuntimeOptions class . I was just wondering where should i report this bug for cucumber core TIA Comment : This project should be the right place : github.com cucumber cucumber-jvm https : github.com cucumber cucumber-jvm", "Question : I got this error when I am trying to upgrade my cucumber version from 1.1.2 to 1.2.4 . I am running on JDK1.8 . This is the code not working .. . .. . And this is error output : Comment : What are your glue parameters set to Are they pointing to step definitions Do the glued paths exist .. . Answer : cucumber 1.2.4 has the following dependencies . Check your installed versions to make sure that they are up to-date . info.cukes cucumber-core 1.2.4 http : mvnrepository.com artifact info.cukes cucumber-core 1.2.4 .. . info.cukes cucumber-jvm-deps 1.0.5 http : mvnrepository.com artifact info.cukes cucumber-jvm-deps 1.0.5 .. . info.cukes gherkin 2.12.2 http : mvnrepository.com artifact info.cukes gherkin 2.12.2 .. . info.cukes cucumber-junit 1.2.4 http : mvnrepository.com artifact info.cukes cucumber-junit 1.2.4 .. . junit junit 4.12 http : mvnrepository.com artifact junit junit 4.12 .. . .. . Optional .. . .. . net.sourceforge.cobertura cobertura 2.1.1 http : mvnrepository.com artifact net.sourceforge.cobertura cobertura 2.1.1 .. . org.mockito mockito-all 1.10.19 http : mvnrepository.com artifact org.mockito mockito-all 1.10.19", "Question : My Maven Project Structure is .. . .. . enter image description here http : i.stack.imgur.com ufxnX.jpg .. . .. . The project runs well If I try to run it through eclipse as JUnitTest CucumberRunnerTest.java . But if I try executing it through maven then I get the below error : .. . .. . The pom is as below : .. . .. . When run from command prompT mvn integration-test .. . .. . where as I have implemented this steps in Search Text.java . IF I use maven-compiler plugin and run it through maven I get package cucumber.api.junit.Cucumber does not exists below is the pluggin added in POM .. . Answer : You have testng and junit as well as dependencies . Try to use only junit so maven results won t be overwritten . The minimal dependency list i needed in my pom when i had the same error in a cucumber project was :", "Question : I am using Cucumber to automate the testing of services and controllers in my app . In addition I am using the Cucumber Junit runner @RunWith Cucumber.class in the test steps . I need to instantiate my controller and was wondering if I could use Spring to autowire this . The code below shows what I want to do . Comment : Autowiring with Spring in cucumber-jvm is explained here - liminescence.blogspot.com 2013 08 http : liminescence.blogspot.com 2013 08 integration-testing-with-spring.html .. . Answer : In addition to Jewel s answer above do not forget to add-in your own additional spring dependencies as cucumber-spring artifact seems to only provided the Glue between Cucumber and Spring . In my case I got Spring Injection to work in my step definitions with the following added dependency . My Step Definition : .. . .. . CukesRunner .. . .. . Cucumber.xml .. . .. . applicationContext.xml", "Question : I have created some cucumber test steps and a small cucumber test case 1 which i run with junit like so : .. . .. . The cucumber features files are now automatically loaded from the classpath location in src main resources package-name .feature .. . .. . I could like to know how I can tell cucumber the location of my feature files because I need it to load them from a location outside the classpath e.g . data . 1 http : thomassundberg.wordpress.com 2011 11 16 testing-a-web-service-with-soapui-junit-maven-and-cucumber comment-714 .. . Answer : I have placed all feature files in test resources features and added my feature file location with class path . Here is my cucumber run file . This will pick all feature files inside the folder features . If you want to have a subfolders you can add that too by just replacing the line as shown below . features classpath : features DEV .. . .. . If only one particular feature file it should be like this .. . .. . features classpath : features DEV SmokeTests.feature Comment : The classpath option was one that assisted me in a Maven multi-module project . I ended up finding this detail as well as other location options in the CLI interface documentation https : cucumber.io docs reference jvm cli-runner .", "Question : I have a cucumber scenario and the step uses assertEquals . My results report shows the stack-trace which is not non-technical user friendly . How can I suppress it .. . .. . junit http : i.stack.imgur.com gZKQT.png .. . Answer : You re correct in observing that the default XML output assuming you re not outputting to JSON or text but you didn t say from a Junit tests show stack traces for failed steps . This isn t actually a Cucumber thing . CucumberOptions http : cukes.info api cucumber-jvm javadoc cucumber api CucumberOptions.html won t help you here . You can : .. . .. . 1 . Use a different or custom Runner for your test and then setup a tag that controls what is included in the output or what will be read by the CI software http : en.wikipedia.org wiki Comparison of continuous-integration software of your choosing . For example the Confulence API API for doing this tells how debugger .. . 2 . Same type of deal for Ant Scripts to tweak the output so that is doesn t show the output . A good Tutorial for learning how to use Any scripts to fire off your Cucumber JUnit Test is here http : www.vogella.com tutorials ApacheAnt article.html . 3 . Other have build a custom formatter for JUnit by implementing XMLJUnitResultFormatter API http : api.dpml.net ant 1.6.5 org apache tools ant taskdefs optional junit XMLJUnitResultFormatter.html explained more here - How do I configure JUnit Ant task to only produce output on failures http : stackoverflow.com questions 963480 how-do-i-configure-junit-ant-task-to-only-produce-output-on-failures .. . .. . Hope that gives you what you need .", "Question : I have cucumber feature file located at below location on my local : .. . .. . and Junit jar at below location : .. . .. . When I have tried several commands like below to execute the feature file from command-prompt however all the time getting same error as .. . .. . Below are the commands which I used : Command 1 : .. . .. . Command 2 : .. . .. . Could you please help me to run this feature file from command-line . Thanks in advance . Comment : HI Team Any suggestions I haven t received any reply on it yet . thanks .. . Answer : JUnit Approach .. . .. . If using JUnit you can run the test the same way you would run a JUnit test on the command-line : .. . .. . where RunCukesTest is the unit test that sets all the cucumber options e.g . : .. . .. . Cucumber-jvm Approach .. . .. . You can also use cucumber-jvm on the command-line : .. . .. . Maven .. . .. . The challenge in both previous cases is to build the classpath and make sure all the dependencies are properly loaded including your own classes and the feature files . An easier solution would be to use for example Maven to define all the deps https : github.com tychobrailleur cucumber-jvm-examples blob master java-example pom.xml running the tests is then as simple as :", "Question : I try to build my first executable specifications with Java and Maven . I created a simple project with this structure : .. . .. . In the junit test MyFeatureTest.java I have this : .. . .. . Now https : github.com cucumber cucumber-jvm wiki IDE-support says that I should add the following line : .. . .. . I tried to modify that to .. . .. . but the annotation @Cucumber.Options isn t available at all . My pom.xml has this dependencies : .. . .. . Am I missing something Update I was missing something : The cucumber feature file has to be in a subdirectory src test resources mypackage . Otherwise it won t be picked up by the junit test . I can run my feature tests when I put them in the same directory src main test so it s not a blocker for me . But I d like to understand the whole setup . .. . Answer : Or you could just build your cucumberoptions arguments like in https : cucumber.io docs reference jvm cli-runner described and pass it to cucumber.api.cli.Main.run . This is a small example : .. . .. . and use it in you JUnit Test . So you don t have to create a seperate class for each testclass just with other arguments .", "Question : I am facing an error whenever I run the cucumber test by Junit . Here is the following Exception . Any help will be awesome .. . .. . NOTE : .. . .. . THERE IS NO ERROR IN THE PROJECT .. . .. . Here is how my POM.xml looks like : .. . .. . Here is the image of my project structure : enter image description here http : i.stack.imgur.com 7GR13.jpg .. . .. . And here is my RunIT.Java Class .. . Answer : It looks like you re missing the cucumber-core library . Try adding the following to your dependencies . Also you appear to be mixing and matching versions . Try using the same version for all the cucumber- libraries .", "Question : I have created some cucumber test steps and a small cucumber test case 1 which i run with junit like so : .. . .. . The cucumber features files are now automatically loaded from the classpath location in src main resources package-name .feature .. . .. . I could like to know how I can tell cucumber the location of my feature files because I need it to load them from a location outside the classpath e.g . data . 1 http : thomassundberg.wordpress.com 2011 11 16 testing-a-web-service-with-soapui-junit-maven-and-cucumber comment-714 .. . Answer : You can use @CucumberOptions instead of @Cucumber.Options", "Question : This question already has an answer here : .. . .. . What java version is needed for JUnit 4.8 questions 2737737 what-java-version-is-needed-for-junit-4-8 3 answers .. . .. . Working with Cucumber FrameWork Need to know Which Java Version required for Junit 4.1 version Comment : Have you tried google .. . Answer : JUnit 4.x need at least Java 1.5 one of the reasons is that JUnit 4 uses Annotations which were introduced in Java 1.5", "Question : I am using Cucumber to automate the testing of services and controllers in my app . In addition I am using the Cucumber Junit runner @RunWith Cucumber.class in the test steps . I need to instantiate my controller and was wondering if I could use Spring to autowire this . The code below shows what I want to do . Comment : Autowiring with Spring in cucumber-jvm is explained here - liminescence.blogspot.com 2013 08 http : liminescence.blogspot.com 2013 08 integration-testing-with-spring.html .. . Answer : I used cucumber-jvm to autowire Spring into Cucumber . And import applicationContext.xml into Cucumber.xml .. . .. . In CucumberIT.java call @RunWith Cucumber.class and add the CucumberOptions . In CucumberStepDefs.java you can @Autowired Spring", "Question : I try to build my first executable specifications with Java and Maven . I created a simple project with this structure : .. . .. . In the junit test MyFeatureTest.java I have this : .. . .. . Now https : github.com cucumber cucumber-jvm wiki IDE-support says that I should add the following line : .. . .. . I tried to modify that to .. . .. . but the annotation @Cucumber.Options isn t available at all . My pom.xml has this dependencies : .. . .. . Am I missing something Update I was missing something : The cucumber feature file has to be in a subdirectory src test resources mypackage . Otherwise it won t be picked up by the junit test . I can run my feature tests when I put them in the same directory src main test so it s not a blocker for me . But I d like to understand the whole setup . .. . Answer : Once you use .. . .. . You will need to add the following to your pom.xml otherwise mvn test will not work . And you can only run your tests from the IDE . See : https : github.com cucumber cucumber-java-skeleton blob master pom.xml", "Question : I want to generate automation test report in eclipse project . I didn t create a marven project and I used Eclipse Cucumber and Selenium web driver for automation scripting . But I cannot find how to generate an automation report . Please tell me if there is a way to generate an automation report for a Java eclipse project . I have created the main class . It is as belows . But only from this I could not generate automation script . What are the additional parts that I have been missed . .. . Answer : If you are using junit the class should have a Test annotation . And when you are running it choose run as junit instead of run as java application . After that use ant to generate report is a easy way .", "Question : I try to build my first executable specifications with Java and Maven . I created a simple project with this structure : .. . .. . In the junit test MyFeatureTest.java I have this : .. . .. . Now https : github.com cucumber cucumber-jvm wiki IDE-support says that I should add the following line : .. . .. . I tried to modify that to .. . .. . but the annotation @Cucumber.Options isn t available at all . My pom.xml has this dependencies : .. . .. . Am I missing something Update I was missing something : The cucumber feature file has to be in a subdirectory src test resources mypackage . Otherwise it won t be picked up by the junit test . I can run my feature tests when I put them in the same directory src main test so it s not a blocker for me . But I d like to understand the whole setup . .. . Answer : Take a look at my question here http : stackoverflow.com questions 13861060 specify-the-feature-file-location-in-cucumber 13869842 13869842 : .. . .. . You can specify a location on the classpath by setting the feature attribute in the options annotation like .. . .. . Edit : .. . .. . in new versions code is", "Question : I try to build my first executable specifications with Java and Maven . I created a simple project with this structure : .. . .. . In the junit test MyFeatureTest.java I have this : .. . .. . Now https : github.com cucumber cucumber-jvm wiki IDE-support says that I should add the following line : .. . .. . I tried to modify that to .. . .. . but the annotation @Cucumber.Options isn t available at all . My pom.xml has this dependencies : .. . .. . Am I missing something Update I was missing something : The cucumber feature file has to be in a subdirectory src test resources mypackage . Otherwise it won t be picked up by the junit test . I can run my feature tests when I put them in the same directory src main test so it s not a blocker for me . But I d like to understand the whole setup . .. . Answer : Ok I can only put this on monday morning.. . The directory layout I used wasn t correct I forgot to put the cucumber features into subdirectories matching my package structure . Make sure you create the needed package directories also in src test resources", "Question : null .. . Answer : I was able to execute a test script with Selenium Cucumber Maven and JUnit framework . However when I converted the same to POM model along with these I am getting the below error message . Would be really helpful if I can get any help at once :" ] }
[ "yes-answer-long", "yes-answer-short" ]
cucumber-jvm
UNK_RELATION
save-as@user@67
save-as -- this tag refers to a common ui prompt type that asks a @placeholder under what name they wish to save a file as .
{ "confidence": [ 34.52119827270508, 33.365577697753906, 32.08546447753906, 30.928852081298828, 30.650470733642578, 30.593704223632812, 29.98139190673828, 29.632047653198242, 29.60397720336914, 29.389739990234375, 29.121498107910156, 28.696701049804688, 28.37500762939453, 28.32073974609375, 27.940746307373047, 27.900611877441406, 27.838340759277344, 27.693317413330078, 27.484695434570312, 27.334697723388672, 27.285202026367188, 27.220401763916016, 27.218788146972656, 27.198684692382812, 27.180755615234375, 27.145488739013672, 27.069461822509766, 27.048171997070312, 27.0153751373291, 26.913990020751953, 26.61606216430664, 26.61606216430664, 26.61606216430664, 26.508296966552734, 26.475414276123047, 26.474334716796875, 26.39157485961914, 26.333736419677734, 26.236860275268555, 26.217975616455078, 26.10710906982422, 26.091190338134766, 25.974632263183594, 25.974632263183594, 25.974632263183594, 25.936830520629883, 25.821693420410156, 25.805194854736328, 25.60366439819336, 25.50248908996582, 25.433359146118164, 25.3997802734375, 25.297645568847656, 25.283830642700195, 25.240257263183594, 25.169296264648438, 25.169296264648438, 25.169296264648438, 25.169296264648438, 25.169296264648438, 25.169296264648438, 25.169296264648438, 25.169296264648438, 25.169296264648438, 25.07904815673828, 24.83515167236328, 24.791961669921875, 24.714550018310547, 24.714550018310547, 24.714550018310547, 24.714550018310547, 24.699951171875, 24.699951171875, 24.612743377685547, 24.597721099853516, 24.588912963867188, 24.588912963867188, 24.551023483276367, 24.551023483276367, 24.50918197631836, 24.44998550415039, 24.448646545410156, 24.43185043334961, 24.410919189453125, 24.410919189453125, 24.371131896972656, 24.358428955078125, 24.358428955078125, 24.358428955078125, 24.358428955078125, 24.358428955078125, 24.358428955078125, 24.358428955078125, 24.29347038269043, 24.257827758789062, 24.257827758789062, 24.24887466430664, 24.211078643798828, 24.211078643798828, 24.190631866455078 ], "content": [ "Hmmm...it allows me to modify the file name and save under the new name even though a placeholder name is specified .", "Then I save-as the name of my file .", "In that case how could one save that file without showing save file prompt", "However if you really need a prompt for where to save the file you could use a plugin like Flash or Java to produce the save prompt .", "Is it possible to save the file with a new name but keep the original one open for editing", "What I want to do is to generate a prompt box to ask the user where to save the file like the Save As dialog box created by Application.GetSaveAsFilename in VBA .", "Although the same file name appears in the save file dialog but on clicking Save it gives a message The same file name already exists .", "I want to be able to save the file as any name .", "Just think about what the save function needs : text to save and a file to save in and go from there .", "Are you trying to override the browser s implementation of the save file UI", "But seems the save-as-File-type is not considered until changing the save-as-type on the dialog by manually .", "What is the easiest way to save UIView s representation to file", "I m trying to save ONLY an specific version of the tag inside the file .", "This will be save into the file .", "I want to invoke the file save-as prompt while allowing the user to download a file in ExtJS from a URL .", "Once user types the name and click s ok you can save the draw in your sdcard under that name .", "Where does the save write the file to", "Try save in a .txt file .", "Is there a way to trigger the Save As dialog box that opens when you save a new file", "I would like to ask your help with this code : .. . .. . Basically what I expect from this code is the possibility to save the file with a specified name and format .", "However if I load my file by opening it and then save it it simply won t save .", "I have a requirement in my app where I need to set the File-name and extension programmatically with the Common save-as File dialog .", "After save new file press .. . .. . This is shortcut to alternate file", "save write and all other functions either come with a predefined file name or expect one to be passed .", "Something like save-as file on web pages .", "I want to save them as separate files although I would also be interested to know how to save them all under 1 big file .", "Just tried it out it will save a file with no name nor extension in Chrome .", "As the title says I m trying to create a Save button which will prompt the SaveFileDialogue upon the first click the user names the file etc .", "In Firefox this doesn t pop-up a window even just asks the user if they want to save the file and saves it as a .part file .", "What are other ways to save that file without GUI", "This will save the content of the page in the file yourpage.html .", "Another clean way to save the file is this :", "Is there a way to save only the html file", "I m trying to get a Save dialog box to pop-up and prompt the user what location they would like to save a particular file to after they hit an API route .", "I wish to find an elegant way to open and add a new value id to each line and save again the same file .", "The file is opened in QuickOffice however the Save option is disabled only Save as is enabled .", "Whenever a field is changed you save the data to a file .", "So what is a valid file path to save arrays of custom classes", "It takes the current type of opened file by default even though the save-as-type on dialog is different and ask for overwriting the existing file .", "Can t you just save NAME", "At what moment I save the state", "yes since I want it to be save with the correct variable name not just the file name", "For instance this would save the values in a pipe-delimited file : .. . .. . And this would read it in : .. . .. . However it s not smart to save to a file in the root directory .", "If the user did not open the file the Save As.. . button would open the regular Save File Dialog .", "STEP 1 - Save bitmap file locally using file save function below .", "I named my file WSID nameOfFile but when I typed SAVE this comes out : .. . .. . Unable to SAVE workspace nameOfFile .", "You want to have two choices to save : A Save As. . button and a Save button .", "How can I save the file", "And then save .", "I am trying to save gyroscope data to txt file but it does not save .", "is there a method to save", "I d like to do a : wa but save all buffers under a new path .", "I am attempting to save an object but it fails : .. . .. . I can access it and I can save it with saveRDS : .. . .. . Or I can save it with : .. . .. . Why I can t save the object as expected with save MEs moduleColors net dendrograms file TNF AH-network-auto.RData", "Is there a way to save the worksheet to the workbook specified by the user in the SaveAs prompt", "That will save one copy of the file while Book- Save and Book- Close will save another", "I could not find File Save as options .", "and Save it like this .. . .. . This will be persisted in your Config file like this :", "Choosing the location to save the file before creating it is not possible .", "http : cybernetnews.com save-webpage-single-html-file", "I need to save record data into a .dat file .", "The next thing is simple : create a file and save the image .", "It should save each iteration of this grid as a file .", "I don t have to save the file before running it .", "Similarly as google-docs offers you to save a file .", "In particular for the subsection Run F5 Preferences it provides two options after the heading If file has never been saved one Prompt to Save and the other No Prompt .", "Everytime I save the tag both ID3v1 and ID3v2 get created .", "Sorry But its not solving my problem. . What I want is that the contents changed in an already open file is saved to the file without opening the save file dialog on clicking the Save button. .", "So instead of going to the File menu - Save As I want my user to be able to click the button to save the page on to the disk .", "I don t want to save it to a file on the server just have the user save it then clear out the string .", "I noticed that it is easy to SAVE AS but for some reason I cannot just SAVE a file .", "I m trying to save a file using EPPlus but I keep getting an InvalidOperationException on the Save line .", "See what is happening when you save", "What do you mean by save a music", "The Icon class does not have a save to file method but it does have a save to FileStream method so you can save it like this :", "Here is where I believe to save command needs to be : .. . .. . I am pretty sure I need to add the save command under the pictureBox1.Image bitmap .", "The default save folder for 3dsmax is located under : .. . .. . Make sure to check there .", "Note : Save My.Settings on Shutdown is already enabled under Application .", "So what codec did GEdit use to save the file", "Can you save the GEdit format to a new file and verify what the differences are", "I do have a method to save that open a save file dialog but I want one that needs no dialog just a quick cntrl n to save it you may understand what i mean .", "I ve got a Shiny app that produces a product that I d like my users to be able to save in whatever location they d like to save it and with whatever name they d like .", "You can create the macro for this just save the file as a temporary file and run that .", "When saving the file you should save it with its extension :", "What I would like to be able to do is load the ini file from a website as well as save upload to that file on the website .", "That is what I want to remove and make the changed contents saved directly to the opened file without opening the save file dialog .", "What you need to do is save the filename entered then when the save option is pressed check for a previously entered filename .", "I want to be able to save the file as any format .", "See Save a dictionary to a file alternative to pickle in Python", "I was hoping to have the XSL just save the file .", "One of the arguments is the file where to save the result-of the transformation .", "Save the file restart the Terminal and you re done", "You ll need to save the file with a .txt extension .", "I m not sure how to save the display object to a file .", "Then selects one or more and click on save-as .", "When we open Windows notepad application then open a file changes it contents and save it it simply gets saved without opening the Save File dialog .", "But in the notepad program I have created above the Save File dialog opens on clicking Save after changing the contents of saved file .", "I tried a lot and stuck on Save As not Save .", "in save function", "It was refusing to save .", "Edit : I m basing the answer on understanding that the question is about SAVE on a common block not on local-variables ie . as an alternative for COMMON ." ] }
{ "confidence": [ 36.1563606262207, 35.72784423828125, 35.50074768066406, 32.718685150146484, 32.53685760498047, 30.794204711914062, 30.404945373535156, 30.01171875, 29.472042083740234, 29.06328582763672, 28.894760131835938, 28.432174682617188, 28.01937484741211, 27.889724731445312, 27.855480194091797, 27.357559204101562, 27.35186004638672, 27.29791259765625, 27.249265670776367, 27.171531677246094 ], "content": [ "Question : null .. . Answer : I m trying to get a Save dialog box to pop-up and prompt the user what location they would like to save a particular file to after they hit an API route . However i can t seem to get it to pop-up even though i can generate my CSV file no problems UPDATE : i can get the prompt to save to pop-up with the code below but ONLY for my API project . Whenever i get to the same API route but go through my TypeScripted front-end UI i can t get the same prompt to pop-up . What s the deal Comment : When you go through the browser directly it interprets the Content-Disposition header automatically and prompts you to save the file by design . When you go through your Type Script it bypasses the browser as you are making a direct call to the API . So you re going to have to write some code to launch a save dialog yourself from the front-end UI Comment : Really Okay i ll get on-board w that", "Question : null .. . Answer : I ve got a Shiny app that produces a product that I d like my users to be able to save in whatever location they d like to save it and with whatever name they d like . In order to do this I m currently using file.choose to allow the user to choose a location and file name . On Windows if it s a new file the user will be prompted with a message saying this file does not exist and asks if it should be created . On Ubuntu I believe it was the same outcome . However this option doesn t work on Mac as there s no way to enter in a new file name and an existing file must be chosen . Additionally the dialog box says Open as opposed to Save which is confusing to some users . Is there a way to trigger the Save As dialog box that opens when you save a new file save write and all other functions either come with a predefined file name or expect one to be passed . Edit .. . .. . I ve come across some questions on SO that attempt to address this with the tcltk package but I m not sure I like this solution since there seem to be some issues on Mac OSX with this package . Others recommended using choose.files as there are some customization options you can pass but this is Windows specific . I m hoping for a cross-platform option that is intuitive . Comment : This is a good place to start : shiny.rstudio.com gallery download-file.html http : shiny.rstudio.com gallery download-file.html Comment : @user3949008 Shiny s downloadHandler requires that the filename be coded into the source code either dynamically or statically . But I need the filename to be chosen interactively so that doesn t quite get me there . Comment : Hmmm...it allows me to modify the file name and save under the new name even though a placeholder name is specified . Additionally although I have not used it this specific way but I believe you can make the filename function and use user input to create the file name on the fly . Comment : @user3949008 Interesting . I think you might be on to something then . Let me look into this .", "Question : null .. . Answer : As the title says I m trying to create a Save button which will prompt the SaveFileDialogue upon the first click the user names the file etc . and when the Save button is clicked again the file is re-saved updated and the SFD isn t prompted again . Here is my Save button click method : .. . .. . Here is the full code . Does anybody have any ideas on how to approach this Thanks in advance . Comment : Why do you want this What do you want to achieve in common Comment : 1 When user saves file for 1st time SFD will return filepath with filename that user chose . Store this path in some variable . 2 When save button is clicked again check for this path variable if it has value then skip SFD and do update logic . 3 Clear this path variable at appropriate location in code when user that file session is completed . Comment : @vnikhil Thanks for your reply . I ve been looking at it . I have created the file path . string FilePath Path.Combine AppDomain.CurrentDomain.BaseDirectory Name of File So I have that and I think that will work but how do I apply it I ve found an example but it uses StreamWriter and I m using Microsoft Word . I m not sure how to do steps 2 and 3 . If you have an example to refer to that would be great .", "Question : I m trying to make a UI for downloading files from my site . The site have zip-files and these need to be downloaded to the directory entered by the user . However I can t succeed to download the file it just opens up from a temporary folder . Code : .. . .. . Full sourcecode : http : en.paidpaste.com LqEmiQ Comment : Post relevant parts of your code here directly in the question . Don t use external links . Comment : @Anders Abel Fixed Comment : Are you trying to override the browser s implementation of the save file UI It would be much easier if you write the file to the stream and specify in content-type that it is a file.. . Also if i remember correctly u dont have access to ur client s filesystem...u cannot download files to paths on client hence taking it as an input is not of any use. . Comment : I -think- this is a client software i.e . it runs in process on the client s machine . Comment : What is the value of textBox1.Text .. . Answer : My program does exactly what you are after no prompts or anything please see the following code . This code will create all of the necessary directories if they don t already exist : .. . .. . This code will download the given file to the given directory after it has been created by the previous snippet : .. . .. . So using these two pieces of code you can create all of the directories and then tell the downloader that doesn t prompt you to download the file to that location . Comment : What should be done if this file is being fetched from a protected folder on server In that case you can not fetch file directly from server but if the file has been processed by the server to download and send back to the browser . In that case how could one save that file without showing save file prompt Any suggestions", "Question : I currently have this code : .. . .. . string contains a lot of html code that gets written in a.html file . The above code is working perfectly . On a button click browser chrome automatically downloads an html file with the string content written in it . Now what i want to do is instead of chrome downloading the file automatically it should open a save-as dialog box and ask user the location and name of the file and then download it to that location . A quick simple reply would be really appreciated . Comment : I think it will always use the default behavior because this is what the user expects . Comment : Well in my case user should be able to set the location and name of the file to be saved.. . Comment : That will happen automatically if the browser has not instructed their browser to do otherwise . But maybe you can force it by supplying a different mime type via the type attribute for the link . Comment : Can t find any such attribute to open save-as dialog.. . Comment : You have set your browser has all file downloaded to a default location .. . Answer : My browser was set to automatically download all files in default location which is why not only this file but all other files from my browser were downloaded directly without the save prompt dialogue . Changing the settings in browser to always ask the download location worked .", "Question : I am uploading a file in JSF . I am using Tomahawk s t : inputFileUpload for this but the same question is applicable on e.g . PrimeFaces p : fileUpload and JSF 2.2 h : inputFile . I have the below backing bean code : .. . .. . I am able to get the file name type and size but I am unable to save this file at a specific path . I can t figure out the proper way to save the uploaded file . How can I achieve this Comment : add more detail.post complete code Comment : @Abin i edited with code i am getting name of file but how can i upload it ot server u know it Comment : your are using Myfaces..right Comment : yes JSF1.1 . And i want to store local file @server with perticular url Comment : what is the error .. . Answer : The getInputStream method of the uploaded file represents the file content . You need to copy it to a file . You should first prepare a folder on the local disk file system where the uploaded files should be stored . For example path to uploads on Windows that would be on the same disk as where the server runs . Note that you should absolutely not store the files in expanded WAR folder by using a relative-path or getRealPath for the reasons mentioned here Uploaded image only available after refreshing the page http : stackoverflow.com questions 8885201 uploaded-image-only-available-after-refreshing-the-page . Then you need to autogenerate the filename . Otherwise when someone else uploads a file with coincidentally the same name later it would be overwritten . You could use Files createTempFile http : docs.oracle.com javase 8 docs api java nio file Files.html createTempFile-java.nio.file.Path-java.lang.String-java.lang.String-java.nio.file.attribute.FileAttribute...- facility to get an autogenerated filename . The path to uploads could if necessary be parameterized based on one of several ways shown in this Q A : Recommended way to save uploaded files in a servlet application http : stackoverflow.com questions 18664579 recommended-way-to-save-uploaded-files-in-a-servlet-application . The FilenameUtils is part of Apache Commons IO which you should already have in your classpath as it s a dependency of the Tomahawk file-upload component . Finally just stream the uploaded file to that file assuming Java 7 : .. . .. . Then to download it back easiest would be to register path to uploads as a new webapp context or a virtual host so that all those files are available by an URL . See also Load images from outside of webapps webcontext deploy folder using h : graphicImage or img tag http : stackoverflow.com questions 4543936 load-the-image-from-outside-of-webcontext-in-jsf . Comment : thanx And if I want to select multiple-files at once then what i need to prefer Comment : That s not possible with t : inputFileUpload which generates a plain old HTML4 input-type-file . That s only possible with Flash or HTML5 input-type-file multiple true . RichFaces and PrimeFaces offer such components . E.g . showcase.richfaces.org richfaces http : showcase.richfaces.org richfaces component-sample.jsf demo fileUpload skin blueSky and primefaces.org showcase ui fileUploadMultiple.jsf http : www.primefaces.org showcase ui fileUploadMultiple.jsf Comment : Thanx sorry for questioning more and more but any other way using t : inputFileUpload Comment : Just use multiple t : inputFileUpload components or use it in h : dataTable or t : dataList backed by a collection of UploadedFile . Comment : @Ced : because an empty temp file is physically created and thus already exists before writing . It works this way so the system can guarantee that no other temp file with coincidentally same name will be created by other thread between the creation and the writing .", "Question : I can t find anything over this and need some help . I have loaded a bunch of images into memory as BitmapImage types so that I can delete the temp directory that they were stored in . I have successfully done this part . Now I need to save the images to a different temp location and I can t figure out how to do this The images are contained in a : .. . .. . The string is the filename . How do I save this collection to the new temp location Thanks for any help Comment : Is there a reason you aren t just moving the files If the server or your program crashes before you write them back to disk the data will be lost . If you just use IO to move the files there is effectively no risk of data loss . Comment : Yes I have a different method for handling recovering that I intend to implement . When a user loads a project file for my application a zip file it extracts it all to a temp directory loads the files into memory then cleans up that temp directory . The program will then periodically autosave the project in a backup file . When the user wants to then save their project I want to unload all these resources in memory into a temp directory zip that up as the project file save it to the users location then delete the temp directory . I just need to figure how to save from the memory . Comment : Do you only load the images to memory or do you also show them in a UI If you don t show them there is no need to create BitmapImages you could simply store the binary file content as byte array . Anyway saving a BitmapImage to file is done by a BitmapEncoder e.g . a PngBitmapEncoder . Comment : I ll take a look into that . And yes I show the images in the UI . .. . Answer : You need to use an encoder to save the image . The PngBitmapEncoder will handle most of the common image types PNG BMP TIFF etc . The following will take the image and save it : .. . .. . I usually will write this into an extension method since it s a pretty common function for image-processing manipulating applications such as : .. . .. . This way you can just call it from the instances of the BitmapImage objects . Comment : Thanks That solution is pretty elegant and worked like a charm", "Question : I have a requirement in my app where I need to set the File-name and extension programmatically with the Common save-as File dialog . But seems the save-as-File-type is not considered until changing the save-as-type on the dialog by manually . It takes the current type of opened file by default even though the save-as-type on dialog is different and ask for overwriting the existing file . I have tried with parameters with OPENFILENAME struct but couldn t resolve it.Any help is appreciated on this issue . Comment : Without seeing your code there s not much anyone can do . .. . Answer : Leave the lpstrDefExt field empty . If this field is filled the Default will be used . Comment : That also means you have to make sure there is no file extension specified in the value of the filename field or else it will be used instead of the default . It is also not uncommon to use the CDN TYPECHANGE http : msdn.microsoft.com en-us library windows desktop ms646868.aspx event to manually update the value of the filename field with the selected file extension .", "Question : null .. . Answer : When I search for an answer from the web most suggest using header function like the following : .. . .. . However this would only force the user to download a csv file to the default position . What I want to do is to generate a prompt box to ask the user where to save the file like the Save As dialog box created by Application.GetSaveAsFilename in VBA . Comment : This behaviour is largely up to the browser itself . If the user has set their browser to download files to a default location there s not much you can do about it . Comment : That behavior is determined by the browser as J . Steen pointed out . However if you really need a prompt for where to save the file you could use a plugin like Flash or Java to produce the save prompt . Please don t though . Comment : If this were possible it would be a job for the client-side however for security reasons the client-side has no control over where a file is saved by default for good reason you wouldn t want a file replacing any of your system files Comment : You cant do that cuz evry user can set their own default location where to download files", "Question : Whenever I use the : sav command it saves the file with a new name and opens the new file open in Vim . Is it possible to save the file with a new name but keep the original one open for editing Comment : Hey @vimguy why not accept the obviously right answer Comment : Seriously why don t you accept the answer It s correct and you are actually detaining @wilhelmtell from receiving his deserved reward . Comment : Because he s not been back to this site since asking the question . Comment : You should really accept the top answer @vimguy . It s the right one it works well and it has been 4 years.. . Comment : maybe he passed on . .. . Answer : After save new file press .. . .. . This is shortcut to alternate file Comment : For what it s worth using nvim 0.1.0 under OS X 10.10.5 this requires SHIFT-CTRL-6 . Comment : shift-ctrl-6 on a Homebrew version of Vim on OS X 11 .", "Question : I m running mutagen 1.21 with python 2.7.5 on windows-8 and I get the errors below when I try to use pprint and save . If anyone could figure out what the problem is I would also appreciate a sample code of how to set the title artist album artist album date and track number of an mp3 file . Also is it possible to not remove the already existing tags that I don t wish to change If not I need a way to get the genre of an mp3 file before it is removed and then set it again along with the other tags . code .. . .. . traceback .. . .. . code .. . .. . traceback .. . .. . Edit : Regarding Michael0x2a s answer The chart you linked is exactly what I was looking for but it only worked halfway . Title track artist and album all worked fine . For all fields under the mp3 file s properties details except these four and year previous values were cleared by save and new ones couldn t be added - lines such as the one you posted .. . .. . did nothing . In particular the genre and album artist fields don t work . As for year which has both the codes TYER and TDAT it wouldn t change at all unless the field was empty first and then only by TYER . ORIGYEAR with the code TORY does nothing . The genre field isn t actually completely broken - if you change it with python code audio.add etc or manually go into properties details beforehand save will clear non-built-in genres such as Technical Death Metal or mt3jr39kf390 while it works with built-in genres such as Classic Rock or Country while certain integers such as 1 or 2 turn into those built-in genres . Here s the code I used : .. . .. . Edit : I continued the question at Some mutagen tags don t work http : stackoverflow.com questions 18026516 some-mutagen-tags-dont-work .. . Answer : The MP3 class is a type of ID3 class which as the tutorial says is highly structured http : mutagen.readthedocs.org en latest tutorial.html hard-examples-id3 and cannot be simply written to because of metadata it needs to keep track of . I suspect that s the reason for the errors -- when you re trying to save or print the audio object the code is expecting each key to point to some object but instead sees a simple string . Instead you need to specify that you want to use the EasyMP3 class so you can edit the keys like you want . The EasyMP3 class will automatically convert the strings into the appropriate objects for you . Example from the docs : .. . .. . However you can only edit certain keys . To get a list of valid keys that are editable use the following : .. . .. . Edit : .. . .. . Disclaimer : None of this is tested and might need tweaking or debugging . To edit tags not included within EasyMP3 you could reference this chart http : help.mp3tag.de main tags.html and use the 4-letter tag under the ID3v2.3 column . For example to set the album artist the chart states that the 4-letter code is TPE2 . You could then try : .. . .. . However I m not 100 sure what the encoding parameter does nor could I find any documentation about it so your mileage may vary . Comment : Thanks - I read the tutorial and assumed I could simply use the FLAC example but replace it with mp3 . But EasyID3 doesn t seem to have the album artist tag-it does have albumartistsort though . Do you know how to use the real ID3 class with artist album artist album date track number and genre The link with ID3v2 tag storage details from the mutagen tutorial is dead . Also I still need to know how to get current tag for genre . Comment : @user1715765 -- unfortunately I m not 100 sure how to do the things you asked but I updated my answer with the info I did find . Comment : I updated my question with the testing I did .", "Question : I want to invoke the file save-as prompt while allowing the user to download a file in ExtJS from a URL . Basically the idea is to allow the user to change the file name and select his desired location before saving the file on their machine . Is there any way I could do this I do not want to use : .. . .. . 1 . A server-side code to send the headers . 2 . Nor do I want to use the Flash-based Downloadify library to do this . 3 . Also a tag s download attribute does download the file but it does not prompt the dialog box if the browser settings are not set right . Is there any way apart from the above where we could handle the file download in our application .. . Answer : No it cannot be done with javascript alone due to the security restrictions of the contemporary browsers . You can read files http : www.html5rocks.com en tutorials file dndfiles but I have no knowledge of a way to save files directly from the javascript alone . If your I do not want tos are not that strict here http : extjs.eu ext-examples downloading-file you can find an example of file downloading . The essence is to send Content-Disposition : attachment header .", "Question : When we open Windows notepad application then open a file changes it contents and save it it simply gets saved without opening the Save File dialog . But in the notepad program I have created above the Save File dialog opens on clicking Save after changing the contents of saved file . Although the same file name appears in the save file dialog but on clicking Save it gives a message The same file name already exists . Do you want to replace it . That is what I want to remove and make the changed contents saved directly to the opened file without opening the save file dialog . .. . Answer : What you need to do is save the filename entered then when the save option is pressed check for a previously entered filename . If you have one skip showing the dialog and just execute the save code .", "Question : I currently have this code : .. . .. . string contains a lot of html code that gets written in a.html file . The above code is working perfectly . On a button click browser chrome automatically downloads an html file with the string content written in it . Now what i want to do is instead of chrome downloading the file automatically it should open a save-as dialog box and ask user the location and name of the file and then download it to that location . A quick simple reply would be really appreciated . Comment : I think it will always use the default behavior because this is what the user expects . Comment : Well in my case user should be able to set the location and name of the file to be saved.. . Comment : That will happen automatically if the browser has not instructed their browser to do otherwise . But maybe you can force it by supplying a different mime type via the type attribute for the link . Comment : Can t find any such attribute to open save-as dialog.. . Comment : You have set your browser has all file downloaded to a default location .. . Answer : The only way to do this is to set the header of the file on the server like so : .. . .. . The download attribute does not allow you to change the filename or filetype any more as it is an obvious security risk . What you are trying to do it replicate the right-click - save-as dialogue but I m afraid that is not possible at this time .", "Question : I have data that I want to write to a file and open a file dialog for the user to choose where to save the file . It would be great if it worked in all browsers but it has to work in Chrome . I want to do this all client-side . Basically I want to know what to put in this function : .. . .. . Where the function takes in data has the user select a location to save the file and creates a file in that location with that data . Thanks in advance . EDIT : Using HTML is fine too if that helps . Comment : Basically I want to know what to put in this function : the essence of every good question .. . Answer : function download text name type .. . var a document.getElementById a .. . var file new Blob text type : type .. . a.href URL.createObjectURL file .. . a.download name .. . .. . .. . .. . a href id a click here to download your file a .. . button onclick download file text myfilename.txt text plain Create file button .. . .. . And you would then download the file by putting the download attribute on the anchor tag . The reason I like this better than creating a data-url is that you don t have to make a big long url you can just generate a temporary url . Comment : The function you wrote takes 2 parameters . You call it using 3 parameters . That s just poor sportsmanship . Comment : That was really elegant actually . Thanks . Comment : This does not work in IE . As IE does not support the download attribute . Comment : @Banjocat You should check if the browser support certain objects . Example detecting : if URL in window createObjectURL in URL download in Element.prototype : else then you just change the downloading method or notice that the browser doesn t support the needed objects to download the file . Comment : doesnt work in safari", "Question : I am outputting a PDF file in a Web browser IE8 HttpContext.Response.writefile fileName and it works great . When I try to save the file it will give me the name of the ashx handler as a default . I would like to actually pass the real name . I tried to add header information as follow : .. . .. . And it works but I do not want the user to have to choose between open and save i want the file to open normally and if the user chooses to save it then the dialog would give him her the default filename . I tried also : .. . .. . Or just like Scott Hanselman suggested in his blog http : www.hanselman.com blog TheContentDispositionSagaControllingTheSuggestedFileNameInTheBrowsersSaveAsDialog.aspx . None of those work for me . Does anybody have any ideas .. . Answer : In case of INLINE it seems that Internet explorer is using the last parameter in the URL to build the filename . For example if your url is http : doc.com 131231231 IE will prompt you to save the file as 131231231.pdf If you need a filename for example foo 131231231.pdf you can hack the IE by using this url : http : doc.com foo 131231231 You may suffer to change your app a bit to expect such ugly parameter but at the end your app will work as you expect .", "Question : When we open Windows notepad application then open a file changes it contents and save it it simply gets saved without opening the Save File dialog . But in the notepad program I have created above the Save File dialog opens on clicking Save after changing the contents of saved file . Although the same file name appears in the save file dialog but on clicking Save it gives a message The same file name already exists . Do you want to replace it . That is what I want to remove and make the changed contents saved directly to the opened file without opening the save file dialog . .. . Answer : Set sfd.OverwritePrompt false any time after construction and before ShowDialog to suppress the overwrite warning .", "Question : Update : .. . .. . As discussed in Jacob s reply below limiting or correcting the behaviour of FileReference.save isn t possible . Can anyone suggest an alternative server is Apache PHP that matches all of my criteria from this post and avoids the pitfalls I discussed with Jacob End edit .. . .. . I m saving an image from my AS3 app using FileReference.save . This is the code which works fine : .. . .. . This opens up the save file dialog as expected . I m using this rather than sending the byteData to PHP because I want the user to have a familiar dialog box that lets them set their own file name . The problem comes when users have their operating-system configured to display file extensions like I do . This means that in the save dialog the file name contains the extension as seen in the image below and so it is very easy for the user to delete that extension when they rename the file . Because the default file-type for this box is All files if the extension is deleted the file is saved with no type . I don t know of any way to force a file-type on the save dialog if there is one that would be my preferred route so failing that can anyone suggest a safe way for me to do this that still allows the user to set the file name themselves using a standard dialog for their OS I did try putting in a call to FileReference.browse before the save-as shown in this tutorial http : ask.amoeba.co.in save-images-from-flash-actionsctipt-3-filereference-save-jpgencoder but that throws an error because you can only perform one FileReference call at a time . file save dialog http : i.stack.imgur.com z8BEL.jpg .. . Answer : Eduard http : bugs.adobe.com jira browse FP-2014 focusedCommentId 407325 page com.atlassian.jira.plugin.system.issuetabpanels 3acomment-tabpanel action 407325 provided a workaround in Adobe s feature request tracker for this issue : Doubling the file extension such as image.jpg.jpg . This is what we will do since for our users who hide extensions the extensions gets dropped whether or not they change the file name .", "Question : I want to save my images automatically but I don t know how to set it in DM . My script is as follows : Comment : You should provide your code as plain text so other users can copy and test it . Don t post a picture of your code if you want to get useful answers . Comment : What exactly do you mean by automatically You want to save it the moment it is first displayed Or you want to save all images every X minutes Or you want to save all of them when the user does a certain UI action Menu etc . Please describe in more detail . Comment : I get a lot of images it s first displayed then I want to save all of them . so I should name them firstly then set a path to store them finally the script can save them automatically when I use the script . Comment : @user1438038 thank you I should provide my codes . .. . Answer : It seems the main thing you are missing is a line that creates a full pathname from the combination of the destination directory path and the name for each image . So in addition to the changes suggested in the answer by BmyGuest you should add a call to PathConcatenate as follows :", "Question : I want to save my images automatically but I don t know how to set it in DM . My script is as follows : Comment : You should provide your code as plain text so other users can copy and test it . Don t post a picture of your code if you want to get useful answers . Comment : What exactly do you mean by automatically You want to save it the moment it is first displayed Or you want to save all images every X minutes Or you want to save all of them when the user does a certain UI action Menu etc . Please describe in more detail . Comment : I get a lot of images it s first displayed then I want to save all of them . so I should name them firstly then set a path to store them finally the script can save them automatically when I use the script . Comment : @user1438038 thank you I should provide my codes . .. . Answer : The script you ve written will not save anything but most likely produce an error . In the For -loop you 1000000x get the next image to save but when you reach the end the next image is invalid . Therefore the next iteration will throw an error at img.SetName because img is not a valid image at that moment . What you want to do is something like the following :" ] }
[ "yes-answer-long", "yes-answer-short" ]
user
UNK_RELATION
sqoop@relational-database@157
sqoop -- sqoop is an open-source software product of cloudera inc.sqoop is an open-source connectivity framework that facilitates transfer between multiple @placeholder management systems rdbms and hdfs .
{ "confidence": [ 53.02294921875, 50.62471008300781, 50.12176513671875, 50.10784149169922, 49.32786560058594, 49.12531280517578, 48.1759033203125, 47.947731018066406, 47.210533142089844, 46.838966369628906, 45.944915771484375, 45.56348419189453, 44.37261199951172, 44.14064407348633, 44.08566665649414, 43.9018440246582, 43.67523956298828, 43.51404571533203, 43.00807189941406, 43.00807189941406, 42.998497009277344, 42.908695220947266, 42.891578674316406, 42.56062316894531, 42.007835388183594, 41.819854736328125, 41.35010528564453, 41.302818298339844, 41.04081344604492, 40.97798538208008, 40.916236877441406, 40.84716033935547, 40.57079315185547, 40.57079315185547, 40.57079315185547, 40.57079315185547, 40.15039825439453, 40.12152099609375, 39.91080093383789, 39.86463165283203, 39.6909294128418, 39.509376525878906, 39.1314811706543, 38.984596252441406, 38.93602752685547, 38.93602752685547, 38.93330383300781, 38.86553955078125, 38.86553955078125, 38.86553955078125, 38.77206802368164, 38.59751510620117, 38.59751510620117, 38.59008026123047, 38.59008026123047, 38.59008026123047, 38.50459289550781, 38.488006591796875, 38.410682678222656, 38.410682678222656, 38.234535217285156, 38.17075729370117, 38.06060791015625, 37.79115676879883, 37.79115676879883, 37.684242248535156, 37.684242248535156, 37.684242248535156, 37.684242248535156, 37.684242248535156, 37.63383483886719, 37.63383483886719, 37.49211120605469, 37.45264434814453, 37.45264434814453, 37.4018669128418, 37.4018669128418, 37.4018669128418, 37.2536506652832, 37.195709228515625, 36.87907028198242, 36.764442443847656, 36.70171356201172, 36.70171356201172, 36.70171356201172, 36.689109802246094, 36.689109802246094, 36.689109802246094, 36.654876708984375, 36.533348083496094, 36.533348083496094, 36.533348083496094, 36.533348083496094, 36.533348083496094, 36.49540328979492, 36.49540328979492, 36.49000549316406, 36.4571418762207, 36.4571418762207, 36.4571418762207 ], "content": [ "I m using Cloudera hadoop and Sqoop .", "You would be executing Sqoop Eval from a node that has connectivity to the Source .", "Sqoop works with any kind of RDBMS system that supports JDBC connectivity .", "sqoop is essentially a tool to ingest data in HDFS from RDBMS .", "There is a Teradata Sqoop connector for Cloudera : Clicky", "SQOOP Import function tries to import the data from RDBMS and load it into HDFS .", "How to import the data from multiple source thru Sqoop .", "sqoop import is used to import data from RDBMS to HDFS .", "This is how sqoop imports job works : .. . .. . sqoop creates imports data in tmp dir HDFS which is user s home dir in your case it is user cloudera .", "If it is possible I can do that and then transfer the local files using ftp and then use sqoop again to transfer them to HDFS .", "We are open to explore option at hive or sqoop end .", "If we using 6 mapper in sqoop to importing the data from Oracle then how many connection will be establish between sqoop and source .", "No problem with the installation there is no need to copy all the files from sqoop directory just copy the sqoop library files into hdfs .", "Is there any way to remove special control-characters in HDFS block data using Sqoop export or any parameters using Sqoop", "I am using cloudera CDH for practising sqoop .", "I see that sqoop component is also present in Cassandra to import data so was wondering if we can use the SQOOP provided by Cloudera to import data into Cassandra .", "http : stackoverflow.com questions 19521655 whats-the-difference-between-flume-and-sqoop both Flume and Sqoop can pull data from source and push to Hadoop .", "For Sqoop Import to work all the Nodes of your Cluster need to have connectivity to the Source .", "Is there a way to import couchbase data into local files instead of HDFS using sqoop .", "Hi I loaded a data from mysql to hdfs via sqoop connector .", "You can solve this by adding all jars in usr local sqoop lib into HDFS : .. . .. . First create a directory in HDFS : .. . .. . Then put all libraires into HDFS .. . .. . Then check That the jars exists in HDFS : .. . .. . Finnaly import data using sqoop :", "I am trying to sqoop the records from table A to HDFS at say 2 : 00 PM CT source table A has 5M records and the sqoop ends at 4 : 00 PM CT table A has 5.5M records .", "Why is there MapReduce process in Sqoop to load data from HDFS to MySQL .. . .. . This is because Sqoop is based on MapReduce .", "issues.apache.org jira browse SQOOP https : issues.apache.org jira browse SQOOP .", "I am using Sqoop job to do incremental imports from RDBMS into HDFS as shown below .. . .. . sqoop job exec JOB1 .. . .. . The above 2 sqoop commands are working perfectly fine when run from command-prompt .", "I am trying to import data from MySql to HDFS using Sqoop .", "Both Sqoop and Flume pull the data from the source and push it to the sink .", "I am using sqoop-metastore HSQLDB to store the sqoop jobs .", "Propertiesfile : .. . .. . sqoop import command", "Use Sqoop .", "1 . copy sqoop from local to HDFS : .. . .. . hadoop fs -mkdir -p usr lib sqoop .. . .. . hadoop fs -copyFromLocal usr lib sqoop .jar usr lib sqoop lib .. . .. . 2 . copy jar class from tmp to HDFS .. . .. . cp tmp sqoop-hduser compile usr lib sqoop bin .. . .. . hadoop fs -put tmp sqoop-hduser compile user hduser", "We have brought data from respective RDBMS using sqoop .", "I am trying to export the data from RDMS into HDFS using sqoop .", "These .gz file is stored in Oracle DB as blob and imported into HDFS using Sqoop .", "Sqoop can take data from HDFS and export them to MySQL .", "I was trying to import a 1 TB table in MySQL to HDFS using sqoop .", "sqoop", "I am new to sqoop", "When I try to connect to cloudera mysql database through sqoop .", "SQOOP Eval function just acts on the RDBMS database and returns you the resultset .", "The sqoop create job is working in OOZIE and i am able to see the sqoop job being listed in the sqoop-metastore after oozie job completes .", "Sqoop is used for simpler SQL queries .", "Sqoop : How to deal with duplicate values while importing data from RDBMS to Hive tables .", "hadoop fs -rmr user cloudera categories .. . .. . OR .. . .. . hadoop fs -mv user cloudera categories user cloudera categories 1 .. . .. . and re-run sqoop command", "This is coming from official sqoop docs : By default Sqoop will specify the timezone GMT to Oracle .", "Note : In above command opt hadoop sqoop-1.4.6 is my system sqoop installation location", "There s an incremental mode in Sqoop .", "I tried to set up sqoop sqoop-1.4.3.bin hadoop-1.0.0 on Ubuntu .", "I have tried with the earlier versions of sqoop like Sqoop 1.4.3 and 1.4.4 .", "Sqoop Import uses Map-reduce whereas Sqoop Eval doesn t .", "I m getting following error while using sqoop import command : ERROR security.UserGroupInformation : PriviledgedActionException as : SqoopUser auth : SIMPLE cause : java.io.FileNotFoundException : File does not exist : hdfs : localhost : 8020 home SqoopUser sqoop-1.4.3-cdh4.4.0 sqoop-1.4.3-cdh4.4.0.jar .", "Now when we execute Sqoop commands they look like below : .. . .. . sqoop import --connect .. . --username .. . --table .. .", "We are using sqoop-1.4.4 in our environment and we want to use the sqoop java API to run our imports and exports .", "Is there a way to make sqoop work for ORC", "Sqoop is a better choice and widely used .", "Using SQOOP we will import that data .", "I am using hive action to load data into HDFS and Sqoop action to load data from HDFS to MySQL", "So in short Importing to Hive will use hdfs as the staging place and sqoop deletes staging dir user cloudera categories after copying sucessfully to actual hdfs location - it is last stage of sqoop job to clean up staging tmp files - so if you try to list the tmp staging dir you won t find it .", "Load SQL server tables onto HDFS using Sqoop .. . 2 .", "I am trying to import data from sybase to HDFS using Sqoop .", "Specifically .. . .. . Sqoop could be used to import export data to from RDBMS systems like Oracle MS SQL Server MySQL PostgreSQL Netezza Teradata and some others which supports JDBC connectivity .", "Sqoop helps to move data between hadoop and other databases and it can transfer data in parallel-for performance .", "If it does not exist put it there with hadoop fs -put jarLocationOn NameNode fileSystem sqoop-1.4.3-cdh4.4.0.jar home SqoopUser sqoop-1.4.3-cdh4.4.0 sqoop-1.4.3-cdh4.4.0.jar .", "Here s what I have for a sqoop job : .. . .. . logs :", "That could prove easier than patching recompiling Sqoop .", "This is something known issue in sqoop .", "Export it with Sqoop in a single transaction .", "and no sqoop wizard in page .", "Which version of sqoop is it", "But sqoop jobs fail .", "For this i installed Hadoop sqoop hive .", "Sqoop file is present for 1.4 version .", "addtowar.sh is not present in my sqoop installation .. . .. . Sqoop is at home hduser sqoop-1.99.3-bin-hadoop200 and in cataline.properties : - .. . .. . I execute . sqoop.sh server start. . .. . .. . sqoop.war is deployed to webapps sqoop .. . .. . Then there are the logs : -", "I have noticed this in the Sqoop manual : .. . .. . 24.5 .", "I am calling sqoop using java-api", "No extra additional locking is performed by Sqoop .", "Sqoop uses plain JDBC remember", "Could post your Sqoop command", "I remember looking at the code for sqoop github.com apache-sqoop https : github.com apache-sqoop and it helped me understand what the Couchbase connector was trying to do .", "Apache Flume works well for streaming data sources that are generated continuously in hadoop environment such as log files from multiple servers whereas whereas Apache Sqoop works well with any RDBMS has JDBC connectivity .", "The below syntax can be used to import data from Oracle Database to HDFS using Sqoop .. . .. . usr bin sqoop import --connect jdbc : oracle : thin : system system@ : 1521 : xe --username -P--table .", "sqoop import-all-tables --connect jdbc : mysql : quickstart.cloudera retail db .. . --username retail dba .. . --password cloudera .. . --autoreset-to-one-mapper .. . --warehouse-dir user cloudera sqoop import", "Then write the sqoop import code for it .", "Im using sqoop 1.99.3 .", "If not why Sqoop do like this", "I want to know certain things from this : - .. . .. . Before coping my sqoop to hdfs is my installation right", "Is it necessary to copy sqoop directory from ext file system to hdfs file system .", "I need to have Sqoop to write the column names as headers into the import files files that end up in HDFS .", "I m doing a sqoop import for multiple from Teradata using the same credentials .", "So I cannot use sqoop in the recommended way .", "Oozie version is 4.1.0.2.2 and Sqoop version is 1.4.5.2.2 .", "Running Sqoop requires a a Hadoop client i.e .", "We need not to install SQOOP on all 30 nodes .", "The minimum number of nodes should be isntalled by SQOOP is 1 .", "Again run hadoop fs -ls home SqoopUser sqoop-1.4.3-cdh4.4.0 sqoop-1.4.3-cdh4.4.0.jar and look at the file-permissions .", "Indiscriminate user of chmod 777 will take of this ie hadoop fs -chmod 777 home SqoopUser sqoop-1.4.3-cdh4.4.0 sqoop-1.4.3-cdh4.4.0.jar .", "You can run sqoop command from Save data into mysql from hive hadoop through sqoop", "Without these options the Sqoop import will only copy the data to HDFS and a Hive table will NOT be created .", "Sqoop stores at one location and based on the Replication Factor of the cluster HDFS replicates the data", "My scenario : I will get daily 100 records in hdfs through sqoop at particular time ." ] }
{ "confidence": [ 75.43833923339844, 74.65919494628906, 70.42046356201172, 68.63581848144531, 66.96904754638672, 66.846435546875, 65.10562896728516, 64.77591705322266, 64.77591705322266, 64.38787078857422, 63.58780288696289, 62.958648681640625, 62.6456298828125, 61.93778610229492, 61.86956024169922, 61.69098663330078, 61.28245544433594, 61.228553771972656, 61.09471130371094, 60.66807174682617 ], "content": [ "Question : I am new to Big data . From some of the answers to What s the difference between Flume and Sqoop http : stackoverflow.com questions 19521655 whats-the-difference-between-flume-and-sqoop both Flume and Sqoop can pull data from source and push to Hadoop . Can anyone please specify exaclty where flume is used and where sqoop is Can both be used for the same tasks .. . Answer : Flume http : flume.apache.org and Sqoop http : sqoop.apache.org are both designed to work with different kind of data sources . Sqoop works with any kind of RDBMS system that supports JDBC connectivity . Flume on the other hand works well with streaming data sources like log data which is being generated continuously in your environment . Specifically .. . .. . Sqoop could be used to import export data to from RDBMS systems like Oracle MS SQL Server MySQL PostgreSQL Netezza Teradata and some others which supports JDBC connectivity . Flume could be used to ingest high throughput data from sources like below and insert into destinations sinks below . Commonly used flume sources : .. . Spooling directory - directory in which lot of files are being created used mostly for collecting and aggregating log data .. . JMS - collect metrics from JMS based systems .. . And lots more https : flume.apache.org FlumeUserGuide.html flume-sources .. . Commonly used flume sinks : .. . HDFS .. . HBase .. . Solr .. . ElasticSearch .. . And lots more https : flume.apache.org FlumeUserGuide.html flume-sinks .. . .. . No both tools cannot be used to achieve the same task like for example flume cannot be used with databases and sqoop cannot be used with streaming data sources or flat files . If you are interested flume also has an alternate which does the same thing called as chukwa https : chukwa.apache.org . Comment : Thank you very much @Ashrith", "Question : Both Flume and Sqoop are meant for data movement then what is the difference between them Under what condition should I use Flume or Sqoop .. . Answer : Sqoop and Flume both are meant to fulfill data ingestion needs but they serve different purposes . Apache Flume works well for streaming data sources that are generated continuously in hadoop environment such as log files from multiple servers whereas whereas Apache Sqoop works well with any RDBMS has JDBC connectivity . Sqoop is actually meant for bulk data transfers between hadoop and any other structured-data stores . Flume collects log data from many sources aggregating it and writing it to HDFS . I came across this interesting infographic that explains the differences between the two apache projects Sqoop and Flume https : www.dezyre.com article sqoop-vs-flume-battle-of-the-hadoop-etl-tools- 176 - .. . .. . Difference between Sqoop and Flume http : i.stack.imgur.com xaxoB.png", "Question : I am very new to big data and i have little confusion regarding Sqoop and Flume .. . .. . So i get that difference between the Sqoop and Flume .. . .. . Sqoop is for transferring bulk data from RDBMS .. . Flume is for streaming of data such as log files .. . .. . My confusion is because big data architecture i am looking at which i have no virtual copy of grouped structured-data and its transferred by Sqoop and Unstructured streamed by Flume . My question regard that is does that mean Flume is only for streaming What about high frequency data and does Flume support transfer of unstructured data that are non-log files i.e . audio video or would Sqoop be able to handle that Final question is can Sqoop work with federated data sources if yes with both real and virtual Thanks .. . Answer : sqoop is essentially a tool to ingest data in HDFS from RDBMS . Under the hood it generates simple Java code which submit a query to a RDBMS and writes the result to HDFS . This means that you can import with sqoop everything which can be accessed via JDBC connection and which has a Java driver available . For this reason you can t use it for files like logs or things like that . Then sqoop can t handle video or audio files . Flume instead is used to monitor and ingesting in real-time informations . You can ingest everything for which there is a Flume source available https : flume.apache.org FlumeUserGuide.html flume-sources .", "Question : I m getting following error while using sqoop import command : ERROR security.UserGroupInformation : PriviledgedActionException as : SqoopUser auth : SIMPLE cause : java.io.FileNotFoundException : File does not exist : hdfs : localhost : 8020 home SqoopUser sqoop-1.4.3-cdh4.4.0 sqoop-1.4.3-cdh4.4.0.jar . I m using Cloudera hadoop and Sqoop . Not able to understand why it is looking for jar files in hdfs . Regards Big Data Developer Comment : Can u pls share the command which u are using Comment : See this answer http : stackoverflow.com a 26850804 by turkgen turkgen http : stackoverflow.com users 4186330 turkgen-turkgen in a similar question . .. . Answer : Please execute below commands which will resolve your problem . It will copy your files in HDFS system . Similarly copy any file which is not able to get by HDFS system . Note : In above command opt hadoop sqoop-1.4.6 is my system sqoop installation location", "Question : I m getting following error while using sqoop import command : ERROR security.UserGroupInformation : PriviledgedActionException as : SqoopUser auth : SIMPLE cause : java.io.FileNotFoundException : File does not exist : hdfs : localhost : 8020 home SqoopUser sqoop-1.4.3-cdh4.4.0 sqoop-1.4.3-cdh4.4.0.jar . I m using Cloudera hadoop and Sqoop . Not able to understand why it is looking for jar files in hdfs . Regards Big Data Developer Comment : Can u pls share the command which u are using Comment : See this answer http : stackoverflow.com a 26850804 by turkgen turkgen http : stackoverflow.com users 4186330 turkgen-turkgen in a similar question . .. . Answer : It is common for Hadoop services to look for jars in HDFS because all nodes in the cluster can access files in HDFS . This is important if the MapReduce job being kicked off by the Hadoop service in this case Sqoop has a dependence on those jars . Remember the Mappers are running on a DataNode not the NameNode even though you are probably running the Sqoop command from the NameNode . Putting the jars on HDFS is not the only possible solution to this problem but it is a sensible one . Now we can deal with the actual error . At least one but probably all of your Mappers are unable to find a jar they need . That means that either the jar does not exist or the user trying to access them does not have the required permissions . First check if the file-exists by running hadoop fs -ls home SqoopUser sqoop-1.4.3-cdh4.4.0 sqoop-1.4.3-cdh4.4.0.jar by a user with superuser privileges on the cluster . If it does not exist put it there with hadoop fs -put jarLocationOn NameNode fileSystem sqoop-1.4.3-cdh4.4.0.jar home SqoopUser sqoop-1.4.3-cdh4.4.0 sqoop-1.4.3-cdh4.4.0.jar . I haven t worked with Cloudera specifically so you will have to track down the jar location on the NameNode yourself . If Cloudera is anything like Hortonworks there will be occasional issues like this where cluster deployment scripts documentation misses a couple of required steps to get everything up and running . Now that we know the file-exists we can check to see if the user SqoopUser has permissions to the file . Again run hadoop fs -ls home SqoopUser sqoop-1.4.3-cdh4.4.0 sqoop-1.4.3-cdh4.4.0.jar and look at the file-permissions . Also check the permissions of the directories containing the jar . Explaining POSIX file-permissions is outside the scope of this answer so if you are not familiar you might need to read up on those . One important note is that HDFS does not have its own concept of groups it bases that on the groups of the underlying OS . Just make sure the jar is readable by SqoopUser and all of the parent directories are executable by SqoopUser . Indiscriminate user of chmod 777 will take of this ie hadoop fs -chmod 777 home SqoopUser sqoop-1.4.3-cdh4.4.0 sqoop-1.4.3-cdh4.4.0.jar . But of course be more discerning about the permissions you grant if your environment requires it . If you find file-permissions are tripping you up more often than you would like the nuclear option is to set dfs.permissions to false in hdfs-site.xml . This will let all users access all files on HDFS . This can be very useful for rapid development but it is safer to leave dfs.permisssions on .", "Question : I am using cloudera CDH for practising sqoop . When I try to connect to cloudera mysql database through sqoop . I am getting error - .. . .. . use --table or --query for import .. . .. . I followed instruction exactly as described in the sqoop documentation . http : sqoop.apache.org docs 1.4.6 SqoopUserGuide.html connecting to a database server .. . .. . Is there anyway to connect to mysql server from sqoop other than using the import statement . .. . Answer : sqoop import is used to import data from RDBMS to HDFS . To import data you need to tell name of table or SQL query . That s why you are getting this error : .. . .. . use --table or --query for import .. . .. . You want to check if connection is successful with Sqoop and don t want to import data . You can try some other Sqoop features like .. . .. . List databases .. . .. . sqoop list-databases --connect jdbc : mysql : database.example.com -username user --password pass .. . .. . .. . List tables in a database .. . .. . sqoop list-tables --connect jdbc : mysql : database.example.com testdb --username user --password pass", "Question : null .. . Answer : I am working on a use-case where I have to transfer data from RDBMS to HDFS . We have done the benchmarking of this case using sqoop and found out that we are able to transfer around 20GB data in 6-7 Mins . Where as when I try the same with Spark SQL the performance is very low 1 Gb of records is taking 4 min to transfer from netezza to hdfs . I am trying to do some tuning and increase its performance but its unlikely to tune it to the level of sqoop around 3 Gb of data in 1 Min . I agree to the fact that spark is primarily a processing engine but my main question is that both spark and sqoop are using JDBC driver internally so why there is so much difference in the performance or may be I am missing something . I am posting my code here . I have checked many other post but could not get a clear answer for the internal working and tuning of sqoop nor I got sqoop vs spark sql benchmarking .Kindly help in understanding this issue .", "Question : I m getting following error while using sqoop import command : ERROR security.UserGroupInformation : PriviledgedActionException as : SqoopUser auth : SIMPLE cause : java.io.FileNotFoundException : File does not exist : hdfs : localhost : 8020 home SqoopUser sqoop-1.4.3-cdh4.4.0 sqoop-1.4.3-cdh4.4.0.jar . I m using Cloudera hadoop and Sqoop . Not able to understand why it is looking for jar files in hdfs . Regards Big Data Developer Comment : Can u pls share the command which u are using Comment : See this answer http : stackoverflow.com a 26850804 by turkgen turkgen http : stackoverflow.com users 4186330 turkgen-turkgen in a similar question . .. . Answer : In addition to Daniel Koverman answer do this also . This will help you . export HADOOP MAPRED HOME usr lib hadoop-0.20-mapreduce export HADOOP HOME usr lib hadoop-0.20-mapreduce .. . .. . add these two lines in .. . .. . etc default hadoop and etc default hiveserver", "Question : I m getting following error while using sqoop import command : ERROR security.UserGroupInformation : PriviledgedActionException as : SqoopUser auth : SIMPLE cause : java.io.FileNotFoundException : File does not exist : hdfs : localhost : 8020 home SqoopUser sqoop-1.4.3-cdh4.4.0 sqoop-1.4.3-cdh4.4.0.jar . I m using Cloudera hadoop and Sqoop . Not able to understand why it is looking for jar files in hdfs . Regards Big Data Developer Comment : Can u pls share the command which u are using Comment : See this answer http : stackoverflow.com a 26850804 by turkgen turkgen http : stackoverflow.com users 4186330 turkgen-turkgen in a similar question . .. . Answer : first we have to grant all permission to the file like grant all privileges on filename . to @ localhost grant all privileges on filename . to @ localhost give this to command and excute", "Question : I am trying to copy the retail db database tables into hive database which I already created . When I execute the following code .. . .. . My Map-reduce job stops with the following error : .. . .. . ERROR tool.ImportAllTablesTool : Encountered IOException running import job : org.apache.hadoop.mapred.FileAlreadyExistsException : Output directory hdfs : quickstart.cloudera : 8020 user cloudera categories already exists .. . .. . I am trying to copy the tables to hive database Then why an existing file in cloudera caused the problem . Is there a way to ignore this error or overwrite the existing file . .. . Answer : This is how sqoop imports job works : .. . .. . sqoop creates imports data in tmp dir HDFS which is user s home dir in your case it is user cloudera . Then copy data to its actual hive location i.e . user hive wearhouse . This categories dir should have exist before you ran import statements . so delete that dir or rename it if its important . hadoop fs -rmr user cloudera categories .. . .. . OR .. . .. . hadoop fs -mv user cloudera categories user cloudera categories 1 .. . .. . and re-run sqoop command So in short Importing to Hive will use hdfs as the staging place and sqoop deletes staging dir user cloudera categories after copying sucessfully to actual hdfs location - it is last stage of sqoop job to clean up staging tmp files - so if you try to list the tmp staging dir you won t find it . After successful import : hadoop fs -ls user cloudera categories - dir will not be there .", "Question : I have 3 physical nodes running DSE 4.5 . On the same 3 nodes I have HDP 2.2 running as well . Using Sqoop either dse sqoop or sqoop provided by HortonWorks how can I extract data from a Cassandra table and load into Hbase I have searched on the net and all examples describe RDBMS to HBase and vice versa or RDBMS to Cassandra and vice versa . Have not found any example for Cassandra to HBase i.e . NoSQL to NoSQL . The README.txt in usr share dse demos sqoop also details import export from mysql to cassandra . Any help is much appreciated .. . Answer : The version of sqoop provided with DSE 4.5 does not support this . It only supports data-transfer between RDBMS and NoSql not data-transfer between NoSql and NoSql .", "Question : When i run sqoop eval its give me output . But when i do sqoop import its giving following error .. . .. . I am using BigInsight . Anyone can please tell what is the problem . .. . Answer : Sqoop Import uses Map-reduce whereas Sqoop Eval doesn t . You would be executing Sqoop Eval from a node that has connectivity to the Source . For Sqoop Import to work all the Nodes of your Cluster need to have connectivity to the Source .", "Question : I m getting following error while using sqoop import command : ERROR security.UserGroupInformation : PriviledgedActionException as : SqoopUser auth : SIMPLE cause : java.io.FileNotFoundException : File does not exist : hdfs : localhost : 8020 home SqoopUser sqoop-1.4.3-cdh4.4.0 sqoop-1.4.3-cdh4.4.0.jar . I m using Cloudera hadoop and Sqoop . Not able to understand why it is looking for jar files in hdfs . Regards Big Data Developer Comment : Can u pls share the command which u are using Comment : See this answer http : stackoverflow.com a 26850804 by turkgen turkgen http : stackoverflow.com users 4186330 turkgen-turkgen in a similar question . .. . Answer : I have also faced such problem . I just check my hadoop services using .. . .. . jps 10869 JobHistoryServer 10610 NameNode 10669 DataNode 15215 Jps 10738 ResourceManager 3978 Main .. . .. . NodeManager not running . Changed some settings in yarn-site.xml and now sqoop find my jars in my local file system . Comment : Changed some settings in yarn-site.xml what changes", "Question : I need to migrate the couchbase data into HDFS but the db and Hadoop clusters are not accessible to each other . So I cannot use sqoop in the recommended way . Is there a way to import couchbase data into local files instead of HDFS using sqoop . If it is possible I can do that and then transfer the local files using ftp and then use sqoop again to transfer them to HDFS . If that s a bad solution then is there any other way I can transfer all the cb data in local files . Creating views on this cb cluster is a difficult task and I would like to avoid using it . .. . Answer : You can use couchbase kafka adapter to stream data from couchbase to kafka and from kafka you can store in any file system you like . CouchbaseKafka adapter uses TAP protocol to push data to kafka . https : github.com paypal couchbasekafka", "Question : Need detailed difference between Sqoop and TDCH- Teradata Connector for Hadoop . Which is recommended for Teradata as source and hadoop as a Target . We need to implement different type of loads like Incremental History and Append Comment : The Teradata connector supports JDBC FastLoad FastExport which should at least potentially out-perform the generic Sqoop connector . .. . Answer : TDCH supports hive HCatalog but does not support all file formats : only supports TextFile SequenceFile and RCFile . Now almost all hadoop distributions have added sqoop Teradata connector so you can use all sqoop features Incremental History Append etc . which TDCH does not support : .. . .. . cloudera-connector-for-teradata http : blog.cloudera.com blog 2012 01 cloudera-connector-for-teradata-1-0-0 .. . .. . hwx-connector-for-teradata https : hortonworks.com wp-content uploads 2015 04 hwx-connector-for-teradata.pdf .. . .. . four-step-strategy-incremental-updates-hive http : hortonworks.com blog four-step-strategy-incremental-updates-hive .. . .. . MapR-teradata-connector-hadoop-yarn https : www.mapr.com blog teradata-connector-hadoop-yarn-mapr .. . .. . IBM - biginsights http : www.ibm.com support knowledgecenter SSPT3X 4.1.0 com.ibm.swg.im.infosphere.biginsights.import.doc doc data-warehouse teradata-import.html .. . .. . Edit : removed this line from original answer as per Dev s input : .. . .. . For Teradata as source you have to use TDCH sqoop doesn t not have direct support for Teradata . Comment : Apache Sqoop directly supports Teradata . All you need to add JDBC jar like for other RDBMS . Comment : but don t we need connection-manager like - this - dba.stackexchange.com questions 76555 http : dba.stackexchange.com questions 76555 problem-while-connecting-to-teradata-with-sqoop and I was referring to this doc- sqoop.apache.org docs 1.4.1-incubating https : sqoop.apache.org docs 1.4.1-incubating SqoopUserGuide.html supported databases in reference to direct support for teradata . Comment : This works fine with sqoop 1.4.6 - sqoop export -Dsqoop.export.records.per.statement 1 --connect jdbc : teradata : xxx.xxx.xxx.xxx DBS PORT 1025 DATABASE ds tbl db --driver com.teradata.jdbc.TeraDriver --username xxx --password xxx --table hive 01 --export-dir dir --input-fields-terminated-by 001 --input-null-string N --input-null-non-string N -m 2 Comment : Thanks for your input @dev I removed the misleading line from answer and my mind . . . Comment : you are welcome BigDataLearner", "Question : I am very new to big data and i have little confusion regarding Sqoop and Flume .. . .. . So i get that difference between the Sqoop and Flume .. . .. . Sqoop is for transferring bulk data from RDBMS .. . Flume is for streaming of data such as log files .. . .. . My confusion is because big data architecture i am looking at which i have no virtual copy of grouped structured-data and its transferred by Sqoop and Unstructured streamed by Flume . My question regard that is does that mean Flume is only for streaming What about high frequency data and does Flume support transfer of unstructured data that are non-log files i.e . audio video or would Sqoop be able to handle that Final question is can Sqoop work with federated data sources if yes with both real and virtual Thanks .. . Answer : Apache Flume is a distributed reliable and available system for efficiently collecting aggregating and moving large amounts of log data from many different sources to a centralized data store . The use of Apache Flume is not only restricted to log data aggregation . Since data sources are customizable Flume can be used to transport massive quantities of event data including but not limited to network traffic data social-media-generated data email messages and pretty much any data source possible . .. . .. . .. . .. . Apache Sqoop is a tool designed for efficiently transferring bulk data between Apache Hadoop and structured datastores such as relational databases it imports data transform the data in Hadoop MapReduce and then export the data . Sqoop automates most of this process relying on the database to describe the schema for the data to be imported . Sqoop uses MapReduce to import and export the data which provides parallel operation as well as fault tolerance . .. . .. . Sqoop Vs Flume http : i.stack.imgur.com WLUiI.png .. . .. . Source : sqoop-vs-flume-battle-of-the-hadoop https : www.dezyre.com article sqoop-vs-flume-battle-of-the-hadoop-etl-tools- 176 .. . .. . Reference : INGESTION AND STREAMING https : thinkbiganalytics.com leading big data technologies ingestion-and-streaming-with-storm-kafka-flume .. . .. . .. . .. . Flume is efficient with streams and if you want to just dump data from RDBMS why not use sqoop By high frequency data if you mean social media yes flume can handle it . Unstructured data yes flume may handle that too . When to use http : i.stack.imgur.com fOqH6.png", "Question : I m getting following error while using sqoop import command : ERROR security.UserGroupInformation : PriviledgedActionException as : SqoopUser auth : SIMPLE cause : java.io.FileNotFoundException : File does not exist : hdfs : localhost : 8020 home SqoopUser sqoop-1.4.3-cdh4.4.0 sqoop-1.4.3-cdh4.4.0.jar . I m using Cloudera hadoop and Sqoop . Not able to understand why it is looking for jar files in hdfs . Regards Big Data Developer Comment : Can u pls share the command which u are using Comment : See this answer http : stackoverflow.com a 26850804 by turkgen turkgen http : stackoverflow.com users 4186330 turkgen-turkgen in a similar question . .. . Answer : First the answer : .. . .. . You need to refresh the client config files . In CDH 5 this can be done from the front page of the Manager s UI by clicking on the circle-arrow symbol next to the service . I think the config that is causing your problem is the YARN service but you might as well bring all your config files up to-date . Second the background : .. . .. . I just solved this issue for myself . I am using CDH 5.0 . Here is the command I ran and the error encountered :", "Question : I need to migrate the couchbase data into HDFS but the db and Hadoop clusters are not accessible to each other . So I cannot use sqoop in the recommended way . Is there a way to import couchbase data into local files instead of HDFS using sqoop . If it is possible I can do that and then transfer the local files using ftp and then use sqoop again to transfer them to HDFS . If that s a bad solution then is there any other way I can transfer all the cb data in local files . Creating views on this cb cluster is a difficult task and I would like to avoid using it . .. . Answer : Alternative solution perhaps not as elegant but it works : .. . .. . 1 . Use Couchbase backup utility : cbbackup and save locally all data . 2 . Transfer backup files to HDFS reachable network host . 3 . Install Couchbase in the network segment where HDFS is reachable and use Couchbase restore from backup procedure to populate that instance . 4 . Use Scoop in recommended way against that Couchbase instance that has access to HDFS .", "Question : I am trying to export some data from hdfs to mysql using sqoop . The problem is when I try to export a uncompressed file it exports properly but if I try to export the same file compressed with lzo compression the sqoop job fails . I am trying it in standard cloudera CDH4 VM environment . The columns in file are separated by tab and null is represented as N . The file content : .. . .. . Description of mysql table : .. . .. . File in hdfs : .. . .. . sqoop command : .. . .. . Error : .. . .. . This works perfectly if the file is not compressed and I am directly working with dipayan-test.txt file . Need help in resolving this issue and also want to know if I am missing something when working with lzo files . .. . Answer : Chances are that your table doesn t have the correct columns . You can always go into the .java file sqoop creates for you and debug from there : sqooptest.java : 225", "Question : I am running a 3 node HDP 2.2 cluster . Oozie version is 4.1.0.2.2 and Sqoop version is 1.4.5.2.2 . I am using Sqoop job to do incremental imports from RDBMS into HDFS as shown below .. . .. . sqoop job exec JOB1 .. . .. . The above 2 sqoop commands are working perfectly fine when run from command-prompt . I am using sqoop-metastore HSQLDB to store the sqoop jobs . The sqoop create job is working in OOZIE and i am able to see the sqoop job being listed in the sqoop-metastore after oozie job completes . But when i put the sqoop exec job in the oozie workflow i get Main class org.apache.oozie.action.hadoop.SqoopMain exit code 1 error . The underlying map reduce job however shows as completed successfully . Checked for logs in var log oozie but nothing there as well . workflow.xml : .. . .. . job.properties : .. . .. . I have tried in multiple different ways for sqoop exec job in oozie but nothing works . Please help . Comment : I m surprised that your code works from command-prompt because you first define a job in a specific metastore then you execute the same job without specifying which metastore it was defined into .. . Answer : It puzzles me as to how sqoop job --exec JOB1 works in the command-prompt . The right syntax for executing the job from command-prompt would be .. . .. . sqoop job --exec JOB1 --meta-connect jdbc : hsqldb : hsql : ip-address : 16000 sqoop .. . .. . Perhaps you executed the job from the same machine that is running your sqoop metastore .. . .. . Please make sure you have done the following .. . .. . 1 . Started sqoop metastore on a the machine with ip ip-address .. . 2 . Made necessary configuration changes in sqoop-site.xml follow this http : files.hii-tech.com book Hadoop Oreilly.Apache.Sqoop.Cookbook.Jul.2013.pdf link .. . .. . As for the oozie workflow try the following workflow.xml" ] }
[ "yes-answer-long", "yes-answer-short" ]
relational-database
UNK_RELATION
django-permissions@django@109
django-permissions -- django-permissions is a pluggable django app that provides per-object permissions for @placeholder based on roles .
{ "confidence": [ 64.99240112304688, 63.16196823120117, 61.94764709472656, 61.620113372802734, 61.59720993041992, 61.2523307800293, 60.49224853515625, 59.181793212890625, 59.181793212890625, 59.181793212890625, 59.181793212890625, 58.979190826416016, 58.6754264831543, 57.967472076416016, 57.967472076416016, 57.54666519165039, 56.691471099853516, 54.06589126586914, 53.79042053222656, 53.79042053222656, 53.79042053222656, 53.59404373168945, 53.54633331298828, 53.06617736816406, 52.737796783447266, 52.58144760131836, 52.57609939575195, 52.57609939575195, 52.066707611083984, 51.22404098510742, 51.13274002075195, 51.12070083618164, 51.12070083618164, 51.12070083618164, 50.90324401855469, 50.169979095458984, 49.966392517089844, 49.754058837890625, 49.72425842285156, 49.31121826171875, 48.90245056152344, 48.89909362792969, 48.77853775024414, 48.15705490112305, 47.701904296875, 47.50025939941406, 47.50025939941406, 47.50025939941406, 47.50021743774414, 47.33870315551758, 47.08515548706055, 47.01359558105469, 46.77700424194336, 46.52827072143555, 46.52827072143555, 46.52827072143555, 46.52827072143555, 45.31394958496094, 44.22737503051758, 44.0863151550293, 44.072059631347656, 44.051780700683594, 43.858551025390625, 43.858551025390625, 43.858551025390625, 43.858551025390625, 43.858551025390625, 42.965877532958984, 42.87199401855469, 42.151302337646484, 42.08367919921875, 42.023101806640625, 41.67450714111328, 41.6466064453125, 41.591102600097656, 41.416595458984375, 41.416595458984375, 41.288124084472656, 40.86935806274414, 40.840633392333984, 40.47756576538086, 40.35883331298828, 40.22857666015625, 39.95384979248047, 39.761043548583984, 39.41395950317383, 39.41395950317383, 39.37643051147461, 39.36719512939453, 39.32392883300781, 39.32392883300781, 38.90665817260742, 38.821449279785156, 38.821449279785156, 38.821449279785156, 38.768280029296875, 38.70283126831055, 38.546722412109375, 38.53858184814453, 38.111778259277344 ], "content": [ "Django comes with a simple permissions system .", "Where is the documentation for django groups permissions", "Or does django-cache the permissions somehow", "django-rest-framework http : www.django-rest-framework.org provides a hook for permissions http : www.django-rest-framework.org api-guide permissions and provides a integration of django model permissions .", "Also this SOF link http : stackoverflow.com questions 11082564 django-object-permissions-vs-django-guardian-vs-django-authority provides a nice comparison .", "I am using django-guardian to implement per-object permissions in my Django project .", "Why is it a problem for Django to create these permissions", "How would you handle such permissions in Django", "For Model permissions Django handles these for you.. . mostly .", "For each model Django will create permissions in the form appname.permissionname modelname .", "The permissions that Django automatically creates will be create change and delete .", "As for Aug 13 django-object-permissions has been superseded by django-permission https : github.com lambdalisue django-permission .", "Check out my article Django Generic Class Based Views with Object-Level Permissions Checking http : blog.darwiniansoftware.com 2013 09 30 dslibpy-django-generic-class-based-views-with-object-level-permissions-checking .", "I d like to extend or use the django groups and permissions .", "Is there a way to do row level permissions in django", "I would recommend using Django Guardian https : github.com lukaszb django-guardian for object-level permissions .", "I want an administrator to be able to assign remove django-guardian permissions to a person and how they relate to a Project object based on what permissions available to said object .", "When I create a user in Django he has no permissions : .. . .. . I want some permissions to be set by default say api.add item and I use Django Guardian http : packages.python.org django-guardian .", "I have seen you can create custom permissions in Django i.e .", "I ve read about Django permissions but not able to implement the same .", "This is a great answer for permissions but barely touches groups and how they work in Django", "You can use django.contrib.auth Group to add your users to the respective group and then assign permissions to the groups : .. . .. . Check django-guardian https : github.com lukaszb django-guardian for more fine-grained control and object-level permissions .", "I ve seen some apps like django-guardian djang-permissions django-rulez etc .", "Most of the permissions packages I have seen are row-based like django-guardian but in my case I want to implement a permissions system based on a related model .", "If you look at the source code for the ModelBackend https : github.com django django blob master django-contrib auth backends.py you can see that Django does cache the permissions on the user object .", "If that doesn t work out try checking all permissions with : .. . .. . Django does not usually install the default permissions for a model this command can grab all the permissions that are needed", "This is how I changed Django 1.0.2 to add view permissions .", "and .. . .. . The Django admin operates on three permissions : add change and delete .", "The Django documentation especially docs.djangoproject.com and djangobook.com talks extensively about how to retrieve permissions programmatically and to test users for permissions but what I can t find is one of the most basic uses of permissions alluded to in the documentation : controlling per-model not per-object just the model permissions for the admin interface .", "I would like to set custom permissions with django guardian on my django-rest-framework views .", "Active Development : .. . .. . 1 . django-guardian 1 week ago .. . 2 . django-object-permissions 1 year ago .. . 3 . django-authority nearly 2 years ago .. . .. . API .. . .. . 1 . django-guardian save an instance of a defined model .. . 2 . django-object-permissions register permissions .. . 3 . django-authority define classes .. . .. . The above are in order by the way .", "Django functions for validate permissions like has perm would work", "Django functions for validate permissions like has perm would work", "I suspect that the issue of the django-permissions for objects but how set it for guest users", "Check Django Document for User authentication in Django https : docs.djangoproject.com en 1.9 topics auth and Permissions in Django Rest Framework http : www.django-rest-framework.org api-guide permissions .", "You should try django-guardian it s a pretty good app to manage permissions with decorators : D", "Some similar questions have been asked but with no clear answer for the general case : .. . .. . Django default user-permissions http : stackoverflow.com questions 20992334 django-default-user-permissions .. . How do I define default permissions for users in Django Guardian", "From the Django docs : .. . .. . Permission caching https : docs.djangoproject.com en 1.8 topics auth default permission-caching .. . .. . The ModelBackend caches permissions on the User object after the first time they need to be fetched for a permissions check .", "@GreatTurtle I posted this question here stackoverflow.com questions 23104449 view-permissions-in-django http : stackoverflow.com questions 23104449 view-permissions-in-django on 16th April and no one replies", "For various reasons I want to ditch this and instead use Django s Groups and Permissions together with a library like django-guardian https : github.com lukaszb django-guardian .", "Keep in mind vanilla django-permissions are model based so if you need to limit changing only certain fields to different users you will need something more robust like django-guardian .", "I ve found 3 row-level permission solutions for Django 1.2+ .. . .. . django-object-permissions http : pypi.python.org pypi django-object-permissions .. . django-guardian https : github.com lukaszb django-guardian .. . django-authority http : packages.python.org django-authority index.html .. . .. . Could someone tell if there is any recommended more than the others what are their main differences etc .", "I am working on Django project as per requirements I need to manage users groups and permissions in custom template .", "Additionally you should use contrib.auth.Group https : docs.djangoproject.com en 1.8 ref contrib auth together with django-guardian https : django-guardian.readthedocs.org en v1.2 to keep track of object-level permissions instead of implementing it yourself .", "The importance of this field is that it designates the object to which the permission applies from the django source code 1.7.11 : .. . .. . Permissions are set globally per type of object not per specific object instance .", "You might be able to prevent Django from creating the permissions but it might not be worth the complexity that it adds to your app .", "I cant filter by app because django create useless permissions for every model .", "If the app is included in INSTALLED APPS then Django should create the missing permissions when you run . manage.py migrate .", "If you want object permissions you ll have to either write your own http : djangoadvent.com 1.2 object-permissions if using 1.2+ or find a project someone else has written one I like is django-objectpermissions https : github.com callowayproject django-objectpermissions from washingtontimes .", "There are a large number of permissions apps for django available on PyPi http : pypi.python.org pypi 3aaction search term django 20permission submit search .. . For example you could look at django-object-permission http : pypi.python.org pypi django-object-permission 0.5.2 .", "I use the following code slightly modified from Dev with Passion http : devwithpassion.com felipe south-django-permissions and originally from django-extensions http : packages.python.org django-extensions .", "Based on djangopackages.com grids g perms https : www.djangopackages.com grids g perms github.com django-guardian django-guardian https : github.com django-guardian django-guardian seems like a good option for row-level ie object level permissions .", "The django doco here https : docs.djangoproject.com en dev topics auth default permissions says that a users permissions are stored in the template variable perms .", "I m using django-1.8 python3 .. . .. . Edit .. . .. . Also I m creating required permissions dynamically while adding new department .", "Now in Django admin by default provided permissions i.e add change delete works fine with models and their admin views .", "If I am getting you correct what you need to implement is called row level permissions in Django .", "in django by default when syncdb is run with django.contrib.auth installed it creates default permissions on each model.. . like foo.can change foo.can delete and foo.can add .", "You shouldn t use django-guardian as my answer shows permissions can be easily done with a own custom User model .", "This is unrelated to creating the default possible permissions that may be granted to users although for reference .. . .. . Default permission group data in Django http : stackoverflow.com questions 22457733 default-permission-group-data-in-django .. . In Django how do you programmatically create a group with permissions http : stackoverflow.com questions 22250352 in-django-how-do-you-programmatically-create-a-group-with-permissions", "In particular you would like to control who can edit a model which is included in the default permissions https : docs.djangoproject.com en 1.8 topics auth default default-permissions of django .", "Personally I prefer authority or permission which uses methods for checking permissions runtime rather than django-guardian which uses database to keep the permissions attached upon object creation f.e . .", "The basis idea is to browse the django packages perm grid http : djangopackages.com grids g perms and pick an implementation of object level permissions .", "Too many models spamming django permission table even in models where I dont need permissions .", "In fact I would even prefer if django wont create permissions at all on every migrate.. .", "I cannot get permissions to work in django-templates that are loaded via the use of the inclusion tag .", "From Django docs : .. . .. . More information could be found here https : docs.djangoproject.com en 1.8 topics auth default permissions .", "This creates all permissions for existing django-models even for those with added south migrations .", "So permissons provides enough security for django-admin .", "I would recommend you to use the standard way to use custom permissions as described in the Django documentation https : docs.djangoproject.com en 1.8 topics auth customizing custom-permissions .", "I m fairly new and django-rest-framework and I have some questions regardin permissions .", "In that point django-permissions are not sufficient because our customer must see record belong to his account while a standard admin can see all records .", "If you want to give permissions on all cars then Model-level is appropriate but if you want to give permissions on a per-car basis you want Object-level .", "What you are describing is Role based permissions .", "It provides a way to assign permissions to specific users and groups of users .", "As I came across this and needed object permission I found django-guardian : django-guardian.readthedocs.org en v1.2 http : django-guardian.readthedocs.org en v1.2", "I have a UI for adding permissions for users so I need to know what are my real permissions and what are django ones which I don t want to display .", "I m not sure on the details of when the get created recreated but django has default permissions https : docs.djangoproject.com en 1.8 topics auth default default-permissions for every model you create .", "django-authority .. . .. . Declaration : .. . .. . Usage : .. . .. . It also wraps standard django-permissions but you can see the flexibility in the above custom permission which -AFAIK- you cannot do in guardian .", "My view s are protected using the PermissionRequiredMixin like so : .. . .. . Does Django Guardian provide some way of giving registered users the same permissions as anonymous users", "This behavior is expected because permissions are cached .", "Not sure how those permissions work inbuild permissions auth permissions", "I m on a django app about academies teachers and students .", "My question is : is there a way I can create a foreign key to a permissions group within a django model", "github.com lukaszb django-guardian https : github.com lukaszb django-guardian", "To do the same check as has perm above you d call something like this : .. . .. . If you need to use object or row permissions they mean the same thing then Django can t really help you by itself .", ".. . .. . If you try to get rid of existing permissions django might just recreate them or you may run into trouble when creating new models .", "I am trying to add standard django-permissions by using django.core.management.call command .. . .. . When I type it in the console everything works fine i.e .", "To create custom permissions for a given model object use the permissions model Meta attribute .", "This worked for me : .. . .. . It is a django-extensions https : github.com django-extensions django-extensions thing .", "Can the ModelAdmin permissions be trusted", "It does not appear to be a permissions issue .", "I m building app using django for note that i m very very new to django .", "How this can be achieved in Django", "+1 for Django-guardian .", "An updated answer for Django 1.8 .", "So if you needed to change the permissions on many users at once you could simply update the permissions of the group they are assigned to .", "I know permissions can be created programmatically and I can just create a set of permissions upon receiving the post save signal for Department .", "It should be noted that there s a bug in Django 11383 https : code.djangoproject.com ticket 11383 which prevents the check for object level permissions when the delete selected admin action is run .", "Every time I wipe the database of my Django app during testing or when cloning or deployin I have to go into admin and set up permissions and groups .", "in django-admin ." ] }
{ "confidence": [ 75.45169067382812, 75.2989501953125, 73.0656967163086, 72.11388397216797, 71.02970123291016, 71.00222778320312, 68.83834075927734, 67.61839294433594, 67.50321960449219, 66.92192840576172, 66.70777130126953, 66.416015625, 66.19977569580078, 64.61305236816406, 63.979164123535156, 63.9562873840332, 63.451698303222656, 63.274723052978516, 62.85407638549805, 62.716957092285156 ], "content": [ "Question : I understand the basic user stuff . I know authentication login creating accounts etc . But now I want to work on groups and permissions . Where is the documentation for django groups permissions This is not it : http : docs.djangoproject.com en dev topics auth .. . Answer : I suppose the first question you need to ask are what permissions do you need and what sort . By what sort I mean do you want Model- or Object-level . To clarify the difference say you have a model Car . If you want to give permissions on all cars then Model-level is appropriate but if you want to give permissions on a per-car basis you want Object-level . You may need both and this isn t a problem as we ll see . For Model permissions Django handles these for you.. . mostly . For each model Django will create permissions in the form appname.permissionname modelname . If you have an app called drivers with the Car model then one permission would be drivers.delete car . The permissions that Django automatically creates will be create change and delete . For some strange reason they decided not to include read permissions from CRUD you will have to do this yourself . Note that Django decided to change CRUD s update to change for some reason . To add more permissions to a model say read permissions you use the Meta class : .. . .. . Note that permissions is a set of tuples where the tuple items are the permission as described above and a description of that permission . You don t have to follow the permname modelname convention but I usually stick with it . Finally to check permissions you can use has perm : .. . .. . Where obj is either a User or Group instance . I think it is simpler to write a function for this : .. . .. . Where entity is the object to check permissions on Group or User model is the instance of a model perms is a list of permissions as strings to check e.g . read change and app is the application name as a string . To do the same check as has perm above you d call something like this : .. . .. . If you need to use object or row permissions they mean the same thing then Django can t really help you by itself . The nice thing is that you can use both model and object permissions side-by-side . If you want object permissions you ll have to either write your own http : djangoadvent.com 1.2 object-permissions if using 1.2+ or find a project someone else has written one I like is django-objectpermissions https : github.com callowayproject django-objectpermissions from washingtontimes . Comment : This is a great answer for permissions but barely touches groups and how they work in Django Comment : There isn t a whole lot to groups they re mostly just for bundling users together to apply permissions much like Linux user groups . You give a permission to a Group and it extends to all members of that group . The documentation says it all really : docs.djangoproject.com en dev topics auth default groups https : docs.djangoproject.com en dev topics auth default groups . Comment : Looks like Django Advent is gone there s a version of the article about writing your own object permissions on Github : github.com djangoadvent djangoadvent-articles blob master 1.2 https : github.com djangoadvent djangoadvent-articles blob master 1.2 06 object-permissions.rst Comment : I feel compelled to point out here that you want to consider using django guardian https : github.com lukaszb django-guardian for this . See the authorization package breakdown https : www.djangopackages.com grids g authorization here . Also this SOF link http : stackoverflow.com questions 11082564 django-object-permissions-vs-django-guardian-vs-django-authority provides a nice comparison . Comment : As I came across this and needed object permission I found django-guardian : django-guardian.readthedocs.org en v1.2 http : django-guardian.readthedocs.org en v1.2", "Question : Is there a way to do row level permissions in django I thought there wasn t but just noticed this in the docs : .. . .. . Permissions can be set not only per type of object but also per specific object instance . By using the has add permission has change permission and has delete permission methods provided by the ModelAdmin class it is possible to customize permissions for different object instances of the same type . https : docs.djangoproject.com en dev topics auth .. . .. . But i don t see any documentation on how to actually implement per instance permissions .. . Answer : I have rolled-out a solution to this kind of problem using Django Class Based Views . Check out my article Django Generic Class Based Views with Object-Level Permissions Checking http : blog.darwiniansoftware.com 2013 09 30 dslibpy-django-generic-class-based-views-with-object-level-permissions-checking .", "Question : Django comes with a simple permissions system . It provides a way to assign permissions to specific users and groups of users . Like this app lable.model name . It may be convenient for the django-admin but I think it will be use difficult when I use it to control what people can to do with it . For example If I want to control whether a certain user can post a comment or see some portion content of my site . I have to config a permission group to him but why not just add a user property like can post or can view certain portion Its seems more intuitive . So who can help me understand those things Thanks in advance . .. . Answer : The reason to keep permissions in a separate model is to leverage groups . So if you needed to change the permissions on many users at once you could simply update the permissions of the group they are assigned to . Also since users can belong to more than one group you have more flexibility for customizating permissions per user . Keep in mind vanilla django-permissions are model based so if you need to limit changing only certain fields to different users you will need something more robust like django-guardian .", "Question : Is there a way to do row level permissions in django I thought there wasn t but just noticed this in the docs : .. . .. . Permissions can be set not only per type of object but also per specific object instance . By using the has add permission has change permission and has delete permission methods provided by the ModelAdmin class it is possible to customize permissions for different object instances of the same type . https : docs.djangoproject.com en dev topics auth .. . .. . But i don t see any documentation on how to actually implement per instance permissions .. . Answer : There are a large number of permissions apps for django available on PyPi http : pypi.python.org pypi 3aaction search term django 20permission submit search .. . For example you could look at django-object-permission http : pypi.python.org pypi django-object-permission 0.5.2 . What the documentation is referring to is that the functionality is there to implement the permissions . And people have done just that by creating apps for this .", "Question : I have a model called Logs : .. . .. . Some Users can administer logs others edit and the rest only view . How would you handle such permissions in Django .. . .. . I was thinking of adding a new many-to-many field one for admins the other for editors then on the save function check which user is in what group . However this seems static and bad can I somehow use Django s built-in permissions What other solutions packages are there what is the best approach to this problem I have seen you can create custom permissions in Django i.e . But how on Logs would I check the permissions would this be done in the Save method . Comment : yes just set up user Groups and use the Django permissions system docs.djangoproject.com en 1.8 topics auth default https : docs.djangoproject.com en 1.8 topics auth default topic-authorization Comment : how to check the permissions is a bit further down that docs page docs.djangoproject.com en 1.8 topics auth default https : docs.djangoproject.com en 1.8 topics auth default the-permission-required-decorator Comment : @Anentropic can you apply the decorators for this to the Django Rest Framework i.e . on the view there .. . Answer : You re asking for permissions functionality which is implemented for you in django.contrib.auth https : docs.djangoproject.com en 1.8 ref contrib auth . In particular you would like to control who can edit a model which is included in the default permissions https : docs.djangoproject.com en 1.8 topics auth default default-permissions of django . You can also implement custom permissions https : docs.djangoproject.com en 1.8 topics auth default programmatically-creating-permissions if you need to . You would check these privileges on the views and django.contrib.auth provides the permission required decorator https : docs.djangoproject.com en 1.8 topics auth default the-permission-required-decorator . Which does what you require . You do not need to reimplement the many-to-many field for editors admins and users either . You can use django.contrib.auth Group to add your users to the respective group and then assign permissions to the groups : .. . .. . Check django-guardian https : github.com lukaszb django-guardian for more fine-grained control and object-level permissions . django-rest-framework http : www.django-rest-framework.org provides a hook for permissions http : www.django-rest-framework.org api-guide permissions and provides a integration of django model permissions . The following answer can also be helpful : .. . .. . User Groups and permissions http : stackoverflow.com questions 12393726 user-groups-and-permissions Comment : +1 for Django-guardian . Though you may not need another dependency for one class and can implement permissions yourself .", "Question : Is there a way to do row level permissions in django I thought there wasn t but just noticed this in the docs : .. . .. . Permissions can be set not only per type of object but also per specific object instance . By using the has add permission has change permission and has delete permission methods provided by the ModelAdmin class it is possible to customize permissions for different object instances of the same type . https : docs.djangoproject.com en dev topics auth .. . .. . But i don t see any documentation on how to actually implement per instance permissions .. . Answer : The plumbing is there this is from the bottom of the same page you linked : .. . .. . Handling object permissions .. . .. . Django s permission framework has a foundation for object permissions though there is no implementation for it in the core . That means that checking for object permissions will always return False or an empty list depending on the check performed . An authentication backend will receive the keyword parameters obj and user obj for each object related authorization method and can return the object level permission as appropriate . But no default implementation is provided . Since this is a common topic there are lots of answers http : stackoverflow.com questions 4076145 django-adding-permission-to-an-specific-model-instance on SO . Check to the right and you ll see some listed . The basis idea is to browse the django packages perm grid http : djangopackages.com grids g perms and pick an implementation of object level permissions . I personally like django-guardian http : www.djangopackages.com packages p django-guardian .", "Question : I m working on a product that allows different schools to administer their content online . Part of this involves setting up a role based access-control logic which I ve written myself . Essentially each school has its own set of roles that have their own set of permissions . A user of the software could belong to mulitple schools with differing roles at any given time . For various reasons I want to ditch this and instead use Django s Groups and Permissions together with a library like django-guardian https : github.com lukaszb django-guardian . The problem that I am facing is how should I go about extending the Groups model such that I can include a Foreign Key to each new school and still be able to use the helper methods in Django and also libraries like django-guardian . One possibly approach I came up with is to simply create groups based on event names such as School 1 - Admin School 1 - Teacher School 2 - Admin School 2 - Teacher and query permissions based on this instead . Is there a good reason why I shouldn t do it this way Comment : possible duplicate of django one-to-many relation http : stackoverflow.com questions 10975140 django-one-to-many-relation .. . Answer : Why not mix both approaches in Django model allows for inheritence https : docs.djangoproject.com en dev topics db models model-inheritance . First define the Role model with allowed roles and a school model . You can then inherit a new model from django.contrib.auth.Group say GroupRole . Django will create a new db table for your model only containing the properties not originally in group with a foreignkey to the appropriate group with constraints . Even better you will get an automatic reverse relationship to the original group model so you can write something like : .. . .. . On a fun note the relationship is reflective so something like this is valid if not too useful : .. . .. . If you get a base group instance that does not have a grouprole proxy associated with it then you will get an exception thrown : .. . .. . Alternatively you can override this behavior to return None instead of raising an exception or even provide a default GroupRole instead .", "Question : I m working on a product that allows different schools to administer their content online . Part of this involves setting up a role based access-control logic which I ve written myself . Essentially each school has its own set of roles that have their own set of permissions . A user of the software could belong to mulitple schools with differing roles at any given time . For various reasons I want to ditch this and instead use Django s Groups and Permissions together with a library like django-guardian https : github.com lukaszb django-guardian . The problem that I am facing is how should I go about extending the Groups model such that I can include a Foreign Key to each new school and still be able to use the helper methods in Django and also libraries like django-guardian . One possibly approach I came up with is to simply create groups based on event names such as School 1 - Admin School 1 - Teacher School 2 - Admin School 2 - Teacher and query permissions based on this instead . Is there a good reason why I shouldn t do it this way Comment : possible duplicate of django one-to-many relation http : stackoverflow.com questions 10975140 django-one-to-many-relation .. . Answer : Upon closer inspection django-guardian was able to solve my needs . I wrote about my full implementation here : http : pragmaticstartup.wordpress.com 2012 06 26 django-guardian-a-full-access-control-logic-acl-example", "Question : I ve found 3 row-level permission solutions for Django 1.2+ .. . .. . django-object-permissions http : pypi.python.org pypi django-object-permissions .. . django-guardian https : github.com lukaszb django-guardian .. . django-authority http : packages.python.org django-authority index.html .. . .. . Could someone tell if there is any recommended more than the others what are their main differences etc . .. . Answer : As for Aug 13 django-object-permissions has been superseded by django-permission https : github.com lambdalisue django-permission . The 3 projects are on active development . Personally I prefer authority or permission which uses methods for checking permissions runtime rather than django-guardian which uses database to keep the permissions attached upon object creation f.e . . -- EDIT -- .. . .. . Examples from the docs . django-guardian .. . .. . You assign the permission and keep it in database . django-authority .. . .. . Declaration : .. . .. . Usage : .. . .. . It also wraps standard django-permissions but you can see the flexibility in the above custom permission which -AFAIK- you cannot do in guardian . Common Usecase .. . .. . A Student can belong to Classroom s . guardian : .. . .. . 1 . When Student is assigned to new Classroom attach permission attend classroom to Student over Classroom object . 2 . When Student is removed from Classroom remove attend classroom permission to Student over Classroom object . 3 . When accessing Classroom check attend classroom permission . authority : .. . .. . 1 . Define custom permission ClassroomPermission.can attend classroom which will query if Student belongs-to Classroom . 2 . When accessing Classroom check ClassroomPermission.can attend classroom .. . .. . Authority keeps the checking logic in a separate file . Guardian needs attach detaching permissions though the rest of the code . Comment : I don t really understand what you mean by runtime vs object creation . Presumably they both use the database to store permissions and they both use an API to retrieve them . Comment : @RobertGrant : I added a couple of examples for clarity . Comment : Okay I think you re saying that the way Authority works is you define a custom method for each combination of object-type and permission type where you write the code to check if someone has a permission whereas in Guardian you say user.has perm classroom.attend classroom Comment : Do the recommendations here remain true today Authority https : github.com jezdez django-authority looks pretty close to what I want class-based security voters but no activity for over a year are there any alternatives Comment : django-permission https : github.com lambdalisue django-permission looks pretty good I think I am going to give that a go over authority and see if I can just ignore the db permissions and use the custom class-based stuff", "Question : I m developing a Learning Management System . The system has several Actors like Student Tutors Admin Dean etc . Now I need a permission system that can handle different Roles Students can add courses to their basket Tutors can CRUD a course Admins also has access to financial parts as well etc . Based on my researches I need to have some row-level permission system that can handle different roles . I ve seen some apps like django-guardian djang-permissions django-rulez etc . But still confused on how to design roles based on them they are not well documented . Can anybody gives me a hint to get this painful job done .. . Answer : Django has a really nice authentication authorisation api built-in .. . .. . I would advise that you read the follow doc : https : docs.djangoproject.com en dev topics auth this gives you the basics . For your application the best way is to setup permissions for cetain things like permissions to edit courses . Then you can use the permission required decorator for your views that allow you to do those things . For example if you had a view : .. . .. . you can add the above this view : .. . .. . and then only a user that has this permission can access that piece of functionality . YOu can the go further by creating groups that you can assign permission to e.g . a teacher group and then you can assign all of you staff to this group and they will inherit this course editor permission . But as I say this question is a bit broad for a specific answer so your best bet is to grok the doc at the url above . Comment : Thanks for your reply . So you mean there is no need for object row permission at all Actually I ve read the Auth part in Django Doc . . Comment : no in my opinion you can handle most things as I have outlined above . That way you have got access to the User object from the request .", "Question : Is there a way to do row level permissions in django I thought there wasn t but just noticed this in the docs : .. . .. . Permissions can be set not only per type of object but also per specific object instance . By using the has add permission has change permission and has delete permission methods provided by the ModelAdmin class it is possible to customize permissions for different object instances of the same type . https : docs.djangoproject.com en dev topics auth .. . .. . But i don t see any documentation on how to actually implement per instance permissions .. . Answer : The methods that the docs talk about will allow you to restrict access to particular objects in the admin . Each method is passed the object in play which you can use to make determinations about whether a user can access it by returning either True or False . Comment : It should be noted that there s a bug in Django 11383 https : code.djangoproject.com ticket 11383 which prevents the check for object level permissions when the delete selected admin action is run .", "Question : I ve found 3 row-level permission solutions for Django 1.2+ .. . .. . django-object-permissions http : pypi.python.org pypi django-object-permissions .. . django-guardian https : github.com lukaszb django-guardian .. . django-authority http : packages.python.org django-authority index.html .. . .. . Could someone tell if there is any recommended more than the others what are their main differences etc . .. . Answer : I ll start this by saying we use none of these for object level permission - we use our own custom method and I really wish we hadn t . If you can avoid object level permissions at all do so they are a pain to organise . This is how I evaluate the 3 apps you ve mentioned . Active Development : .. . .. . 1 . django-guardian 1 week ago .. . 2 . django-object-permissions 1 year ago .. . 3 . django-authority nearly 2 years ago .. . .. . API .. . .. . 1 . django-guardian save an instance of a defined model .. . 2 . django-object-permissions register permissions .. . 3 . django-authority define classes .. . .. . The above are in order by the way . I d recommend guardian purely on API alone but the fact that it is still being developed where the others aren t usually means a big win .", "Question : null .. . Answer : I m building a web app using Django 1.8.4 . I have a Post model which has Category model as a ForeignKey . I let users to create new Categories . Then I want to let the user who created the category the permissions to modify or delete Posts with that specific Category . For example when John creates new category named Movies he ll be able to modify remove all posts under the category movies . How can I assign new permissions for post modifying to the category creator now Comment : Based on djangopackages.com grids g perms https : www.djangopackages.com grids g perms github.com django-guardian django-guardian https : github.com django-guardian django-guardian seems like a good option for row-level ie object level permissions .", "Question : null .. . Answer : Most of the permissions packages I have seen are row-based like django-guardian but in my case I want to implement a permissions system based on a related model . To elaborate let us say I have a set of models like so : .. . .. . What users can do with a Stuff object will depend on what Department permissions they have e.g : .. . .. . can view stuff in dept code .. . can add stuff in dept code .. . can change stuff in dept code .. . can delete stuff in dept code .. . can custom-action stuff in dept code .. . .. . So in order to add a new Stuff object under a Department codenamed foo a user will need the permission can add stuff in foo . I know permissions can be created programmatically and I can just create a set of permissions upon receiving the post save signal for Department . Anyway I just want feedback and suggestions . Am I on the right track Am I complicating things Are there better approaches", "Question : I m building a Django web application in which I have two roles e.g . sys user and an exhibitor . When a sys user logins in he has access to all the urls and app modules but an exhibitor will have limited access i.e he will have access to specific urls and app modules . Consider the following : .. . .. . When a sys user logs in he should see the following sidebar and have access to all the modules like : .. . .. . When an exhibitor logs he should see the following sidebar and have access to only the following modules like : .. . .. . Now I know that Django provides its own permissions but I don t really know how they fit into my situation or is there any other alternative approach for this . Please point me in the right direction . Thanks Comment : Where should this access be placed on on Templates level view Comment : Any where would work as long as the exhibitor cannot directly access the restricted modules directly from the urls .. . Answer : If you want to do this on Template level permissions are stored in perm variable . From Django docs : .. . .. . More information could be found here https : docs.djangoproject.com en 1.8 topics auth default permissions . Also it is possible to do on url level : .. . .. . In this example login-required decorator is used . But you can create you own decorator where you will check user in request object and based on it make decision what to do redirect forbidden page etc . Here https : docs.djangoproject.com en 1.8 modules django-contrib auth decorators are comprehensive example of decorators usage in Django . Simple example of custom decorator : Comment : What permissions should I add and where-in views.py for my specific case Comment : @Sibtain You can grant sys user with admin rights and check in view if request.user.is superuser and do some stuff specific for admin user . Comment : Ok . If I use the template level approach does it also avoid the direct url navigation to restricted urls Comment : @Sibtain - like url s to --- Module1 for example I think for direct url you will need add also decorator on urls . Comment : @Sibtain - added custom decorator example for you in my answer . You can use smth like that to protect some url s and make them accessible only for sys user for example .", "Question : null .. . Answer : Too many models spamming django permission table even in models where I dont need permissions . I use django-simple-history and django creates permssions on these historical tables . How can I avoid it I ve tried passing the bases option to HistoricalRecords passed an abstract-class with .. . default permissions in its Meta . Didnt work . Any solution In fact I would even prefer if django wont create permissions at all on every migrate.. . Comment : Why is it a problem for Django to create these permissions They won t have any noticeable effect in terms of disk space or performance . You might be able to prevent Django from creating the permissions but it might not be worth the complexity that it adds to your app . Comment : I have a UI for adding permissions for users so I need to know what are my real permissions and what are django ones which I don t want to display . I ve created a one-to-one table for that . Larger the auth.permission table is harder for me to maintain Comment : I would try to filter the list of permissions in the UI rather than trying to stop the permissions from being created . The Permission model has a foreign key to ContentType which has an app label field . You could either whitelist or blacklist the permissions for different apps by using filter or exclude respectively . Comment : I cant filter by app because django create useless permissions for every model . That s why I have one-to-one table Comment : Maybe you can filter on the model name then - it looks like django-simple-history prefixes model names with historical .", "Question : I am looking for the best way to implement user-permissions to allow users to edit specific model instances . For instance I have such two models : .. . .. . Now my Operators are my build-in Django users . I want to make groups for these users so that they can only add remove edit ProgramSchedules that are allowed . In addition I want to add groups to these users to the admin panel . Thanks . .. . Answer : You are looking for an object permission implementation . A good comparison is here : http : djangopackages.com grids g perms .. . .. . Shameless plug : Heres my fork of a very popular per-object permission app : http : github.com azizmb django-authority Comment : Sounds good Did you document also how to add permissions from python code That was something I kind of missed in the original version of the doc .", "Question : null .. . Answer : I am completely lost and am hoping to get some clarity . The Django documentation especially docs.djangoproject.com and djangobook.com talks extensively about how to retrieve permissions programmatically and to test users for permissions but what I can t find is one of the most basic uses of permissions alluded to in the documentation : controlling per-model not per-object just the model permissions for the admin interface . Say I have a model called Book . I want all staff users to be able to edit any book object in the admin interface . As an added layer of complexity I m using Django-nonrel with djangotoolbox and django-permission-backend-nonrel . I have created a permission called change book for the book type using the Permissions section of the admin interface . However my test user who is is staff but not is superuser just sees the generic message You don t have permissions to edit anything in the admin landing page . I can see the box to set unset permissions for the user but when I select the new permissions and click save the permission is not attached to the user as far as I can tell . What do I specifically name the permission and how do I attach it to the user UPDATE : Here s the relevant parts of settings.py : Comment : can you show your settings.py Especially the AUTHENTICATION BACKENDS part Comment : I ve added the parts of settings.py that are related to authentication and the user model .", "Question : I am looking for the best way to implement user-permissions to allow users to edit specific model instances . For instance I have such two models : .. . .. . Now my Operators are my build-in Django users . I want to make groups for these users so that they can only add remove edit ProgramSchedules that are allowed . In addition I want to add groups to these users to the admin panel . Thanks . .. . Answer : I would recommend using Django Guardian https : github.com lukaszb django-guardian for object-level permissions .", "Question : I am using custom permissions in my Django models like this : .. . .. . The problem is that when I add a permission to the list it doesn t get added to the auth permission table when I run syncdb . What am I doing wrong . If it makes any difference I am using south for database migrations . Comment : You can fix the field length in the Permissions model : stackoverflow.com a 28343007 3310666 http : stackoverflow.com a 28343007 3310666 .. . Answer : You can connect to the post migrate signal in order to update the permissions after migration . I use the following code slightly modified from Dev with Passion http : devwithpassion.com felipe south-django-permissions and originally from django-extensions http : packages.python.org django-extensions . Comment : This is the best way to solve this issue Comment : This has an issue when working with something like gunicorn to run the app namely it fails at finding environmental variable that is set in the wsgi.py file ." ] }
[ "yes-answer-long", "yes-answer-short" ]
django
UNK_RELATION
econnect@microsoft-dynamics@51
econnect -- econnect is an additional product for @placeholder gp .
{ "confidence": [ 64.74559020996094, 61.925758361816406, 58.68274688720703, 58.68274688720703, 58.68274688720703, 57.49974060058594, 57.49974060058594, 56.081878662109375, 56.081878662109375, 56.081878662109375, 54.49298858642578, 52.95075988769531, 50.51613235473633, 50.51613235473633, 50.51613235473633, 50.51613235473633, 50.51613235473633, 50.51613235473633, 49.96703338623047, 49.3331298828125, 47.91526794433594, 46.39768981933594, 46.39768981933594, 44.99149703979492, 44.334983825683594, 43.721534729003906, 43.29704284667969, 43.16849899291992, 43.16849899291992, 42.2117919921875, 42.083038330078125, 42.083038330078125, 42.083038330078125, 41.985496520996094, 41.85289001464844, 41.85289001464844, 41.85289001464844, 40.7202033996582, 40.7202033996582, 40.7202033996582, 38.29108810424805, 38.11933898925781, 38.11933898925781, 37.43771743774414, 37.43771743774414, 37.403846740722656, 37.403846740722656, 37.403846740722656, 37.403846740722656, 37.403846740722656, 37.403846740722656, 37.403846740722656, 37.385780334472656, 37.385780334472656, 37.385780334472656, 37.385780334472656, 36.863807678222656, 36.863807678222656, 36.863807678222656, 36.22084426879883, 35.73516082763672, 35.73516082763672, 35.73516082763672, 35.73516082763672, 35.73516082763672, 35.64961624145508, 34.802982330322266, 34.65180969238281, 34.552154541015625, 34.46661376953125, 34.262943267822266, 34.262943267822266, 33.842044830322266, 33.04875183105469, 32.98867416381836, 32.98867416381836, 32.98867416381836, 32.98867416381836, 32.98867416381836, 32.93673324584961, 32.93673324584961, 32.93673324584961, 32.93673324584961, 32.93673324584961, 32.93673324584961, 32.93673324584961, 32.93673324584961, 32.93673324584961, 32.93673324584961, 32.93673324584961, 32.93673324584961, 32.93673324584961, 32.93673324584961, 32.93673324584961, 32.93673324584961, 32.93673324584961, 31.8056697845459, 31.8056697845459, 31.8056697845459 ], "content": [ "It is these credentials that are used to authenticate eConnect to Dynamics GP .", "We have GP and eConnect installed in a server.Our application runs from another machine which has to send data to GP in our server using eConnect .", "We need to integrate data from our application to GP using eConnect .", "I am looking to enter a single gltransaction in Dynamics GP using econnect .", "I have an application that uses EConnect to import information into GP .", "I ve started working with eConnect to communicate with Dynamic GP in order to access information .", "Not everything that can be done in GP can be done via eConnect .", "I was using eConnect to connect my .NET application to the Dynamics GP .", "This is my C eConnect code to create update an item on Dynamics GP .", "Is there a way to get a list of existing credit cards in GP using eConnect", "So we have recently decided to go with econnect to communicate from crm to gp and we are trying to implement econnect in crm as a plugin .", "I m using eConnect to create and update various items in Dynamics GP but I can t seem to find how to use it to read data from GP .", "How do I get the next BACHNUMB for the Dynamics GP eConnect proc taPopRcptHdrInsert", "The problem with the econnect storedproc taPATimeSheetLineInsert is that it does thing differently than the timesheet entry inside GP .", "I am working on a Windows Forms app that will integrate with Dynamics GP 2010 using the eConnect WCF service .", "However there are available web-services that you can reach remotely outside of the eConnect tool for GP 2010 .", "I am looking for the capability to approve a Purchase Order in Dynamics GP using eConnect .", "I m trying to get our database in Dynamics GP updated automatically using eConnect .", "If you have access to build an econnect process app that makes a connection to your SQL server for GP this is the fastest way to integrate SOP and receivable transactions .", "GP also has an API called eConnect but the web service API is a lot easier to work with .", "I ve been looking at among other things the eConnect Programmer s Guide Release 10.0 for Microsoft Dynamics GP .", "this will allow econnect to be called from a client that does not have econnect .", "The eConnect SDK must be installed on every client machine that issues eConnect for requests .", "Is there a way to do this from eConnect", "I read that GP has some sort of web service too but I ve also read that it supports something called eConnect new to me .", "data-integration or GP Vendors", "You may want to look at a Dynamics GP customization using Visual Studio Tools for Dynamics GP or Visual Basic for applications in Dynamics GP .", "Econnect must use a trusted connection .", "or a eConnect plug-in itself that causes this error", "After review the batch will be posted to GP .", "You will also need to configure the econnect setup to allow the user to access sql through econnect .", "As eConnect uses windows-authentication we use integrated security in our application to connect with eConnect .", "There is no eConnect integration to approve purchase orders but you may create your own process by extending eConnect with custom SQL logic .", "There is no eConnect node for the PM Class Master .", "Integration manager can use econnect for its insertion engine .", "If you have the time to develop a custom integration routine go for econnect .", "If you want to leverage WCF technology on top of econnect go for web-services .", "Is it possible to use the eConnect Windows service remotely", "Is that necessary to install eConnect in developer s machine as well as in the server", "You will need to put the service account into the eConnect service .", "I m using eConnect 10 to insert a document in GP 10 The document can be one of several types the problem I have is that I do not know the meaning and what value to pass of the second parameter of the method called docIdKey In the MS documentation there is nothing other than the indication of STDINV or STDORD for creating orders and invoices .", ": Nothing found in the eConnect 10 default Documentation", "Yes as of this time there is no eConnect request to retrieve this information .", "I want to build a replacement that creates a batch in GP and imports the invoices into the batch .", "Microsoft Dynamics GP has user-defined Document Types .", "Simply trying to create via eConnect the EFT Bank informations on a customer .", "Regarding security the eConnect SDK creates a windows service where credentials are supplied .", "Use the same eConnect service account on all machine installations .", "Each time I need to repair the econnect to get rid of this exception .", "How would I go about manipulating eConnect via Excel", "EDIT : The version of Excel is 2010 and I m using eConnect 11 .", "Are you referencing a specific plug-in you wrote referencing eConnect", "If you are processing a high volume of transactions you will notice a huge difference between integration manager s UI engine and econnect .", "When you create a new integration simply choose the econnect option and whatever data source you have set up .", "The web-services sits on top of econnect and it is much slower integrating because you are passing information between several layers .", "Uploading a Journal Invoice To GP2010 using Econnect - getting Offset Account could not be found for this vendor .", "Another option worth considering is a separate installation for Dynamics GP called the Dynamics GP Web Services .", "GP development on the web is limited to none if i did find anything it was irrelevant due to a different version of GP .. .", "If you are unfamiliar with the database-schema in Dynamics GP you may want to reach out to a Dynamics GP Partner for assistance with that development .", "Im working on an EConnect integration Windows form app in C .", "Is GP datasource name or sql datasource name .", "We have invoice documents in GP 10.0 .", "I got an answer over on the Dynamics GP Forums .", "However installing Web Services for Dynamics GP is not trivial .", "The GP forums were also no help for this particular case .", "The eConnect Windows service is defaulted to only have the net.pipe binding which would indicate that every client machine that will run my Windows Forms app will need to also have the eConnect Windows service also installed .", "See the class description in the eConnect Programmers Guide search for CURRCOSTSpecified .", "If you want to get done quickly and do not mind working from the integration manager interface just build your integrations using econnect .", "Should be able to target GP 9 and 10 .", "We did not choose econnect because of the ease of the web-services econnect I beleive has more options and we did use it to create and update sales invoices but changed it to web-services .", "I am attempting to make a connection to a Dynamics GP SQL Server Database using the currently logged in credentials from GP .", "Yes that looks about right the Dynamic GP 2010 is the default dynamics GP ODBC32 connection name .", "Because I m never 100 sure what fields GP really needs I was hoping I could use eConnect or web-services to get the document by number change the SOPTYPE to 4-Return and save it back since it appears everything else should be the same .", "If you want to keep all integration points going through eConnect in order to keep your architecture consistent consider extended eConnect to add the credit-card information request .", "I tried to enter the same entry manually in GP and the accrued revenues are OK .", "For example I d like to get the Vendor and Account lists from GP .", "But I have doubt about datasource name : Dynamic GP 2010 .", "I can then invoice the new client and save that into GP using existing processes .", "Can you include the solution you received from the Dynamics GP Forums", "I cannot find any informations in the eConnect documentation or on the web of the correct method to use .", "I m trying to use econnect to insert TimeSheet Entry batches from an external system via taPATimeSheetLineInsert .", "I specifed the currency id which is different from the functionnal currency and I provide a PAUNITCOST as requested by eConnect .", "Yes you are correct in order for your windows form app to work with the eConnect code you will need to install it on each of the clients .", "Actually you can setup econnect on the server and add a HTTP reference in addition to the net pipe .", "However eConnect does expose pre and post stored-procedures to customize business logic .", "If you are building a web application then you would need the eConnect SDK installed on the webserver from which the requests originate .", "That would allow you to issue web service requests without the need of installing the eConnect SDK .", "Exception from HRESULT : 0x8000401A When I repair the installed eConnect the above issue get resolved .", "I have an eConnect outgoing document pulled from MSMQ i need to loop through the line items .", "I am in the process of creating a custom interface to receive items on an RMA and am using eConnect to do this .", "C Code : .. . .. . eConnect Error : .. . .. . Procedure or function taFSRMALineSerial expects parameter @I vReturn Record Type which was not supplied .", "I -could- just interact with SQL Server directly using ADO however I like the rollbacks and validation eConnect provides .", "I have a snippet of code that creates one or more Miscellaneous Log Entries via eConnect .", "Shane Yo im referencing the eConnect dll itself and Nanhydrin i will try using Fuslogvw and let you know my results", "Here is the full error message : .. . .. . I am using .net framework 4.5 with version 12.0.0.0 of the econnect dll s .", "You have three layers of tags : root eConnect Customer but your classes have only two layer : root Customer .", "We have done sites based off of web-services for GP 9 .", "CRM uses a web UI GP uses a fat windows client .", "The GP UI is called Dexterity which does support customizations ." ] }
{ "confidence": [ 80.23906707763672, 79.97247314453125, 76.89420318603516, 75.9918212890625, 74.60873413085938, 73.26651763916016, 72.74758911132812, 72.66146850585938, 72.45513916015625, 71.7755355834961, 70.30070495605469, 69.87393188476562, 68.7907943725586, 68.69231414794922, 68.5951156616211, 68.50155639648438, 65.93327331542969, 65.3419418334961, 65.3419418334961, 64.53820037841797 ], "content": [ "Question : We need to integrate data from our application to GP using eConnect . We have GP and eConnect installed in a server.Our application runs from another machine which has to send data to GP in our server using eConnect . Is that necessary to install eConnect in developer s machine as well as in the server As eConnect uses windows-authentication we use integrated security in our application to connect with eConnect . So we are now able to integrate data from one user s machine whose credentials was given while installing eConnect in server . Can anyone help .. . Answer : In short yes . The eConnect SDK must be installed on every client machine that issues eConnect for requests . If you are building a web application then you would need the eConnect SDK installed on the webserver from which the requests originate . If you are developing windows forms application to be installed on each users PC then the eConnect SDK must also be installed on each users PC . Because this is often not a desirable deployment scenario many people are in the practice of creating a new service to encapsulate the specific eConnect requests that the application needs so that the SDK only needs to be installed on the server . Another option worth considering is a separate installation for Dynamics GP called the Dynamics GP Web Services . That would allow you to issue web service requests without the need of installing the eConnect SDK . However installing Web Services for Dynamics GP is not trivial . Regarding security the eConnect SDK creates a windows service where credentials are supplied . It is these credentials that are used to authenticate eConnect to Dynamics GP . Keep in mind that Dynamics GP does not support Active Directory authentication for user access . However one can use a domain service account in the eConnect service and set that up for access directly in SQL Server with DYNGRP role . Normally this account would be a service account created for this purpose and not the user account . Comment : We have a service account which has access to SQL with DYNGRP role in the server . Do we need to use the same credentials to invoke the service in the server from another machine Comment : As eConnect uses windows-authentication we use integrated security in our application to connect with eConnect . So we are now able to integrate data from one user s machine whose credentials was given while installing eConnect in server.But we need to integrate data from different machines different windows id by invoking service in the server . Comment : You will need to put the service account into the eConnect service . Don t use a user s credentials in the service account . As long as the eConnect account has DYNGRP role permissions in SQL Server it should function properly with any other valid active-directory account on each machine . Use the same eConnect service account on all machine installations . Comment : I am getting below exception when trying to connect to eConnect from my c code Configurations are done as mentioned The server process could not be started because the configured identity is incorrect . Check the username and password . Exception from HRESULT : 0x8000401A When I repair the installed eConnect the above issue get resolved . But getting it later . Each time I need to repair the econnect to get rid of this exception . Any solutions", "Question : We are using Integration Manager to create a batch of monthly invoices . I want to build a replacement that creates a batch in GP and imports the invoices into the batch . After review the batch will be posted to GP . Is this doable with either of these API s and which would you choose .. . Answer : Integration manager can use econnect for its insertion engine . If you are processing a high volume of transactions you will notice a huge difference between integration manager s UI engine and econnect . When you create a new integration simply choose the econnect option and whatever data source you have set up . Concerning the non-IM APIs both may be used and they are situational . The web-services sits on top of econnect and it is much slower integrating because you are passing information between several layers . It does provide a secure link between your SQL server and any outside integration sources and it is ideal if you need to setup something to allow integrations to happen through middleware such as a billing gateway . If you have access to build an econnect process app that makes a connection to your SQL server for GP this is the fastest way to integrate SOP and receivable transactions . It maintains all the business-rules to help ensure GP does not break in as a result-of a patch and the speed is fast enough to push thousands of records without requiring a custom integration solution . If you want to get done quickly and do not mind working from the integration manager interface just build your integrations using econnect . If you have the time to develop a custom integration routine go for econnect . If you want to leverage WCF technology on top of econnect go for web-services . Each are listed in the amount of time it will take you to develop from fast implementation to slower implementation .", "Question : I am working on a Windows Forms app that will integrate with Dynamics GP 2010 using the eConnect WCF service . The eConnect Windows service is defaulted to only have the net.pipe binding which would indicate that every client machine that will run my Windows Forms app will need to also have the eConnect Windows service also installed . Is it possible to use the eConnect Windows service remotely So that it can be installed on one server and have several client machines connect to it I was thinking of modifying the config file for the Windows service to add a net.tcp binding but I m not sure if that would be supported by the service and Googling hasn t turned up much . .. . Answer : you need to create a custom web service and install it in on the same domain where gp web service is installed and use this web service as a bridge between gp web service and your application .", "Question : I m using eConnect to create and update various items in Dynamics GP but I can t seem to find how to use it to read data from GP . For example I d like to get the Vendor and Account lists from GP . Is there a way to do this from eConnect Do I have to use SQL .. . Answer : i use gpwebservice for this .. . .. . use webservice method wsDynamicsGP.GetVendorList .. . .. . alternatively you can use the below query .. . .. . select VendorId VENDname as VendorName from PM00200", "Question : I am looking for the capability to approve a Purchase Order in Dynamics GP using eConnect . I do not see this capability when reviewing the eConnect Programmer s Guide but I would like someone with more experience to verify that I am not missing it please . If it matters please realize I also have no experience in approving POs through the GP application so I am not certain how this operates on its own . I have a vague recollection that this approval happens in a workflow whose functionality was added somewhat recently in GP s history . So perhaps a second question is this approval functionality part of the stock Dynamics GP install or no Thanks .. . Answer : You can add purchase order approval functionality to Dynamics GP by enabling the option in the Purchase Order Enhancements Setup window . Microsoft Dynamics GP menu - Tools - Setup - Purchasing - Purchase Order Enhancements .. . .. . Refer to the manual for Purchase Order Enhancements from your installation media or download it directly from Microsoft . In a nutshell it allows you to set up security around approvals with limits on dollar amounts and restrictions by purchase order number vendor or created by . There is no eConnect integration to approve purchase orders but you may create your own process by extending eConnect with custom SQL logic . If you are unfamiliar with the database-schema in Dynamics GP you may want to reach out to a Dynamics GP Partner for assistance with that development . I wouldn t recommend directly modifying data in the Dynamics GP database without a complete understanding of the impact . With that said this is a fairly simple customization for someone with a good understanding and experience with the purchase order module in Dynamics GP .", "Question : I am working on a Windows Forms app that will integrate with Dynamics GP 2010 using the eConnect WCF service . The eConnect Windows service is defaulted to only have the net.pipe binding which would indicate that every client machine that will run my Windows Forms app will need to also have the eConnect Windows service also installed . Is it possible to use the eConnect Windows service remotely So that it can be installed on one server and have several client machines connect to it I was thinking of modifying the config file for the Windows service to add a net.tcp binding but I m not sure if that would be supported by the service and Googling hasn t turned up much . .. . Answer : Yes you are correct in order for your windows form app to work with the eConnect code you will need to install it on each of the clients . However there are available web-services that you can reach remotely outside of the eConnect tool for GP 2010 . It s either do it that way or install it on a single web server and change your application from Windows form to web forms .", "Question : I m using eConnect to create and update various items in Dynamics GP but I can t seem to find how to use it to read data from GP . For example I d like to get the Vendor and Account lists from GP . Is there a way to do this from eConnect Do I have to use SQL .. . Answer : You don t have to use SQL you can use eConnectOut to retrieve data but the result sets are somewhat limited out of the box . In the end I found that just dealing with SQL was easier for me because eConnectOut doesn t give you access to all of the GP data without manipulation to the eConnect Out Setup table which is cumbersome at best . There s a long list of DOCTYPEs in the eConnect Out Setup table for pre-existing eConnectOut queries if you re interested . The DOCTYPE you are probably looking for is Vendor which is in the PM00200 table if you re using SQL . Here s an example of eConnectOut using C : http : msdn.microsoft.com en-us library ff623639.aspx .. . .. . If you are using XML for eConnect transactions here s an example of that : .. . .. . More documentation on eConnectOut can be found on MSDN http : msdn.microsoft.com en-us library ff623993.aspx .", "Question : I am looking for the capability to approve a Purchase Order in Dynamics GP using eConnect . I do not see this capability when reviewing the eConnect Programmer s Guide but I would like someone with more experience to verify that I am not missing it please . If it matters please realize I also have no experience in approving POs through the GP application so I am not certain how this operates on its own . I have a vague recollection that this approval happens in a workflow whose functionality was added somewhat recently in GP s history . So perhaps a second question is this approval functionality part of the stock Dynamics GP install or no Thanks .. . Answer : Go to Microsoft Dynamics GP menu - Tools - Setup - Purchasing - Purchase Order Enhancements and activate the approval setup . Once the user having PURCHASING role he can able to approve any PO .", "Question : null .. . Answer : Uploading a Journal Invoice To GP2010 using Econnect - getting Offset Account could not be found for this vendor . Where is the issue data-integration or GP Vendors Help", "Question : I am working on a Windows Forms app that will integrate with Dynamics GP 2010 using the eConnect WCF service . The eConnect Windows service is defaulted to only have the net.pipe binding which would indicate that every client machine that will run my Windows Forms app will need to also have the eConnect Windows service also installed . Is it possible to use the eConnect Windows service remotely So that it can be installed on one server and have several client machines connect to it I was thinking of modifying the config file for the Windows service to add a net.tcp binding but I m not sure if that would be supported by the service and Googling hasn t turned up much . .. . Answer : Actually you can setup econnect on the server and add a HTTP reference in addition to the net pipe . this will allow econnect to be called from a client that does not have econnect .", "Question : How do I get the next BACHNUMB for the Dynamics GP eConnect proc taPopRcptHdrInsert .. . Answer : There is no NEXT batch number like Next Document Number you have to provide batch id if this already exist in GP all is fine if not e-connect will create new id .", "Question : I am doing research about integrating a product into Dynamics Great Plains . I have worked with Dynamics CRM before but not with Great Plains . I have heard that GP is a different animal than CRM even though they share the same Dynamics prefix where do the similarities end and where do the differences begin Has anyone had any experience with both Are you able to describe some similarities and or differences between the two Any caveats difficult parts or pain points I should be looking out for in GP I am interested about the entrance points into the product and ease of extending the user-interface . When I worked with Dynamics CRM I used a provided Web Service as the entrance point into the application . I read that GP has some sort of web service too but I ve also read that it supports something called eConnect new to me . That s a lot of questions I put in here I m not looking for a specific answer for every single point just wanted to get you thinking about the kind of information I am digging for . Thanks .. . Answer : Here is what I ve found working with these two products : .. . .. . They are very different products that were acquired by Microsoft in separate acquistions . CRM uses a web UI GP uses a fat windows client . Both have web service APIs but you ll find a lot less documentation and samples for GP . GP also has an API called eConnect but the web service API is a lot easier to work with . CRM customizations make it pretty easy to extend both the data model and the user-interface . It s mostly just point and click unless you need more sophisticated UI functionality using Javascript . The GP UI is called Dexterity which does support customizations . However I ve not had any experience with it .", "Question : Is there a way to get a list of existing credit cards in GP using eConnect Current implementation uses the .NET serialization approach mentioned in the eConnect documentation though I haven t been able to find any information about how to get a list of currently existing credit cards . Some methods exist for creating new cards within GP but what I d really like to get a list of the existing cards along with their names so that I can send in credit-card information on newly created invoices using the CRCRDAMNT CCAMPYNM CARDNAME headers . Am I out of luck on this one .. . Answer : GP doesn t and shouldn t keep credit-card numbers PCI compliance and all . The default info that is kept around is Card Name Reciept Number Auth code etc but not the card number itself Your best bet is to take a look SOP10103 http : www.gptablereference.com 2010 Table SOP10103 Comment : I see that the table stores all of the information that I m hoping to get a hold of but haven t been able to find any eConnect requests that I can build out to get that data . Is a direct SQL query the only way to get it Comment : Yes as of this time there is no eConnect request to retrieve this information . Direct SQL query is the recommended approach . If you want to keep all integration points going through eConnect in order to keep your architecture consistent consider extended eConnect to add the credit-card information request .", "Question : Simply trying to create via eConnect the EFT Bank informations on a customer . You go inside a customer - address - EFT Bank . I cannot find any informations in the eConnect documentation or on the web of the correct method to use . Trying my chance here . Thanks .. . Answer : There no way except writing directly inside the database tables this is for latest version : Dynamics GP v 10 .", "Question : null .. . Answer : I m trying to get our database in Dynamics GP updated automatically using eConnect . I -could- just interact with SQL Server directly using ADO however I like the rollbacks and validation eConnect provides . I tried to reference the eConnect s dll and serialization dll in Excel s IDE yet I keep getting the error Can t add reference to the specified file . How would I go about manipulating eConnect via Excel EDIT : The version of Excel is 2010 and I m using eConnect 11 . Comment : Are you trying to use VBA in Excel Is there a reason you do not wish to build a solution with Visual Studio and read from the Excel file Comment : I should have updated this ages ago . I did end up building the solution in Visual Studio not long after this was posted .", "Question : Is there a way to get a list of existing credit cards in GP using eConnect Current implementation uses the .NET serialization approach mentioned in the eConnect documentation though I haven t been able to find any information about how to get a list of currently existing credit cards . Some methods exist for creating new cards within GP but what I d really like to get a list of the existing cards along with their names so that I can send in credit-card information on newly created invoices using the CRCRDAMNT CCAMPYNM CARDNAME headers . Am I out of luck on this one .. . Answer : payment information is in SOP10103 table just shoot a select query based on your criteria . or if you are using gp web service then sales order object also returns information about payment salesOrder.Payments .. . .. . hope it helps", "Question : I am finding my self looking in front of a wall right now . I ve started working with eConnect to communicate with Dynamic GP in order to access information . I ve come accross a questions that I have yet to see answered and I m tired of searching all over the web and all over the bunch of documents I have . In case someone reads this I ll give you a few sources after my question so you can guide your self even if this post doesn t help you . My question is how can I create a new PMClassMaster through C In the end its an XML file that you need to generate but I wonder if there is a method that does that for me For example to create a new Vendor you can do the following : .. . .. . This will pretty much create an XML for you because thats what GP recevies through eConnect s CreateEntity and UpdateEntity methods . I can t seem to find the same for PMClassMaster which is the table that has all the Vendor Class IDs . Does anyone know the answer For reference : https : www.gptablereference.com 2010 Table PM00100 .. . .. . ----- Sources for GP ----- .. . .. . http : mbsguru.blogspot.pt .. . .. . http : victoriayudin.com .. . .. . http : www.gptablereference.com .. . Answer : There is no eConnect node for the PM Class Master . Not everything that can be done in GP can be done via eConnect . For this you will have to manually insert records into the relevant SQL table in the desired database .", "Question : I was using eConnect to connect my .NET application to the Dynamics GP . This is my C eConnect code to create update an item on Dynamics GP . When I checked the xmlDocument I have only these below fields . I have no idea what s wrong in my code . Please help me in this . All your help is much appreciated . Thanks . Comment : You need to add more details about expected and actual behavior Comment : What type of details you need I believe I d given all to my knowledge . Comment : Perhaps you can specify if the item you re showing exists and is being updated or you know you re inserting it for the first time . Are there any logs on the server-side showing the result-of the operation It is likely that you re not following the expected protocol of the Update Insert or you re lacking permissions . The more you share the greater the abbility for someone to replicate and or see the issue . .. . Answer : I believe you have to add this line : GpLineItem.CURRCOSTSpecified true .. . .. . With eConnect you have to do this with a lot of values .", "Question : I was using eConnect to connect my .NET application to the Dynamics GP . This is my C eConnect code to create update an item on Dynamics GP . When I checked the xmlDocument I have only these below fields . I have no idea what s wrong in my code . Please help me in this . All your help is much appreciated . Thanks . Comment : You need to add more details about expected and actual behavior Comment : What type of details you need I believe I d given all to my knowledge . Comment : Perhaps you can specify if the item you re showing exists and is being updated or you know you re inserting it for the first time . Are there any logs on the server-side showing the result-of the operation It is likely that you re not following the expected protocol of the Update Insert or you re lacking permissions . The more you share the greater the abbility for someone to replicate and or see the issue . .. . Answer : Answered by Tim Wappat .. . .. . You must specify that you are supplying some fields current cost is one of those . See the class description in the eConnect Programmers Guide search for CURRCOSTSpecified . I think it would be something like : .. . .. . as another line in your code where you are setting the class-members of the taUpdateCreateItemRcd . We ve all done it at some time.. .", "Question : I m trying to use econnect to insert TimeSheet Entry batches from an external system via taPATimeSheetLineInsert . When using the fuctionnal currency everything works fine . The problem is that when I use another currency the ACCRUED REVENUES are set to 0 . I tried to enter the same entry manually in GP and the accrued revenues are OK . When you take a look at it in the UI everything is the same in both timesheet entryes . I specifed the currency id which is different from the functionnal currency and I provide a PAUNITCOST as requested by eConnect . If I look into the PA10001 TABLE there are differences between the record inserted manually and the one inserted with eConnect as the value of PA Base Billing Rate and PAORIGBSBILLRTE are set to 0 . The ACCRUED REVENUE COLUMN is evidently different as well . There is no option in taPATimeSheetLineInsert that can help me so I don t know what to do to make it work Please help .. . Answer : Just to let you know we resolved the problem temporarily and I would hate to find an unanswered post about that problem if I were to be someone else having the same problem . The problem with the econnect storedproc taPATimeSheetLineInsert is that it does thing differently than the timesheet entry inside GP . Looks like it tries to use the forecast profit amount instead of the profit amount set in the Project Budget . Funny that there is no usable data in the Forecast and that the stored procedure tries to get it anyway . For now we added a bit of code to get the paprofitamt instead of paforecastbaseprofitamt . Still have no clue about why the code was made like that but everything works fine . Have fun people" ] }
[ "yes-answer-long", "yes-answer-short" ]
microsoft-dynamics
UNK_RELATION
senna@tags@142
senna -- senna is a neural-network trained software which outputs a host of natural language processing nlp predictions : part-of-speech pos @placeholder chunking chk name entity recognition ner semantic role labeling srl and syntactic parsing psg .
{ "confidence": [ 64.7587661743164, 51.98317337036133, 46.5348014831543, 46.5348014831543, 29.41550064086914, 25.042890548706055, 20.320789337158203, 15.609004974365234, 11.2708101272583, 11.2708101272583, 11.2708101272583, 11.2708101272583, 11.2708101272583, 11.2708101272583, 11.2708101272583, 11.2708101272583, 11.2708101272583, 11.2708101272583, 11.2708101272583, 11.2708101272583, 11.2708101272583, 11.2708101272583, 11.2708101272583, 11.2708101272583, 11.2708101272583, 11.2708101272583, 11.2708101272583 ], "content": [ "Senna http : ml.nec-labs.com senna is a NLP tool built using neural nets and it s able to do : .. . .. . POS tagging .. . NER tagging .. . Chunk tagging .. . Semantic Role Label tagging and .. . Parsing .. . .. . After downloading the pre-compiled package from http : ml.nec-labs.com senna download.html .. . .. . I ran the --help menu and see what are the options : .. . .. . The command-line interface is straight forward and the outputs for POS and NER tags are also easy to interpret .", "SENNA uses the CoNLL format .", "Then there is the output of the semantic role labeling .", "That is the output of the semantic role labeling .", "The SRL tags are a little weird they are multiple-annotations per token : .. . .. . The look like the tuple-like outputs we get from semantic frames but I don t understand the conventions e.g .", "Look for more information on SRL as this gets a little more complex .", "Given this input : .. . .. . This is out standard Penn Treebank tagset : .. . .. . And this is the BIO tagset http : stackoverflow.com questions 17116446 what-do-the-bilou-tags-mean-in-named-entity-recognition : .. . .. . And for the chunking it s also some sort of the BIOE tagset http : stackoverflow.com questions 32333312 how-to-extract-chunks-from-bio-chunked-sentences-python we re used to : .. . .. . But what does the S- tags mean", ".. . .. . And for the Parser output : .. . .. . It looks like the bracketed parse output we see in parsing http : stackoverflow.com questions 28704060 how-to-flatten-the-parse-tree-and-store-in-a-string-for-further-string-operation but what does the mean", "It seems like it s only attached to tokens that are single token chunks is that true", "what is -AM-", "what is -PNC", "What does the output mean and how should we interpret it", "You can read about it here : http : universaldependencies.github.io docs format.html .. . .. . It s rather common and there are plenty of converters around .", "As for the prefixes they mean : S- singleton expressions and B- begin I- intermediate E- end of a multi word expression .", "Notice there are two columns one for the verb go and one for the verb eat .", "Usually A0 is the subject and A1 the direct object again oversimplified .", "AM is the argument modifier and -LOC is a location it could be other adverbs .", "PNC seems to refer to the surrogate noun phrase acting as object of the verb go .", "Don t remember from the top of my head .", "Examples here verbs.colorado.edu propbank framesets-english go-v.html As for the parse-tree it s bracketed and also a common notation loosely inspired by Lisp .", "The indicates the label of the current token .", "I found this useful : http : math.stackexchange.com questions 588230 how-to-convert-parentheses-notation-for-trees-into-an-actual-tree-drawing", "Thanks on the note of the LISP .", "Any idea what s -AM- and -PNC", "Oh sorry I skipped that .", "Examples here verbs.colorado.edu propbank framesets-english go-v.html http : verbs.colorado.edu propbank framesets-english go-v.html", "Thanks @JosepValls" ] }
{ "confidence": [ 125.32821655273438 ], "content": [ "Question : Senna http : ml.nec-labs.com senna is a NLP tool built using neural nets and it s able to do : .. . .. . POS tagging .. . NER tagging .. . Chunk tagging .. . Semantic Role Label tagging and .. . Parsing .. . .. . After downloading the pre-compiled package from http : ml.nec-labs.com senna download.html .. . .. . I ran the --help menu and see what are the options : .. . .. . The command-line interface is straight forward and the outputs for POS and NER tags are also easy to interpret . Given this input : .. . .. . This is out standard Penn Treebank tagset : .. . .. . And this is the BIO tagset http : stackoverflow.com questions 17116446 what-do-the-bilou-tags-mean-in-named-entity-recognition : .. . .. . And for the chunking it s also some sort of the BIOE tagset http : stackoverflow.com questions 32333312 how-to-extract-chunks-from-bio-chunked-sentences-python we re used to : .. . .. . But what does the S- tags mean It seems like it s only attached to tokens that are single token chunks is that true The SRL tags are a little weird they are multiple-annotations per token : .. . .. . The look like the tuple-like outputs we get from semantic frames but I don t understand the conventions e.g . what is -AM- what is -PNC What does the output mean and how should we interpret it .. . .. . And for the Parser output : .. . .. . It looks like the bracketed parse output we see in parsing http : stackoverflow.com questions 28704060 how-to-flatten-the-parse-tree-and-store-in-a-string-for-further-string-operation but what does the mean .. . Answer : SENNA uses the CoNLL format . You can read about it here : http : universaldependencies.github.io docs format.html .. . .. . It s rather common and there are plenty of converters around . As for the prefixes they mean : S- singleton expressions and B- begin I- intermediate E- end of a multi word expression . Then there is the output of the semantic role labeling . Look for more information on SRL as this gets a little more complex . Notice there are two columns one for the verb go and one for the verb eat . Usually A0 is the subject and A1 the direct object again oversimplified . AM is the argument modifier and -LOC is a location it could be other adverbs . PNC seems to refer to the surrogate noun phrase acting as object of the verb go . Don t remember from the top of my head . Examples here verbs.colorado.edu propbank framesets-english go-v.html As for the parse-tree it s bracketed and also a common notation loosely inspired by Lisp . The indicates the label of the current token . I found this useful : http : math.stackexchange.com questions 588230 how-to-convert-parentheses-notation-for-trees-into-an-actual-tree-drawing Comment : Thanks on the note of the LISP . Any idea what s -AM- and -PNC Comment : Oh sorry I skipped that . That is the output of the semantic role labeling . Look for more information on SRL as this gets a little more complex . Notice there are two columns one for the verb go and one for the verb eat . Usually A0 is the subject and A1 the direct object again oversimplified . AM is the argument modifier and -LOC is a location it could be other adverbs . PNC seems to refer to the surrogate noun phrase acting as object of the verb go . Don t remember from the top of my head . Examples here verbs.colorado.edu propbank framesets-english go-v.html http : verbs.colorado.edu propbank framesets-english go-v.html Comment : Thanks @JosepValls" ] }
[ "yes-answer-long", "yes-answer-short" ]
tags
UNK_RELATION
vhosts@http@31
vhosts -- a virtual host of a @placeholder https webserver virtual host in apache server block in nginx . . .
{ "confidence": [ 45.47635269165039, 43.174808502197266, 40.01387023925781, 37.7476806640625, 37.709938049316406, 37.398094177246094, 36.60600662231445, 36.60600662231445, 36.411624908447266, 35.69500732421875, 35.57522964477539, 35.57522964477539, 35.301666259765625, 33.934043884277344, 33.1369743347168, 32.890621185302734, 32.5200309753418, 32.51765823364258, 32.0156364440918, 32.0156364440918, 31.230365753173828, 30.27765655517578, 30.08295440673828, 30.004558563232422, 29.749446868896484, 29.749446868896484, 29.749446868896484, 29.472888946533203, 29.03820037841797, 28.771251678466797, 28.300251007080078, 27.97646141052246, 27.743988037109375, 27.41843605041504, 27.334789276123047, 26.940040588378906, 26.940040588378906, 26.938278198242188, 26.713211059570312, 26.673309326171875, 26.64057159423828, 25.968894958496094, 25.808452606201172, 25.794719696044922, 25.4908447265625, 25.29110336303711, 25.028820037841797, 25.028820037841797, 24.921937942504883, 24.913976669311523, 24.88028335571289, 24.88028335571289, 24.706892013549805, 24.682376861572266, 24.498035430908203, 24.20098876953125, 24.11865234375, 24.11865234375, 23.912445068359375, 23.663570404052734, 23.54996109008789, 23.440811157226562, 23.440811157226562, 23.427780151367188, 23.36817169189453, 23.36817169189453, 23.07402229309082, 23.008556365966797, 22.989891052246094, 22.989891052246094, 22.95401954650879, 22.88323974609375, 22.881668090820312, 22.845497131347656, 22.845497131347656, 22.827899932861328, 22.827899932861328, 22.801227569580078, 22.643301010131836, 22.633068084716797, 22.606494903564453, 22.585758209228516, 22.478208541870117, 22.4100341796875, 22.4100341796875, 22.4100341796875, 22.4100341796875, 22.4100341796875, 22.368148803710938, 22.3373966217041, 22.3373966217041, 22.291179656982422, 22.114322662353516, 21.82555389404297, 21.814720153808594, 21.710895538330078, 21.646255493164062 ], "content": [ "The third virtual host block will serve the content for https : monsite.fr .", "and I add virtual host definition to apache config file .", "Then you can use rpi.myserver.dyndns.org as virtual host .", "You must merge everything into that virtual host .", "The app-servers host different sites via vhosts .", "I have a feeling that the Default virtual host is over taking all requests and won t allow the 443 SSL virtual host to take those specific requests .", "I recently set up virtual host on a brand new mac .", "I am trying to create a virtual host on my localhost XAMPP .", "My virtual host setup in httpd-vhosts.conf is like this : .. . .. . And the hosts-file : .. . .. . I have checked the Apache log .", "For more detailed tutorial try Nginx Server Block Setup https : www.digitalocean.com community tutorials how-to-set-up-nginx-server-blocks-virtual-hosts-on-ubuntu-14-04-lts .", "i don t have any virtual host setup yet", "This is how I set up my virtual host : .. . .. . 1 .", "Modify your vhost configuration as follows : .. . .. . The first virtual host block will redirect all requests from http : www.monsite.fr to https : monsite.fr .", "This is what I have in my etc hosts-file right now : .. . .. . On the other side 192.168.0.20 Apache is configured to run the virtual host on the example.dev domain .", "It will also redirect all requests from http : monsite.fr to https : monsite.fr .. . .. . The second virtual host block will redirect all requests from https : www.monsite.fr to https : monsite.fr .", "I need a virtual host setup based on the cookie in the request header .", "My .htaccess file looked like this : .. . .. . And : .. . .. . if you re running Apache 2.4 note the changes since previous versions regarding Require all granted and AllowOverride all within a Directory .. . Directory block on your virtual host .", "Make sure that you are using name-based virtual hosting AND that if you are using apache that is distributed with OS X and the vhosts config is in a separate file e.g .", "Using XAMPP to create a virtual host so that my project files are kept locally .", "It sounds more like you re looking for aliases or rewrites rather than a virtual host .", "The nodeHttpProxy.js file looks like this : .. . .. . As you can see I will have to do two things each time I create a new Node virtual host : .. . .. . 1 . add the virtual host name to my nodeVhosts array .. . 2 . define a new express virtual host using the .set method .. . .. . Of course I will also have to create the actual host path files in my localhost directory .", "I have a virtual host that looks something like : .. . .. . Requests are proxy passed to a Ruby on Rails application running w the Puma webserver but when I inspect request.ENV I do not see my shibboleth attributes .", "Lastly you may want to try to visit 192.168.1.2 http : 192.168.1.2 from your host computer which shouldn t land at the wordpress site due to vhosts but should land you at some page on that webserver .", "I don t know why this problem occurs but the solutions what I got .. . .. . Edited etc zpanel configs apache httpd-vhosts.conf .. . .. . Problem Caused Virtual Host Code .. . .. . Replaced with", "Using this you can add Network Drive Network Directory to both Virtual Host as well as in Alias .", "You virtual host should point to the public folder there s no need for workarounds and tricks it should work just like it is .", "You need to correctly setup virtual host in you web server s config file .", "The usual error for this is leaving out the NameVirtualHost directive if you re still using httpd 2.2 .. . .. . Add the following in your config file and it ll probably work .. . .. . You might want to read the documentation for Named-based Virtual Host Support with httpd 2.2 http : httpd.apache.org docs 2.2 vhosts name-based.html .", "I have Zend Server installed on my machine windows-7 home edition and I m trying to set up a virtual host on a folder that is located in our server .", "Instead of.. . .. . .. . ...it now contents .. . .. . So as described in official documentation https : httpd.apache.org docs current vhosts examples.html port I ve added new port to listen in httpd configuration and setup new port to resolve in domain s virtual host configuration .", "After it worked I can see that the requests are www.example.com and not the localhost showing that the virtual host is indeed working .", "How about creating a token one for host 1 and another for host 2", "On the server 8.8.8.8 I have two virtual-hosts files .", "My intention is to have the VHOSTS file resolve which server to use if the host header contains my own subdomain name rather than just the DynDNS name which is what my question is all about .", "Go through this link will sure helps to you .. . .. . https : www.digitalocean.com community tutorials how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts", "Since Express uses Connect http : www.senchalabs.org connect vhost.html I m pretty sure you can use Connect s virtual host middleware .", "Delete the second virtual host and add an alias directive http : httpd.apache.org docs current mod mod alias.html alias to your first one .", "Seems like Vhosts didn t like that it is not allowing me to restart apache .", "I am running a virtual-server Ubunto Plesk 12 .", "I use vhosts to park 3 domain to this server .", "I wonder if there is a way to point this v-host to server folder .", "In my host file of my webserver computer I have now changed : 127.0.0.1 wordpress.local to its IP instead which is : 192.168.1.2 wordpress.local .", "At front NGINX works as a static cache server .", "I set up virtual-hosts like normal on Apache http : httpd.apache.org docs 2.0 vhosts examples.html .. . .. . I installed the following on Node .. . .. . Express http : expressjs.com .. . node-http-proxy https : github.com nodejitsu node-http-proxy .. . .. . Then as a matter of personal style I placed all my virtual-hosts in a common directory localhost .. . .. . I then switched Apache to listen on a port other than port 80 .", "At first whenever I was making a request on my website through the Virtual Host in my access log I only had 127.0.0.1 which is incorrect .", "For the browser that you are using is it on a remote host", "Just as an update I removed the virtual host configuration removed entries from hosts-file removed entries from MAMP httpd-vhosts.conf file and put all website files under htdocs .", "Here is the full solution for anyone else stuck on this : .. . .. . The bottom of your Applications MAMP bin php your php version conf php.ini should look like this : .. . .. . Note that then xdebug.remote host option is set to the name you gave your virtual host .", "Any http requests sent from the machine would then try to resolve on that host .", "Yes it s totally possible you should use nginx of apache for that .", "It works just fine i have several vhosts set up on my OS X box under apache .", "How to prevent PHP sessions from being shared between different Apache vhosts", "Think ov vHosts .", "I want to install Apache vhost on my machine.. . Is there a way to run these external applications on my virtual-server on my system so i can experiment with PHP calls", "Go through this link will sure helps to you digitalocean.com community tutorials https : www.digitalocean.com community tutorials how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts", "It will listen on port 80 and if the host matches one of the names in the nodeVhosts array it will forward the request to that host on port 8000 otherwise it will forward the the request onto that host on port 9000 .", "do you have any virtual-hosts setup", "The solution provided in Automatic Virtual Hosts with MAMP Pro", "This works fine with multiple vhosts sections .", "MySql Server Port : 3306 .. . .. . My virtual-hosts setup within MAMP is working fine .", "I have recently implemented white labeling and after changing my VHOSTS setting I have found that some of the URL is stripped for example : .. . .. . is configured like this within apache vhosts .", "How can I setup a virtual hosting on my Mac .", "So most of the time you can configure the virtual-hosts as follows .", "My virtual-hosts on Apache look like : .. . .. . My question is what is the correct way to have vhost like functionality on the Express Nodejs side", "But may web host doesn t allow me to change my vhost configuration", "From the host computer I can access 192.168.1.2 unsurprisingly .", "This works perfectly on local machine but when uploaded to host it gives me server errors because cant find the files since its trying to locate those files in public html .. . .. . For example : .. . .. . inside my script.php : .. . .. . this works good on local machine but on host it fails since it tries to locate style.css under public html and not public html website 1 .. . .. . Is there a way to have multiple document roots without using VHosts", "I have a server on which I want to run multiple wildcard vhosts with their own modperl environment .", "I ve set up different vhosts on an Apache 2.2 and everything works perfectly until I realized that the PHP sessions are shared by default .", "Certainly both vhosts using the default session handler will write their session files to the same directory - just override it in the Apache vhost config :", "I have 3 vhosts setup on xampp on my local windows machine .", "The virtual-hosts slution should work fine .", "Is it a configuration of vhosts to catch request to 443", "It is important that this script works with MySQL mass vhosts is not possible .", "I don t need to use wildcard vhosts .", "the only thing i have to do is have them installed on my system and even the virtual web server will have access to them", "I have multiple-domains that I need to redirect to a primary domain but my server also has multiple virtual servers for various other domains .", "There s no such thing as a host domain-name with a path in it .", "At the end of file you will see there are some commented lines already to show you a demo how to setup virtual host just copy those lines and make necessary changes and it will work for you.I have attached a screenshot for better understanding .. . .. . http : postimg.org image 5pug9f42p", "I have tried to add them underneath the upper v-host config but they are just not reachable : .. . .. . With best regards", "Checked my host file .. . 4 .", "Relative vs absolute paths may be a pain.. . command might need to be usr bin uptime or another could be usr bin ls home chris ftp And virtual-server doesn t mean anything other than the webserver is cognizant of the hostname for the incoming request and might do something differently .", "I have restarted Apache and even the server .", "I m writing a script to create virtual-hosts in Mamp Pro .", "I ve found the following questions on SO : .. . .. . Automatic Virtual Hosts with MAMP Pro", "2 virtual-hosts with roots at Applications MAMP htdocs .. . 7 .", "User accounts are virtual accounts stored in an LDAP and they ARE NOT mapped to local users .", "Virtual users that haven t corresponding local ones are the general practice nowadays .", "I m using one server to host multiple Node.js web apps which are distributed across multiple-domains .", "You only need the remote host IP hostname not the additional port .", "Shouldn t you use a different port to host even when using vhost", "I am struggling to configure virtual-hosts on a remote-server to do the following : I have a Tomcat running on port 8888 and want to serve it to the public on port 80 .", "http : eosrei.net articles 2012 08 create-dynamic-virtual-hosts-apache-http-vhostalias comment-1838 http : serraphyn.com tutorials automated-vhosts-in-ubuntu-with-apache2-and-dnsmasq .. . .. . kindly help me to give an clear basic steps to process this automate vhost configuration for our local development purpose and also for an future client-server configurations .", "Restarting Apache Web Server .. . .. . After editing configuration-files you usually have to restart Apache HTTP Server to apply your changes .", "For the vhosts the settings are stored in httpd.conf which is generated by Plesk .", "Researching the web in general I ran into this link : https : groups.google.com forum topic vagrant-up IcEl9-V9wsU .. . .. . This guy is running Nginx and looks to be asking the same question as me but using a different webserver .", "Editing the vhosts set up as follows and" ] }
{ "confidence": [ 57.121307373046875, 49.49633026123047, 46.934207916259766, 45.863677978515625, 44.99700927734375, 44.16606521606445, 44.125221252441406, 42.676429748535156, 41.76407241821289, 41.7044677734375, 40.821285247802734, 40.01831817626953, 39.968692779541016, 39.843143463134766, 38.89931106567383, 38.60394287109375, 38.5636100769043, 37.99293518066406, 37.972496032714844, 37.70925521850586 ], "content": [ "Question : I m running Nodejs and Apache alongside each other . node-http-proxy is listening on port 80 and then forwarding requests to either Apache : 9000 or to Express : 8000 . My virtual-hosts on Apache look like : .. . .. . My question is what is the correct way to have vhost like functionality on the Express Nodejs side I would prefer to not have to place each Nodejs app on its own port as is suggested here : .. . .. . https : github.com nodejitsu node-http-proxy Section titled Proxy requests using a Hostname Only ProxyTable .. . .. . I noticed Connect which as I understand it gets bundled in Express has some vhosts functionality . Should I be using that If so what would be the correct way to run it alongside node-http-proxy http : www.senchalabs.org connect middleware-vhost.html .. . .. . I also noticed this other module called Cluster it seems to be related but I m not sure how : .. . .. . http : learnboost.github.com cluster .. . .. . While not wanting to overwhelm I also came across one called Haibu it seems to be related but I m not sure if it would just be an all out replacement for using vhosts : .. . .. . https : github.com nodejitsu haibu .. . .. . Note : I m a front-end guy so I m not very familiar with a lot of server terminology .. . Answer : I never figured out Haibu or Cluster . But I did find a good solution that addressed my issue . To my surprise it was actually quite simple . However I don t know much about servers so while this works it may not be optimal . I set up virtual-hosts like normal on Apache http : httpd.apache.org docs 2.0 vhosts examples.html .. . .. . I installed the following on Node .. . .. . Express http : expressjs.com .. . node-http-proxy https : github.com nodejitsu node-http-proxy .. . .. . Then as a matter of personal style I placed all my virtual-hosts in a common directory localhost .. . .. . I then switched Apache to listen on a port other than port 80 . I just happened to choose port 9000 because I had seen that used somewhere . In httpd.conf changed Listen 80 to Listen 9000 . I also had to make sure that all my virtual-hosts as defined in extra httpd-vhosts.conf were set to an IP based nameVirtualHost 127.0.0.1 instead of using a port : 80 . On the Node side I created my app server aka node virtual host that listened on port 8000 somewhat arbitrarily choice of port-number See this link on creating a server with express : http : expressjs.com guide.html .. . .. . In my localhost directory I then created a file called nodeHttpProxy.js .. . .. . Using node-http-proxy in nodeHttpProxy.js I then created a proxy server that listens on port 80 . Using express which wraps connect http : www.senchalabs.org connect I created my virtual-hosts . The nodeHttpProxy.js file looks like this : .. . .. . As you can see I will have to do two things each time I create a new Node virtual host : .. . .. . 1 . add the virtual host name to my nodeVhosts array .. . 2 . define a new express virtual host using the .set method .. . .. . Of course I will also have to create the actual host path files in my localhost directory . Once all this is done I just need to run nodeHttpProxy.js : .. . .. . You might get some weird EACCESS error in which case just run as sudo . It will listen on port 80 and if the host matches one of the names in the nodeVhosts array it will forward the request to that host on port 8000 otherwise it will forward the the request onto that host on port 9000 . Comment : converted for newer express syntax : gist.github.com 4135704 https : gist.github.com 4135704", "Question : I have a VDS with CentOS and Apache . I m using virtual-based hosts so I have domain my.domain and few subdomains like sub1.my.domain sub2.my.domain etc . Each of them have it own config file in etc httpd conf vhosts . I need to redirect all connections from sub1.my.domain : 8080 to another.web.site : 8080 . So I ve added this lines in .htaccess file at sub1.my.domain s root directory : .. . .. . But it wouldn t work because web-server listen only to port 80 . So I did modified etc httpd httpd.conf this way : .. . .. . And did modified sub1.my.domain s vhost file . Instead of.. . .. . .. . ...it now contents .. . .. . So as described in official documentation https : httpd.apache.org docs current vhosts examples.html port I ve added new port to listen in httpd configuration and setup new port to resolve in domain s virtual host configuration . But when I m trying to open sub1.my.domain : 8080 I get an error - browser can t resolve that address . I ve even forward 8080 port through iptables reboot whole server but nothing helped . What I did wrong .. . Answer : Whole day spent to understand that fail2ban blocks all connections to 8080 . I ve added rule to fail2ban table through iptables and everything worked like a charm .", "Question : I ve got a dynamic IP from my ISP so I m using a free DynDNS service to redirect traffic to my server . I just bought a Raspberry Pi and would like to reach it from the outside too preferrably with another subdomain . Can I use multiple CNAME records pointing at the DynDNS domain and then put a VHOSTS file in the servers to direct traffic to the right server depending on the subdomain called Or is it the DynDNS subdomain that calls the server rather than my own subdomain i.e . showing the same id to the server independent of the subdomain called by the user I d rather not use different ports for different servers handling the same protocol . Today : .. . server.example.com - CNAME - server.dyndns.com - 1.2.3.4 - home server .. . .. . Future : .. . server.example.com - CNAME - server.dyndns.com - 1.2.3.4 - home server .. . rpi.example.com - CNAME - server.dyndns.com - 1.2.3.4 - raspberry-pi Comment : That certainly is possible . from a technical point of view . But DynDNS does not offer usage of second level domains like that . Most likely you have an account there resolving to something like myserver.dyndns.org . Then you can use rpi.myserver.dyndns.org as virtual host . What you cannot do is have such subdomains resolve to different internal ip addresses since that would mean that the router would have to evaluate the host header inside the http protocol which does not work . Comment : I dont intend to use second level subdomains with my DynDNS address I want to direct several first level subdomains to my single IP and then split them to different servers . My intention is to have the VHOSTS file resolve which server to use if the host header contains my own subdomain name rather than just the DynDNS name which is what my question is all about . Comment : Ok no problem then . But what is the problem in this case Comment : I want to know if the host header shows my subdomain name rather than the DynDNS name . If so I can use VHOSTS to separate traffic to different servers . Comment : Perfect thats just what I wanted to hear .. . Answer : Ya I think you would just use CNAME records to point all of your sub domains to the same dyndns sub domain and then handle differentiating them all with vhosts . As for your raspberry-pi you might have to have a vhost on your apache web server that would act like a proxy server sending all traffic from a hostname sub domain to the pi s ip . Here s an example of a vhost proxy configuration goes in Apache s config probably httpd.conf .. . .. . Replace localhost and port-number with the ip and port of the raspberry-pi", "Question : I am working on a site that only owns an SSL cert for monsite.fr . I am trying to remove the www . and redirect to https : monsite.fr . the redirection doesn t work if the user type www.monsite.fr he WILL NOT be redirected to https : monsite.fr but to https : www.monsite.fr and get certification error NET : : ERR CERT COMMON NAME INVALID . This is the content of mysite.conf file : .. . .. . Is there a solution to redirect www.monsite.fr to https : monsite.fr .. . Answer : Modify your vhost configuration as follows : .. . .. . The first virtual host block will redirect all requests from http : www.monsite.fr to https : monsite.fr . It will also redirect all requests from http : monsite.fr to https : monsite.fr .. . .. . The second virtual host block will redirect all requests from https : www.monsite.fr to https : monsite.fr . The third virtual host block will serve the content for https : monsite.fr . Make sure to edit the above mentioned configuration and add the correct path path to cert server.crt for the SSL certificate and path to key server.key for the private key .", "Question : I have this configuration but both url app.test.com stage.test.com redirect to same code deployment .. . Answer : The usual error for this is leaving out the NameVirtualHost directive if you re still using httpd 2.2 .. . .. . Add the following in your config file and it ll probably work .. . .. . You might want to read the documentation for Named-based Virtual Host Support with httpd 2.2 http : httpd.apache.org docs 2.2 vhosts name-based.html . Comment : It works . I just uncommented the NameVirtualHost : 80 entry in httpd.conf file", "Question : How can I setup a virtual hosting on my Mac . It should be easy by adding a 127.0.0.1 line to the hosts-file and editing the apache configuration . But for some reason it doesn t work with me.. . .. . .. . And no MAMP is not an option since you can t setup vhosts in MAMP except if you buy the MAMP Pro.. . .. . Any advice Comment : It works just fine i have several vhosts set up on my OS X box under apache . Make sure that you are using name-based virtual hosting AND that if you are using apache that is distributed with OS X and the vhosts config is in a separate file e.g . in etc apache2 other httpd-vhosts.conf that it is actually getting included . Include private etc apache2 other .conf .. . Answer : It works just fine i have several vhosts set up on my OS X box under apache . Make sure that you are using name-based virtual hosting AND that if you are using apache that is distributed with OS X and the vhosts config is in a separate file e.g . in etc apache2 other httpd-vhosts.conf that it is actually getting included . Also you can always test apachectl -t -D DUMP VHOSTS to see if the virtual-hosts are actually getting defined . Comment : Allright great to hear it possible : The only httpd-vhosts.conf file I ve got is in etc apache2 extra . Do I need to duplicate this and place it in another folder Comment : thats the right place.. . make sure that your etc apache2 httpd.conf has a line that Includes this file into it uncommented . And once you add an entry to etc hosts-file you should make sure to run dscacheutil -flushcache command to flush the directory service cache which controls the name lookups . Comment : I did everything you asked for but Safari isn t able to make a connection to my local hosted website.. . Comment : are you able to ping your hostname in the terminal Also make sure that apache is bound to localhost .. . try telnet localhost 80 in terminal to make sure that it s binding to localhost .. . Comment : If not how can I bind apache to my localhost", "Question : null .. . Answer : I have Zend Server installed on my machine windows-7 home edition and I m trying to set up a virtual host on a folder that is located in our server . For some reasons I can t set an apache web server in there so it must be done in my own computer . But I can t get it done . My virtual host setup in httpd-vhosts.conf is like this : .. . .. . And the hosts-file : .. . .. . I have checked the Apache log . There s a Warning : .. . .. . I got full access to this folder and I have it mapped like a local drive . I tried to set the DocumentRoot as follows but no luck Apache does not restarts after setting the Z : . I wonder if there is a way to point this v-host to server folder . Any ideas Comment : You should be able to use Z : if it is mounted and you can browse it - what output from httpd -t do you get if you using Z : Comment : @LeonardChallis Thanks for your attention . Yeah it is mounted . Apache gives me an syntax-error pointing to the line where I have declared the Z folder and a DocumentRoot must be a directory message . Running the httpd -t I just got a Syntax OK message from the command-line .", "Question : null .. . Answer : I m setting up a new server for a customer and they ve got themselves a VPS with Webmin installed they chose it before consulting me I would have recommended WHM CPanel personally . I ve managed to install the SSL RapidSSL Cert . and it works great and as expected when visiting https : domain.com : 10000 so I know it s not the certificate that s the actual issue . However without the : 10000 port extension main website I get an SSL error : - ERR SSL PROTOCOL ERROR Chrome - Error code : ssl error rx record too long Firefox .. . .. . I ve come to the conclusion that it must be something to do with the setup of the virtual-hosts but I m pulling my hair out by this point as it s been about 3 4 hours setup time for just the SSL . I have a feeling that the Default virtual host is over taking all requests and won t allow the 443 SSL virtual host to take those specific requests . Here s my httpd.conf file for the virtual-hosts : .. . .. . No matter what I do it just doesn t seem to want to work . I ve followed a lot of online forums and advice for a solution but nothing works I m running Webmin version 1.760 and Apache version 2.2.15 if that helps . Any help would be an absolute life saver .", "Question : I m having troubles on making the PHP cURL library recognize the alias I created in my etc hosts-file . This is what I have in my etc hosts-file right now : .. . .. . On the other side 192.168.0.20 Apache is configured to run the virtual host on the example.dev domain . The alias works if I test it on my browser but with PHP cURL just doesn t work . The hosts-file is on both machines 192.168.0.10 PHP cli 192.168.0.20 Apache . For the sake of completeness this is the PHP code I m using . Note : This issue seems like this one http : stackoverflow.com questions 3390549 set-curl-to-use-local-virtual-hosts but PHP related . Comment : Have you restarted the server Just to make sure Comment : Can you post the exact code There should not be a problem . Comment : is the hosts-file on the right machine do you run PHP on this machine Comment : I also expect no problem at all can you ping or telnet to it Is curl configured to use proxy If yes it will ignore etc hosts Comment : The hosts-file is on all machines 192.168.0.10 php cli 192.168.0.20 apache .. . Answer : Solved using this url http : 192.168.0.20 instead of http : www.example.dev .. . .. . Also the Host header is needed.. .", "Question : null .. . Answer : I m using Shibboleth along w Apache w mod-proxy and I ve noticed that environment-variables such as REMOTE USER are not making it all the way to my application . I have a virtual host that looks something like : .. . .. . Requests are proxy passed to a Ruby on Rails application running w the Puma webserver but when I inspect request.ENV I do not see my shibboleth attributes . Does anyone have any experience w something like this Comment : Did you specify you want to use AuthType shibboleth If you think that the virtualhost is right verify that you set the attribute to be extracted for saml message from IdP in your sp see attribute-map.xml by default Comment : .... . Then for setting REMOTE USER you can set a priority list of these attributes see the examples here wiki.shibboleth.net confluence display SHIB2 https : wiki.shibboleth.net confluence display SHIB2 NativeSPApplication Examples", "Question : This has probably been asked but I can t find a straight answer or the ones I found don t work . I have one domain mydomain.com resolving to an IP let s call it 8.8.8.8 . The DNS settings also point two subdomains to that IP address with an A record . These are dev.mydomain.com and staging.mydomain.com . Both have an A-record pointing to 8.8.8.8 . On the server 8.8.8.8 I have two virtual-hosts files . These are as follows : .. . .. . staging.mydomain.com.conf .. . .. . And.. . .. . .. . dev.mydomain.com.conf .. . .. . The problem is : .. . .. . Regardless of whether I visit http : staging.mydomain.com or http : dev.mydomain.com I always land on staging.mydomain.com Apache serves these files . I have restarted Apache and even the server . If I change the order of the .conf files so that dev is first I always see that . Any suggestions would be so appreciated . Thanks .. . .. . update .. . .. . I find myself back at this problem again If you know that your syntax is correct you might have a bad symlink . Delete it and recreate again restarting apache in-between . I just did this and it solved hours of head-scratching . On CentOS you can check your available vhosts with httpd -S Comment : I have voted to re-open this question because both the question and the answer are helpful . Besides this questions about Apache are not off-topic on StackOverflow and ServerFault is only for professional setups . .. . Answer : Sounds like you need to add NameVirtualHost directive http : httpd.apache.org docs 2.2 mod core.html namevirtualhost to your configuration . Under some circumstances Apache may not be able to handle : 80 VirtualHosts correctly . In those cases you should map VirtualHosts directly on specific IPs . You can also run apachectl -t -D DUMP VHOSTS to see how Apache parses the VirtualHost configuration . Update : As mentioned in the comments usually you can just use NameVirtualHost : 80 . So most of the time you can configure the virtual-hosts as follows . Comment : Thx Ketola . At the end of my httpd.conf file I have the following where the vhosts are included NameVirtualHost : 80 new line Include etc httpd sites-enabled Comment : That should work then . Apache can be a bit picky with : 80 at times so you might want to try 8.8.8.8 : 80 instead to see if it works better . Also run apachectl -t -D DUMP VHOSTS to see how Apache parses your configuration-files . Updated the answer to reflect these as well . Comment : Thanks Ketola tried that in both .conf files and the httpd.conf file but no cigar although the order changes The apachectl -t -D DUMP VHOSTS is very useful and shows that Apache is defining the dev server as the default and loading it first . Comment : Very strange . The only other cause I can think of is a typo somewhere but that s quite unlikely . Do you have a proxy or anything else in between that could mess up the Host : header in the request The next step would be to set LogLevel debug in Apache and or do telnet localhost 80 on the server and request for the document directly . Comment : I had a similar issue...the apachectl -t -D DUMP VHOSTS command was the tell all : Mon May 20 23 : 51 : 08 2013 warn default VirtualHost overlap on port 80 the first has precedence . Adding the NameVirtualHost : 80 solved it", "Question : Allright this driving me nuts I have spent couple of hours trying to find a solution of how to access my Wordpress site from outside my network when no easy solution was found I m OK with just being able to accessing it from another device within my network . It turned out to be a tricky part as well . I just don t know how to configure this . I run virtual-hosts using WAMP likeso : .. . .. . In httpd-vhosts.conf : .. . .. . My httpd.conf file is set to port 80 : .. . .. . ServerName localhost : 80 .. . .. . Hostsfile : .. . .. . 127.0.0.1 wordpress.local .. . .. . If I now want to access this from another computer or my mobile that are in my network how do I achieve this Comment : You should replace your local ip with your local network ip it should be something like 192.168.. . instead of localhost or 127.0.0.1 .. . Answer : You ll need to change your Listen http : httpd.apache.org docs 2.2 mod mpm common.html listen directive to listen to the network IP or 0.0.0.0 rather than localhost if that is not yet done . Then on the other computer edit the hosts usually C : windows system32 drivers etc hosts or etc hosts-file to include the IP of the webserver computer mapped to wordpress.local Comment : In my host file of my webserver computer I have now changed : 127.0.0.1 wordpress.local to its IP instead which is : 192.168.1.2 wordpress.local . From the computer which Im trying to surf from I added 192.168.1.2 wordpress.local to its host file . I don t seem to be able to access it though . I tried to ping wordpress.local which gave a message of timeout . How come Comment : If a ping is timing out then either you have network connectivity issues or name resolution issues . Please try to directly ping 192.168.1.2 from the surfing computer . If this does not work verify network connectivity and firewall settings . If this does work verify the IP address shown when you ping wordpress.local is the IP address in the hosts-file . Lastly you may want to try to visit 192.168.1.2 http : 192.168.1.2 from your host computer which shouldn t land at the wordpress site due to vhosts but should land you at some page on that webserver . Comment : From the host computer I can access 192.168.1.2 unsurprisingly . I also can access my surfing computer from my host computer when pinging it this in reverse though throw a timeout message . On my hosting computer my windows-firewall are completely turned off while testing no other firewall is used either . Comment : Have you verified that you are listening on all interfaces by checking the Listen directive in httpd.conf Have you verified the IP address you get when you ping from the surfing computer to wordpress.local is actually the IP of the host computer Comment : I start thinking the problem not has anything to do with WAMP since I can t ping my host computer in any way with WAMP turned off either Hmm.. . Do I need to make any changes to 192.168.1.2 by opening ports or something", "Question : After upgrading my MacBook Pro to Mac OS X Lion I am not able anymore to get my Zend Server running like before . At first the Zend Server gave me servile errors by starting it from the command-line . I fix this by doing a complete new installation of Zend Server . After this new installation Zend Server runs fine and no problems at all . So now I want to put back my zend projects . I made a backup of my vhost file and put it back it seems to be Lion didn t touch my host file so I didn t touch either just checked . I did the follow things .. . .. . 1 . Put one of my vhosts back in conf extra httpd-vhosts.conf just one to check . 2 . Uncomment the vhost include in conf httpd.conf .. . 3 . Checked my host file .. . 4 . Restart zend-server from command-line .. . .. . After this I still cant reach the project by browsing to http : foo.localhost : 10088 .. . .. . Vhosts .. . .. . Hosts .. . .. . I am not sure if this can have effect on the problem but by restarting zend from the command-line i get the follow : .. . .. . Regards Nicky .. . Answer : I ve had similar problems as well with that . I ve been searching around for an answer found some solutions but none of them seemed to work . The only thing that finally made it working not even sure how it actually helped is going into system preferences - sharing and enabling web sharing . That is normally starting your apache2 server but I wasn t using the default one I am running another apache2 process with a different httpd configuration . Anyway after starting it and stopping it from the system preferences window it seemed like it was working . One thing that could be useful is checking your error-log as well as the access log in var log apache2 . Check the access log to see what is the address trying to be resolved . At first whenever I was making a request on my website through the Virtual Host in my access log I only had 127.0.0.1 which is incorrect . After it worked I can see that the requests are www.example.com and not the localhost showing that the virtual host is indeed working . Not sure if that will help you give it a try paste the access log and error-log latest lines to see where there could be a problem .", "Question : Automatically zpanel showing This domains disk limit has been exceeded for all the websites hosted in VPS with ZPanel .. . Answer : I don t know why this problem occurs but the solutions what I got .. . .. . Edited etc zpanel configs apache httpd-vhosts.conf .. . .. . Problem Caused Virtual Host Code .. . .. . Replaced with", "Question : I have installed WAMP in my system and http : localhost is working nicely . but when i got 127.0.0.1 then it gives Forbidden error : .. . .. . Forbidden .. . .. . You don t have permission to access on this server . .. . .. . I don t know what is this error for .. . .. . in httpd.config i have give permission to allow all : .. . .. . and if i set in my host file .. . .. . and access test it gives same error . Any suggestion would be appreciated.thanks Comment : do you have any virtual-hosts setup Comment : Take a look at stackoverflow.com questions 10873295 https : stackoverflow.com questions 10873295 error-message-forbidden-you-dont-have-permission-to-access-on-this-server Comment : i don t have any virtual host setup yet Comment : What version of WAMPServer did you install What version of Windows are you runnig Comment : wamp version is wampserver 2.4 .. . Answer : The correct syntax for Apache 2.4.x is .. . .. . Now if you did not actually want to give access to your site while you develop it to the whole internet a better method would be .. . .. . The require local covers localhost 127.0.0.1 and : : 1 . : : 1 is the IPV6 equivalent of 127.0.0.1 .. . .. . If you want to be able to access the WAMPServer Apache from other PC s on your local network then you can include this line as well .. . .. . Note : I used only the first 3 quartiles of the normal 4 quartile set this gives access to any ip on your internal subnet . You will have to check what your actual subnet is as 192.168.0.x is a default but not for all home routers . Can i suggest you read this document http : forum.wampserver.com read.php 2 119754 and make the required fixes for the WAMPServer 2.4 release . Make each change one by one and make sure that Apache and MySQL start again after each change so you can know where you make any mistakes as they happen rather than doing them all in one go", "Question : I m running Nodejs and Apache alongside each other . node-http-proxy is listening on port 80 and then forwarding requests to either Apache : 9000 or to Express : 8000 . My virtual-hosts on Apache look like : .. . .. . My question is what is the correct way to have vhost like functionality on the Express Nodejs side I would prefer to not have to place each Nodejs app on its own port as is suggested here : .. . .. . https : github.com nodejitsu node-http-proxy Section titled Proxy requests using a Hostname Only ProxyTable .. . .. . I noticed Connect which as I understand it gets bundled in Express has some vhosts functionality . Should I be using that If so what would be the correct way to run it alongside node-http-proxy http : www.senchalabs.org connect middleware-vhost.html .. . .. . I also noticed this other module called Cluster it seems to be related but I m not sure how : .. . .. . http : learnboost.github.com cluster .. . .. . While not wanting to overwhelm I also came across one called Haibu it seems to be related but I m not sure if it would just be an all out replacement for using vhosts : .. . .. . https : github.com nodejitsu haibu .. . .. . Note : I m a front-end guy so I m not very familiar with a lot of server terminology .. . Answer : I took some inspiration from @uglymunky and wrote a chef script to do this on Ubuntu . With this script you can install express and apache with vhost support on a single server using 1 line after you pull down my chef project from github .. . .. . https : github.com toranb ubuntu-web-server .. . .. . If you have git installed and you pull it down you can kick it off like so .. . This does require Ubuntu 12.04 or greater as I took advantage of an upstart script to start node when you reboot the machine .. . .. . When the script is finished you will have a working ubuntu web server with express to run any node apps you configured along side apache to run any wsgi apps you configured", "Question : null .. . Answer : In JMeter is it possible to override the hosts-file somehow I mean something that is described here : https : guide.blazemeter.com hc en-us articles 207420205-Hosts-Override .. . .. . What I want to test : Behind a Loadbalancer there are many application servers Apache webservers . The app-servers host different sites via vhosts . They are requested by customers via the loadbalancer . Thehe loadbalancer sends the requests to the app-servers . Based on the url the webserver knows which site is requested . Now I want to send requests directly to the webservers . I could change my hosts-file so a request will bypass the Loadbalancer . but I want to test different webservers at the same time . So I would need a separate Hosts file for every thread group . Comment : why do you want to change it in the middle of the run wouldn t it be simpler to put all servers behind LB in your hosts-file before run and then just target them instead of LB name during run Comment : I have a lot of servers and I want to send requests to all the servers separately . I want to bypass the loadbalancer . But on all servers I need to use the same hostname since they can only be reached via the vhosts configuration . that is why I want a function like the one I linked to in blazemeter because I want to be able to test all server from one loadgenerator JMeter .", "Question : I m writing a script to create virtual-hosts in Mamp Pro . I want them to be created and appear in the GUI next to the normal ones I ve created manually through the GUI . I ve found the following questions on SO : .. . .. . Automatic Virtual Hosts with MAMP Pro http : stackoverflow.com questions 12359199 automatic-virtual-hosts-with-mamp-pro .. . Add MAMP Pro Vhosts with script http : stackoverflow.com questions 32032912 add-mamp-pro-vhosts-with-script .. . .. . Here are my findings so far : .. . .. . I ve found out that the hosts appearing in the MAMP Pro GUI are found in : Library Application Support appsolute MAMP PRO settings3.plist I ve tried editing it but I can t seem to get the entries right with the command PlistBuddy -c print : virtualHosts settings3.plist which says Print : Entry : virtualHosts Does Not Exist .. . .. . From the second question I ve listed above I found out that I can edit the httpd.conf files one found in user library and one in the root library through the GUI . The hosts-file including all of the IP addressing is in private etc hosts .. . .. . The questions are dead even though I commented on the latest one asking for an update on how he solved his scripting problem in the end . In the end I can easily add the values into the hosts-file and the vhosts.conf files to make the website work . My only problem is getting it to show up in the list with the other virtual-hosts in the MAMP Pro GUI . Update : After further investigation and experimentation I realized the process in which the virtual-hosts are created when I first create a host through the GUI the settings3.plist file gets updated when I hit save to save the changes the hosts and httpd.conf files are updated accordingly . I understand that settings3.plist can be converted to an XML through plutil -convert xml1 -o - settings3.plist test.txt and then edit it and convert it back to binary through plutil -convert binary -o - test.txt settings3.plist . My problem with that is that even though I got the gist of how the CP UID works in the XML formats I cannot create a script to undestand the concept check for the position of the values through the list and then put in the values accordingly . I even asked a question about it here : How to add new data values to an NSKeyedArchiver Plist file through a command-line shell script http : stackoverflow.com q 33775025 1934402 Comment : Make sure you work with file Library Application Support appsolute MAMP PRO settings.plist i.e . check that you are working on the right plist file . On my system Mac OS X 10.11.1 El Capitan with MAMP PRO 2.2 the file is settings.plist and the commands from my answer in Automatic Virtual Hosts with MAMP Pro http : stackoverflow.com questions 12359199 automatic-virtual-hosts-with-mamp-pro work fine . What version of MAMP PRO are you on which MAC OS X version In any case the .plist file is an xml file and you could inspect it with an editor and even write a simple script to process it . Comment : I had the chance to look further into this by getting my hands on a MAMP PRO 3.4 used by friend . You are indeed looking at the right file which for version 3.x of MAMP PRO is settings3.plist and it is BINARY FORMAT PROPERTY LIST while for version 2.x of MAMP PRO was settings.plist and was an XML FORMAT PROPERTY LIST . I will try to put my findings in an answer to your question . Comment : I updated my question . @Symvan Also I greatly appreciate your help . Comment : I would avoid the round trip with plutil conversions as it misses the point of automation . My approach is to use PlistBuddy .. . Answer : The solution provided in Automatic Virtual Hosts with MAMP Pro http : stackoverflow.com questions 12359199 automatic-virtual-hosts-with-mamp-pro refers to MAMP PRO version 2.x where host configuration is saved in settings.plist which is an XML format property list file while in MAMP PRO version 3.x host settings are stored in settings3.plist which is a binary format property list file . Even in this format you should be able to do : .. . .. . and still get the contents of the file . Your problem arises from the fact that virtualHosts is no longer there as you will see by running the above command . The above command output is not very helpful for understanding the structure of your plist file so you could run : .. . .. . and then work out the structure of settings3.plist.xml in order to find out which keys to use in PlistBuddy commands . It is a good idea to check the manual pages for plist and PlistBuddy . Do note that key names have changed and the structure is not that clear even in the xml file . I hope this helped . I will investigate further into it and modify this answer if I have a full recipe for editing host details . Comment : I have already found out the structure of the XML file and what the values mean roughly through this post : cclgroupltd.com http : www.cclgroupltd.com geek-post-nskeyedarchiver-files-what-are-they-and-how-can-i-use-them I don t know how to put all of that logic into a shell script .", "Question : I am struggling to configure virtual-hosts on a remote-server to do the following : I have a Tomcat running on port 8888 and want to serve it to the public on port 80 . To do so I have a v-host config like so which works just fine : .. . .. . Furthermore I want to run some php-scripts that are located in var www auth . I have tried to add them underneath the upper v-host config but they are just not reachable : .. . .. . With best regards .. . Answer : Something like this should work : .. . .. . Or maybe you even want to make it even prettier for your users :", "Question : I have an existing server which is working well hosting a number of sites using nginx and ISPconfig . However I have created a new site and wish to use Laravel . I ve installed Laravel successfully via composer and have got as far as seeing the familiar welcome blade displayed when I visit mywebsite.com public .. . .. . What I want to do next is make some clean-urls . My experience with vhost files is somewhat limited and I m having a bit of trouble with the config . My routes file looks like this .. . .. . and I d hoped to see mywebsite.com test display the contents of test.blade.php .. . .. . I m aware I need to do some work with the vhost file before I can expect this to work but my experience with vhosts is limited and I m at a bit of a loss . My current file looks like this .. . .. . Now on another server I have this working with this simple directive .. . .. . But I am limited to what I can do with the vhost on the current server as ISPconfig writes most of it for me and it refuses to write the above config that worked elsewhere . Also I feel editing the file directly will be bad practice I d always be on edge that ISPconfig will rewrite the file for me so I m not really sure how best to proceed with this . My options would be to just go ahead and edit the vhost and hope for the best but if I do that how would I ensure ISPconfig could not overwrite the file without resorting to hacky methods Alternatively is there a config I can enter via ISPconfig that will allow rewrites to happen properly in a way that suits Laravel In this instance any directive entered would need to take precedence over the .php clause as that is written by ISPconfig before any directives entered via the control panel . Comment : I ve created the ispconfig tag this is now the first question under the tag and also removed the nginx tag from this question because as an nginx specialist I can t see how I can be of any help here . .. . Answer : I am not expert with this but from my past experience if I have two domains I would define server blocks for each in two different files and place them in etc nginx sites-available site1.com and etc nginx sites-available site2.com .. . .. . but it looks like you already have a website that you access using mywesite.com which is located at var www mywebsite.com web see the root value of your configuration file .. . .. . Now you install Laravel in test folder in var www mywebsite.com test location . To access this you need can try adding following at the end of your ispconfig file . Note how I used the relative-path to laravel s public folder from the root of the server block . For more detailed tutorial try Nginx Server Block Setup https : www.digitalocean.com community tutorials how-to-set-up-nginx-server-blocks-virtual-hosts-on-ubuntu-14-04-lts . Hope this helps .. . .. . K Comment : Thanks for the effort this would work with a typical NGINX setup . The problem I have is that ISPConfig rewrites much of the vhost files for me and I want to avoid having to take control away from ISPConfig Comment : Oh.. . Sorry I got the question wrong unfortunately I had never had a chance to work with ispconfig control panel . Comment : If you get the opportunity to avoid it do so" ] }
[ "yes-answer-long", "yes-answer-short" ]
http
UNK_RELATION
dolby@noise-reduction@80
dolby -- dolby laboratories inc .is an american company specializing in audio @placeholder and audio encoding and compression technology .
{ "confidence": [ 62.28562927246094, 59.755096435546875, 56.853515625, 52.923423767089844, 50.841552734375, 50.841552734375, 50.841552734375, 46.21186065673828, 46.21186065673828, 43.3775634765625, 43.09034729003906, 43.09034729003906, 42.61723327636719, 42.61723327636719, 40.936492919921875, 40.71580505371094, 38.087425231933594, 37.775291442871094, 37.775291442871094, 37.775291442871094, 36.17110061645508, 34.81191635131836, 33.15859603881836, 33.13117599487305, 33.13117599487305, 33.13117599487305, 31.32915496826172, 31.32915496826172, 31.32915496826172, 31.32915496826172, 29.252029418945312, 29.16022300720215, 29.16022300720215, 28.305606842041016, 26.208566665649414, 25.149932861328125, 25.149932861328125, 25.149932861328125, 25.046695709228516, 24.39482879638672, 23.540210723876953, 23.540210723876953, 22.55733871459961, 22.55733871459961, 20.961772918701172, 20.082252502441406, 18.56744384765625, 18.56744384765625, 15.079331398010254, 15.079331398010254, 15.079331398010254, 15.079331398010254, 14.767194747924805, 14.767194747924805, 14.767194747924805, 14.767194747924805, 14.767194747924805, 14.767194747924805, 14.767194747924805, 14.767194747924805, 14.767194747924805, 14.767194747924805, 14.767194747924805, 14.767194747924805, 14.767194747924805, 14.767194747924805, 13.086454391479492, 13.086454391479492, 13.086454391479492, 13.086454391479492, 13.086454391479492, 13.086454391479492, 13.086454391479492, 13.086454391479492, 13.086454391479492, 13.086454391479492, 13.086454391479492, 13.086454391479492, 13.086454391479492, 13.086454391479492, 13.086454391479492, 13.086454391479492, 13.086454391479492, 13.086454391479492, 13.086454391479492, 13.086454391479492, 13.086454391479492, 13.086454391479492, 13.086454391479492, 13.086454391479492, 13.086454391479492, 13.086454391479492, 13.086454391479492, 13.086454391479492, 13.086454391479492, 13.086454391479492, 13.086454391479492, 13.086454391479492, 13.086454391479492, 8.321059226989746 ], "content": [ "If a null is returned the Dolby Audio Processing isn t available .", "Dolby Digital encoding", "I get the following errors when using the Dolby Audio API .", "Before you say it : i know that audio decoding of Dolby Digital audio is not suitable for the market for free due to license limitations .", "Support for Dolby Digital decoding", "Dolby Atmos virtualizer effect.. .", "Only .ogg will not be affected by Dolby .", "What do you mean by turn on the dolby", "Currently in Dolby API v1.1.1.0 this is a known issue .", "I am using LENEVO G500 Laptop and my sound card has support for Dolby Advanced Audio v2 that works nicely in Windows OS i.e .", "First we use Dolby or any other API to channelize audio to corresponding device .", "I ve tried Dolby Audio sample app https : github.com DolbyDev Universal Windows App for Windows 10 .", "When I am developing an Android application how to detect that the dolby is on or off", "I m trying to trying implement Dolby in my Amazon build .", "Because the initialize is happening before the Dolby Service is binded it ll return -1 .", "There is an Android API from Dolby Developer which can be found at their website http : developer.dolby.com .. . .. . You can make the following call DolbyAudioProcessing.getDolbyAudioProcessing which will inform you if Dolby is available or not .", "I can only use Gstreamer 0.10 and I have a Dolby Digital license to get the beepdec.ddplus plugin .", "I want to know whether the cellphone turn on the dolby by program code and does Android provide this application interface", "I m using corona SDK but I didnt find documentation for that is possible add Dolby in my Corona Project", "Please check the release note by Dolby : developer.dolby.com tools-tech.aspx http : developer.dolby.com tools-tech.aspx v1.1.1.0 .", "There is a way to programmatically detect if Dolby system is active or not on Android application", "Currently we have converted all of our mp3 file to ogg file in order to skip processing by Dolby on Kindle Fire devices .", "if you do a adb shell getprop grep dolby you ll see there is a system property dolby.ds.state that toggles between On and Off when it s active playing audio .. . .. . To query the active status from your application this lets you query a System property note that you ll probably have to wrap try-catch blocks round it to keep Java happy .. . .. . It looks like different sorts of audio trigger the Dolby status - if you watch logcat with something like iHeartRadio playing you ll see the the Dolby setting gets bypassed for orbis so you might simply be able to change the codec you are using when you don t want it turned on .", "However I have failed to enable Dolby sound effect in my Linux OS have tried it with Linux Mint 17 Fedora 20 .", "It generally says .. . .. . .. . There isn t going to be an easy fix for this unless Dolby releases a Linux driver or publishes more information on what exactly their software is doing which is unlikely .", "Please also notice that the exception is not thrown when I call one of the dolby APIs since I m catching all the Runtime exceptions every time .", "I couldn t find documentation for Windows 10 Dolby API http : developer.dolby.com tools-tech.aspx .", "Edit : Update with new official Dolby API .. . .. . See http : developer.dolby.com for a more complete and less hacky", "Dolby now has an official API available which I am sure will meet your needs .", "Make sure to check out http : developer.dolby.com .. . .. . As an app developer you can now access Dolby technologies .", "initialize is returning -1 .. . .. . Here is the error-log I am getting : .. . .. . D dalvikvm 3346 : DexOpt : unable to opt direct call 0x01b3 at 0x0b in Lcom dolby dap DsClientFactory .createDsClient I DSPluginJNI 3346 : callMethodWithBoolReturn java rtn 00000001 I DSPluginJNI 3346 : callMethodWithIntReturn java rtn ffffffff I DsClientFactory 3346 : DsClient is : android.media.dolby.DolbySurroundClient I DsClient07Wrapper 3346 : onClientConnected v DS version 0.7.0.0 I DSJavaPlugin 3346 : Dolby client connected", "Which libraries should I use for the audio and video", "It s important to get the channels of the 5.1 audio separated .", "Haswell-ThinkPad-problems linux-low-audio-quality https : github.com leoluk thinkpad-stuff wiki Haswell-ThinkPad-problems linux-low-audio-quality", "I have integrated Dolby audio plugin api v1.1.1.0 into my Android app and am seeing this stack-trace in a handful of cases : .. . .. . Following the examples on the Dolby dev site this is the call that tries to initialize the DolbyAudioProcessing instance : .. . .. . According to Crashlytics all instances were on a Samsung GT-S5360B or GT-S5360L running Android 2.3.6 .", "Hence each audio device would be used to render audio from its corresponding video file .", "So for this approach can I render audio in form of a channel to a particular audio device", "That worked for single audio file however I want to render audio of multiple videos that are being played .", "I have a problem with my android app when I run on a kindle-fire 7 with Dolby active there is a flaw in the sound but when this option is disabled the problem disappears .", "And I don t want to merge audio in anyway .", "I have 3 audio devices attached to machine which will be used distinctively to render audio from video file s that s playing .", "I ve tried this approach with XAudio2 http : www.newventuresoftware.com blog universal-audio-component-playing-audio-xaudio2 by calling createMasteringVoice method with device ID I want .", "Audio device 1 would play video 1 and so on .", "We choose the device we want to play audio on by providing device ID .", "@Jarrod I thought company name tags were bad http : meta.stackexchange.com q 190914 135887", "Second we use 3 sound cards and attach an audio device to each one .", "I m using MediaPlayer to play long audio files i cannot use AudioPool because these are background sounds i m already using SoundPool to play effects .", "Asking the user to turn it off is probably a bad experience for them can you use a different codec for audio you don t want processed this way", "The setup is the following : .. . .. . rootfs built with yocto daisy and MACHINE is imx6dlsabresd.conf linux-kernel is 3.10.53 .", "I m using the following Gstreamer pipeline to watch HD TV from an external TV tuners in USB : .. . .. . And the command output : .. . .. . I try lots of different pipeline but it still doesn t work .", "Could you help me to find an issue", "Best Regards", "unfortunately there is no Corona Solution just yet", "Make sure to reach out to Corona Lab and let them know you want this .", "Thanks", "Yes is true .", "I sent an email to chartboost support center and they are developing a solution for corona but not is done yet .", "I m purposely using a loop to play an .mp3 file quickly and I m getting the following error .", "01-03 20 : 42 : 04.109 : E AndroidRuntime 2913 : FATAL EXCEPTION : DsClientHandlerThread 01-03 20 : 42 : 04.109 : E AndroidRuntime 2913 : java.lang.RuntimeException : java.lang.RuntimeException : Internal DSClient.setDsOn true Failed", "01-03 20 : 42 : 04.109 : E AndroidRuntime 2913 : at com.dolby.dap.DsClientManager.setDolbySurroundEnabled DsClientManager.java : 525 .. . .. . If I load the .mp3 via soundpool or mediaplayer class the error will be seen .", "What s interesting is that .ogg or .wav is fine .", "Looks isolated to .mp3 file-format", "Could you include some of the code that you are using", "I load an mp3 file and I loop it on purpose so I play it individually for example for int x 1 x 29 x++ silentkeychannel x mSoundPool.play silentkeybufferid x 0 0 1 0 1 This is done because some Android devices after loading a sound there could be delays based on if the end user tries to play a different sound .", ".wav is no good too .", "Please check out the API and read the release note : .. . .. . The issue might be rectified in future release .", "But I only want to decode MKV video on my iPhone for study purposes .", "Ffmpeg https : ffmpeg.org should do it .", "Ffmpeg should build on iOS .", "Thank you", "I will check it", "Windows 7 8 and 8.1 .", "Does anyone have an idea which linux version has support for this feature or how I can enable in a linux OS .", "I would appreciate if you could direct me to the right direction .", "Thanks .", "After a bit of research I found this explanation that seems to have satisfied my query .", "I can t get the API to connect to the device via API .", "Make sure the initialize is called on the last line before the app game starts", "Very minor thing given how infrequent it is but it makes me curious .", "Has anyone else seen this before", "So this turned out to be a because the AppActivityLifecycleCallbacks is an ICS API Level interface .", "I should have been doing SDK LEVEL check before calling DolbyAudioProcessing.getDolbyAudioProcessing .", "mmcmahon", "I have an app that uses com.dolby.dap.DsClientManager .", "When running on some Lenovo Acer and ZTE devices I randomly get a NullPointerException .. . .. . Has anyone else seen this issue", "Is there a way to fix it", "The exception is thrown asynchronously .", "If you don t post the stacktrace and code causing this I highly doubt anyone can answer this .", "You re assuming it s an Android bug when it could be a bug in your code .", "The reason why I m quite sure it is not in my code is that it is very random it is only on some devices and it is not when I call one of the APIs .", "I added all the stacktrace but as you can see it does not tell you much more then before .", "Generally you should assume bug comes from your code .", "Randomness also is usual when dealing with threads .", "Still waiting for the code", "it s just too big to be posted here and I m not expecting anyone to debug my code .", "I just need to know whether someone else is seeing the same issue .", "As you can see the crash is asynchronous so I would need to post the entire code", "sscce.org http : sscce.org - if nobody reported such an issue then most likely it s a problem in your code .", "As I said it s common when multi-threading the wrong way .", "I m working on a WinRT project in which I m playing multiple video files at the same time ." ] }
{ "confidence": [ 79.09501647949219, 65.08888244628906, 62.4988899230957, 60.95420837402344, 57.632469177246094, 57.21604919433594, 56.34857940673828, 52.413177490234375, 51.626522064208984, 45.74570083618164, 41.994808197021484, 32.316558837890625 ], "content": [ "Question : When I am developing an Android application how to detect that the dolby is on or off I want to know whether the cellphone turn on the dolby by program code and does Android provide this application interface Comment : What do you mean by turn on the dolby Support for Dolby Digital decoding Dolby Digital encoding Dolby Atmos virtualizer effect.. . .. . Answer : There is an Android API from Dolby Developer which can be found at their website http : developer.dolby.com .. . .. . You can make the following call DolbyAudioProcessing.getDolbyAudioProcessing which will inform you if Dolby is available or not . If a null is returned the Dolby Audio Processing isn t available .", "Question : I am using LENEVO G500 Laptop and my sound card has support for Dolby Advanced Audio v2 that works nicely in Windows OS i.e . Windows 7 8 and 8.1 . However I have failed to enable Dolby sound effect in my Linux OS have tried it with Linux Mint 17 Fedora 20 . Does anyone have an idea which linux version has support for this feature or how I can enable in a linux OS . I would appreciate if you could direct me to the right direction . Thanks . .. . Answer : After a bit of research I found this explanation that seems to have satisfied my query . It generally says .. . .. . .. . There isn t going to be an easy fix for this unless Dolby releases a Linux driver or publishes more information on what exactly their software is doing which is unlikely . Haswell-ThinkPad-problems linux-low-audio-quality https : github.com leoluk thinkpad-stuff wiki Haswell-ThinkPad-problems linux-low-audio-quality", "Question : Before you say it : i know that audio decoding of Dolby Digital audio is not suitable for the market for free due to license limitations . But I only want to decode MKV video on my iPhone for study purposes . Which libraries should I use for the audio and video It s important to get the channels of the 5.1 audio separated . .. . Answer : Ffmpeg https : ffmpeg.org should do it . Ffmpeg should build on iOS . Comment : Thank you I will check it", "Question : I get the following errors when using the Dolby Audio API . I m purposely using a loop to play an .mp3 file quickly and I m getting the following error . 01-03 20 : 42 : 04.109 : E AndroidRuntime 2913 : FATAL EXCEPTION : DsClientHandlerThread 01-03 20 : 42 : 04.109 : E AndroidRuntime 2913 : java.lang.RuntimeException : java.lang.RuntimeException : Internal DSClient.setDsOn true Failed 01-03 20 : 42 : 04.109 : E AndroidRuntime 2913 : at com.dolby.dap.DsClientManager.setDolbySurroundEnabled DsClientManager.java : 525 .. . .. . If I load the .mp3 via soundpool or mediaplayer class the error will be seen . What s interesting is that .ogg or .wav is fine . Looks isolated to .mp3 file-format Comment : Could you include some of the code that you are using Comment : I load an mp3 file and I loop it on purpose so I play it individually for example for int x 1 x 29 x++ silentkeychannel x mSoundPool.play silentkeybufferid x 0 0 1 0 1 This is done because some Android devices after loading a sound there could be delays based on if the end user tries to play a different sound . Comment : .wav is no good too . Only .ogg will not be affected by Dolby . Please check the release note by Dolby : developer.dolby.com tools-tech.aspx http : developer.dolby.com tools-tech.aspx v1.1.1.0 . Currently we have converted all of our mp3 file to ogg file in order to skip processing by Dolby on Kindle Fire devices . .. . Answer : Currently in Dolby API v1.1.1.0 this is a known issue . Please check out the API and read the release note : .. . .. . The issue might be rectified in future release .", "Question : I m working on a WinRT project in which I m playing multiple video files at the same time . I have 3 audio devices attached to machine which will be used distinctively to render audio from video file s that s playing . Maximum number of videos that can be played simultaneously is 3 . Hence each audio device would be used to render audio from its corresponding video file . i.e . Audio device 1 would play video 1 and so on . That s the requirement I have . So far I came across two approaches . First we use Dolby or any other API to channelize audio to corresponding device . i.e . left channel is rendered to device 1 middle center to device 2 and right to device 3 . I ve tried Dolby Audio sample app https : github.com DolbyDev Universal Windows App for Windows 10 . They ve done channeling in embedded video not in code . I couldn t find documentation for Windows 10 Dolby API http : developer.dolby.com tools-tech.aspx . So for this approach can I render audio in form of a channel to a particular audio device And I don t want to merge audio in anyway . Second we use 3 sound cards and attach an audio device to each one . We choose the device we want to play audio on by providing device ID . I ve tried this approach with XAudio2 http : www.newventuresoftware.com blog universal-audio-component-playing-audio-xaudio2 by calling createMasteringVoice method with device ID I want . That worked for single audio file however I want to render audio of multiple videos that are being played . Both approaches didn t solve the core requirement yet . So considering the scenario what is best approach to follow to fulfill the requirement .. . Answer : I would say you can go with XAudio2 as you mentioned in second approach . Since you can pass deviceId to createMasteringVoice you can create multiple instance of UniversalAudioPlayer and pass different IDs to each one . This way multiple sounds can be played concurrently . Take a look at function definition and community additions here https : msdn.microsoft.com en-us library windows desktop hh405048 v vs.85 .aspx . Comment : Thank you . Referred link is quite useful .", "Question : I m trying to trying implement Dolby in my Amazon build . I m using corona SDK but I didnt find documentation for that is possible add Dolby in my Corona Project Comment : @Jarrod I thought company name tags were bad http : meta.stackexchange.com q 190914 135887 .. . Answer : unfortunately there is no Corona Solution just yet Make sure to reach out to Corona Lab and let them know you want this . Thanks Comment : Yes is true . I sent an email to chartboost support center and they are developing a solution for corona but not is done yet .", "Question : I have a problem with my android app when I run on a kindle-fire 7 with Dolby active there is a flaw in the sound but when this option is disabled the problem disappears . I m using MediaPlayer to play long audio files i cannot use AudioPool because these are background sounds i m already using SoundPool to play effects . There is a way to programmatically detect if Dolby system is active or not on Android application There is a way to make MediaPlayer accept multichannel Sorry for my bad english : p .. . .. . .. . .. . I found a way to set the property dolby.ds.state programmatically but this caused a BIG problem so DON T DO THAT This way is : .. . .. . When I did that the property was applied but only when rebooted the device after it done I changed the menu option usually by the device still kept getting the value set programmatically . If you ve done the same stupid thing I ve found a way to resolve it run the following code and reset the device : Comment : If you have not done so already you might want to ask this on a Kindle Fire development support forum : forums.developer.amazon.com forums forum.jspa forumID 12 https : forums.developer.amazon.com forums forum.jspa forumID 12 Comment : i ve already did this but thanks forums.developer.amazon.com forums https : forums.developer.amazon.com forums thread.jspa messageID 3339 3339 Comment : FYI use the kindle-fire http : stackoverflow.com questions tagged kindle-fire tag for future Kindle Fire-specific questions as fine folk like @Offbeatmammal who has a strangely non-mammalian avatar.. . from Amazon monitor that tag and will be more likely to see your question . Comment : Thanks i tried to use this tag but i dont have enough points : .. . Answer : if you do a adb shell getprop grep dolby you ll see there is a system property dolby.ds.state that toggles between On and Off when it s active playing audio .. . .. . To query the active status from your application this lets you query a System property note that you ll probably have to wrap try-catch blocks round it to keep Java happy .. . .. . It looks like different sorts of audio trigger the Dolby status - if you watch logcat with something like iHeartRadio playing you ll see the the Dolby setting gets bypassed for orbis so you might simply be able to change the codec you are using when you don t want it turned on . Edit : Update with new official Dolby API .. . .. . See http : developer.dolby.com for a more complete and less hacky solution Comment : THANK YOU With this solution I could find out if the option is enabled or not but I did not understand how I can change it there is a way to do this Comment : sorry the question only asked about detecting it . I ve not found a way to control it - I ve not seen anything in the properties that corresponds to the users chosen setting that could be used to control this the dolby.ds.state just reflects what the current state is if it s been triggered by playback . Asking the user to turn it off is probably a bad experience for them can you use a different codec for audio you don t want processed this way Comment : Sorry I really didn t ask how to change the option but it would help me . p I m looking for a way to do this but I will probably warn the user and ask it to disable the option thank you again you saved my life : Comment : This way is too hacky : The answer below seems to be the right way to go .", "Question : I have a problem with my android app when I run on a kindle-fire 7 with Dolby active there is a flaw in the sound but when this option is disabled the problem disappears . I m using MediaPlayer to play long audio files i cannot use AudioPool because these are background sounds i m already using SoundPool to play effects . There is a way to programmatically detect if Dolby system is active or not on Android application There is a way to make MediaPlayer accept multichannel Sorry for my bad english : p .. . .. . .. . .. . I found a way to set the property dolby.ds.state programmatically but this caused a BIG problem so DON T DO THAT This way is : .. . .. . When I did that the property was applied but only when rebooted the device after it done I changed the menu option usually by the device still kept getting the value set programmatically . If you ve done the same stupid thing I ve found a way to resolve it run the following code and reset the device : Comment : If you have not done so already you might want to ask this on a Kindle Fire development support forum : forums.developer.amazon.com forums forum.jspa forumID 12 https : forums.developer.amazon.com forums forum.jspa forumID 12 Comment : i ve already did this but thanks forums.developer.amazon.com forums https : forums.developer.amazon.com forums thread.jspa messageID 3339 3339 Comment : FYI use the kindle-fire http : stackoverflow.com questions tagged kindle-fire tag for future Kindle Fire-specific questions as fine folk like @Offbeatmammal who has a strangely non-mammalian avatar.. . from Amazon monitor that tag and will be more likely to see your question . Comment : Thanks i tried to use this tag but i dont have enough points : .. . Answer : Dolby now has an official API available which I am sure will meet your needs . Make sure to check out http : developer.dolby.com .. . .. . As an app developer you can now access Dolby technologies .", "Question : I can t get the API to connect to the device via API . initialize is returning -1 .. . .. . Here is the error-log I am getting : .. . .. . D dalvikvm 3346 : DexOpt : unable to opt direct call 0x01b3 at 0x0b in Lcom dolby dap DsClientFactory .createDsClient I DSPluginJNI 3346 : callMethodWithBoolReturn java rtn 00000001 I DSPluginJNI 3346 : callMethodWithIntReturn java rtn ffffffff I DsClientFactory 3346 : DsClient is : android.media.dolby.DolbySurroundClient I DsClient07Wrapper 3346 : onClientConnected v DS version 0.7.0.0 I DSJavaPlugin 3346 : Dolby client connected .. . Answer : Because the initialize is happening before the Dolby Service is binded it ll return -1 . Make sure the initialize is called on the last line before the app game starts", "Question : null .. . Answer : The setup is the following : .. . .. . rootfs built with yocto daisy and MACHINE is imx6dlsabresd.conf linux-kernel is 3.10.53 . I can only use Gstreamer 0.10 and I have a Dolby Digital license to get the beepdec.ddplus plugin . I m using the following Gstreamer pipeline to watch HD TV from an external TV tuners in USB : .. . .. . And the command output : .. . .. . I try lots of different pipeline but it still doesn t work . Could you help me to find an issue Best Regards", "Question : I have integrated Dolby audio plugin api v1.1.1.0 into my Android app and am seeing this stack-trace in a handful of cases : .. . .. . Following the examples on the Dolby dev site this is the call that tries to initialize the DolbyAudioProcessing instance : .. . .. . According to Crashlytics all instances were on a Samsung GT-S5360B or GT-S5360L running Android 2.3.6 . Very minor thing given how infrequent it is but it makes me curious . Has anyone else seen this before .. . Answer : So this turned out to be a because the AppActivityLifecycleCallbacks is an ICS API Level interface . I should have been doing SDK LEVEL check before calling DolbyAudioProcessing.getDolbyAudioProcessing . mmcmahon", "Question : null .. . Answer : I have an app that uses com.dolby.dap.DsClientManager . When running on some Lenovo Acer and ZTE devices I randomly get a NullPointerException .. . .. . Has anyone else seen this issue Is there a way to fix it Please also notice that the exception is not thrown when I call one of the dolby APIs since I m catching all the Runtime exceptions every time . The exception is thrown asynchronously . Comment : If you don t post the stacktrace and code causing this I highly doubt anyone can answer this . You re assuming it s an Android bug when it could be a bug in your code . Comment : The reason why I m quite sure it is not in my code is that it is very random it is only on some devices and it is not when I call one of the APIs . I added all the stacktrace but as you can see it does not tell you much more then before . Comment : Generally you should assume bug comes from your code . Randomness also is usual when dealing with threads . Still waiting for the code Comment : it s just too big to be posted here and I m not expecting anyone to debug my code . I just need to know whether someone else is seeing the same issue . As you can see the crash is asynchronous so I would need to post the entire code Comment : sscce.org http : sscce.org - if nobody reported such an issue then most likely it s a problem in your code . As I said it s common when multi-threading the wrong way ." ] }
[ "yes-answer-long", "yes-answer-short" ]
noise-reduction
UNK_RELATION
slice@program-slicing@294
slice -- a slice is a representation of a part of a sequence usually defined by a reference to the underlying sequence an index giving the starting position a length or end position and optionally a stride or step value.please use tag : object-slicing for the slicing problem in c++ and tag : @placeholder for the analysis technique .
{ "confidence": [ 60.212032318115234, 55.00034713745117, 53.22456741333008, 49.72239685058594, 49.380828857421875, 49.156166076660156, 48.462345123291016, 48.15022277832031, 47.54998016357422, 46.60901641845703, 46.34759521484375, 46.013465881347656, 46.00208282470703, 45.728912353515625, 45.714168548583984, 45.62560272216797, 45.33701705932617, 44.349552154541016, 44.17353820800781, 44.01476287841797, 43.50416946411133, 43.010498046875, 42.78136444091797, 42.717857360839844, 42.524356842041016, 42.52433776855469, 42.41281509399414, 42.385894775390625, 41.71567153930664, 41.465511322021484, 41.284080505371094, 41.105934143066406, 41.08015441894531, 41.05024719238281, 40.33638000488281, 40.08029556274414, 40.04433822631836, 40.02737045288086, 39.96115493774414, 39.96115493774414, 39.91340255737305, 39.51570129394531, 39.50402069091797, 39.04106521606445, 39.04093933105469, 39.01526641845703, 38.84587097167969, 38.72224426269531, 38.72141647338867, 38.700218200683594, 38.629539489746094, 38.61910629272461, 38.56656265258789, 38.48484802246094, 38.40223693847656, 38.39360809326172, 38.36322784423828, 38.186241149902344, 38.186241149902344, 37.99809265136719, 37.91608428955078, 37.6942024230957, 37.68532943725586, 37.65361785888672, 37.448909759521484, 37.286041259765625, 37.28403854370117, 37.27748107910156, 37.256080627441406, 37.25204086303711, 37.186073303222656, 37.108463287353516, 37.092159271240234, 37.04887390136719, 37.02911376953125, 36.98332214355469, 36.88710021972656, 36.64149475097656, 36.21845626831055, 36.04641342163086, 35.94147872924805, 35.87349319458008, 35.860294342041016, 35.84843826293945, 35.810340881347656, 35.72431182861328, 35.66608428955078, 35.65532302856445, 35.56609344482422, 35.539825439453125, 35.51823043823242, 35.433135986328125 ], "content": [ "This function takes a Python object optional-parameters for slicing and returns start stop step slice length for the requested slice .", "capacity of the underlying array minus the position of the start of the slice in the array .. . .. . Go 1.2 adds new syntax to allow a slicing operation to specify the capacity as well as the length .", "The slice you mention is because slicing acts on the underlying array : Go lets you slice beyond the length of a slice you just can t go beyond its capacity the length of the underlying array .", ".. . .. . For higher performance on immutable sequence types like strings you can avoid slicing the sequence entirely in the case that index is 0 by checking the value of index before the slice operation .", "I know that I can use slice or slice to emulate slicing .", "Related possible duplicate of Slicing a slice pointer passed as argument http : stackoverflow.com questions 38013922 slicing-a-slice-pointer-passed-as-argument", "The second is the absolute end index not the slice length .", "A slicing operation creates a new slice by describing a contiguous section of an already-created array or slice : .. . .. . The capacity of the slice is the maximum number of elements that the slice may hold even after reslicing it reflects the size of the underlying array .", "My understanding of list slicing is that the left slice index is always inclusive whilst the right slice index is only inclusive when it is left blank .", "Assignment to a regular slice can be used to change the length of the sequence .", "slice Doesn t .. . substr Doesn t .. . substring Doesn t .. . Note 3 : slice substring .. . .. . Using Negative Numbers as an Argument : .. . slice selects characters starting from the end of the string .. . substr selects characters starting from the end of the string .. . substring Doesn t Perform .. . Note 3 : slice substr substr .. . .. . if the First Argument is Greater than the Second : .. . slice Doesn t Perform .. . substr since the Second Argument is NOT a position but length value it will perform as usual with no problems .. . substring will swap the two arguments and perform as usual .. . .. . .. . the First Argument : .. . slice Required indicates : Starting Index .. . substr Required indicates : Starting Index .. . substring Required indicates : Starting Index .. . Note 4 : slice substr substring .. . .. . the Second Argument : .. . slice Optional The position up to but not including where to end the extraction .. . substr Optional The number of characters to extract .. . substring Optional The position up to but not including where to end the extraction .. . Note 5 : slice substring .. . .. . What if the Second Argument is Omitted", "The slicing parameters are aptly named .. . .. . so the slice starts at the location defined by start stops before the location stop is reached and moves from one position to the next by step items .", ".. . stop : the ending index of the slice it does not include the element at this index defaults to length of the sequence being sliced that is up to and including the end .", "The slice is of the form start : stop : stride .", "Slicing past length .. . .. . Slicing past length is actually supported .", "How about just slicing by stride", "This question already has an answer here : .. . .. . Explain Python s slice notation questions 509211 explain-pythons-slice-notation 21 answers .. . .. . Suppose I was slicing a list and a string : .. . .. . So when I slice the list the first slice index is inclusive but when I slice the string the slice index is noninclusive .", "Is it because I ve calculated the length of the slice wrong or is there something subtle about slicing that I haven t caught", "It is a slice http : docs.python.org tutorial introduction.html lists from the beginning of the sequence to the end usually producing a shallow copy .", "end index Index after end of slice .", "@Pascal Cuoq .. . .. . I tried frama-c test.c -slice-calls event -then-on Slicing export -print why it outputs as follows :", "Use getitem with a slice index .", "Python slicing notation : .. . .. . For start and end negative values are interpreted as being relative to the end of the sequence .", "For more see the tag failure-slice questions tagged failure-slice .", "a string is essentially a sequence of characters and so the slicing operation works on it .", "The index or slice is passed to the methods as a single argument and the way Python does this is by converting the slice notation 1 : 10 : 2 in this case to a slice object : slice 1 10 2 .", "itertools.islice : .. . .. . islice behaves like slice except that slice takes sequence and returns sequence whereas islice takes iterable and returns iterable .", "in Summary : .. . if you know the index the position on which you ll stop but NOT include Use slice .. . if you know the length of characters to be extracted use substr .", "Note 2 : .. . .. . If the parameter type is a slice and not a pointer to a slice and you pass a slice the underlying array is not copied only the slice header .", "Slice s from start to end with step step .", "We can grow s to its capacity by slicing it again : .. . .. . A slice cannot be grown beyond its capacity .", "Similarly del on a slice is defined as deleting the elements of that slice .", "An empty string assigned to a slice will remove the sliced elements but a non-empty string assigned to a slice will be treated as a sequence of characters .", "For more about failure-slices and how to use them see tag failure-slice questions tagged failure-slice .", "For the slice-of-slice-of-slice case : Make one slice and do the index calculation yourself see e.g .", "This example is from the documentation s tutorial https : docs.python.org 2 tutorial introduction.html but I ve modified it slightly to indicate which item in a sequence each index references : .. . .. . How Slicing Works .. . .. . To use slice notation with a sequence that supports it you must include at least one colon in the square brackets that follow the sequence which actually implement the getitem method of the sequence according to the Python data model https : docs.python.org 2 reference datamodel.html object . getitem .", "For slices the upper index bound is the slice capacity cap a rather than the length .", "Here is a particular debugging technique called slicing .", "@TomWijsman look at this http : stackoverflow.com questions 509211 good-primer-for-python-slice-notation question for understanding python slicing syntax", "The answers above don t discuss slice assignment : .. . .. . This may also clarify the difference between slicing and indexing .", "The maximal capacity of the slice is the capacity of the underlying array minus the position of the start of the slice in the array : .. . .. . Maybe this program will make it more clear that c and d are just windows over b : .. . .. . Output :", "That object must support setitem with a slice index .. . 4 .", "You can slice beyond the length of a slice but you can t slice beyond the capacity : .. . .. . Earlier we sliced s to a length shorter than its capacity .", "Like view slice x at position 100 y 0 z 0", "Python sequence slice addresses can be written as a start : end : step and any of start stop or end can be dropped .", "Presently I m trying to use Frama-C s slicing capabilities to generate the backwards slice of a particular statement in a given file and from that particular slice I would like to acquire the original SIDs of the statements belonging to it .", "A @ returns the contents of the array : 1 : 2 takes a slice of length 2 starting at index 1 .", "The slice http : docs.python.org library functions.html slice function returns slice objects http : docs.python.org reference datamodel.html .", "The nd4j slice method only takes dimension and index arguments not length .", "Edit2 : What I mean my list : : -2 is like .. . .. . Edit3 : Slicing by stride in Python is to check the item in a list every step stride .If the step is negative Python would check the item from the end of the list to the beginning of the list .", "A slice contains a pointer to an underlying array so a function modifying a slice passed as a parameter does modify the underlying array .", "-------------------------- .. . .. . General comment -- I find it weird that the second index is the position after the last character of the slice or substring .", "In other words the capacity of the slice is the length of the slices backing array and the length of a slice is independent from the capacity .", "3 is index 2 of the list and slicing starts from there i is index 5 of the string and slicing starts from there .", "See failure-slice questions tagged failure-slice for more examples to use this technique .", "slice selects all characters from the start-position to the end of the string .. . substr selects all characters from the start-position to the end of the string .. . substring selects all characters from the start-position to the end of the string .. . Note 6 : slice substr substring .. . .. . so you can say that there s a difference between slice and substr while substring is basically a copy of slice .", "Simply look at the start stop and step members of the slice object in order to get the components for the slice .", "When slicing in Python the third parameter is the step .", "There are three parts to slicing - start stop and step .", "def slice self start None end None step None : return self.obj slice start end step", "If you want to be more clear on your intent you can do : .. . .. . I am not an expert in slicing but typically if you try to slice into an array and the values are continuous you get back a view where the stride value is changed .", "Setup .. . .. . The index looks like : .. . .. . Then I slice it : .. . .. . This is the expected slice .", "In Frama-C the slicing plug-in relies on the result-of a preliminary static-analysis plug-in called the value analysis .", "@ValentijnSpruyt : Did you read other answers from the tag failure-slice http : stackoverflow.com questions tagged failure-slice", ".slice returns a function object .", "The type of the pointer is separate type from the underlying slice .", "How do I get the user-supplied integer into the slice stride command", "What you are looking at when you print the slice and see zero or one elements in the slice is its length that is the number of values the slice actually contains .", "There is good deal of discussion on slicing at SO .. . .. . http : stackoverflow.com questions 509211 good-primer-for-python-slice-notation .. . .. . Are you looking for something specific", ".. . returns .. . .. . a sequence containing the elements starting at index from and extending up to but not including index until of this sequence .", "But in practice it is probably easier and safer to pass the slicing object tuple slice etc to your function rather than deduce it from the results .", "The most simple way was of course slicing by index e.g .", "So we will simply implement slice method here like .. . .. . In your case we have implemented -1 as the end parameter so our code is like .. . .. . As a negative index end indicates an offset from the end of the sequence .", "I have the 4 bezier points for the curves .. . .. . I d like to slice the NURBS surface with a slicing-plane thats on-axis not as advanced as 3DSMAX", "You use a slice of structs not a slice of pointers .", "In getitem if key is a slice use isinstance key slice then you can access all the start stop and step attributes of the slice object and manipulate them optimize on them at will before applying it directly to the filter result .", "In general the built-in slice creates a slice object that can be used anywhere a slice is allowed .", "It s using extended slicing - a string is a sequence in Python and shares some methods with other sequences namely lists and tuples .", "You can use slice https : developer.mozilla.org en-US docs Web JavaScript Reference Global Objects String slice", "Ok so I m pretty sure the right way to do this is : if you are slicing columns use tocsc and slice using a list array of integers .", "And is there a way to tell a slice to stop at the end", "You re indexing by an identical slice object .", ": creates a slice usually used to get just a part of a list .", "jsperf.com slice-vs-substring-trim-end http : jsperf.com slice-vs-substring-trim-end", "A minimal change is to add a further goal that establishes the relation between the length of those two lists first before length 2 is used : .. . .. . See failure-slice questions tagged failure-slice for more on this technique .", "I think that creating an extended slice whose step is 1 effectively acts like a regular slice rather than an extended slice .", "The slice substring methods are all most the same except the that the slice accepts a negative index relative to the end of the string but not the substring it throws out-of-bound error", "It s a lightweight wrapper for buffers of various primitive-types and helps manage slicing position conversion byte ordering etc .", "Or docs.python.org reference http : docs.python.org reference expressions.html grammar-token-slicing", "Slice notation to get the last nine elements from a list or any other sequence that supports it like a string would look like this : .. . .. . When I see this I read the part in the brackets as 9th from the end to the end .", "Finally begin defaults to the beginning of the sequence end to the end and step to -1 .", "The problem is simple : you have a slice of driver s : .. . .. . Note that Drivers is a slice of some struct type not a slice of pointers" ] }
{ "confidence": [ 92.56039428710938, 91.14164733886719, 84.71334838867188, 78.60859680175781, 75.7981185913086, 75.26616668701172, 74.98774719238281, 73.88444519042969, 72.18280792236328, 72.06791687011719, 71.94493103027344, 71.55001068115234 ], "content": [ "Question : I need a good explanation references are a plus on Python s slice notation . To me this notation needs a bit of picking up . It looks extremely powerful but I haven t quite got my head around it . Comment : Do you mean python.org doc 2.5.2 ref slicings.html tok-slicing http : www.python.org doc 2.5.2 ref slicings.html tok-slicing Or docs.python.org reference http : docs.python.org reference expressions.html grammar-token-slicing Or docs.python.org 3.0 library functions.html slice http : docs.python.org 3.0 library functions.html slice Or something else Comment : well it s probably in there somewhere.. . this is a bit too concise . I guess what I am really looking for is some help coming to grips with it rather than the full definition of the grammar . Comment : gulp and now two other references.. . Comment : Different versions -- 2.5 2.6 3.0 -- three views of the same underlying thing . Comment : what s wrong with the tutorial docs.python.org tutorial introduction.html strings http : docs.python.org tutorial introduction.html strings yeah i know.. . seasoned programmers can t be asked to . .. . Answer : Explain Python s slice notation .. . .. . In short the colons : in subscript notation subscriptable subscriptarg make slice notation - which has the optional arguments start stop step : .. . .. . Python slicing is a computationally fast way to methodically access parts of your data . In my opinion to be even an intermediate Python programmer it s one aspect of the language that it is necessary to be familiar with . Important Definitions .. . .. . To begin with let s define a few terms : .. . .. . start : the beginning index of the slice it will include the element at this index unless it is the same as stop defaults to 0 i.e . the first index . If it s negative it means to start n items from the end . .. . stop : the ending index of the slice it does not include the element at this index defaults to length of the sequence being sliced that is up to and including the end . .. . step : the amount by which the index increases defaults to 1 . If it s negative you re slicing over the iterable in reverse . How Indexing Works .. . .. . You can make any of these positive or negative numbers . The meaning of the positive numbers is straightforward but for negative numbers just like indexes in Python you count backwards from the end for the start and stop and for the step you simply decrement your index . This example is from the documentation s tutorial https : docs.python.org 2 tutorial introduction.html but I ve modified it slightly to indicate which item in a sequence each index references : .. . .. . How Slicing Works .. . .. . To use slice notation with a sequence that supports it you must include at least one colon in the square brackets that follow the sequence which actually implement the getitem method of the sequence according to the Python data model https : docs.python.org 2 reference datamodel.html object . getitem . Slice notation works like this : .. . .. . And recall that there are defaults for start stop and step so to access the defaults simply leave out the argument n in the notation . Slice notation to get the every other elements from nine elements from a list or any other sequence that supports it like a string would look like this : .. . .. . When I see this I read the part in the brackets as 9th from the end to the end . Actually I abbreviate it mentally as -9 on .. . .. . Explanation : .. . .. . The full notation is .. . .. . and to substitute the defaults actually when step is negative stop s default is -len my list -1 so None for stop really just means it goes to whichever end step takes it to : .. . .. . But the colon : is what tells Python you re giving it a slice and not a regular index . That s why the idiomatic way of making a shallow copy of lists in Python 2 is .. . .. . And clearing them is with : .. . .. . Python 3 gets a list.copy and list.clear method . Give your slices a descriptive name You may find it useful to separate forming the slice from passing it to the list . getitem method that s what the square brackets do https : docs.python.org 2 reference datamodel.html object . getitem . Even if you re not new to it it keeps your code more readable so that others that may have to read your code can more readily understand what you re doing . However you can t just assign some integers separated by colons to a variable . You need to use the slice object : .. . .. . The second argument None is required so that the first argument is interpreted as the start argument otherwise it would be the stop argument https : docs.python.org 2 library functions.html slice . You can then pass the slice object to your sequence : .. . .. . Memory Considerations : .. . .. . Since slices of Python lists create new objects in memory another important function to be aware of is itertools.islice . Typically you ll want to iterate over a slice not just have it created statically in memory . islice is perfect for this . A caveat it doesn t support negative arguments to start stop or step so if that s an issue you may need to calculate indices or reverse the iterable in advance . The fact that list slices make a copy is a feature of lists themselves . If you re slicing advanced objects like a Pandas DataFrame it may return a view on the original and not a copy . Comment : Excellent information . This is how I used it : import itertools .. . for c in itertools.islice ABCDEFG 0 None 2 : .. . print c Output : A C E G", "Question : What s the use of built-in function slice and how can I use it The direct way of Pythonic slicing I know - l1 start : stop : step . I want to know if I have a slice object then how do I use it Comment : this worked for me . def slice self start None end None step None : return self.obj slice start end step .. . Answer : Square brackets following a sequence denote either indexing or slicing depending on what s inside the brackets : .. . .. . Both of these cases are handled by the getitem method of the sequence or setitem if on the left of an equals sign . The index or slice is passed to the methods as a single argument and the way Python does this is by converting the slice notation 1 : 10 : 2 in this case to a slice object : slice 1 10 2 . So if you are defining your own sequence-like class or overriding the getitem or setitem or delitem methods of another class you need to test the index argument to determine if it is an int or a slice and process accordingly : .. . .. . A slice object has three attributes : start stop and step and one method : indices which takes a single argument the length of the object and returns a 3-tuple : start stop step .", "Question : I need a good explanation references are a plus on Python s slice notation . To me this notation needs a bit of picking up . It looks extremely powerful but I haven t quite got my head around it . Comment : Do you mean python.org doc 2.5.2 ref slicings.html tok-slicing http : www.python.org doc 2.5.2 ref slicings.html tok-slicing Or docs.python.org reference http : docs.python.org reference expressions.html grammar-token-slicing Or docs.python.org 3.0 library functions.html slice http : docs.python.org 3.0 library functions.html slice Or something else Comment : well it s probably in there somewhere.. . this is a bit too concise . I guess what I am really looking for is some help coming to grips with it rather than the full definition of the grammar . Comment : gulp and now two other references.. . Comment : Different versions -- 2.5 2.6 3.0 -- three views of the same underlying thing . Comment : what s wrong with the tutorial docs.python.org tutorial introduction.html strings http : docs.python.org tutorial introduction.html strings yeah i know.. . seasoned programmers can t be asked to . .. . Answer : Python slicing notation : .. . .. . For start and end negative values are interpreted as being relative to the end of the sequence . Positive indices for end indicate the position after the last element to be included . Blank values are defaulted as follows : +0 : -0 : 1 . Using a negative step reverses the interpretation of start and end .. . .. . The notation extends to numpy matrices and multidimensional arrays . For example to slice entire columns you can use : .. . .. . Slices hold references not copies of the array elements . If you want to make a separate copy an array you can use deepcopy http : stackoverflow.com questions 6532881 how-to-make-a-copy-of-a-2d-array-in-python . Comment : -0 is the same as +0 and doesn t refer to the end of the sequence . Comment : Interesting : slice notation is a convenient notation for a tuple of slice objects http : stackoverflow.com a 30244830 86967 . Comment : I m quite sure that I previously had written a comment regarding musiphil s valid note above . Unfortunately someone deleted it . Now I have no record of what I wrote . How rude .", "Question : I need a good explanation references are a plus on Python s slice notation . To me this notation needs a bit of picking up . It looks extremely powerful but I haven t quite got my head around it . Comment : Do you mean python.org doc 2.5.2 ref slicings.html tok-slicing http : www.python.org doc 2.5.2 ref slicings.html tok-slicing Or docs.python.org reference http : docs.python.org reference expressions.html grammar-token-slicing Or docs.python.org 3.0 library functions.html slice http : docs.python.org 3.0 library functions.html slice Or something else Comment : well it s probably in there somewhere.. . this is a bit too concise . I guess what I am really looking for is some help coming to grips with it rather than the full definition of the grammar . Comment : gulp and now two other references.. . Comment : Different versions -- 2.5 2.6 3.0 -- three views of the same underlying thing . Comment : what s wrong with the tutorial docs.python.org tutorial introduction.html strings http : docs.python.org tutorial introduction.html strings yeah i know.. . seasoned programmers can t be asked to . .. . Answer : I find it easier to remember how it s works then I can figure out any specific start stop step combination . It s instructive to understand range first : .. . .. . Begin from start increment by step do not reach stop . Very simple . The thing to remember about negative step is that stop is always the excluded end whether it s higher or lower . If you want same slice in opposite order it s much cleaner to do the reversal separately : e.g . abcde 1 : -2 : : -1 slices off one char from left two from right then reverses . See also reversed http : www.python.org dev peps pep-0322 . Sequence slicing is same except it first normalizes negative indexes and can never go outside the sequence : .. . .. . Don t worry about the is None details - just remember that omitting start and or stop always does the right thing to give you the whole sequence . Normalizing negative indexes first allows start and or stop to be counted from the end independently : abcde 1 : -2 abcde 1 : 3 bc despite range 1 -2 . The normalization is sometimes thought of as modulo the length but note it adds the length just once : e.g . abcde -53 : 42 is just the whole string . Comment : Thanks for the good information for The normalization is sometimes thought of as modulo the length but note it adds the length just once : e.g . abcde -53 : 42 is just the whole string .", "Question : I need the last 9 numbers of a list and I m sure there is a way to do it with slicing but I can t seem to get it . I can get the first 9 like this : .. . .. . Any help would be great . Comment : duplicate : stackoverflow.com questions 509211 http : stackoverflow.com questions 509211 good-primer-for-python-slice-notation also : well documented in the tutorial Comment : I disagree : People who don t know what slicing means in Python s context will never find the question you linked even if it is in principle the same question . .. . Answer : Slicing .. . .. . Python slicing is an incredibly fast operation and it s a handy way to quickly access parts of your data . Slice notation to get the last nine elements from a list or any other sequence that supports it like a string would look like this : .. . .. . When I see this I read the part in the brackets as 9th from the end to the end . Actually I abbreviate it mentally as -9 on .. . .. . Explanation : .. . .. . The full notation is .. . .. . But the colon is what tells Python you re giving it a slice and not a regular index . That s why the idiomatic way of copying lists is .. . .. . And clearing them is with : .. . .. . Give your slices a descriptive name You may find it useful to separate forming the slice from passing it to the list . getitem method that s what the square brackets do https : docs.python.org 2 reference datamodel.html object . getitem . Even if you re not new to it it keeps your code more readable so that others that may have to read your code can more readily understand what you re doing . However you can t just assign some integers separated by colons to a variable . You need to use the slice object : .. . .. . The second argument None is required so that the first argument is interpreted as the start argument otherwise it would be the stop argument https : docs.python.org 2 library functions.html slice . You can then pass the slice object to your sequence : .. . .. . islice .. . .. . islice from the itertools module is another possibly performant way to get this . islice doesn t take negative arguments so ideally your iterable has a reversed special method - which list does have - so you must first pass your list or iterable with reversed to reversed . islice allows for lazy-evaluation of the data pipeline so to materialize the data pass it to a constructor like list :", "Question : I recently has pick up the Go and now I confused with the following code : .. . .. . And the result : .. . .. . Any help would thanks . Comment : Slices with their own capacity are coming go 1.2 . See my answer below http : stackoverflow.com a 18911267 6309 .. . Answer : Note that in go 1.2 Q4 2013 1.2rc1 is available now http : code.google.com p go downloads list you can associate to a slice a capacity of its own instead of a capacity deduced from the underlying array . See Three-index slices http : tip.golang.org doc go1.2 three index and the design document http : golang.org s go12slice . A slicing operation creates a new slice by describing a contiguous section of an already-created array or slice : .. . .. . The capacity of the slice is the maximum number of elements that the slice may hold even after reslicing it reflects the size of the underlying array . In this example the capacity of the slice variable is 8 . capacity of the underlying array minus the position of the start of the slice in the array .. . .. . Go 1.2 adds new syntax to allow a slicing operation to specify the capacity as well as the length . A second colon introduces the capacity value which must be less than or equal to the capacity of the source slice or array adjusted for the origin . .. . For instance .. . .. . sets the slice to have the same length as in the earlier example but its capacity is now only 4 elements 6-2 . It is impossible to use this new slice value to access the last two elements of the original array . The main argument is to give programmers more control over append http : golang.org ref spec Appending and copying slices . That slice has : .. . .. . indices starting at 0 .. . length equals to j - i .. . capacity equals to k - i .. . .. . The evaluation panics if i j k cap a is not true .", "Question : I need a good explanation references are a plus on Python s slice notation . To me this notation needs a bit of picking up . It looks extremely powerful but I haven t quite got my head around it . Comment : Do you mean python.org doc 2.5.2 ref slicings.html tok-slicing http : www.python.org doc 2.5.2 ref slicings.html tok-slicing Or docs.python.org reference http : docs.python.org reference expressions.html grammar-token-slicing Or docs.python.org 3.0 library functions.html slice http : docs.python.org 3.0 library functions.html slice Or something else Comment : well it s probably in there somewhere.. . this is a bit too concise . I guess what I am really looking for is some help coming to grips with it rather than the full definition of the grammar . Comment : gulp and now two other references.. . Comment : Different versions -- 2.5 2.6 3.0 -- three views of the same underlying thing . Comment : what s wrong with the tutorial docs.python.org tutorial introduction.html strings http : docs.python.org tutorial introduction.html strings yeah i know.. . seasoned programmers can t be asked to . .. . Answer : This is how I teach slices to newbies : .. . .. . Understanding difference between indexing and slicing : .. . .. . Wiki Python has this amazing picture which clearly distinguishes indexing and slicing . enter image description here http : i.stack.imgur.com o99aU.png .. . .. . It is a list with 6 elements in it . To understand slicing better consider that list as a set of six boxes placed together . Each box has an alphabet in it . Indexing is like dealing with the contents of box . You can check contents of any box . But You can t check contents of multiple boxes at once . You can even replace contents of the box . But You can t place 2 balls in 1 box or replace 2 balls at a time . Slicing is like dealing with boxes itself . You can pickup first box and place it on another table . To pickup the box all You need to know is the position of beginning ending of the box . You can even pickup first 3 boxes or last 2 boxes or all boxes between 1 4 . So You can pick any set of boxes if You know beginning ending . This positions are called start stop positions . The interesting thing is that You can replace multiple boxes at once . Also You can place multiple boxes where ever You like . Slicing With Step : .. . .. . Till now You have picked boxes continuously . But some times You need to pickup discretely . For example You can pickup every second box . You can even pickup every third box from the end . This value is called step size . This represents the gap between Your successive pickups . The step size should be positive if You are picking boxes from the beginning to end and vice versa . How Python Figures Out Missing Parameters : .. . .. . When slicing if You leave out any parameter Python tries to figure it out automatically . If You check source code of CPython You will find a function called PySlice GetIndicesEx which figures out indices to a slice for any given parameters . Here is the logical equivalent code in Python . This function takes a Python object optional-parameters for slicing and returns start stop step slice length for the requested slice . This is the intelligence that is present behind slices . Since Python has inbuilt function called slice You can pass some parameters check how smartly it calculates missing parameters . Note : This post is originally written in my blog http : www.avilpage.com 2015 03 a-slice-of-python-intelligence-behind.html", "Question : I need a good explanation references are a plus on Python s slice notation . To me this notation needs a bit of picking up . It looks extremely powerful but I haven t quite got my head around it . Comment : Do you mean python.org doc 2.5.2 ref slicings.html tok-slicing http : www.python.org doc 2.5.2 ref slicings.html tok-slicing Or docs.python.org reference http : docs.python.org reference expressions.html grammar-token-slicing Or docs.python.org 3.0 library functions.html slice http : docs.python.org 3.0 library functions.html slice Or something else Comment : well it s probably in there somewhere.. . this is a bit too concise . I guess what I am really looking for is some help coming to grips with it rather than the full definition of the grammar . Comment : gulp and now two other references.. . Comment : Different versions -- 2.5 2.6 3.0 -- three views of the same underlying thing . Comment : what s wrong with the tutorial docs.python.org tutorial introduction.html strings http : docs.python.org tutorial introduction.html strings yeah i know.. . seasoned programmers can t be asked to . .. . Answer : It s pretty simple really : .. . .. . There is also the step value which can be used with any of the above : .. . .. . The key point to remember is that the : end value represents the first value that is not in the selected slice . So the difference beween end and start is the number of elements selected if step is 1 the default . The other feature is that start or end may be a negative-number which means it counts from the end of the array instead of the beginning . So : .. . .. . Python is kind to the programmer if there are fewer items than you ask for . For example if you ask for a : -2 and a only contains one element you get an empty list instead of an error . Sometimes you would prefer the error so you have to be aware that this may happen . Comment : and a : : -1 to reverse a string . Comment : You can give meaning to index -2 by reading it as length-2 . But don t forget the edge cases Comment : Also can be important that : returns a shallow copy http : docs.python.org 2 library copy.html of a list . it means that every slice notation returns a list which have new address in memory but its elements would have same addresses that elements of source list have . Comment : @DenysS : Yes after taking a slice of a list changes in the slice do not affect the original and vice versa . A new list object is returned . Comment : Slicing builtin types returns a copy but that s not universal . Notably slicing NumPy arrays http : docs.scipy.org doc numpy reference arrays.indexing.html returns a view that shares memory with the original .", "Question : I need a good explanation references are a plus on Python s slice notation . To me this notation needs a bit of picking up . It looks extremely powerful but I haven t quite got my head around it . Comment : Do you mean python.org doc 2.5.2 ref slicings.html tok-slicing http : www.python.org doc 2.5.2 ref slicings.html tok-slicing Or docs.python.org reference http : docs.python.org reference expressions.html grammar-token-slicing Or docs.python.org 3.0 library functions.html slice http : docs.python.org 3.0 library functions.html slice Or something else Comment : well it s probably in there somewhere.. . this is a bit too concise . I guess what I am really looking for is some help coming to grips with it rather than the full definition of the grammar . Comment : gulp and now two other references.. . Comment : Different versions -- 2.5 2.6 3.0 -- three views of the same underlying thing . Comment : what s wrong with the tutorial docs.python.org tutorial introduction.html strings http : docs.python.org tutorial introduction.html strings yeah i know.. . seasoned programmers can t be asked to . .. . Answer : The answers above don t discuss slice assignment : .. . .. . This may also clarify the difference between slicing and indexing . Comment : You may want to add an example http : stackoverflow.com a 15824717 1355221 of using slice assignment to remove one or more elements from a sequence . If you do I will remove my answer . Comment : There are a lot of interesting things you could discuss about slice assignment if this answer were more than just a code snippet . Only iterables can be assigned in this manner and if the specified slice has nonzero width the elements it references in the original list will be replaced by the assigned iterable . An empty string assigned to a slice will remove the sliced elements but a non-empty string assigned to a slice will be treated as a sequence of characters .", "Question : What s the use of built-in function slice and how can I use it The direct way of Pythonic slicing I know - l1 start : stop : step . I want to know if I have a slice object then how do I use it Comment : this worked for me . def slice self start None end None step None : return self.obj slice start end step .. . Answer : You create a slice by calling slice with the same fields you would use if doing start : end : step notation : .. . .. . To use the slice just pass it as-if it were the index into a list or string : .. . .. . Let s say you have a file of fixed-length text fields . You could define a list of slices to easily extract the values from each record in this file . Prints :", "Question : I need a good explanation references are a plus on Python s slice notation . To me this notation needs a bit of picking up . It looks extremely powerful but I haven t quite got my head around it . Comment : Do you mean python.org doc 2.5.2 ref slicings.html tok-slicing http : www.python.org doc 2.5.2 ref slicings.html tok-slicing Or docs.python.org reference http : docs.python.org reference expressions.html grammar-token-slicing Or docs.python.org 3.0 library functions.html slice http : docs.python.org 3.0 library functions.html slice Or something else Comment : well it s probably in there somewhere.. . this is a bit too concise . I guess what I am really looking for is some help coming to grips with it rather than the full definition of the grammar . Comment : gulp and now two other references.. . Comment : Different versions -- 2.5 2.6 3.0 -- three views of the same underlying thing . Comment : what s wrong with the tutorial docs.python.org tutorial introduction.html strings http : docs.python.org tutorial introduction.html strings yeah i know.. . seasoned programmers can t be asked to . .. . Answer : And a couple of things that weren t immediately obvious to me when I first saw the slicing syntax : .. . .. . Easy way to reverse sequences And if you wanted for some reason every second item in the reversed sequence : Comment : reversed would be better Comment : It gets tricky when using negative steps with start and end . It seems like using a negative step maps begin and end into the negative space . I.e . if you want to select only parts of something reversed by : : -1 you will have to use e.g . 1 2 3 4 -1 : -5 : -1 4 3 2 1 . This is trial and error - I ve just ran across this . Comment : Just like a downwards counting for-loop 8 : 4 : -1 start at 8 end at 4 step by -1 each time .", "Question : I need a good explanation references are a plus on Python s slice notation . To me this notation needs a bit of picking up . It looks extremely powerful but I haven t quite got my head around it . Comment : Do you mean python.org doc 2.5.2 ref slicings.html tok-slicing http : www.python.org doc 2.5.2 ref slicings.html tok-slicing Or docs.python.org reference http : docs.python.org reference expressions.html grammar-token-slicing Or docs.python.org 3.0 library functions.html slice http : docs.python.org 3.0 library functions.html slice Or something else Comment : well it s probably in there somewhere.. . this is a bit too concise . I guess what I am really looking for is some help coming to grips with it rather than the full definition of the grammar . Comment : gulp and now two other references.. . Comment : Different versions -- 2.5 2.6 3.0 -- three views of the same underlying thing . Comment : what s wrong with the tutorial docs.python.org tutorial introduction.html strings http : docs.python.org tutorial introduction.html strings yeah i know.. . seasoned programmers can t be asked to . .. . Answer : Enumerating the possibilities allowed by the grammar : .. . .. . Of course if high-low stride 0 then the end point will be a little lower than high-1 . Extended slicing with commas and ellipses are mostly used only by special data-structures like Numpy the basic sequences don t support them . Comment : doesn t seq : : stride should starts like - seq stride .. . seq -1 instead of seq 0 seq stride .. . seq -1" ] }
[ "yes-answer-long", "yes-answer-short" ]
program-slicing
UNK_RELATION
spring-jms@api@147
spring-jms -- spring provides a jms integration framework that simplifies the use of the jms api much like spring s integration does for the jdbc @placeholder .
{ "confidence": [ 78.45504760742188, 78.36576080322266, 76.95384216308594, 76.51042175292969, 74.96217346191406, 70.27217864990234, 70.25436401367188, 69.35354614257812, 68.81350708007812, 68.68254852294922, 68.68254852294922, 68.678955078125, 68.12488555908203, 67.01150512695312, 67.01150512695312, 65.21360778808594, 65.1970443725586, 64.93669128417969, 64.9256591796875, 64.86021423339844, 64.8104248046875, 64.28247833251953, 64.12164306640625, 64.12164306640625, 64.09904479980469, 64.09904479980469, 62.66693878173828, 62.66693878173828, 62.14337921142578, 61.250518798828125, 61.20499801635742, 60.78671646118164, 60.78671646118164, 60.693668365478516, 60.60520935058594, 60.50383758544922, 60.462303161621094, 59.85565948486328, 59.817588806152344, 59.62958908081055, 59.62958908081055, 59.523921966552734, 59.523921966552734, 59.35850524902344, 59.27752685546875, 59.2450065612793, 59.24405288696289, 59.006961822509766, 58.80313491821289, 58.128639221191406, 57.94851303100586, 57.94851303100586, 57.94851303100586, 57.94851303100586, 57.920249938964844, 57.78156280517578, 57.78156280517578, 57.56230545043945, 57.38745880126953, 57.342384338378906, 57.221702575683594, 56.662200927734375, 56.100486755371094, 56.07662582397461, 55.783878326416016, 55.74468231201172, 55.18403625488281, 54.83834457397461, 54.68315124511719, 54.68315124511719, 54.57468032836914, 54.41312789916992, 54.331356048583984, 54.331356048583984, 54.294593811035156, 54.194244384765625, 54.12868881225586, 54.03786087036133, 53.96224594116211, 53.81109619140625, 53.55351257324219, 53.44263458251953, 53.25814437866211, 52.5232048034668, 52.5232048034668, 52.5232048034668, 52.5232048034668, 52.5232048034668, 52.5232048034668, 52.281639099121094, 51.97810363769531, 51.92467498779297, 51.92467498779297, 51.700111389160156, 51.612953186035156, 51.53396987915039, 51.31846618652344, 51.23822021484375, 51.2087516784668, 51.2087516784668 ], "content": [ "Working with spring-integration-core-4.0.3.RELEASE spring-integration-jms-4.0.3.RELEASE spring-integration-java-dsl-1.0.0.M2 spring-jms-4.0.6.RELEASE .", "Use spring-integration to send message jms when something was modified in service .", "forum.spring.io forum spring-projects integration jms http : forum.spring.io forum spring-projects integration jms 124544-unable-to-set-jmsexpiration-on-outbound-messages", "In the application that I am working on I use a Spring JMS DefaultMessageListenerContainer http : docs.spring.io spring-framework docs 2.0.x api org springframework jms listener DefaultMessageListenerContainer.html and a JMS consumer that is a SessionAwareMessageListener http : docs.spring.io spring-framework docs 2.0.x api org springframework jms listener SessionAwareMessageListener.html .", "Is it even possible with Spring JMS", "We just upgraded to Spring 4 and JMS 2.0 .", "I ve setup a spring config for JMS .", "Apache Camel uses Spring JMS underneath to connect to JMS providers .", "Just register them all in your code like Spring advises : JMS http : docs.spring.io spring docs current spring-framework-reference html jms.html jms-annotated-programmatic-registration", "Which version of spring-jms are you using", "my spring-jms version is 3.1.1.RELEASE .", "Can this be done through Spring-JMS .", "Background : We are conducting a performance test of our application and use Spring JMS to post thousands of messages a second to JMS .", "But some of these have a JMS equivalent available in Spring template .", "I m following the path of ActimeMQ JMS without Spring .", "You might also want to consider using Spring Integration on top of JMS there s a sample here that uses ActiveMQ https : github.com SpringSource spring-integration-samples tree master basic jms - you would just need to change the JMS config to use MQ instead .", "Spring JMS message listeners lets you filter messages based on JMS properties as well as JMS headers .", "Refer the below article to make the spring-jms configuration dynamic using annotations Spring JmsListenerConfigurer http : spring.io blog 2014 04 30 spring-4-1-s-upcoming-jms-improvements .", "I have a Spring Integration application where I have a JMS inbound channel adapter that will receive messages from a queue in a remote JMS broker .", "I have a spring-boot application with spring JMS using DefaultMessageListener container .", "Refer Spring JMS and Websphere MQ http : stackoverflow.com questions 14523572 spring-jms-and-websphere-mq .", "Also the Jms Messaging Template uses the SimpleJmsHeaderMapper instead of the DefaultJmsHeaderMapper from spring-integration .", "The JMS ConnectionFactory is supplied for Spring Boot ActiveMQAutoConfiguration by the way .", "New way using Spring JMS Template .", "I m using spring-jms-3.0.6.RELEASE and open MQ .", "@Nicholas - added my Spring JMS config is that what you were looking for", "We would like to see the relevant spring-jms configuration file .", "I d like to start up a JMS Broker using spring .", "I am using Spring JMS 4.1.2 and I am using org.springframework.messaging.Message as the input payload in the JMS Listener .", "The Spring transaction manager will be the coordinator using JTA and the spring-jms can then be used to bring in the WMQ JMS client and MQ Queue Manager as a transactional resource .", "I m using Spring jms to send jms messages to websphere-mq using the target client as 1 at the destination resolver .", "We started to use oracle AQ and spring-jms and it works fine .", "Use the local names in Spring JMS template to establish connection and send messages .", "After all Spring is just a convenient abstraction over the top of JMS and doesn t prevent you from using the JMS API directly if required .", "I checked the source code of that class in Github - seems it is not the same against this URL : github.com spring-projects spring-framework blob master https : github.com spring-projects spring-framework blob master spring-jms src main java org springframework jms config AbstractListenerContainerParser.java L229", "However there is a new method in Spring 4 called getProxyIfNecessary that determines whether or not JMS 2.0 is being used and when it detects JMS 2.0 it creates a Jms2MessageProducerInvocationHandler proxy .", "For sending receiving message i m using JmsTemplate and DefaultMessageListenerContainer in spring-jms 4.1.1 .", "I have working with JMS listeners for receiving messages into standard webapps some time ago normally using JSF ICEfaces for the webapp and spring activemq etc . for the JMS integration .", "Application is not required to close the Session when using DefaultMessageListenerContainer https : github.com spring-projects spring-framework blob master spring-jms src main java org springframework jms listener DefaultMessageListenerContainer.java it creates the required sessions and closes them during shutdown .", "But according to the JMS specification it is a bit different and Spring listener containers as expected do not try to alter the behavior from the JMS specification .", "The connection factory Spring is referring to not finding is the JMS Connection Factory that tells the Camel JMS component how to talk to your queue .", "Two instances of an application are processing messages from that queue using Spring JMS .", "I have spring JMS message listener container setup as follows .", "I change my Spring-JMS DefaultMessageListenerContainer implementations to use a cacheLevelName of CACHE NONE and ran into the below exception .", "Now I have java code which starts tibco jms subscription with several steps : .. . .. . I want to use Spring for initialization but I can t find how to configure jms in spring using initial context .", "DefaultMessageListenerContainer http : docs.spring.io spring docs 4.0.6.RELEASE javadoc-api org springframework jms listener DefaultMessageListenerContainer.html .. . MessageListenerAdapter http : docs.spring.io spring docs 4.0.6.RELEASE javadoc-api org springframework jms listener adapter MessageListenerAdapter.html .. . .. . I am trying to create consumers for a topic many tutorials in the web use destination-type topic .. . .. . According with the 23.6 JMS Namespace Support http : docs.spring.io spring docs 4.0.6.RELEASE spring-framework-reference htmlsingle jms-namespace section there is the Table 23.2 .", "This is a follow up question for Difference between AUTO ACKNOWLEDGEMENT mode with and without Spring JMS http : stackoverflow.com questions 28426467 difference-between-auto-acknowledgement-mode-with-and-without-spring-jms 28433500 28433500 .", "We are trying to use IBM MQ manager as XA Transaction manager with spring-jms and spring transaction support .", "queue.put msg pmo Looks like an extension to JMS and is therefore not available using the standard JMS API - so my guess is it s not possible with Spring JMS unless there s some other back-door method e.g .", "When I use Spring to listen to JMS messages I receievd the above error .", "hi I am new to Spring JMS and websphere MQ .", "I am using spring-io for jms queue message transfer .", "I am using MQQueueConnectionFactory configured and injected into my spring JMS components .", "Trying to figure out the camel Spring configuration to set ApplicationIdData using JMS .", "See DefaultMessageListenerContainer http : docs.spring.io spring docs current javadoc-api org springframework jms listener DefaultMessageListenerContainer.html See also the default receiveTimeout http : docs.spring.io spring docs current javadoc-api org springframework jms listener AbstractPollingMessageListenerContainer.html DEFAULT RECEIVE TIMEOUT which is 1s .", "Referring some of old blog which points the camel JMS uses Spring JMS .", "spring-bean.xml .. . .. . JMS Producer .. . .. . Controller class .. . .. . Jboss s jms module in standalone.xml .. . .. . POM.xml .. . .. . Error", "Using Spring-JMS it is possible to receive messages within an external transaction context via the DefaultMessageListenerContainer http : static.springsource.org spring docs 3.0.x javadoc-api org springframework jms listener DefaultMessageListenerContainer.html .", "You can t use the WMQ JMS client which is what spring-jms would use with the MQ QueueManager acting as the XA transaction manager .", "There is also an XA transactionManager shared between JMS and JDBC .", "Hi Gary Pls see this link : forum.spring.io forum spring-projects integration http : forum.spring.io forum spring-projects integration 96229-consuming-unparseable-jms-messages I wonder if the same applies for Tibco as well", "I need to send message from one spring-boot application to another spring-boot application using JMS", "My application is a Spring Boot application that has several JMS listeners .", "I am using Spring Framework to concurrently consume messages off of a JMS queue using a DefaultMessageListenerContainer .", "I m not sure if I m doing something wrong or if this is a bug with the new JMS 2.0 support in Spring .", "Add a listener container factory @Bean see the documentation http : docs.spring.io spring-framework docs current spring-framework-reference html jms.html jms-annotated-support and set the autoStartup property to false .", "Yeah I just happened to have 4.0.3 in my IDE - it was updated recently for the JMS Annotation support : github.com spring-projects spring-framework blame master https : github.com spring-projects spring-framework blame master spring-jms src main java org springframework jms config AbstractListenerContainerParser.java L229 - feel free to open a documentation improvement JIRA issue .", "I was reading spring documentation on DefaultMessageListenerContainer http : docs.spring.io spring docs 3.2.7.RELEASE javadoc-api org springframework jms listener DefaultMessageListenerContainer.html .. . .. . It says Note : Don t use Spring s CachingConnectionFactory in combination with dynamic scaling .", "Spring JMS and Websphere MQ https : stackoverflow.com questions 14523572 spring-jms-and-websphere-mq .. . .. . As I run in standalone maven application i am getting the below error .", "This is hinting at by the Spring manual section 21.2.5 http : static.springsource.org spring docs 3.0.x reference jms.html jms-tx : .. . .. . JmsTemplate can also be used with the JtaTransactionManager and an XA-capable JMS ConnectionFactory for performing distributed transactions .", "I use Spring remoting via JMS like that : .. . .. . Client .. . .. . Server .. . .. . And its work fine .", "Without transaction manager Spring uses org.springframework.jms.connection.SingleConnectionFactory http : static.springsource.org spring docs 3.0.x api org springframework jms connection SingleConnectionFactory.html to share a single connection for multiple consumers .", "Spring Configuration : .. . .. . Option Values : .. . .. . Problem : .. . .. . If host1 is unavailable inactive this spring-jms configuration will take nearly an hour to automatically reconnect to host2 which is known to be active", "The Spring JMS doc http : static.springsource.org spring docs 3.0.x reference jms.html suggests that concurrency should be set to 1 for topic listeners .", "@user705414 : this seems to be a mistake in the documentation : AbstractMessageListenerContainer.invokeErrorHandler http : grepcode.com file repo1.maven.org maven2 org.springframework spring-jms 3.0.6.RELEASE org springframework jms listener AbstractMessageListenerContainer.java AbstractMessageListenerContainer.invokeErrorHandler java.lang.Throwable indeed uses log.warn .", "And yes I am using connection-pooling with OracleDataSource and every thing working fine with legecy JMS code without spring .", "As JMS provider I use WebLogic .", "Are you asking if Spring Integration can be used to implement a protocol bridge http : static.springsource.org spring-integration reference htmlsingle spring-integration-reference.html bridge-namespace", "See the Spring Batch BatchMessageListenerContainer https : github.com spring-projects spring-batch blob 5a803937c71f5bb670d434a004b08830344b779c spring-batch-infrastructure-tests src main java org springframework batch container jms BatchMessageListenerContainer.java .", "Wrap your ConnectionFactory in a UserCredentialsConnectionFactoryAdapter http : docs.spring.io spring-framework docs current javadoc-api index.html org springframework jms connection UserCredentialsConnectionFactoryAdapter.html .", "1 Primary the overhead of Spring JMS is the use of JmsTemplate to send messages wihtout a caching mechanism underneath .", "To my knowledge there is no Spring specific way of sending an unsubscribe command to the MQ server however you always have the option of obtaining an underlying JMS Session by extending the DefaultMessageListenerContainer http : static.springsource.org spring docs 3.0.x javadoc-api org springframework jms listener DefaultMessageListenerContainer.html class and calling getSession http : static.springsource.org spring docs 3.0.x javadoc-api org springframework jms listener AbstractPollingMessageListenerContainer.html getSession 28org.springframework.jms.connection.JmsResourceHolder 29 or createSession http : static.springsource.org spring docs 3.0.x javadoc-api org springframework jms support JmsAccessor.html createSession 28javax.jms.Connection 29 .", "As JMS is being used underneath the Spring framework to talk to MQ the issue is that JMS is designed to primarily work with fully managed subscriptions the creation of which is initiated by the client code .", "I want to have an XA transaction using Spring to share a transaction between DB and JMS .", "I also looked at spring-jms connection factory with exception listener but couldnt figure out .", "Could you help me to understand Consumer vs Thread behavior using spring-jms", "Starting from scratch I am using the last Spring JMS version 4.1.2 .", "I have developed project using Spring JMS to receive the message from Queue .", "Issue : Getting resource exception at runtime attempting to connect to a websphere-mq to get a jms message using spring .", "I have this spring-integration config .", "I have a Spring JMS ActiveMQ setup where I use SimpleMessageListenerContainer which I associated with POJO message listener .", "The changes were outlined here http : stackoverflow.com questions 10419389 spring-jms-session-issue-when-using-open-mq 10523893 comment13640043 10523893 .", "So question is how to temporary stop and start a jms listener created using spring using the fallowing way : .. . .. . So basically what is the problem .", "Now if the JMS broker provides a resource adapter and therefore there is a JCA managed connection factory that might be capable of participating in JTA transactions configured in a JBoss App server where my Spring Integration is running packaged in a war .", "Set a header and use a selector expression http : docs.spring.io spring docs current javadoc-api org springframework jms listener AbstractMessageListenerContainer.html setMessageSelector-java.lang.String- .", "in the blog Using Spring to Send JMS messages http : bsnyderblog.blogspot.in 2010 02 using-spring-jmstemplate-to-send-jms.html I could see that adding the daemon true option to the transport will terminate the connection .", "There is a property on AbstractMessageListenerContainer http : static.springsource.org spring docs 3.0.x javadoc-api org springframework jms listener AbstractMessageListenerContainer.html : .. . .. . Where someHandler is a bean implementing ErrorHandler http : static.springsource.org spring docs 3.0.x javadoc-api org springframework util ErrorHandler.html : .. . .. . However note that according to the documentation http : static.springsource.org spring docs 3.0.x javadoc-api org springframework jms listener AbstractMessageListenerContainer.html : .. . .. . The default behavior of this message listener .. . will log any such exception at the error level .", "We currently use Spring Integration for ActiveMQ I would like to know if its a drastic change to move to RabbitMQ AMQP even with Spring Integration .", "I m working on a Spring boot JMS application that is setup strictly with bean annotations and is reading messages from WebshpereMQ .", "I m using Spring JMS and ActiveMQ to send message from one sender to multiple listeners asynchronously ." ] }
{ "confidence": [ 95.58723449707031, 94.31269836425781, 93.5999526977539, 88.66730499267578, 87.46369171142578, 87.42503356933594, 86.38701629638672, 86.3765869140625, 86.00341033935547, 85.85543060302734, 85.34395599365234, 85.26808166503906, 84.97651672363281, 84.83834838867188, 83.8415756225586, 83.61456298828125, 82.60005187988281, 81.72148895263672, 81.6873779296875, 81.44502258300781 ], "content": [ "Question : For the following scenario I am looking for your advices and tips on best practices : .. . .. . In a distributed mainly Java-based system with : .. . .. . many different client applications web-app command-line tools REST API .. . a central JMS message broker currently in favor of using ActiveMQ .. . multiple stand-alone processing nodes running on multiple remote machines computing expensive operations of different types as specified by the JMS message payload .. . .. . How would one best apply the JMS support provided by the Spring Integration http : www.springsource.org spring-integration framework to decouple the clients from the worker nodes When reading through the reference documentation and some very first experiments it looks like the configuration of an JMS inbound adapter inherently require to use a subscriber which in a decoupled scenario does not exist . Small side note : communication should happen via JMS text messages using a JSON data structure for future extensibility . .. . Answer : Here is the Spring Integration I was coming up with today if you find things which could be improved please follow up . On the client-side the messages can be send out and received through a SimpleMessagingGateway : .. . .. . And the configuration on the processing node side looks like please see the comments inline for more explanation of the Spring Integration elements :", "Question : In the application that I am working on I use a Spring JMS DefaultMessageListenerContainer http : docs.spring.io spring-framework docs 2.0.x api org springframework jms listener DefaultMessageListenerContainer.html and a JMS consumer that is a SessionAwareMessageListener http : docs.spring.io spring-framework docs 2.0.x api org springframework jms listener SessionAwareMessageListener.html . There is also an XA transactionManager shared between JMS and JDBC . As JMS provider I use WebLogic . What I have noticed is that each time the consumer receives a message the JMS Session is completely different than the ones used for the previous messages : .. . .. . the output : .. . .. . It seems that the JMS sessions are automatically managed by the DefaultMesageListenerContainer and they are not cached - which makes me worry about performance . In the context of a JMS consumer using XA transactions would it be a good idea to use some level of caching CACHE SESSION for example If required I can provide more code-snippets as JMS configuration is java based . .. . Answer : See the javadocs for that setter : .. . .. . So you need to determine whether WebLogic supports such a configuration .", "Question : For the following scenario I am looking for your advices and tips on best practices : .. . .. . In a distributed mainly Java-based system with : .. . .. . many different client applications web-app command-line tools REST API .. . a central JMS message broker currently in favor of using ActiveMQ .. . multiple stand-alone processing nodes running on multiple remote machines computing expensive operations of different types as specified by the JMS message payload .. . .. . How would one best apply the JMS support provided by the Spring Integration http : www.springsource.org spring-integration framework to decouple the clients from the worker nodes When reading through the reference documentation and some very first experiments it looks like the configuration of an JMS inbound adapter inherently require to use a subscriber which in a decoupled scenario does not exist . Small side note : communication should happen via JMS text messages using a JSON data structure for future extensibility . .. . Answer : Are you asking if Spring Integration can be used to implement a protocol bridge http : static.springsource.org spring-integration reference htmlsingle spring-integration-reference.html bridge-namespace Then the answer is yes and does so quite simply . Comment : I am not sure this would solve my scenario : on the one hand side a client app would be configured to use an inbound channel adapter to hand in the messages into the JMS queue and on a processing node would be configured to use an outbound adapter to pick it up and process it . Comment : I assumed that you wanted to decouple the protocols . The client apps would be largely unchanged except to communicate to a bridging application with their protocol of choice WS REST etc . The bridging app would turn all of these requests into JMS requests which your worker nodes would consume on a competing-consumer pattern . Comment : That s right in the optimal case the client should not have to know anything about the protocol . Could you please elaborate how to best make use of the bridge pattern in the described scenario Thanks .", "Question : What is the most elegant way to consume multiple JMS messages in a single transaction in Spring Integration without storing the message again in an Aggregator backed by a persistent Message Store In an previous project based on IBM Integration Bus this feature IBM calls it Commit Count was very helpful to increase message throughput . .. . Answer : See the Spring Batch BatchMessageListenerContainer https : github.com spring-projects spring-batch blob 5a803937c71f5bb670d434a004b08830344b779c spring-batch-infrastructure-tests src main java org springframework batch container jms BatchMessageListenerContainer.java .", "Question : null .. . Answer : I have a spring-web app running on jboss . Use aop @AfterReturning annotation for services to invalidate cache . Use spring-integration to send message jms when something was modified in service . JMS handlers use the same services to get data from DB . JDBC transaction is synchronized with jms transaction so message is send when leave service method . The problem is sometimes @AfterReturning annotation take more time and jms handler can take some old data from services . i can described problem in few steps : .. . .. . 1 . enter in method editUser User u : User - open DB transaction .. . 2 . method do some work and send jms message .. . 3 . leave method .. . 4 . commit DB transaction .. . 5 . @AfterReturning annotation is executed and cache invalidated . 6 . jms message is receive in handler . Handler can take fresh data from service . After commit transaction point 4 is not sure what order we will have - 5 and 6 or 6-5", "Question : hi I am new to Spring JMS and websphere MQ . Can Any one give me step by step processs or example how to receive message from websphere MQ and be able to print that message in console thanks u very much for your help Comment : I posted a Spring mdp activation spec webpshere mq example at stackoverflow.com questions 7390286 http : stackoverflow.com questions 7390286 whats-the-difference-between-activationspec-and-connectionfactory .. . Answer : You might also want to consider using Spring Integration on top of JMS there s a sample here that uses ActiveMQ https : github.com SpringSource spring-integration-samples tree master basic jms - you would just need to change the JMS config to use MQ instead . The sample reads from the console sends the message over JMS read by a message-driven adapter and written to the console . Comment : thanks for the reply and the link . When i downlad it gave me like 20 different project and i cdnt find example needed or neither run it . I just want simple example to be able to run Comment : confused The link points right to the sample on GitHub with a ReadMe about how to run it . Simply clone the Github sample repo and follow the instructions .", "Question : For the following scenario I am looking for your advices and tips on best practices : .. . .. . In a distributed mainly Java-based system with : .. . .. . many different client applications web-app command-line tools REST API .. . a central JMS message broker currently in favor of using ActiveMQ .. . multiple stand-alone processing nodes running on multiple remote machines computing expensive operations of different types as specified by the JMS message payload .. . .. . How would one best apply the JMS support provided by the Spring Integration http : www.springsource.org spring-integration framework to decouple the clients from the worker nodes When reading through the reference documentation and some very first experiments it looks like the configuration of an JMS inbound adapter inherently require to use a subscriber which in a decoupled scenario does not exist . Small side note : communication should happen via JMS text messages using a JSON data structure for future extensibility . .. . Answer : This doesn t really answer your question but make sure you look into Apache Camel http : camel.apache.org for connecting your different components . I found it extremely useful for connecting a JMS queue up to an existing web service and plan to use it for other components also . An example that monitors an ActiveMQ queue for messages transforms them and posts them to a web service : .. . .. . That s all that s necessary in our Spring application to fire up Camel and start processing messages . Comment : Thanks Camel is of course also an option but wouldn t that require more configuration overhead or is this feasible Comment : I don t think it s too much configuration overhead . I ve updated my answer with an example . Comment : True this looks indeed very concise . Thanks for posting more details .", "Question : I was trying to configure jms template to connect to WebSphere MQ . When using Websphere client jar there are multiple options that were set like MQC.MQOO OUTPUT MQC.MQOO FAIL IF QUIESCING etc for Queue s and PUT and GET options like MQC.MQPMO NEW MSG ID MQC.MQGMO WAIT MQC.MQMO MATCH CORREL ID etc . . .. . .. . is there way to pass these option to JMS template .. . Answer : These options are IBM MQ specific so don t think they can be passed as it is to Spring . But some of these have a JMS equivalent available in Spring template . MQC.MQOO OUTPUT option means open queue for putting messages and is equivalent to JMS createProducer API . MQC.MQGMO WAIT option is equivalent to receive timeout .. . .. . MQC.MQMO MATCH CORREL ID - is equivalent to creating a consumer with a selector JMSCorrelatoinID your correlationid Comment : is there an sample that can be referred with the integration tried to follow couple of samples but couldnt replicate the client jar functionality . Comment : Sorry I don t have one", "Question : null .. . Answer : Trying to figure out the camel Spring configuration to set ApplicationIdData using JMS . I know the java way to do it as below I set MQOO SET IDENTITY CONTEXT using below .. . .. . and then i set applicationIdData as : .. . .. . queue.put msg pmo .. . .. . Question is How do I set applicationIdData using JMS camel Spring configuration . Below is my current camel configuration . I have gone through below links couldnt find the right answer .. . .. . http : forum.spring.io forum spring-projects integration jms 97168-how-to-set-wmqconstants-wmq-mqmd-read-enabled-in-spring .. . .. . http : www.ibm.com support knowledgecenter SSFKSJ 7.0.1 com.ibm.mq.csqzaw.doc jm41030 .htm .. . .. . https : www.ibm.com support knowledgecenter en SSFKSJ 9.0.0 com.ibm.mq.dev.doc q032010 .htm Comment : queue.put msg pmo Looks like an extension to JMS and is therefore not available using the standard JMS API - so my guess is it s not possible with Spring JMS unless there s some other back-door method e.g . via a message header . Comment : Thanks Gary but I think there should be some way workaround . Will keep trying.. . Comment : IBM has suggested a way to set it as property trying it IBM s Suggestion ibm.com support knowledgecenter SSFKSJ 7.0.1 http : www.ibm.com support knowledgecenter SSFKSJ 7.0.1 com.ibm.mq.csqzaw.doc jm41030 .htm", "Question : null .. . Answer : I have a Spring Integration application where I have a JMS inbound channel adapter that will receive messages from a queue in a remote JMS broker . I m looking up the connection factory directly from the broker s remote JNDI service and this is what I use to set up my inbound channel adapter . I understand that behind the scenes there is a DefaultMessageListenerContainer . According to AbstractMessageListenerContainer javadocs found here http : docs.spring.io spring-framework docs 2.0.x api org springframework jms listener AbstractMessageListenerContainer.html if sessionTransacted is set to true for the DMLC local JMS transactions will be used for the delivery of messages from the broker . I m not interested in having the receipt of messages to be part of externally managed transactions . Now if the JMS broker provides a resource adapter and therefore there is a JCA managed connection factory that might be capable of participating in JTA transactions configured in a JBoss App server where my Spring Integration is running packaged in a war . I could use this instead of directly looking up from the broker s JNDI as I described above . Since I am not interested in global transactions I don t see the value of using this JCA connection factory moreover I don t know if the caching of connections sessions that JCA does might clash with the DMLC caching strategy . Additionally I m not sure if adding a JCA layer to wrap the original connection factory will impact performance . Which is the right approach then take connection factory directly from broker JNDI and let DMLC handle everything or take a JCA managed connection There seems to be a not very well documented school of thought that tells that JCA is safer and more robust but if I m not using EJBs I dont see how this can be true .", "Question : The java doc here http : docs.spring.io spring docs 3.2.4.RELEASE javadoc-api related to Spring CachingConnectionFactory has comment : .. . .. . NOTE : This ConnectionFactory requires explicit closing of all Sessions obtained from its shared Connection . This is the usual recommendation for native JMS access code anyway . However with this ConnectionFactory its use is mandatory in order to actually allow for Session reuse . I am not clear how to handle this with the below given configuration in my application . The listener class is this : .. . .. . .. . .. . How do I follow recommendation that Sessions obtained from shared connection should be closed explicitly Came across SessionAwareMessageListener interface which provides onMessage method which gives handle to Session . So to properly implement session closing should this interface be implemented .. . Answer : Application is not required to close the Session when using DefaultMessageListenerContainer https : github.com spring-projects spring-framework blob master spring-jms src main java org springframework jms listener DefaultMessageListenerContainer.java it creates the required sessions and closes them during shutdown . Per my understanding the note you mentioned applies when Session is created by application using CachingConnectionFactory reference about which spring will have no clue .", "Question : What is the equivalent of destination-type from jms : listener-container in JavaConfig I have checked in the API these two following classes without results . DefaultMessageListenerContainer http : docs.spring.io spring docs 4.0.6.RELEASE javadoc-api org springframework jms listener DefaultMessageListenerContainer.html .. . MessageListenerAdapter http : docs.spring.io spring docs 4.0.6.RELEASE javadoc-api org springframework jms listener adapter MessageListenerAdapter.html .. . .. . I am trying to create consumers for a topic many tutorials in the web use destination-type topic .. . .. . According with the 23.6 JMS Namespace Support http : docs.spring.io spring docs 4.0.6.RELEASE spring-framework-reference htmlsingle jms-namespace section there is the Table 23.2 . Attributes of the JMS element table . Where for the destination-type attribute says : .. . .. . The JMS destination type for this listener : queue topic or durableTopic . The default is queue . For the audience : consider the two following links if you are trying to do a migration from jms : listener-container and jms : listener for JavaConfig . complete jms : listener migration to JavaConfig http : stackoverflow.com questions 25173809 complete-jmslistener-migration-to-javaconfig .. . How to add multiple JMS MessageListners in a single MessageListenerContainer for Spring Java Config http : stackoverflow.com questions 21881657 how-to-add-multiple-jms-messagelistners-in-a-single-messagelistenercontainer-for .. . Answer : When in doubt look at the parser in this case AbstractListenerContainerParser that attribute doesn t map to a single property it maps to pubSubDomain and subscriptionDurable .. . Comment : I checked the source code of that class in Github - seems it is not the same against this URL : github.com spring-projects spring-framework blob master https : github.com spring-projects spring-framework blob master spring-jms src main java org springframework jms config AbstractListenerContainerParser.java L229 Comment : Could be improved the Spring Reference documentation about this situation let me know to create a JIRA issue . Comment : Yeah I just happened to have 4.0.3 in my IDE - it was updated recently for the JMS Annotation support : github.com spring-projects spring-framework blame master https : github.com spring-projects spring-framework blame master spring-jms src main java org springframework jms config AbstractListenerContainerParser.java L229 - feel free to open a documentation improvement JIRA issue . Comment : Thank you Gary Done : jira.spring.io browse SPR-12073 https : jira.spring.io browse SPR-12073", "Question : When I use Spring to listen to JMS messages I receievd the above error . I am wondering how to add an Errorhandler into the JMS listener .. . Answer : There is a property on AbstractMessageListenerContainer http : static.springsource.org spring docs 3.0.x javadoc-api org springframework jms listener AbstractMessageListenerContainer.html : .. . .. . Where someHandler is a bean implementing ErrorHandler http : static.springsource.org spring docs 3.0.x javadoc-api org springframework util ErrorHandler.html : .. . .. . However note that according to the documentation http : static.springsource.org spring docs 3.0.x javadoc-api org springframework jms listener AbstractMessageListenerContainer.html : .. . .. . The default behavior of this message listener .. . will log any such exception at the error level . .. . However if error-handling is necessary then any implementation of the ErrorHandler strategy may be provided to the setErrorHandler ErrorHandler method . Check out your logs maybe the exception is already logged Comment : thanks for your answer . BTW why use @Service for this bean Comment : Looks like the exception is logged using WARN level by default . Comment : @user705414 : this seems to be a mistake in the documentation : AbstractMessageListenerContainer.invokeErrorHandler http : grepcode.com file repo1.maven.org maven2 org.springframework spring-jms 3.0.6.RELEASE org springframework jms listener AbstractMessageListenerContainer.java AbstractMessageListenerContainer.invokeErrorHandler java.lang.Throwable indeed uses log.warn . I use @Service to autodetect the bean of course any way to declare the error handler bean is fine .", "Question : I have working with JMS listeners for receiving messages into standard webapps some time ago normally using JSF ICEfaces for the webapp and spring activemq etc . for the JMS integration . Now I m trying to do the same into an OpenXava application . So this is what I have done at the moment : .. . .. . I have created the listeners.xml into the WEB-INF same place of the web.xml which I can t modify because OpenXava with this content content to be auto added to web.xml by OpenXava : .. . .. . I have created the applicationContext.xml I have tested placing it in the OpenXava application src folder and also into the WEB-INF with the following content : .. . .. . -- Create the topic to connect to -- .. . bean id TTCTopic class org.apache.activemq.command.ActiveMQTopic .. . property name physicalName value com.comp.app.message.tags .. . bean .. . .. . -- JMS Connection Factory -- .. . bean id connectionFactory class org.apache.activemq.spring.ActiveMQConnectionFactory .. . property name brokerURL value tcp : 127.0.0.1 : 1100 .. . bean .. . .. . -- Spring Helper to listen to a JMS Destination -- .. . bean id jmsContainer .. . class org.springframework.jms.listener.DefaultMessageListenerContainer .. . property name connectionFactory ref connectionFactory .. . property name destination ref TTCTopic .. . property name messageListener ref messageReceiver .. . bean .. . .. . .. . Then I have created my listener class com.comp.app.listeners.MessageReceiver which implements the JMS MessageListener interface and which has the code to process the message received . Also I did place into the WEB-INF Lib of my OpenXava application the spring and activemq jars and also I added the references in the project s classpath for each jar . Finally I m not getting any kind of error . So after all the problem is : The spring context is not being added to the OpenXava web.xml as is supposed to do.. . because the spring context is not created therefore the JMS listener is never created . So what I m missing here .. . is there a better way to do this Thanks in advance .. . Answer : My advice is to create a very simple OpenXava project and follow the Spring integration instruction http : openxava.wikispaces.com spring en step by step when it works you can try it against your real project . However your option of not using Spring is better . Comment : Hi Javier good to read from you here I m following the path of ActimeMQ JMS without Spring . Everything is working at that level but now I have a big problem going from JMS listeners to OpenXava specific views . So I created a new thread for that stackoverflow.com questions 13940334 http : stackoverflow.com questions 13940334 updating-certain-view-programmatically-from-a-jms-listener-class .. . please take a look at this maybe you know or you can find at least a dirty trick to accomplish a similar behavior . thanks in advance", "Question : I am trying to write a simple message flow using Spring Integration v4 s DSL APIs which would look like this : .. . .. . With the request response being asynchronous when I inject a message via the initial Gateway the message goes all the way to JMS OUT QUEUE . Beyond this message flow a reply message is put back into JMS IN QUEUE which it is then picked up by JmsGatewayIn . At this point the message is Processed and placed into out.ch I know the response gets to out.ch because I have a logger interceptor there which logs the message being placed there but the Gateway never receives the response . Instead of a response the system outside of this message flow which picked up the message from JMS OUT QUEUE and placed the response in JMS IN QUEUE receives a javax.jms.MessageFormatException : MQJMS1061 : Unable to deserialize object on its own JmsOutboundgateway I think it is failing to deserialize a jms reply object from looking at the logs . I have clearly not got something configured correctly but I don t know exactly what . Does anyone know what I am missing Working with spring-integration-core-4.0.3.RELEASE spring-integration-jms-4.0.3.RELEASE spring-integration-java-dsl-1.0.0.M2 spring-jms-4.0.6.RELEASE . My Gateway is configured as follows : .. . .. . My Integration flow is configured as follows : .. . .. . Thanks for any help on this PM . .. . Answer : First of all your configuration is bad : .. . .. . 1 . Since you start the flow from WsGateway process you really should wait reply there . The gateway s request reply capability is based on TemporaryReplyChannel which is placed to the headers as non-serializable value . 2 . As long as you wait rely on that gateway actually there is no reason to provide the replyChannel if you aren t going to do some publish-subscribe logic on the reply . 3 . As you send message to the JMS queue you should understand that consumer part might be a separete remote application . And the last one might know nothing about your out.ch . 4 . The JMS request reply capability is really based on JMSCorrelationID but it isn t enough . The one more thing here is a ReplyTo JMS header . Hence if you are going to send reply from the consumer you should really just rely on the JmsGatewayIn stuff . So I d change your code to this : .. . .. . Let me know if it is appropriate for you or try to explian why you use two-way gateways for one one-way cases . Maybe Jms.outboundAdapter and Jms.inboundAdapter are more good for you UPDATE .. . .. . How to use header-channels-to-string from Java DSL : Comment : Hi your solution is correct thanks . I had first tried replacing the Jms In Out Gateways with Jms In Out Adapters but had trouble configuring those too . Then I tried only Jms Out Gateway with replyDestination as in your solution and that worked okay . I hadn t removed the initial @Gateway s replyChannel which as you mentioned is not needed . Thanks Comment : Hello again I find myself needing to come back to this post.. . I have a requirement where I believe I do need to use separate JMS Inbound Outbound adapters to allow for asynchronous responses . In order to do this I have again set a replyChannel out.ch on WsGateway switched the Jms.outboundGateway to both a Jms.outboundAdapter and Jms.inboundAdapter and have set JMSCorrelationID header on the message before sending out but when response comes back and placed into out.ch the WsGateway does not pick up the response message My SI flow is actually a bit more complicated than shown here.. . Comment : Try to use header-enricher with header-channels-to-string before sending request Comment : How would I use header-channels-to-string in the new DSL form Is it simply a case of setting it as a header name with null value Comment : Yes you are right . So you have to do this workaround : github.com spring-projects spring-integration-extensions blob https : github.com spring-projects spring-integration-extensions blob master spring-integration-java-dsl src main java org springframework integration dsl HeaderEnricherSpec.java L145", "Question : In plain JMS we can do : session.unsubscribe name of the durable subscription but how do we do it through DMLC Couldn t find any specific method for this purpose in it . .. . Answer : To my knowledge there is no Spring specific way of sending an unsubscribe command to the MQ server however you always have the option of obtaining an underlying JMS Session by extending the DefaultMessageListenerContainer http : static.springsource.org spring docs 3.0.x javadoc-api org springframework jms listener DefaultMessageListenerContainer.html class and calling getSession http : static.springsource.org spring docs 3.0.x javadoc-api org springframework jms listener AbstractPollingMessageListenerContainer.html getSession 28org.springframework.jms.connection.JmsResourceHolder 29 or createSession http : static.springsource.org spring docs 3.0.x javadoc-api org springframework jms support JmsAccessor.html createSession 28javax.jms.Connection 29 . After all Spring is just a convenient abstraction over the top of JMS and doesn t prevent you from using the JMS API directly if required .", "Question : Using Spring-JMS it is possible to receive messages within an external transaction context via the DefaultMessageListenerContainer http : static.springsource.org spring docs 3.0.x javadoc-api org springframework jms listener DefaultMessageListenerContainer.html . However the only documented way to write a message is via JmsTemplate.send and I can t see how this can be coerced to use a given TransactionManager . Can anyone point me in the right direction .. . .. . More info : Ensuring a transaction manager is available WebSphereUowTransactionManager using JmsTemplate.write against an Oracle AQjmsFactory.getQueueConnectionFactory dataSource results in : .. . .. . So whilst I have no reason to doubt the advise below I am not able to test it as I can t figure out how to get AQ JMS to not attempt a commit . Will update as I learn more . .. . Answer : My understanding is that JMS producers are inherently transacted via JTA . By sending a message via JMS MessageProducer the thread-local JTA transaction is used if one is present . This is hinting at by the Spring manual section 21.2.5 http : static.springsource.org spring docs 3.0.x reference jms.html jms-tx : .. . .. . JmsTemplate can also be used with the JtaTransactionManager and an XA-capable JMS ConnectionFactory for performing distributed transactions . Note that this requires the use of a JTA transaction manager as well as a properly XA-configured ConnectionFactory . This is also suggested by JmsAccessor.setSessionTransacted the superclass of JmsTemplate javadoc http : static.springsource.org spring docs 3.0.x javadoc-api org springframework jms support JmsAccessor.html setSessionTransacted 28boolean 29 : .. . .. . Set the transaction mode that is used when creating a JMS Session . Default is false . Note that within a JTA transaction the parameters passed to create Queue Topic Session boolean transacted int acknowledgeMode method are not taken into account . Depending on the J2EE transaction context the container makes its own decisions on these values . Analogously these parameters are not taken into account within a locally managed transaction either since the accessor operates on an existing JMS Session in this case . .. . Setting this flag to true will use a short local JMS transaction when running outside of a managed transaction and a synchronized local JMS transaction in case of a managed transaction other than an XA transaction being present . The latter has the effect of a local JMS transaction being managed alongside the main transaction which might be a native JDBC transaction with the JMS transaction committing right after the main transaction . So by start a JTA transaction i.e . by using Spring s transaction API with JtaTransactionManager and calling JmsTemplate.send .. . you will be sending the message bound to that transaction . Comment : Thank you . I wonder will Spring be able to find the transaction in flight when it is started by another non-Spring process I ll find out tomorrow Comment : @Synesso : Yes it will . JTA transactions are managed by the container not by Spring .", "Question : We currently use JMS API with ActiveMQ broker looking over to move to RabbitMQ . Compared to openWire vs amqp which one would give best performance with java client-producer . I Couldn t find a comparison study on amqp RabbitMQ vs openwire activeMQ native protocol . I m looking in terms of raw performance and ease of scalability . We currently use Spring Integration for ActiveMQ I would like to know if its a drastic change to move to RabbitMQ AMQP even with Spring Integration . Is there any bridge similar to what ActiveMQ uses to do JMS - AMQP forwarding .. . Answer : ActiveMQ now implements AMQP . You can specify multiple communication protocols and let ActiveMQ auto detect determine which to implement : http : activemq.apache.org auto.html", "Question : What is the equivalent of destination-type from jms : listener-container in JavaConfig I have checked in the API these two following classes without results . DefaultMessageListenerContainer http : docs.spring.io spring docs 4.0.6.RELEASE javadoc-api org springframework jms listener DefaultMessageListenerContainer.html .. . MessageListenerAdapter http : docs.spring.io spring docs 4.0.6.RELEASE javadoc-api org springframework jms listener adapter MessageListenerAdapter.html .. . .. . I am trying to create consumers for a topic many tutorials in the web use destination-type topic .. . .. . According with the 23.6 JMS Namespace Support http : docs.spring.io spring docs 4.0.6.RELEASE spring-framework-reference htmlsingle jms-namespace section there is the Table 23.2 . Attributes of the JMS element table . Where for the destination-type attribute says : .. . .. . The JMS destination type for this listener : queue topic or durableTopic . The default is queue . For the audience : consider the two following links if you are trying to do a migration from jms : listener-container and jms : listener for JavaConfig . complete jms : listener migration to JavaConfig http : stackoverflow.com questions 25173809 complete-jmslistener-migration-to-javaconfig .. . How to add multiple JMS MessageListners in a single MessageListenerContainer for Spring Java Config http : stackoverflow.com questions 21881657 how-to-add-multiple-jms-messagelistners-in-a-single-messagelistenercontainer-for .. . Answer : Though this is a bit late I would suggest to use the following approach for anyone who is still searching for the answer . I have created a new Class DefaultMessageListenerContainerExtended which extends DefaultMessageListenerContainer and I have added one more method as setDestinationType . This does the trick in a nice and familiar way . Following is the link-to source code which can be found on git : .. . .. . https : github.com HVT7 spring-jms-set-destination-type blob master DefaultMessageListenerContainerExtended.java .. . .. . Also to add try to use spring version 4.2.5 as there are minor updates in that version Had to dig a lot due to version issues as I was using 4.1.5 and Listener Containers did not had function to set ReplyPubSubDomain property .", "Question : I am not running under Java EE . I want to have an XA transaction using Spring to share a transaction between DB and JMS . Does spring provide such a functionality or must I use an external transaction manager such as Atomikos I use currently the DataSourceTransactionManager for the DB and I see I can also use the JMSTransactionManager . Do they work together Not clear from the documentation as JtaTransactionManager is mentioned . Please advise . Yair .. . Answer : Spring only provides a framework for transaction management it as such doesn t provide any transaction manager . If you are running your application outside a Java EE container and you need a transaction between resources like a DB and JMS you have to use an external TransactionManager like Atomikos or JOTM Java Open Transaction Manager . You might want to refer to http : www.javaworld.com javaworld jw-04-2007 jw-04-xa.html for more details on XA using Spring ." ] }
[ "yes-answer-long", "yes-answer-short" ]
api
UNK_RELATION
flotr@javascript-framework@72
flotr -- flotr is a javascript plotting library based on the prototype @placeholder 1.6 + .flotr enables you to draw appealing graphs in most modern browsers with an easy to learn syntax .
{ "confidence": [ 67.91080474853516, 65.86145782470703, 65.51144409179688, 64.91944885253906, 64.91944885253906, 62.70458984375, 59.743682861328125, 59.090545654296875, 58.75735855102539, 57.546478271484375, 56.485145568847656, 56.09519958496094, 53.86003875732422, 53.41061019897461, 53.41061019897461, 50.748451232910156, 48.35820007324219, 48.03382873535156, 47.581321716308594, 46.410369873046875, 46.20857620239258, 46.20857620239258, 46.20857620239258, 44.99769592285156, 44.99769592285156, 42.44470977783203, 41.82062530517578, 41.80077362060547, 40.58988952636719, 33.32915496826172, 31.503902435302734, 24.553756713867188, 22.621326446533203, 22.474735260009766, 21.17902183532715, 20.663623809814453, 20.315876007080078, 20.102962493896484, 20.03353500366211, 19.97307014465332, 19.154903411865234, 18.835865020751953, 18.66786003112793, 18.470291137695312, 18.470291137695312, 18.367639541625977, 18.249584197998047, 17.952293395996094, 17.90721321105957, 17.75348472595215, 17.443391799926758, 17.305028915405273, 17.03046417236328, 16.696331024169922, 16.629568099975586, 16.629568099975586, 16.610912322998047, 16.560914993286133, 16.539613723754883, 16.539613723754883, 16.539613723754883, 16.539613723754883, 16.539613723754883, 16.539613723754883, 16.539613723754883, 16.539613723754883, 16.539613723754883, 16.539613723754883, 16.539613723754883, 16.49453353881836, 16.49453353881836, 16.49453353881836, 16.290325164794922, 16.26963233947754, 16.187894821166992, 16.187894821166992, 16.02591323852539, 16.02591323852539, 15.933662414550781, 15.913812637329102, 15.904590606689453, 15.904590606689453, 15.832351684570312, 15.832351684570312, 15.832351684570312, 15.520946502685547, 15.223654747009277, 15.223654747009277, 15.223654747009277, 15.041706085205078, 14.616662979125977, 14.616662979125977, 14.403828620910645, 14.365445137023926, 14.34611701965332, 14.294245719909668, 14.294245719909668, 14.200661659240723, 14.079339027404785, 14.007100105285645 ], "content": [ "I am using flotr http : code.google.com p flotr .", "you should add the flotr library to the jsfiddle example", "I am using FLotr API to draw charts and Flotr API is internally using Prototype.js .", "I am new to flotr javascript libary .", "I am using flotr chart javascript libary .", "The option for Flotr is trackFormatter : function obj .. . .", "Is there any way to send object image content-type created by Flotr http : code.google.com p flotr to server-side-scripting .", "The older versions don t support the canvas element afaik.. . but a look at the website solutoire.com flotr http : solutoire.com flotr You have to include the Excanvas script that comes with Flotr .", "I m using flotr to graph 90 data sets .", "I am new to this flotr and beginner of java .", "I am just trying to draw a simple pie-chart using flotr an open-source javascript for developing various charts .", "I was trying to create flotr js on the fly and execute it .", "when i Create basic axis chart from the above link it showing me the white page .. . .. . http : www.solutoire.com experiments flotr examples basic-axis.html .. . .. . Hear is the sample code i am new for flotr javascript .", "Flotr x-axis date time http : stackoverflow.com q 1057392 471559", "Also I would like to use the default options of Flotr .", "I added the flotr js to a static file and put it in a script block .", "Hi In Flotr Playground http : flotr.googlecode.com svn-trunk flotr playground index.html site also the Y Axis Title is appearing in a Horizontal Way .. . .. . See the Image here http : www.tiikoni.com tis view id c57a22f .. . .. . Please tell me how to resolve this", "I am using FLOTR API to display charts .. . .. . I have some large sets of data for Six Months .", "I saw this example.. . .. . .. . http : phenxdesign.net projects flotr examples prototype mouse-tracking.html .. . .. . This one uses tracking support but it only shows the x and y values .", "Maybe you could try this plugin : .. . .. . jquery.flot.resize.js .. . .. . Flotr Resize Example http : www.flotcharts.org flot examples resize", "can any one correct me where i went wrong and what are the js files i need to add for flotr", "The documentation of sDashboard state if widet type is Chart widgetContent should have data and options specified as per the Flotr Documentation .", "For more detailed options value i got this site http : solutoire.com flotr docs options providing good information .", "How can i create a flotr chart that retervie data from data base .", "i can create chart by static values but using database how can i create flotr charts .", "Check out the quick start guide http : solutoire.com flotr docs quickstart Looks like you need to investigate a little more and work out the solution by playing with the Flotr.draw options", "As far as I can tell Flotr generates a canvas HTML element image which you can convert to base64 encoding with the canvas.toDataURL method .", "So I was wondering if flotr has a function to label these data sets when the mouse hovers over graphed data for that data set .", "so that i can work for all the othe charts.please help guide me the process to retervie data ffrom database into flotr charts using java or jsp .", "I m using the Flotr2 lib : https : github.com HumbleSoftware Flotr2 .. . .. . I have been searching everywhere to just understand how to add a callback or an event handler which gets triggered when the Flotr graph is actually finished with its drawing .", "I have a question So the reason i posted this : .. . .. . Hi the above function is from the charting API Flotr API As per the above code the alert gets displayed 8 times Because noofticks labels is 8 .. . .. . Is it possible to capture the last alert That is when n is 8 where 8 is the noofTicks Value .", "Could it be that there are some problems with the standard prototype javascript libraries", "Not easy then .", "See the library source .", "JavaScript For Beginners http : www.codeproject.com Articles 755 JavaScript-For-Beginners", "I m trying to get flotr2 graphs working in my Phonegap application .", "While it s trying to draw the graph container is blank so I would like to show a loading spinner while it s trying to draw and hide this spinner when the graph is actually finished with its drawing .", "Edit : I m sorry I did not realize that you are using a library .", "on a side note as your using prototype you can simplify your code using :", "I m not a javascript expert but i know how to use it .", "I am fairly new to Flotr2 and I have just been building some simple line graphs .", "My graph draws okay with small or mid size data but when I use a larger set of data the graph takes much longer to draw .", "And here is the javascript that I am running :", "You need to disable the option HtmlText by setting it to false .", "Yup you can use the markers attribute .", "You can actually just place this fragment after the bars type you can use both at once : .. . .. . However there is a small problem with this .", "As Fabien M nager mentioned You need to turn off the HtmlText option .", "I am new to flotr2 could you give me an good study article or docs so I can study it .", "Your problem here is very simple.. . in order to use the built-in formatter you have to pass in Date objects in Javascript .", "On their site they have an example http : humblesoftware.com flotr2 basic-pie of how to draw a pie-chart .", "There really wasn t much documentation for it but some simple javascript knowledge was enough for it .", "Well I m not sure what you mean by Java...do you mean Javascript", "You can also use the setData and draw methods of the flot plot to avoid drawing the plot every time but that s a different issue .", "Like so : .. . .. . And then in your javascript code .. . .. . instead of d1 replace that with dataset the variable you declared back at your php code", "Because Flotr2 works on web-based platforms .", "Based on this output what are the changes need in the code .. .", "But to integrate a database into making a chart with Flotr2 is actually really easy .", "You need to use either the success callback or the .done method to draw the plot after getting JSON data from the server : .. . .. . You can see the full jsFiddle http : jsfiddle.net gKRPX 30 .", "I want to have the Text in Vertical Style for Y axis Under my Charts .", "Then the title and the title angle can be adjusted .", "I use flotr2 I wrote a test here .", "http : jsfiddle.net yKqXM .. . .. . If I want to show label on each bar stack should I use marker type", "and how do I use it .", "Sorry if this question is stupid but I am frustrated of looking for the example .", "Matt", "Flotr2 doesn t respect the stacked positions for markers so the marker labels will end up in the wrong position .", "To get around this create some dummy-data sets which are the summation of the stacks and move the bars and markers to be directly specified on the separate data sources .", "The bit after the data is listed is just the default mode for each data source .", "There are many quite useful opts for markers .", "My problem is that I want to defined a custom javascript function to display date in the mouse track .", "Does someone have the same problem and or have find a solution to delcare custom javascript function like trackFormatter", "Like this.. . .. . .. . Look at your final rendered Javascript for clues - the PHP code doesn t make this issue clear .", "I believe you should be using date like so : date U date of completion ...also if you d rather do it with javascript : new Date 04 28 2012 .getTime", "If so the last index of an array with length 8 would b 7 arrays are zero based .", "Thank you", "Thank you", "Thank you very much .", "You can extend it to be a matrix .", "Basically what you need to do is write some php code that will access the database and then just echo out the javascript code with the php variables .", "See http : php.net manual en function.date.php for how to convert a date to Epoch time and remember php uses seconds not ms like JavaScript and Flotr2 .", "How do you call tickFormatter", "Maybe you could be more specific", "In your xaxis object you need to use the ticks property to specify the ticks you want .", "@user663724 Could you show a short example of how you call your function and what the expected output is", "I ve used windows.onload as a wrapper but you could also use a custom function that you call explicitly .", "this code doesn t suit my code anyway thank you for your help .", "Reducing your function to a minimum works well comparing n with this.noTicks : .. . .. . Are you calling it the same way .. . .xaxis.tickFormatter .. .", "You might want to show your code so people know what you re working with .", "You can wrap the call to Flotr.draw in another function and just put your spinner code inside the calling function .", "@user663724 it s good form to mark answers as accepted if they help you see the FAQ under How do I ask questions here", "Thank you very much for the reply This is very big code cant paste it here i am using humblesoftware.com finance index http : www.humblesoftware.com finance index to display HumbleFinance.graphs.price HumbleFinance.KiranGraph this.NewData.slice xmin xmax+1 newBounds", "Hmm I couldn t find any official way to do this but you might be able to patch the js file to store the noticks calculation result in a variable or maybe better send a second parameter to the tickFormatter which is true if it is the last tick .", "So to get the epoch time I just did this : .. . .. . Then to get the time to show up properly instead of it just being crazy numbers this is what I hacked together : .. . .. . and then if you want the mouse-over to produce the same results put this code inside the mouse thing : .. . .. . All of the rest of the javascript and php remain the same as in my original question at the top .", "All of the mentioned features are supported by amCharts : .. . .. . 1 it s SVG VML based 2 free version is the same as commercial only a small link-to amcharts is displayed 3 Here is example with events : http : amcharts.com stock events 4 zoom-in zoom-out is supported 5 multiple y axes are also supported : http : amcharts.com javascript line-chart-with-multiple-value-axes", "You need to make sure you process your ajax response before you call this init .", "Do you have the actual file located in the location that you gave it", "You can check your browser s type which browser you use", "You can use the following :", "have you checked the firebug console", "One side note : you know you re creating global-variables in the second code snippet xmin and xmax don t you" ] }
{ "confidence": [ 80.5566635131836, 77.46145629882812, 74.6944808959961, 74.32437896728516, 74.32437896728516, 71.56935119628906, 71.56935119628906, 70.08621978759766, 68.98741149902344, 68.90562438964844, 67.651611328125, 62.33980941772461, 62.016822814941406, 59.6537971496582, 59.2902717590332, 59.15810012817383, 54.9908447265625, 54.77170944213867, 50.714569091796875, 49.52421951293945 ], "content": [ "Question : I am using flotr chart javascript libary . when i Create basic axis chart from the above link it showing me the white page .. . .. . http : www.solutoire.com experiments flotr examples basic-axis.html .. . .. . Hear is the sample code i am new for flotr javascript . Comment : you should add the flotr library to the jsfiddle example Comment : For me even in Html page displaying the same Can u please explain me in detail .. . Answer : here is your example working : http : jsfiddle.net 7WGkZ 1 .. . .. . you have to add this in the head :", "Question : I am new to this flotr and beginner of java . How can i create a flotr chart that retervie data from data base . i can create chart by static values but using database how can i create flotr charts . please give me some Example with database . so that i can work for all the othe charts.please help guide me the process to retervie data ffrom database into flotr charts using java or jsp . .. . Answer : Well I m not sure what you mean by Java...do you mean Javascript Because Flotr2 works on web-based platforms . But to integrate a database into making a chart with Flotr2 is actually really easy . I use php but you could use asp or jsp as well for this . Basically what you need to do is write some php code that will access the database and then just echo out the javascript code with the php variables . Like so : .. . .. . And then in your javascript code .. . .. . instead of d1 replace that with dataset the variable you declared back at your php code", "Question : Hi In Flotr Playground http : flotr.googlecode.com svn-trunk flotr playground index.html site also the Y Axis Title is appearing in a Horizontal Way .. . .. . See the Image here http : www.tiikoni.com tis view id c57a22f .. . .. . Please tell me how to resolve this I want to have the Text in Vertical Style for Y axis Under my Charts . .. . Answer : Check out the quick start guide http : solutoire.com flotr docs quickstart Looks like you need to investigate a little more and work out the solution by playing with the Flotr.draw options", "Question : I am using FLotr API to draw charts and Flotr API is internally using Prototype.js . My Charts are working fine under Mozilla but if i run charts in IE its giving me Script Errors . There is a function inside the Prototype.js file .. . .. . When i put the alert for the element and run with Mozilla it displays as .. . .. . 1 . object Window .. . 2 . object HTMLDocument .. . 3 . object HTMLCanvasElement .. . 4 . object HTMLCanvasElement .. . 5 . object HTMLCanvasElement .. . .. . But when i run with IE7 it displays .. . .. . 1 . Object .. . 2 . Object .. . 3 . A run time error .. . 4 . object Comment : Which IE version The older versions don t support the canvas element afaik.. . but a look at the website solutoire.com flotr http : solutoire.com flotr You have to include the Excanvas script that comes with Flotr . .. . Answer : Internet Explorer 7 does not support http : en.wikipedia.org wiki Canvas element Support the canvas element . Thus the runtime-error . You can use a plug-in http : arstechnica.com software news 2008 08 mozilla-drags-ie-into-the-future-with-canvas-element-plugin.ars to add support for that element though .", "Question : I am using FLotr API to draw charts and Flotr API is internally using Prototype.js . My Charts are working fine under Mozilla but if i run charts in IE its giving me Script Errors . There is a function inside the Prototype.js file .. . .. . When i put the alert for the element and run with Mozilla it displays as .. . .. . 1 . object Window .. . 2 . object HTMLDocument .. . 3 . object HTMLCanvasElement .. . 4 . object HTMLCanvasElement .. . 5 . object HTMLCanvasElement .. . .. . But when i run with IE7 it displays .. . .. . 1 . Object .. . 2 . Object .. . 3 . A run time error .. . 4 . object Comment : Which IE version The older versions don t support the canvas element afaik.. . but a look at the website solutoire.com flotr http : solutoire.com flotr You have to include the Excanvas script that comes with Flotr . .. . Answer : try to include excanvas into your script tags : .. . .. . http : excanvas.sourceforge.net .. . .. . Hope this helps Comment : Thank you very much i am using IE7 and i am already including Excanvas . but still the error remians the same .", "Question : Hi In Flotr Playground http : flotr.googlecode.com svn-trunk flotr playground index.html site also the Y Axis Title is appearing in a Horizontal Way .. . .. . See the Image here http : www.tiikoni.com tis view id c57a22f .. . .. . Please tell me how to resolve this I want to have the Text in Vertical Style for Y axis Under my Charts . .. . Answer : You need to disable the option HtmlText by setting it to false .", "Question : Hi In Flotr Playground http : flotr.googlecode.com svn-trunk flotr playground index.html site also the Y Axis Title is appearing in a Horizontal Way .. . .. . See the Image here http : www.tiikoni.com tis view id c57a22f .. . .. . Please tell me how to resolve this I want to have the Text in Vertical Style for Y axis Under my Charts . .. . Answer : As Fabien M nager mentioned You need to turn off the HtmlText option . Then the title and the title angle can be adjusted .", "Question : I m using flotr to graph 90 data sets . On average only two of the 90 sets of data will actually produce a graphable line . The other 88 or so will have y values so low that they will barely peak above the x axis . Here is an example.. . enter image description here http : i.stack.imgur.com flwEk.jpg .. . .. . My problem is that I don t know what data set those two lines are . I could make a legend but that legend would be huge because there are about 90 data sets . So I was wondering if flotr has a function to label these data sets when the mouse hovers over graphed data for that data set . Does such a function exist Thanks . .. . Answer : Okay I found my answer . I saw this example.. . .. . .. . http : phenxdesign.net projects flotr examples prototype mouse-tracking.html .. . .. . This one uses tracking support but it only shows the x and y values . I saw this line... . .. . .. . and changed it to this.. . .. . .. . Then I specified a data label for each data set and passed them to Flotr.draw in an associative-array . I did this by changing this.. . .. . .. . to this.. . .. . .. . Below is an example of the changes I made . Now the mouse hover shows x and y values and whatever data label you enter . Before : .. . .. . After :", "Question : Is there any way to send object image content-type created by Flotr http : code.google.com p flotr to server-side-scripting . For comparison with protovis we can send SVG generated to server-side servlet to have PNG JPG result with Apache Batik . Appreciate for any clue . Regards .. . .. . Dino .. . Answer : As far as I can tell Flotr generates a canvas HTML element image which you can convert to base64 encoding with the canvas.toDataURL method . Then it should not be painful to send it to web server with an AJAX HTTP POST call . Cheers", "Question : I am new to flotr javascript libary . when i create a chart and execute . it showing white page and my chart is unable to view . can any one correct me where i went wrong and what are the js files i need to add for flotr Comment : have you checked the firebug console are there any errors shown Comment : No No errors shown . the above chart is not displaying it showing blank .. . Answer : Do you have the actual file located in the location that you gave it Also this is the file path you have now : . js flotr2.min.js but you should try it with 2 periods before the js . like so : . . js flotr2.min.js", "Question : I cannot show the plot using sDashboard in my html file . I did the following and the plot doesn t show up . Also I would like to use the default options of Flotr . I tried Flotr.defaultOptions but it didn t work . The documentation of sDashboard state if widet type is Chart widgetContent should have data and options specified as per the Flotr Documentation . What am I doing wrong here The widget Box Appears but the plot sine plot doesn t appears . .. . Answer : Regarding the options on widgetContent defined on widgetDefinitions it can be left blank and still I get the plot . ie .. . .. . also worked fine on my program . For more detailed options value i got this site http : solutoire.com flotr docs options providing good information .", "Question : This NewdateData is dynamically filled from database depending upon the selection made from the user-interface . I am using this NewdateData for displaying under the X axis Charts . The issue I am facing is that the values are not taken till the end I want to have the last value to have under the X axis Labels . I am using flotr http : code.google.com p flotr . Comment : what i want is i want to have the provious values and if its the last value i want that also so basically i assume if and else withinn return NewdateData k Comment : I use Flotr.js file .. . Answer : You can get the last value of an array with : Comment : Thank you very much is it possible to use both return NewdateData k and NewdateData NewdateData.length-1 to return Comment : @user663724 use json or array if u want to return multiple values", "Question : I cannot show the plot using sDashboard in my html file . I did the following and the plot doesn t show up . Also I would like to use the default options of Flotr . I tried Flotr.defaultOptions but it didn t work . The documentation of sDashboard state if widet type is Chart widgetContent should have data and options specified as per the Flotr Documentation . What am I doing wrong here The widget Box Appears but the plot sine plot doesn t appears . .. . Answer : I solved the problem I was facing by making array of the tdata i was using . ie I was using tdata as in format 0 .. . 1 . . 2 . . .. . and using the same in widgetContent . Upon some research i used following .. . .. . ie I created array of tdata . And got the plot .", "Question : null .. . Answer : I am trying to create a flotr2 chart dynamically but it is invisible and or disappears . The dynamic chart works if I paste in the code static so I know it should work . Please try the code below . Comment : You can see this code in joyless action at jsfiddle jsfiddle.net bodyrock a9tgn 1 http : jsfiddle.net bodyrock a9tgn 1 here is the static joyful code jsfiddle.net bodyrock f4Z6L http : jsfiddle.net bodyrock f4Z6L Comment : sorry the joyful static radar-chart is here jsfiddle.net bodyrock xsRCY http : jsfiddle.net bodyrock xsRCY Comment : this was a newbie mistake . I was trying to create flotr js on the fly and execute it . Turn out I didn t need to do that . I added the flotr js to a static file and put it in a script block . I generated the chart properties JSON js on the fly and had it call the static flotr2 script . This setup allowed for a nice ajax type solution .", "Question : I am just trying to draw a simple pie-chart using flotr an open-source javascript for developing various charts . But the code i gave works a little part . The chart was drawn and the explode properties horizontal and vertical lines all works fine . But the mouse tracker and the legends are not working . I think i have made some mistake in code . but i am not able to clear it . Anyone help me out please . Thanks in advance . .. . Answer : You can check your browser s type which browser you use If IE you should add .. . .. . on your first line in head segment and add .. . .. . in head for compatibility . And you should add a line : .. . .. . in function basic pie container s first line to target the container element . caution : some of my answer string have been messed by the stackoverflow website . Sorry for that", "Question : I am just trying to draw a simple pie-chart using flotr an open-source javascript for developing various charts . But the code i gave works a little part . The chart was drawn and the explode properties horizontal and vertical lines all works fine . But the mouse tracker and the legends are not working . I think i have made some mistake in code . but i am not able to clear it . Anyone help me out please . Thanks in advance . .. . Answer : You might have an error in your legend configuration I deleted it and the legend appeared correctly . Take a look : http : jsfiddle.net Kpmcn Comment : Thanks matthew . Now it works fine for me . But the mouse track problem still exist . I updated the code here . jsfiddle.net Kpmcn 2 http : jsfiddle.net Kpmcn 2", "Question : I m using the Flotr2 lib : https : github.com HumbleSoftware Flotr2 .. . .. . I have been searching everywhere to just understand how to add a callback or an event handler which gets triggered when the Flotr graph is actually finished with its drawing . My graph draws okay with small or mid size data but when I use a larger set of data the graph takes much longer to draw . While it s trying to draw the graph container is blank so I would like to show a loading spinner while it s trying to draw and hide this spinner when the graph is actually finished with its drawing . So my question is how to know when the graph has really completed its drawing Could someone please point me to the right direction or provide with some code sample . Any help would be much much appreciated . Thank you Comment : I ve only tried my answer with smallish data sets that I have handy . You might want to show your code so people know what you re working with . .. . Answer : You can wrap the call to Flotr.draw in another function and just put your spinner code inside the calling function . I ve used windows.onload as a wrapper but you could also use a custom function that you call explicitly . Comment : Thanks . It worked .", "Question : I need help to display chart in tapestry pages . I m using tapestry 5.2.4 and chenillekit 1.3.0 . My problem is that I want to defined a custom javascript function to display date in the mouse track . The option for Flotr is trackFormatter : function obj .. . . In my case I send option for the graph with JSON . When the function is called i have error like this : .. . .. . n.mouse.trackFormatter is not a function for firefox .. . .. . Uncaught TypeError : Property trackFormatter of object is not a function for chrome . Does someone have the same problem and or have find a solution to delcare custom javascript function like trackFormatter thanks My code : .. . .. . mymouseeventhandler.js : Comment : You re registering dateFormatter obj as the handler but your function is actually called dateTracker . Could that be the problem .. . Answer : The function is not well recognized because of double quote added when creating JSONObject . Here is a solution to avoid double quote : .. . .. . I hope it will help someone else :", "Question : I am unable to get the Date Values into X axis .. . .. . It is throwing an Error as detailed error : jsonData n is undefined Comment : Java array Methinks you should edit your title . .. . Answer : From looking at this question http : stackoverflow.com q 1057392 471559 I can see that tickFormatter is passed a timestamp not an index . jsonData n is undefined because n is not the index you think it is . The linked question also seems to have a good solution too you should try that . Flotr x-axis date time http : stackoverflow.com q 1057392 471559 Comment : Thank you for your reply sir I have defined this way xaxis : tickFormatter : function n doesn t know how to proceed here", "Question : Is there a good way to resize Flotr2 charts after it s rendered The only way I know right now is to redraw it . If found that if I just change the size of the canvas the chart simply disappears . Comment : Inorder to do that you need to redraw the the graph after revising the canvas . Comment : That s what I have been doing but it s very inconvenient and also very expensive with amount of data even if it s cached in the browser . .. . Answer : Maybe you could try this plugin : .. . .. . jquery.flot.resize.js .. . .. . Flotr Resize Example http : www.flotcharts.org flot examples resize Comment : The page you linked doesn t actually have any helpful information . Perhaps you can link-to an example implementation Comment : Sorry I was using also Flotr2 but after some search I got rid of it because of its limitations and got highcharts.com http : www.highcharts.com" ] }
[ "yes-answer-long", "yes-answer-short" ]
javascript-framework
UNK_RELATION
qi4j@aop@104
qi4j -- qi4j is a framework for domain centric application development including evolved concepts from @placeholder di and ddd .
{ "confidence": [ 57.67211151123047, 53.228797912597656, 52.76083755493164, 48.871726989746094, 48.498966217041016, 48.4006233215332, 47.59212112426758, 47.59212112426758, 47.57077407836914, 47.32834243774414, 47.03754425048828, 45.7253303527832, 45.14295959472656, 45.12318801879883, 44.494285583496094, 44.27253723144531, 44.014869689941406, 44.014869689941406, 43.88174819946289, 43.88174819946289, 43.88174819946289, 43.199546813964844, 42.5985107421875, 42.279205322265625, 41.340850830078125, 41.340850830078125, 41.047691345214844, 39.83350372314453, 39.83350372314453, 39.32141876220703, 39.23920440673828, 39.23920440673828, 39.23920440673828, 39.23920440673828, 39.23920440673828, 39.15191650390625, 39.15191650390625, 39.15191650390625, 39.11181640625, 37.68937683105469, 37.62781524658203, 37.59452819824219, 36.40514373779297, 36.40514373779297, 36.397865295410156, 36.397865295410156, 36.38690948486328, 36.38690948486328, 34.74399185180664, 34.509376525878906, 34.509376525878906, 33.78636932373047, 32.97080993652344, 31.967849731445312, 31.744365692138672, 31.744365692138672, 31.744365692138672, 31.744365692138672, 31.744365692138672, 31.744365692138672, 31.66803741455078, 31.66803741455078, 31.66803741455078, 31.66803741455078, 30.794178009033203, 30.41037368774414, 30.38140869140625, 28.90302848815918, 28.445518493652344, 28.01813507080078, 23.51947784423828, 23.51947784423828, 22.39244842529297, 21.673242568969727, 21.43760108947754, 19.253589630126953, 18.946195602416992, 18.56537437438965, 18.34109115600586, 17.178625106811523, 17.178625106811523, 17.178625106811523, 17.178625106811523, 17.178625106811523, 17.178625106811523, 17.178625106811523, 17.178625106811523, 17.178625106811523, 17.178625106811523, 17.178625106811523, 17.178625106811523, 17.178625106811523, 17.178625106811523, 17.178625106811523, 17.178625106811523, 17.178625106811523, 17.178625106811523, 17.178625106811523, 17.178625106811523, 17.178625106811523 ], "content": [ "Qi4j SDK 2.0 is under development .", "Qi4j SQL support is like everything Qi4j an opt-in collection of libraries and extensions .", "Qi4j is not .", "If you want to use 2.0 you can download builds from Qi4j continuous-integration or build the Qi4j SDK from source .", "Qi4j provide a small library supporting this use-case : qi4j-lib-servlet .", "Hope that helps or meet the Qi4j community at the qi4j-dev https : groups.google.com forum fromgroups forum qi4j-dev Google Group for additional support .", "Qi4j provide both Composite Oriented Programming using Mixins and a DDD oriented framework .", "Moreover Qi4j provides more than just composites and AOP constructs : a DDD oriented framework libraries extensions and dev tools .", "Using a Qi4j application in a servlet context is quite easy .", "Qi4j will fill in the missing and unused method calls .", "Qi4j do not have this downside .", "I am trying to run the project in Qi4j in 2 minutes tutorial .. . .. . while I can t find the Qi4j lib files in the maven repository .", "In Qi4j you have to assemble the composites .", "According to Ohloh page of QI4J http : www.ohloh.net p qi4j possible alternatives are .. . .. . Indriagen http : code.google.com p indriagen .. . javATE http : www.javate.amattioli.it mainsite description.html .. . learn-ddd http : code.google.com p learn-ddd .. . zipper-framework http : code.google.com p zipper-framework", "For future readers Qi4j is now Apache Zest .", "I haven t used Qi4J .", "For Qi4j we are aiming for strong Scala support so that for instance Scala traits can be used in Qi4j composites .", "You can write Qi4j agnostic code and use Qi4j assembly code to compose it .", "The Qi4j core is small and you are free to use or not librairies and extensions present in the SDK .", "If you don t want to use Qi4j persistence support ie .", "Can anyone tell me how to import the Qi4j lib files with maven", "Your Qi4j Application will then be assembled and bootstrapped alongside your webapp and the Qi4jServletSupport class provided by the very same project will allow you to get a handle to your Qi4j Application from your code for example in your managed beans .", "BTW AspectJ is awesome and has greatly inspired Qi4j .", "The mentioned framework Qi4j by the OP is now Apache Zest http : zest.apache.org .", "Qi4j is not yet supported on the Android Dalvik VM .", "Qi4j 2.0 a complete rewrite was released in 2013 .", "I m currently trying to figure out how Qi4j works .", "So there are two basic approaches to integrate Qi4j with JPA .", "No JPA implies no Qi4j adoption in my opinion .", "Having it in a different scope is only to enforce you don t import anything from Qi4j Core Runtime in your Application Code .", "I m interested in Qi4j but I don t know how well it fits with SQL databases .", "I would like to know what does Qi4j provide to support SQL databases", "As stated in the documentation the SQL Library give you CircuitBreaker Library and Qi4j I O API integration for free .", "See http : qi4j.org latest library-sql.html .. . .. . Qi4j persistence relies on Entities stored in an EntityStore .", "See http : qi4j.org latest extension-es-sql.html .. . .. . Qi4j Query API relies on Index Query services .", "The most obvious similar thing to Qi4j I think is Scala .", "Did anybody manage to get qi4j running on OSGi environment like servicemix", "Qi4j is now Apache Zest and we welcome contributors with open arms .", "Because the mixin composite model is the important feature of Qi4j rather than DI there really isn t any comparison on the Java platform .", "Weekly SNAPSHOTs are uploaded to https : repository-qi4j.forge.cloudbees.com snapshot so you need to add this url as a maven repository : .. . .. . And then you can add dependencies to Qi4j : .. . .. . All this information can now be found on the Qi4j website see http : qi4j.org howto-depend-on-qi4j.html", "See http : qi4j.org latest extension-indexing-sql.html .. . .. . Finally an application sample demonstrates how to use all the SQL support provided by the Qi4j SDK for you to get started from .", "I m currently evaluating QI4J http : www.qi4j.org as it provides interesting concepts regarding properties handling in the context of an application connecting some ontologies together to create a partially semantic application .", "I tried to use the Qi4j lib in my pom.xml and am now facing the problem that the artifact can t be found .", "Qi4j consists of many many artifacts to keep the total footprint down as most applications won t use all bits and pieces .", "First you can use Qi4j in applications that already use something else to handle persistence JDBC JPA or any other technology .", "Entities and Query API you still can leverage the SQL Library that allows you to manage DataSources connection pools as Qi4j Services .", "Well I ve been using Qi4j myself for about a year now in a project .", "When I read through the Qi4j in 2 minutes 10 minutes etc .", "To learn how to depend on Qi4j in your build see the dedicated how-to that s now present on the Qi4j website : http : qi4j.org latest howto-depend-on-qi4j.html .. . .. . Here are the release and snapshot repositories : .. . .. . https : repository-qi4j.forge.cloudbees.com release .. . https : repository-qi4j.forge.cloudbees.com snapshot .. . .. . Weekly SNAPSHOTs are uploaded the snapshot repository so you need to add this url as a maven repository : .. . .. . And then you can add dependencies to Qi4j : .. . .. . Where QI4J VERSION is the version you want to use .", "Qi4J in my mind has way more downsides in that your tightly coupled to a library .", "Vendor lock-in is an interesting question if you have suggestions about this pop on the Qi4j mailing list .", "Nothing stops you to use only qi4j-core alongside anything you re already using or choose to use more from the SDK .", "I was reading an InfoQ article on Composite Oriented Programming earlier on : .. . .. . http : www.infoq.com articles Composite-Programming-Qi4j .. . .. . I was interested in finding out whether anybody is currently using or has used the Qi4j http : www.qi4j.org framework at all", "learn-ddd is only a sample DDD oriented application .", "To limit the JPA options so that the much more flexible data-structures that Qi4j needs can fully be used .", "Doing this will take away most of the advantages of why people choose Qi4j in the first place .", "However I think the extensibility of Qi4j is good enough to do such integration without hacking in the Core Runtime and simply create an EntityStore .", "First of all I like the ideas Composites Mixins Assemblies behind Qi4j but am held back by the complexity of using it .", "You could be thinking dependency-injection and not be thinking spring and be thinking Qi4j and not be thinking dept injection .", "requires casting .. . .. . Having no experience with Qi4J I can t say how this turns out in practice but it doesn t feel good .", "I think you can do most of what Qi4j does and way way more with AspectJ ITDs the language not the @AspectJ Java alternative .", "Jordao mentions it in his answer to the similar post http : stackoverflow.com a 2893712 318174 mentiond by @Ischin http : stackoverflow.com questions 6068772 qi4j-alternatives comment7027745 6068772 .", "Obviously the more you use the more your software depend on Qi4j to run but it s about the same with all frameworks libraries or tools .", "All you need is to extends AbstractQi4jServletBootstrap http : qi4j.org latest javadocs org qi4j library servlet lifecycle AbstractQi4jServletBootstrap.html which is a ServletContextListener and register it in your webapp .", "zipper-framework provides only configuration and service locators in a DDD oriented way its development seems to be staled .", "I am trying to use Qi4j with Android but I have problems defining the dependenciy because the gradle runtime -dependency does not exist on android .", "Based what i can see in the given repository the groupId and artifactId are completely different.. . .. . .. . http : repository.ops4j.org maven2 org qi4j core org.qi4j.core.spi 1.4 org.qi4j.core.spi-1.4.pom", "I just stumbled on Qi4J and after looking at the examples I nearly feel asleep with loads and loads of artifacts you have to create .", "According to the qi4j website the dependencies should look like this : .. . .. . .. . repositories .. . .. . .. . mavenRepo name : qi4j-releases url : https : repository-qi4j.forge.cloudbees.com release .. . mavenRepo name : qi4j-snapshots url : https : repository-qi4j.forge.cloudbees.com snapshot .. . .. . .. . .. . dependencies .. . .. . .. . compile org.qi4j.core : org.qi4j.core.bootstrap : QI4J VERSION .. . runtime org.qi4j.core : org.qi4j.core.runtime : QI4J VERSION .. . test org.qi4j.core : org.qi4j.core.testsupport : QI4J VERSION .. . .. . .. . .. . .. . .. . .. . .. . Because runtime does not exist in the gradle android-plugin I ve changed it to apk : .. . .. . .. . dependencies .. . compile org.qi4j.core : org.qi4j.core.bootstrap : 2.0 .. . apk org.qi4j.core : org.qi4j.core.runtime : 2.0 .. . .. . .. . .. . But I am still getting errors when I am trying to user some library functions in Android Studio .", "It constantly tells me that : .. . .. . On karaf console the following is printed : .. . .. . I m bootstrapping qi4j in an activator method like so apache scr component : .. . .. . In pom.xml I m defining the imports : .. . .. . All packages resolve including the runtime which I deployed in servicemix 5.3.0 together with needed dependencied : .. . .. . What s the trick", "The SDK provides many EntityStore implementations including one based on SQL databases .", "Again the SDK provides several implementations including one based on SQL databases .", "javATE provides a DDD oriented full stack but without COP .", "I just found an article http : www.infoq.com news 2008 11 Qi4j on a framework in Java that apparently allows it to support Mixins http : en.wikipedia.org wiki Mixin and something called Composite Oriented Programming which for all I know might even be the same thing.. . I ve also heard of worked with AOP and I m not sure how it differs from this either.. .", "The concepts there should be part of wider umbrella such as a language such as Java than a framework and should be easier to use .", "Moreover you can choose to either import an existing DataSource useful if you deploy your application in a container and you want that container to manage the DataSource or use any of the following connection pools implementations : Apache DBCP C3P0 or BoneCP .", "is is possible to do end up with something like this : .. . .. . I ve tried doing the above using the concern approach in ServiceChild .. . .. . However using this approach only the Hello implementation are detected by java and not the rest of the stuff from the Service class .", "It is also interesting to note that when a class mixin or concern calls one of its own methods that are in the composite type interface the call will not be intra-class but call the composite from the outside so the entire call stack is invoked to ensure that an internal call and an external call are identical in results .", "Such is not the case with AspectJ and will work great with any framework like Spring or JPA .", "Thanks", "There s support for the following databases : PostgreSQL MySQL MariaDB SQLite embedded H2 embedded or server and Apache Derby aka .", "Oracle JavaDB both in embedded and server modes .", "At the time of writing it supports only PostgreSQL as a backend but work is being done to support as many SQL databases as the SQL EntityStore .", "See http : qi4j.org latest sample-sql-support.html .. . .. . Paul", "thanks in advance :", "thanks a lot .", "The project is running :", "Glad to help .", "If you have any other question don t hesitate to post them here on SO .", "So is there any other approach that would work", "I m not sure I understand what you are trying to do but a concern should more be seen as a wrapper around the original implementation of the class it is a concern of .", "As the documentation states : .. . .. . A concern is a stateless Fragment shared between invocations that acts as an interceptor of the call to the Mixin .", "And would usually do this : .. . .. . But nevertheless if you have a concern on a interface you should also implement said interface : .. . .. . Hope this helped .", "I also don t fully understand the question .", "As Arvice says Concerns are the equivalent of around-advice in AOP with much more precise pointcut semantics .", "Although it is technically correct that a concern wraps the underlying concerns mixins I prefer to not thinking of it as a wrapper but an interceptor .", "It is the incoming-call that is handled .", "Conceptually slightly different and it may not work for everyone .", "It is also possible that both Concerns stateless and Mixins stateful implements only a subset of the methods in the interface they override simply by making the class abstract .", "And any combination may be used ." ] }
{ "confidence": [ 82.34275817871094, 70.59906005859375, 67.6525650024414, 66.5533676147461, 61.93373107910156, 60.954715728759766, 60.67534255981445, 57.29164123535156, 57.162925720214844, 56.61170196533203, 55.17586135864258, 54.61880874633789, 53.403377532958984, 53.04631042480469, 52.366878509521484, 51.67206573486328, 51.49516296386719, 49.63787078857422, 43.19590759277344, 41.624427795410156 ], "content": [ "Question : I m currently evaluating QI4J http : www.qi4j.org as it provides interesting concepts regarding properties handling in the context of an application connecting some ontologies together to create a partially semantic application . As a consequence I would like to find some alternatives regarding properties handling composition and integration in Java EE environment . Comment : Look at this answer http : stackoverflow.com questions 2287624 java-multiple-class-compositing-and-boiler-plate-reduction 2287732 2287732 .. . Answer : According to Ohloh page of QI4J http : www.ohloh.net p qi4j possible alternatives are .. . .. . Indriagen http : code.google.com p indriagen .. . javATE http : www.javate.amattioli.it mainsite description.html .. . learn-ddd http : code.google.com p learn-ddd .. . zipper-framework http : code.google.com p zipper-framework Comment : Qi4j provide both Composite Oriented Programming using Mixins and a DDD oriented framework . Indriagen is a dead project . javATE provides a DDD oriented full stack but without COP . learn-ddd is only a sample DDD oriented application . zipper-framework provides only configuration and service locators in a DDD oriented way its development seems to be staled .", "Question : I m currently evaluating QI4J http : www.qi4j.org as it provides interesting concepts regarding properties handling in the context of an application connecting some ontologies together to create a partially semantic application . As a consequence I would like to find some alternatives regarding properties handling composition and integration in Java EE environment . Comment : Look at this answer http : stackoverflow.com questions 2287624 java-multiple-class-compositing-and-boiler-plate-reduction 2287732 2287732 .. . Answer : I think you can do most of what Qi4j does and way way more with AspectJ ITDs the language not the @AspectJ Java alternative . Jordao mentions it in his answer to the similar post http : stackoverflow.com a 2893712 318174 mentiond by @Ischin http : stackoverflow.com questions 6068772 qi4j-alternatives comment7027745 6068772 . Here is an example of trait-like functionality I mentioned in another post : http : stackoverflow.com a 7403617 318174 . Just by adding an interface to a class you can magically add methods . Comment : Sure but keep in mind that AspectJ force you to use their toolchain and that you can t use it with plain JDK . It means that you ll need to tweak your build and use a AspectJ enabled IDE . Once compiled of course AspectJ based code works on any JRE . Qi4j do not have this downside . Comment : Qi4J in my mind has way more downsides in that your tightly coupled to a library . Such is not the case with AspectJ and will work great with any framework like Spring or JPA . Also with AspectJ you can now refactor with either eclipse or I think Maven to do the code weave inline . That is you can actually tell AspectJ to modify your code . ie you can remove the AspectJ dependency if you want to in the future . AspectJ is also agnostic of your architecture methodology whether its plain OOP or Component oriented Functiona separation of behavior and state . Qi4j is not . Comment : You can write Qi4j agnostic code and use Qi4j assembly code to compose it . Moreover Qi4j provides more than just composites and AOP constructs : a DDD oriented framework libraries extensions and dev tools . Composite Oriented Programming is at Qi4j s heart but its scope goes beyond that . Comment : Nothing stops you to use only qi4j-core alongside anything you re already using or choose to use more from the SDK . Obviously the more you use the more your software depend on Qi4j to run but it s about the same with all frameworks libraries or tools . BTW AspectJ is awesome and has greatly inspired Qi4j . Vendor lock-in is an interesting question if you have suggestions about this pop on the Qi4j mailing list .", "Question : I m interested in Qi4j but I don t know how well it fits with SQL databases . I would like to know what does Qi4j provide to support SQL databases Thanks .. . Answer : Qi4j SQL support is like everything Qi4j an opt-in collection of libraries and extensions . First you can use Qi4j in applications that already use something else to handle persistence JDBC JPA or any other technology . The Qi4j core is small and you are free to use or not librairies and extensions present in the SDK . If you don t want to use Qi4j persistence support ie . Entities and Query API you still can leverage the SQL Library that allows you to manage DataSources connection pools as Qi4j Services . As stated in the documentation the SQL Library give you CircuitBreaker Library and Qi4j I O API integration for free . Moreover you can choose to either import an existing DataSource useful if you deploy your application in a container and you want that container to manage the DataSource or use any of the following connection pools implementations : Apache DBCP C3P0 or BoneCP . See http : qi4j.org latest library-sql.html .. . .. . Qi4j persistence relies on Entities stored in an EntityStore . The SDK provides many EntityStore implementations including one based on SQL databases . There s support for the following databases : PostgreSQL MySQL MariaDB SQLite embedded H2 embedded or server and Apache Derby aka . Oracle JavaDB both in embedded and server modes . See http : qi4j.org latest extension-es-sql.html .. . .. . Qi4j Query API relies on Index Query services . Again the SDK provides several implementations including one based on SQL databases . At the time of writing it supports only PostgreSQL as a backend but work is being done to support as many SQL databases as the SQL EntityStore . See http : qi4j.org latest extension-indexing-sql.html .. . .. . Finally an application sample demonstrates how to use all the SQL support provided by the Qi4j SDK for you to get started from . See http : qi4j.org latest sample-sql-support.html .. . .. . Paul", "Question : I am trying to run the project in Qi4j in 2 minutes tutorial .. . .. . while I can t find the Qi4j lib files in the maven repository . Can anyone tell me how to import the Qi4j lib files with maven thanks in advance : .. . Answer : Qi4j SDK 2.0 is under development . If you want to use 2.0 you can download builds from Qi4j continuous-integration or build the Qi4j SDK from source . Weekly SNAPSHOTs are uploaded to https : repository-qi4j.forge.cloudbees.com snapshot so you need to add this url as a maven repository : .. . .. . And then you can add dependencies to Qi4j : .. . .. . All this information can now be found on the Qi4j website see http : qi4j.org howto-depend-on-qi4j.html Comment : thanks a lot . The project is running : Comment : Glad to help . If you have any other question don t hesitate to post them here on SO .", "Question : I m currently evaluating QI4J http : www.qi4j.org as it provides interesting concepts regarding properties handling in the context of an application connecting some ontologies together to create a partially semantic application . As a consequence I would like to find some alternatives regarding properties handling composition and integration in Java EE environment . Comment : Look at this answer http : stackoverflow.com questions 2287624 java-multiple-class-compositing-and-boiler-plate-reduction 2287732 2287732 .. . Answer : The most obvious similar thing to Qi4j I think is Scala . However it is a new language and all the good and bad things that comes with that . For Qi4j we are aiming for strong Scala support so that for instance Scala traits can be used in Qi4j composites .", "Question : I was reading an InfoQ article on Composite Oriented Programming earlier on : .. . .. . http : www.infoq.com articles Composite-Programming-Qi4j .. . .. . I was interested in finding out whether anybody is currently using or has used the Qi4j http : www.qi4j.org framework at all How does it compares to using a traditional dependency-injection framework such as Spring for wiring classes together . Is the resulting object graph based on mixins rather than classes easier to deal with from a maintenance point of view Comment : I haven t used Qi4J . Honestly I don t understand it but it s not the first time that Rickard Oberg has been way ahead of me . Maybe I ll grok it in another year or two . Comment : I just stumbled on Qi4J and after looking at the examples I nearly feel asleep with loads and loads of artifacts you have to create . Plus nearly everything they showed I have done with Scala and or AspectJ Traits ITDs and pointcuts . Another promise for a GUT http : en.wikipedia.org wiki Grand Unified Theory or panacea for solving all your programming problem.. . .. . Answer : Well I ve been using Qi4j myself for about a year now in a project . Once you get used to the power of mixins in your domain-model you ll be wondering how you ever managed without them before . In fact I think the POJO method of creating domain models should be obsolete . It creates systemically unmaintainable code . Because the mixin composite model is the important feature of Qi4j rather than DI there really isn t any comparison on the Java platform . As for Bozho s concerns : when it comes to declaring mixins there are two separate cases . In entities i.e . the domain-model an interface will typically only have one implementation and you would in fact want to actively avoid having several implementations for maintenance and readibility reasons . So I declare the implementation straight in the interface . But it is only a default which can be overriden by the composite if you want to . I ve so far never found a need to do so . The other case is services which is quite different . For many cases there will be only one implementation and so declaring the implementation in the interface is again quite ok . But there are far more cases with services that you want different implementations and so for those cases you simply declare the mixin in the concrete composite type declaration instead . So both styles are possible and recommended for various reasons . As for casting being able to cast an object is a bonus not a problem . If you don t have casting from one role to other roles you re going to have to be quite inventive to get around it which probably won t make your code simpler .", "Question : In Qi4j you have to assemble the composites . Can someone tell me where to handle this in a JSF 2.0 application Should i extend the FrontController-Servlet Or is it enough to assemble at the point when the application is being deployed and started Thanks a lot .. . Answer : Using a Qi4j application in a servlet context is quite easy . Qi4j provide a small library supporting this use-case : qi4j-lib-servlet . All you need is to extends AbstractQi4jServletBootstrap http : qi4j.org latest javadocs org qi4j library servlet lifecycle AbstractQi4jServletBootstrap.html which is a ServletContextListener and register it in your webapp . The only abstract method of this class is from the ApplicationAssembler interface . Your Qi4j Application will then be assembled and bootstrapped alongside your webapp and the Qi4jServletSupport class provided by the very same project will allow you to get a handle to your Qi4j Application from your code for example in your managed beans .", "Question : I was reading an InfoQ article on Composite Oriented Programming earlier on : .. . .. . http : www.infoq.com articles Composite-Programming-Qi4j .. . .. . I was interested in finding out whether anybody is currently using or has used the Qi4j http : www.qi4j.org framework at all How does it compares to using a traditional dependency-injection framework such as Spring for wiring classes together . Is the resulting object graph based on mixins rather than classes easier to deal with from a maintenance point of view Comment : I haven t used Qi4J . Honestly I don t understand it but it s not the first time that Rickard Oberg has been way ahead of me . Maybe I ll grok it in another year or two . Comment : I just stumbled on Qi4J and after looking at the examples I nearly feel asleep with loads and loads of artifacts you have to create . Plus nearly everything they showed I have done with Scala and or AspectJ Traits ITDs and pointcuts . Another promise for a GUT http : en.wikipedia.org wiki Grand Unified Theory or panacea for solving all your programming problem.. . .. . Answer : Hopefully not too late on this discussion : But this is how I see it . First of all I like the ideas Composites Mixins Assemblies behind Qi4j but am held back by the complexity of using it . The concepts there should be part of wider umbrella such as a language such as Java than a framework and should be easier to use . I ran into a problem 2 years ago that left me wishing I had something like that then . I wanted 3 different behaviors that could be reused on a set of beans . Some beans used all of them others any combination of two . I did not want to put all of them together in a class because it did not make sense . On the other hand I was constrained by the fact that I could not have multiple-inheritance . The obvious solution : use an interface which means implement the thing that many times . I remember complaining to a co-worker about the fact that I hope I had a way of providing a default implementation for an interface . This to me is a simple OO concept that allows one to reuse behaviors in a cleaner fashion . And if it is the case where you need something different than the default implementation than implement that one . That would make more sense and would not brake any natural law that I can see . So to answer your question I think this Qi4j s concepts allow you to think OO in cleaner fashion where Spring is more structural and not even comparable conceptually . You could be thinking dependency-injection and not be thinking spring and be thinking Qi4j and not be thinking dept injection .", "Question : I m currently trying to figure out how Qi4j works . So i decided to start with a simple example . I tried to use the Qi4j lib in my pom.xml and am now facing the problem that the artifact can t be found . I m using NetBeans 7.0.1 and my pom.xml parts are shown below : .. . .. . I m i doing something wrong Thanks a lot . Comment : For future readers Qi4j is now Apache Zest . zest.apache.org http : zest.apache.org .. . Answer : To learn how to depend on Qi4j in your build see the dedicated how-to that s now present on the Qi4j website : http : qi4j.org latest howto-depend-on-qi4j.html .. . .. . Here are the release and snapshot repositories : .. . .. . https : repository-qi4j.forge.cloudbees.com release .. . https : repository-qi4j.forge.cloudbees.com snapshot .. . .. . Weekly SNAPSHOTs are uploaded the snapshot repository so you need to add this url as a maven repository : .. . .. . And then you can add dependencies to Qi4j : .. . .. . Where QI4J VERSION is the version you want to use .", "Question : I m currently trying to figure out how Qi4j works . So i decided to start with a simple example . I tried to use the Qi4j lib in my pom.xml and am now facing the problem that the artifact can t be found . I m using NetBeans 7.0.1 and my pom.xml parts are shown below : .. . .. . I m i doing something wrong Thanks a lot . Comment : For future readers Qi4j is now Apache Zest . zest.apache.org http : zest.apache.org .. . Answer : Qi4j consists of many many artifacts to keep the total footprint down as most applications won t use all bits and pieces . contains the artifacts as of 1.3 .. . .. . For compile scope api and bootstrap should be enough . testsupport is obviously test scope and runtime should not be used by your code and only be a runtime dependency . The Libraries varies greatly in completeness and quality . Extensions can depend on libraries but not the other way around . Extensions implements the slowly growing SPI pluggable functionalities entity stores indexing query and caching . Next release 2.0 will have more extensions for value serialization and others . Hope that helps or meet the Qi4j community at the qi4j-dev https : groups.google.com forum fromgroups forum qi4j-dev Google Group for additional support . Comment : Thans a lot Niclas Worked for me :", "Question : I was reading an InfoQ article on Composite Oriented Programming earlier on : .. . .. . http : www.infoq.com articles Composite-Programming-Qi4j .. . .. . I was interested in finding out whether anybody is currently using or has used the Qi4j http : www.qi4j.org framework at all How does it compares to using a traditional dependency-injection framework such as Spring for wiring classes together . Is the resulting object graph based on mixins rather than classes easier to deal with from a maintenance point of view Comment : I haven t used Qi4J . Honestly I don t understand it but it s not the first time that Rickard Oberg has been way ahead of me . Maybe I ll grok it in another year or two . Comment : I just stumbled on Qi4J and after looking at the examples I nearly feel asleep with loads and loads of artifacts you have to create . Plus nearly everything they showed I have done with Scala and or AspectJ Traits ITDs and pointcuts . Another promise for a GUT http : en.wikipedia.org wiki Grand Unified Theory or panacea for solving all your programming problem.. . .. . Answer : Kabram Integration with JPA has been attempted more than once . If we have two overlapping but not fully compaible technologies you will end up only with the intersection of possibilities . So there are two basic approaches to integrate Qi4j with JPA . 1 . To limit the JPA options so that the much more flexible data-structures that Qi4j needs can fully be used . Doing that makes no sense as going directly to SQL is much more performant and that is what we chose . 2 . To limit Qi4j s data model to fit an existing JPA data model . Doing this will take away most of the advantages of why people choose Qi4j in the first place . We have therefor decided not to spend the cycles to do this . However I think the extensibility of Qi4j is good enough to do such integration without hacking in the Core Runtime and simply create an EntityStore .", "Question : I m currently trying to figure out how Qi4j works . So i decided to start with a simple example . I tried to use the Qi4j lib in my pom.xml and am now facing the problem that the artifact can t be found . I m using NetBeans 7.0.1 and my pom.xml parts are shown below : .. . .. . I m i doing something wrong Thanks a lot . Comment : For future readers Qi4j is now Apache Zest . zest.apache.org http : zest.apache.org .. . Answer : Based what i can see in the given repository the groupId and artifactId are completely different.. . .. . .. . http : repository.ops4j.org maven2 org qi4j core org.qi4j.core.spi 1.4 org.qi4j.core.spi-1.4.pom Comment : Hm i was looking for repository.ops4j.org maven2 org org.qi4j 1.4 org.qi4j-1.4.pom http : repository.ops4j.org maven2 org org.qi4j 1.4 org.qi4j-1.4.pom How do i know which one to use Comment : org is almost certainly a mistake . Use org.qi4j.core .", "Question : null .. . Answer : I am trying to use Qi4j with Android but I have problems defining the dependenciy because the gradle runtime -dependency does not exist on android . According to the qi4j website the dependencies should look like this : .. . .. . .. . repositories .. . .. . .. . mavenRepo name : qi4j-releases url : https : repository-qi4j.forge.cloudbees.com release .. . mavenRepo name : qi4j-snapshots url : https : repository-qi4j.forge.cloudbees.com snapshot .. . .. . .. . .. . dependencies .. . .. . .. . compile org.qi4j.core : org.qi4j.core.bootstrap : QI4J VERSION .. . runtime org.qi4j.core : org.qi4j.core.runtime : QI4J VERSION .. . test org.qi4j.core : org.qi4j.core.testsupport : QI4J VERSION .. . .. . .. . .. . .. . .. . .. . .. . Because runtime does not exist in the gradle android-plugin I ve changed it to apk : .. . .. . .. . dependencies .. . compile org.qi4j.core : org.qi4j.core.bootstrap : 2.0 .. . apk org.qi4j.core : org.qi4j.core.runtime : 2.0 .. . .. . .. . .. . But I am still getting errors when I am trying to user some library functions in Android Studio . What is the right way to import this for android Comment : Qi4j is not yet supported on the Android Dalvik VM . See ops4j1.jira.com browse QI-348 http : ops4j1.jira.com browse QI-348 Comment : Simply add org.qi4j.core.runtime as a compile dependency . Having it in a different scope is only to enforce you don t import anything from Qi4j Core Runtime in your Application Code . This should solve your gradle ide issues but won t work yet see my previous comment . Comment : You should also provide a stacktrace if you get one at least an error message . Comment : Ah that s sad . The ticket wasn t updated for two years so they probably won t fix this in the near future . Thanks for your comments . Btw setting the scope to compile still didn t make Anroid Studio include the dependencies . Comment : I just edited the ticket : Android support would be awesome . Qi4j 2.0 a complete rewrite was released in 2013 . The project is now headed towards 2.1 adding new features . Contributions are welcome", "Question : I was reading an InfoQ article on Composite Oriented Programming earlier on : .. . .. . http : www.infoq.com articles Composite-Programming-Qi4j .. . .. . I was interested in finding out whether anybody is currently using or has used the Qi4j http : www.qi4j.org framework at all How does it compares to using a traditional dependency-injection framework such as Spring for wiring classes together . Is the resulting object graph based on mixins rather than classes easier to deal with from a maintenance point of view Comment : I haven t used Qi4J . Honestly I don t understand it but it s not the first time that Rickard Oberg has been way ahead of me . Maybe I ll grok it in another year or two . Comment : I just stumbled on Qi4J and after looking at the examples I nearly feel asleep with loads and loads of artifacts you have to create . Plus nearly everything they showed I have done with Scala and or AspectJ Traits ITDs and pointcuts . Another promise for a GUT http : en.wikipedia.org wiki Grand Unified Theory or panacea for solving all your programming problem.. . .. . Answer : When I read through the Qi4j in 2 minutes 10 minutes etc . tutorials the last one is incomplete the one obvious question that came to mind was how do I integrate this with JPA Hibernate managed entities I would like to see a solution that seamlessly integrates with JPA . No JPA implies no Qi4j adoption in my opinion . I d love to see an article by the author s that shows integration with JPA and Spring two things that have deep penetration in the Java Enterprise world . If the integration is straightforward rapid adoption will follow .", "Question : Did anybody manage to get qi4j running on OSGi environment like servicemix I tried without success . It constantly tells me that : .. . .. . On karaf console the following is printed : .. . .. . I m bootstrapping qi4j in an activator method like so apache scr component : .. . .. . In pom.xml I m defining the imports : .. . .. . All packages resolve including the runtime which I deployed in servicemix 5.3.0 together with needed dependencied : .. . .. . What s the trick Comment : Qi4j is now Apache Zest and we welcome contributors with open arms . I have created issues.apache.org jira browse ZEST-131 https : issues.apache.org jira browse ZEST-131 to track this . .. . Answer : Actually I debugged the runtime creation process and found that the RuntimeFactory in bootstrap bundle tries to load org.qi4j.runtime.Qi4jRuntimeImpl . Obviously this comes from org.q14j.runtime package which isn t imported by the bootstrap bundle . I created a fragment bundle for host org.qi4j.core.bootstrap bundle-version 2.0.0 to fix the imports . This did the job . Comment : Of course it would be cleaner if the bootstrap bundle would import org.q14j.runtime directly . Comment : There is still a ClassLoader issue when using the vanilla Energy4Java class . It s due to the use of currentThread.getClassLoader . I worked around it by setting the classLoader to bundleClassLoader during bootstrap phase .", "Question : Did anybody manage to get qi4j running on OSGi environment like servicemix I tried without success . It constantly tells me that : .. . .. . On karaf console the following is printed : .. . .. . I m bootstrapping qi4j in an activator method like so apache scr component : .. . .. . In pom.xml I m defining the imports : .. . .. . All packages resolve including the runtime which I deployed in servicemix 5.3.0 together with needed dependencied : .. . .. . What s the trick Comment : Qi4j is now Apache Zest and we welcome contributors with open arms . I have created issues.apache.org jira browse ZEST-131 https : issues.apache.org jira browse ZEST-131 to track this . .. . Answer : Probably you haven t started the bundles . osgi : install installs the bundles but it doesn t start them . Please try this Comment : Version 2.0 also didn t go through a proper validation for OSGi as none of the core developers was working on OSGi at that time . For instance it seems strange that joda-time isn t required and I would therefor not bet on it working . Comment : Sorry but all bundles have been started.. .", "Question : I was reading an InfoQ article on Composite Oriented Programming earlier on : .. . .. . http : www.infoq.com articles Composite-Programming-Qi4j .. . .. . I was interested in finding out whether anybody is currently using or has used the Qi4j http : www.qi4j.org framework at all How does it compares to using a traditional dependency-injection framework such as Spring for wiring classes together . Is the resulting object graph based on mixins rather than classes easier to deal with from a maintenance point of view Comment : I haven t used Qi4J . Honestly I don t understand it but it s not the first time that Rickard Oberg has been way ahead of me . Maybe I ll grok it in another year or two . Comment : I just stumbled on Qi4J and after looking at the examples I nearly feel asleep with loads and loads of artifacts you have to create . Plus nearly everything they showed I have done with Scala and or AspectJ Traits ITDs and pointcuts . Another promise for a GUT http : en.wikipedia.org wiki Grand Unified Theory or panacea for solving all your programming problem.. . .. . Answer : After reading the first part of the linked article I didn t like two things : .. . .. . the implementations are defined in the interface using @Mixins - what if these should be mocked or implementations changed requires casting .. . .. . Having no experience with Qi4J I can t say how this turns out in practice but it doesn t feel good . Comment : You can define implementations at assembly time outside the interfaces . It s a convenience only for the sake of example clarity . Moreover I don t see any cast in the article .", "Question : I was reading an InfoQ article on Composite Oriented Programming earlier on : .. . .. . http : www.infoq.com articles Composite-Programming-Qi4j .. . .. . I was interested in finding out whether anybody is currently using or has used the Qi4j http : www.qi4j.org framework at all How does it compares to using a traditional dependency-injection framework such as Spring for wiring classes together . Is the resulting object graph based on mixins rather than classes easier to deal with from a maintenance point of view Comment : I haven t used Qi4J . Honestly I don t understand it but it s not the first time that Rickard Oberg has been way ahead of me . Maybe I ll grok it in another year or two . Comment : I just stumbled on Qi4J and after looking at the examples I nearly feel asleep with loads and loads of artifacts you have to create . Plus nearly everything they showed I have done with Scala and or AspectJ Traits ITDs and pointcuts . Another promise for a GUT http : en.wikipedia.org wiki Grand Unified Theory or panacea for solving all your programming problem.. . .. . Answer : Bozho For you question about Mixins being declared on interfaces .. . .. . The Mixin implementations can be overridden either in higher i.e . sub- interfaces as the seek order for implementations happen per method and goes from the declared interface left-to-right and then to each of the super interfaces also left-to-right in the extends clause . OR you can override in the Assembly of a composite .. . .. . where the LdapAuthenticatorMixin may be abstract and only override a single method .", "Question : I just found an article http : www.infoq.com news 2008 11 Qi4j on a framework in Java that apparently allows it to support Mixins http : en.wikipedia.org wiki Mixin and something called Composite Oriented Programming which for all I know might even be the same thing.. . I ve also heard of worked with AOP and I m not sure how it differs from this either.. . .. . Answer : Mixin is never meant as stand alone class . They just add some functionality to the class you declare . In Python they can be easily applied by class decorators . For example you could decorate your class with Singleton mixin making your class a singleton .", "Question : I just found an article http : www.infoq.com news 2008 11 Qi4j on a framework in Java that apparently allows it to support Mixins http : en.wikipedia.org wiki Mixin and something called Composite Oriented Programming which for all I know might even be the same thing.. . I ve also heard of worked with AOP and I m not sure how it differs from this either.. . .. . Answer : At a language-agnostic level a mixin just adds functionality to a class and is more for programmer convenience and to avoid code duplication . An abstract base-class forms an is-a relationship and allows for polymorphism . One reason why inheritance is overused is that it s an easy way to implement mixins without writing any boilerplate in languages that don t really support them . The problem is that you re declaring a polymorphic is-a relationship as a side effect making your API more confusing and possibly adding ambiguity . Hence newer languages like D and Ruby support mixins as native features allowing a convenient way to add a bunch of functionality to a class without declaring a polymorphic is-a relationship . Comment : +1 Good brief explanation . This COP stuff sounds cool . Although I like to see this kind of thing work its way down to the core language level . Same with AOP stuff . Comment : @Bruno A core language like C++ Comment : concise and very clear . Awesome explanation Comment : I think the point about making an incorrect unnecessary is-a relationship is a good point . Comment : The mentioned framework Qi4j by the OP is now Apache Zest http : zest.apache.org ." ] }
[ "yes-answer-long", "yes-answer-short" ]
aop
UNK_RELATION
unitils@unit-testing@47
unitils -- unitils is an framework that makes @placeholder with junit and dbunit smoother and more pleasant .
{ "confidence": [ 52.33360290527344, 52.33360290527344, 47.7244873046875, 47.63328552246094, 47.38172149658203, 46.50009536743164, 46.50009536743164, 45.002708435058594, 43.85221862792969, 43.69321823120117, 43.64482498168945, 43.576725006103516, 43.576725006103516, 43.14540481567383, 43.11081314086914, 42.511634826660156, 42.511634826660156, 42.511634826660156, 41.86858367919922, 41.86858367919922, 41.86858367919922, 41.301979064941406, 41.301979064941406, 41.301979064941406, 41.301979064941406, 41.010887145996094, 40.81096267700195, 40.73539352416992, 40.73539352416992, 40.73539352416992, 40.73539352416992, 40.51348876953125, 39.677772521972656, 39.677772521972656, 39.48308181762695, 39.48308181762695, 39.48308181762695, 38.810630798339844, 38.349891662597656, 38.349891662597656, 38.349891662597656, 38.349891662597656, 38.349891662597656, 38.349891662597656, 38.349891662597656, 38.349891662597656, 38.349891662597656, 38.349891662597656, 38.319610595703125, 37.978981018066406, 36.991729736328125, 36.85793685913086, 36.84701156616211, 36.620819091796875, 36.52035903930664, 36.29389572143555, 36.25178146362305, 36.25178146362305, 36.25178146362305, 36.25178146362305, 36.25178146362305, 36.25178146362305, 36.25178146362305, 36.25178146362305, 36.25178146362305, 36.25178146362305, 36.25178146362305, 35.80885314941406, 35.488853454589844, 35.11859130859375, 35.11859130859375, 35.11859130859375, 35.11859130859375, 35.11859130859375, 35.11859130859375, 35.11859130859375, 35.08434295654297, 34.54254150390625, 34.54254150390625, 34.54254150390625, 34.54254150390625, 34.426761627197266, 34.38612747192383, 33.95115280151367, 33.760433197021484, 33.760433197021484, 33.760433197021484, 33.607383728027344, 33.40935134887695, 32.343109130859375, 32.15436935424805, 31.899242401123047, 31.899242401123047, 31.899242401123047, 31.899242401123047, 31.899242401123047, 31.899242401123047, 31.899242401123047, 31.899242401123047, 31.899242401123047 ], "content": [ "I m new to unitils built-in dbunit and spring .", "Any ideas how this can be done with Unitils dbunit", "Is this possible with Unitils", "I am trying to get scala specs and unitils-dbunit to work .", "I m doing the test with junit 4.10 dbunit 2.4.8 unitils 3.3 hsqldb 2.2.8 .", "I already try previous release of dbunit or unitils but it doesn t change anything .", "That exception message suggests to me a discrepancy between the core and dbunit modules of Unitils .", "Unitils is a very good framework as you have noted .", "Unitils does not have proper logging so not able to track it with framework logs .", "I think that you can more or less reuse the code found here http : www.java2s.com Open-Source Java-Document Testing unitils org unitils dbunit DbUnitModule.java.htm .", "By default Unitils uses org.hibernate.cfg.AnnotationConfiguration .", "Where is unitils @Dataset annotation processed", "I am using unitils for testing .", "Answered by one of the unitils developers on the unitils forums here : http : sourceforge.net projects unitils forums forum 570578 topic 4546980 .. . .. . Qualifiers are a feature of dbmaintain .", "From the API http : www.unitils.org apidocs org unitils dbunit DbUnitModule.html : .. . .. . Loading of DbUnit data sets can be done by annotating a class or method with the DataSet annotation .", "But i find nothing for unitils .", "Unitils does not support it .", "Solution : Stopped using Unitils .", "Yeah Unitils doesn t support Mockito .", "+1 Unitils seems to be abandoned nowadays .", "It appears that Unitils is looking for a hibernate3.localSessionFactoryBean .", "I m using Unitils with DbUnit for my data-access-layer unit-testing but the need has arisen to test multiple databases .", "At the new place I m working I can see that some of the testing is with spring and others using unitils dbunit without spring .", "I m using dbunit and unitils trying to get test sensitive dates on my dataset files .", "below my configuration .. . .. . and this is the exception I get .. . .. . I used unitils-dbunit 3.3", "We use Unitils and Spring s test framework on our project .", "Unitils has a Spring integration package : .. . .. . We ve not had to migrate from Spring tests but do use Spring and Unitils together .", "The EasyMock support in Unitils is deprecated now .", "Unitils now uses Spring jars .", "Which version of Unitils are you using", "Unitils seems to be almost abandoned nowadays .", "Coincidentally I was trying to pick up unitils for my db testing as well .", "Is there any techniques available in EasyMock or Unitils Mock Not Unitils supported EasyMock to inject the mocks directly into the Class Under Test", "Before each test Unitils empties EVERY table unusual configuration for Unitils and then inserts specific test data .", "I am using unitils annotation @DataSet .", "This could be a conflict between the Unitils and Spring transaction handling .", "Is what somebody already tested H2 with unitils", "When I tried execute the tests the unitils DBunit read them as other encoding maybe ISO 8859-1 .", "I have some unitils tests in a spring application .", "Is there some unitils properties for inserting dataset to views", "In many other cases unitils is a very handy tool .", "Personally I find Unitils good for my testing .", "Is it possible to mock the static method call using unitils", "I doubt whether it can be achieved with unitils .", "Is there a way we can do similar thing in Unitils", "Though this decision was made because Unitils is no longer supported .", "I am using Unitils Version 3.4.2 .", "so i googled and chose a library unitils .", "When unitils is invoked it picks up the unitils-local.properties file just created by the ant script and does its magic .", "To test my dao s i made some unit tests and i am trying to use JUnit and Unitils .", "Unitils is using an old version of dbMaintain under the covers .", "Below : see Spring-Unitils Tutorial http : www.unitils.org tutorial-spring.html for more details .. . .. . NOTE : please create unitils.properties and unitils-local.properties inside TestPackage to be able to run the program .", "That said Unitils does have some great convenience-methods like some of the ones provided in DatabaseUnitils http : www.unitils.org apidocs org unitils database DatabaseUnitils.html .", "For the time being I have figured out to run Unitils by creating a Junit test with @Dataset annotation .", "hibernate-mapping tests or reflection testing utilities .. . .. . Spring TestContext Framework pros : .. . .. . allows to use the standard Spring annotations when testing .. . probably has a bigger user base and better support this is my assumption since Unitils seems to be basically created by two people .. . also has some of the Unitils features built-in such as reflection testing utilities .. . if I need any of the Unitils bigger features such as DbUnit or EasyMock I can just get regular DbUnit or EasyMock straight from the source - this allows me to always have the most current version of DbUnit EasyMock without waiting for Unitils to release their new version with the current DbUnit EasyMock .. . .. . So for now I m leaning more towards using Spring TestContext Framework .", "Another question I have is this - is there a way to get unitils dbunit to clean up the records which were loaded after all my tests have run", "Unitils 4.0 has this module replaced by a dependency to dbmaintain but this version is not released yet .", "If there is any other direct solution that integrates Mockito with Unitils even that is welcome .", "By default while using Unitils DatabaseModule the transactions are automatically created in the test .", "I am using Unitils http : unitils.org summary.html with Spring for unit-testing .", "I am attempting to use Unitils to assist me in Database testing .", "I would like to use the Unitils DBMaintain functionality for disabling constraints .", "You have to tell Unitils to use your subclass of DbUnitModule .", "Unitils tests using : .. . .. . Which correctly loads the database etc when run .", "Unitils doesn t really have proper Spring integration support .", "After all these changes unitils will start to look for RegTest.xml in folder test resources .", "I used the extension unitils to initialize my database with one of the data sets .", "I can t give you a fully working solution but what you need to do is to dig out the unitils API and use the DataSetFactory http : www.unitils.org apidocs org unitils dbunit datasetfactory impl MultiSchemaXmlDataSetFactory.html directly to load your data .", "Here is the unitils-local.properties setup I have : .. . .. . Can any of you guys give me a tip how to make Unitils work with the second user schema", "Ok i think i find a way to configure unitils .", "Unitils has the Inject module for injection of mock objects into tested objects .", "I m using Unitils Spring DI Oracle DB to create my application .", "I had used your advice in my unitils-local.properties .", "I based my answer on reading the source code of Unitils .", "anybody knows whether unitils project http : unitils.org is still alive .", "The version madness is complete not only inside libraries but unitils itself .", "I made this more of I need an example of using relative dates in unitils dataset -question .", "I believe unitils is using spring under the covers so you might also try adding your datasource context in your unitils tests by using @SpringApplicationContext .", "I got error similar to this : Unitils dataset - insert into sybase datetime column http : stackoverflow.com questions 14121793 unitils-dataset-insert-into-sybase-datetime-column .. . .. . My case is that need to insert a date value that is empty .", "It looks like it s a bug in unitils which doesn t seem to support hibernate4 https : unitils.atlassian.net browse UNI-244 .. . .. . Unitils ver 3.3 does not support loading sessionFactory by @SpringApplicationContext when sessionFactory is defined by org.springframework.orm.hibernate4.LocalSessionFactoryBean .", "Maybe you can use ReflectionUtils unitils.org apidocs org unitils util ReflectionUtils.html http : unitils.org apidocs org unitils util ReflectionUtils.html to massage both objects before passing them to the ReflectionComparator", "http : stackoverflow.com questions 6143505 using-unitils-dbmaintain-to-maintain-database-how-to-exclude-scripts-from-being .. . .. . Basically unitils does not have all the latest features of each of the underlying frameworks such as DBMaintain because unitils uses old versions of the other frameworks under the covers .", "I guess I need someone with extensive knowledge to solve my current problem : .. . .. . I use Eclipse to debug jUnit-tests that use Unitils .", "With unitils one thing we ran into problems with was having more than one PersistenceUnit .", "I have made a unitils-local.properties file with token keys for replacement .", "The trouble is that Unitils is using DBMaintain as a submodule but seems not to honor the multi-database configuration .", "My assumption at this point is that Unitils is using an older version of dbMaintain .", "Thanks for the reply sir btw im using unitils because it is required by my mentor to me .", "In Unitils 3.4.1 they added a new property org.dbunit.database.IMetadataHandler.implClassName .. . .. . In my unitils.properties file I added the following line .. . .. . Yes I know according to Unitils website there is no version 3.4.1 but you can get the latest version via Maven .", "Initially I spotted and got pretty interested in Unitils but then I saw the standard Spring TestContext Framework and started having some doubts .", "The spring context is being created by unitils in the class ClassPathXmlApplicationContextFactory which is from unitils below is the code extract public ConfigurableApplicationContext createApplicationContext List String locations return new ClassPathXmlApplicationContext locations.toArray new String locations.size false and in the ClassPathXmlApplicationContext constructor which is from spring ther is no log info .", "I am using unitils and its dbMaintain module to maintain the state of my local database .", "In my project excludes includes do not work when running from a Unitils test with the UnitilsJUnit4TestClassRunner .", "Unitils 3.1still contains its own dbmaintainer which still dates from before the split-off of dbmaintain .", "Could anyone please share with me how Unitils @InjectInto or @InjectIntoByType annotations are being processed", "AFAIK UnitilsJUnit4TestClassRunner does not have any implementation on how Unitils processes the annotation @InjectInto .", "My question is how can I use the same datasource or the same properties for Unitils", "Unitils expects a file in the classpath unitils.properties with database configuration parameters like url user password and driver .", "I ve tried to configure Unitils using the properties used in the Spring configuration as below but it is not working .", "For @SpringBean explanation and other annotation please read : .. . .. . Unitils-EasyMock http : www.unitils.org tutorial-spring.html" ] }
{ "confidence": [ 70.1839828491211, 68.89177703857422, 66.8998031616211, 64.24581909179688, 59.33307647705078, 59.32789611816406, 58.93914794921875, 58.711158752441406, 58.60094451904297, 58.492515563964844, 58.097557067871094, 55.5137939453125, 54.21403503417969, 54.004600524902344, 53.71965789794922, 52.62877655029297, 51.75066375732422, 51.325218200683594, 51.31573486328125, 51.31573486328125 ], "content": [ "Question : I m thinking about which testing framework to use for my spring+hibernate web application . Initially I spotted and got pretty interested in Unitils but then I saw the standard Spring TestContext Framework and started having some doubts . I m pretty new to the subject but so far my understanding is the following : .. . .. . Unitils pros : .. . .. . has a mix of various other testing frameworks i.e . EasyMock or DbUnit .. . builds on top of the the frameworks providing some additional value i.e . hibernate-mapping tests or reflection testing utilities .. . .. . Spring TestContext Framework pros : .. . .. . allows to use the standard Spring annotations when testing .. . probably has a bigger user base and better support this is my assumption since Unitils seems to be basically created by two people .. . also has some of the Unitils features built-in such as reflection testing utilities .. . if I need any of the Unitils bigger features such as DbUnit or EasyMock I can just get regular DbUnit or EasyMock straight from the source - this allows me to always have the most current version of DbUnit EasyMock without waiting for Unitils to release their new version with the current DbUnit EasyMock .. . .. . So for now I m leaning more towards using Spring TestContext Framework . Does anyone have a bit more experience with these frameworks and could help me tilt in the right direction What does Unitils actually offer on its own except for integration of all these frameworks EDIT Just found out about a few more things provided by Unitils : .. . .. . some improvements to DbUnit like the @DataSet annotation in Spring TestContext Framework it appears you have to write a bit more code on your own if you want to use it with DbUnit as described here : http : blog.zenika.com index.php post 2010 02 04 Testing-SQL-queries-with-Spring-and-DbUnit 2C-part-1 .. . ability to disable database constraints in your tests .. . .. . Here s a nice presentation on Unitils which convinced me to start using Unitils : http : www.javapolis.com confluence download attachments 32918 C 14 09 04.pdf .. . .. . I m leaving the question open for the time being maybe someone will come up with some other thoughts.. . Comment : Little update : now in 2014 it seems that Unitils is almost abandoned while spring-test is under active development . So answer which one to choose seems clear . .. . Answer : Unitils is a very good framework as you have noted . Pros : .. . .. . 1 . Unitils now uses Spring jars . 2 . Unitils inject module works great in my view though you can achieve something like that in spring too . Cons : As you have said I believe it lacks proper support in the Unitils forum . I can see many threads not answered for a long time . However stackoverflow has good support for it : - except if you need additional features or bug fixes . Personally I find Unitils good for my testing .", "Question : I m thinking about which testing framework to use for my spring+hibernate web application . Initially I spotted and got pretty interested in Unitils but then I saw the standard Spring TestContext Framework and started having some doubts . I m pretty new to the subject but so far my understanding is the following : .. . .. . Unitils pros : .. . .. . has a mix of various other testing frameworks i.e . EasyMock or DbUnit .. . builds on top of the the frameworks providing some additional value i.e . hibernate-mapping tests or reflection testing utilities .. . .. . Spring TestContext Framework pros : .. . .. . allows to use the standard Spring annotations when testing .. . probably has a bigger user base and better support this is my assumption since Unitils seems to be basically created by two people .. . also has some of the Unitils features built-in such as reflection testing utilities .. . if I need any of the Unitils bigger features such as DbUnit or EasyMock I can just get regular DbUnit or EasyMock straight from the source - this allows me to always have the most current version of DbUnit EasyMock without waiting for Unitils to release their new version with the current DbUnit EasyMock .. . .. . So for now I m leaning more towards using Spring TestContext Framework . Does anyone have a bit more experience with these frameworks and could help me tilt in the right direction What does Unitils actually offer on its own except for integration of all these frameworks EDIT Just found out about a few more things provided by Unitils : .. . .. . some improvements to DbUnit like the @DataSet annotation in Spring TestContext Framework it appears you have to write a bit more code on your own if you want to use it with DbUnit as described here : http : blog.zenika.com index.php post 2010 02 04 Testing-SQL-queries-with-Spring-and-DbUnit 2C-part-1 .. . ability to disable database constraints in your tests .. . .. . Here s a nice presentation on Unitils which convinced me to start using Unitils : http : www.javapolis.com confluence download attachments 32918 C 14 09 04.pdf .. . .. . I m leaving the question open for the time being maybe someone will come up with some other thoughts.. . Comment : Little update : now in 2014 it seems that Unitils is almost abandoned while spring-test is under active development . So answer which one to choose seems clear . .. . Answer : We use Unitils and Spring s test framework on our project . With unitils one thing we ran into problems with was having more than one PersistenceUnit . Unitils does not support it . Of course spring does . Another problem we ran into I posted about here : Using unitils dbMaintain to maintain database how to exclude scripts from being run http : stackoverflow.com questions 6143505 using-unitils-dbmaintain-to-maintain-database-how-to-exclude-scripts-from-being .. . .. . Basically unitils does not have all the latest features of each of the underlying frameworks such as DBMaintain because unitils uses old versions of the other frameworks under the covers . That said Unitils does have some great convenience-methods like some of the ones provided in DatabaseUnitils http : www.unitils.org apidocs org unitils database DatabaseUnitils.html . We particularly like updateSequences .. . .. . So for ultimate flexibility and or if you anticipate a fairly complex code-structure I would stick with Spring s test framework whenever possible . In many other cases unitils is a very handy tool . And a little p.s.. . when possible I would recommend favoring unit tests and mocking frameworks like Mockito versus integration tests . I ve always been an integration test heavy tester and on this last project it has turned into a bit of a maintenance challenge . Comment : thanks for sharing your experience : You re mentioning using Mockito - do you prefer it over EasyMock which is already bundled with Unititls Comment : I ve heard good arguments for against both frameworks . I haven t used EasyMock . When I was reading about it vs mockito and their associated documentation mockito just seemed simpler and more straightforward . So I chose mockito . YMMV . Comment : The EasyMock support in Unitils is deprecated now . Instead it offers the Unitils Mock module which provides a modern mocking API that is IMO significantly better than the EasyMock or Mockito APIs .", "Question : I am trying to get scala specs and unitils-dbunit to work . To use unitils you have to annotate your test class with @RunWith classOf UnitilsJUnit4TestClassRunner or extend from a class and you can set DataSet s to load with @DataSet Array DataSet.xml . All of this works with JUnit . But I got 2 problems when using specs : .. . .. . I am running my specs tests with gradle and the ScalaTestAntTask so I guess the @RunWith annotation will be ignored . I can not set the @DataSet annotation to my test method as seen here : .. . .. . .. . .. . @RunWith classOf UnitilsJUnit4TestClassRunner .. . class DaoTest extends Specification with ScalaTest .. . .. . @TestDataSource .. . var dataSource : DataSource null .. . .. . @DataSet Array DataSet.xml .. . querying the database should .. . return the right data in .. . assertSomething .. . .. . .. . .. . .. . .. . This gives me the following compiler error : .. . .. . error : expected start of definition .. . .. . querying the database should .. . .. . .. . .. . Does somebody know how I can use specs and unitils together UPDATE : This is the solution I came up with : .. . .. . -- Christian .. . Answer : The DataSet annotation can t be applied directly to xxx should because this is not a test method just a regular scala code call . I can t give you a fully working solution but what you need to do is to dig out the unitils API and use the DataSetFactory http : www.unitils.org apidocs org unitils dbunit datasetfactory impl MultiSchemaXmlDataSetFactory.html directly to load your data . I think that you can more or less reuse the code found here http : www.java2s.com Open-Source Java-Document Testing unitils org unitils dbunit DbUnitModule.java.htm . Then if you need to load this dataset before each example just use a doBefore http : code.google.com p specs wiki DeclareSpecifications Call a function before or after each example call . Comment : Thanks for your answer it worked I attached the solution to my question", "Question : I m new to unitils built-in dbunit and spring . At the new place I m working I can see that some of the testing is with spring and others using unitils dbunit without spring . There is a push to use spring so I ve been trying to merge the following functionality . Spring tests using : .. . .. . This class has the @Autowired ProfileDao which works when using the @RunWith SpringJUnit4ClassRunner.class . Unitils tests using : .. . .. . Which correctly loads the database etc when run . What I m trying to achieve is to combine these so that I can Unitil ise my class with the @RunWith UnitilsJUnit4TestClassRunner.class annotation but also make use of spring in the normal way as in the previous class . Problem is I can t seem to unitilise my class whilst using the spring version as they re both JUnit4ClassRunner extensions . I ve tried a variety of variations but have not been able to get any to work . Can anyone advise on a decent way of doing this Thanks .. . Answer : Unitils doesn t really have proper Spring integration support . Have a look at spring-test-dbunit https : github.com springtestdbunit spring-test-dbunit instead . Comment : +1 Unitils seems to be abandoned nowadays . Furthermore there is also alternative from spring-dbunit https : github.com excilys spring-dbunit . Both seems to provide the same functionality .", "Question : I m creating a web application with Spring 3.1.0.RELEASE and JPA 2 with Hibernate Provider . I m doing the test with junit 4.10 dbunit 2.4.8 unitils 3.3 hsqldb 2.2.8 . I try to test the service-layer a create operation . In my DAO i have this method : .. . .. . My QuestionServiceTest test class : .. . .. . I use the property hibernate.hbm2ddl.auto create-drop for generate the schema the question table is : .. . .. . theme id is a foreign key to table theme . When i launch the test with ExpectedDataSet the insert works but the test never finish . The test block on : .. . .. . DEBUG : org.dbunit.database.AbstractResultSetTable - Query : select ID COUNTRY CODE CREATION DATE EMAIL FIRSTNAME LASTNAME ORIGINAL LANG ORIGINAL QUESTION THEME ID from PUBLIC . QUESTION order by ID .. . .. . This is the last line on debug . My unitils.properties is : .. . .. . My persistence.xml : .. . .. . What should I do I already try previous release of dbunit or unitils but it doesn t change anything . Expected Dataset is really cool feature . Thanks . .. . Answer : I had the same issue and failed to solve it . Then I gave a try to spring-test-dbunit and this lib run smoothly .", "Question : In my project I am using JDBC MySQL Servlets JSP . To test my dao s i made some unit tests and i am trying to use JUnit and Unitils . I am getting this exception : .. . .. . My unitils-local.propreties : .. . .. . My unitils.properties : .. . .. . My dataset options : .. . .. . And some part of my test-dao class which i am trying to test : .. . .. . I know that something wrong with my database options . Can you help me to find the way how to fix this issue Thanks . UPDATE : after changing the parameter in my unitils-local.properties : from : .. . .. . to : .. . .. . a had a new exception : .. . .. . Maybe there is some new variants or some thoughts about that issue Thanks . Comment : Which version of Unitils are you using That exception message suggests to me a discrepancy between the core and dbunit modules of Unitils . Comment : Hi Luke . I am using Unitils Version 3.4.2 . Comment : I see you ve since updated your question and replaced the stacktrace so my comment no longer fits with your question . For the benefit of someone else who may have the same problem as you how did you fix this Comment : I am sorry for this.. . But after that issue - i had a lot of new issues.. . Which are very similar . In my first issue first edit : was the problem with database url . I used database.url jdbc : mysql : thin : @localhost : 3306 : test . But for MySQL it isn t correct . And i changed it to : database.url jdbc : mysql : localhost : 3306 test .. . Answer : I would say that the problem is here : .. . .. . Try setting it to the following instead : .. . .. . Ultimately the class MySqlDbSupport has a bug in it . If the database.identifierQuoteString.mysql property is set to none in the properties file a private field named identifierQuoteString in the class DbSupport is set to null . The toCorrectCaseIdentifier method in MySqlDbSupport fetches the value of this field but forgets to do a null-check before passing it to String.startsWith . Hence we get a NullPointerException . Using auto asks the database for the identifier-quote string to use . I don t see why you would want to use anything other than this . Comment : Hi Luke You are the only one person who trying to help . Thanks . I had used your advice in my unitils-local.properties . I had updated my question if you had some time just look at the updated last part of question . Maybe you know something about this problem . Comment : @davakin111 : to be honest I don t know anything much about Unitils I ve never used it myself other than it appears to have been more-or-less abandoned in 2011 . I based my answer on reading the source code of Unitils . The exception you mention in your most recent edit comes from within DbUnit which I haven t used either . Sorry I don t think I can help you any more here . Comment : Thank you for your reply.That s ok : Did you know some frameworks for database testing something very similar to Unitils Comment : @davakin111 : sorry no I don t . Comment : @davakin111 some time passed but this answer http : stackoverflow.com a 34659291 1037316 might be what you asked for .", "Question : I guess I need someone with extensive knowledge to solve my current problem : .. . .. . I use Eclipse to debug jUnit-tests that use Unitils . While debugging some or all of the tables in my database are locked even though they are not accessed at the moment . The result is that other developers working on the same database are unable to run tests as long as I m debugging or vice versa . Logically I don t see a reason why the tables should be locked the whole time . So should I try to deactivate locking Do you know how to configure that Though I can think of alternative approaches I d really like to have these questions answered for this would be the most convenient solution . EDIT : The tests run on an Oracle DB with empty tables . Before each test Unitils empties EVERY table unusual configuration for Unitils and then inserts specific test data . All constraints are active which again is an unusual configuration . When I m debugging and another developer starts a jUnit-Test their IDE freezes until they get a DB timeout or I stop debugging due to Unitils trying to empty the tables again . Comment : Which DBMS are you using Oracle PostgreSQL Comment : Oracle via JPA . Shouldn t matter though . Comment : It matters a lot actually because some DBMS impose more locking than others . e.g . in MySQL MyISAM an update of a single row will lock the whole table in SQL Server a read-only SELECT will block all retrieved rows from being updated from other sessions and so on . Do you actually see table locks when you e.g . query V LOCK What does the application or the test environment do when you start it It s nearly impossible to answer your question without more details what your tests are doing during startup . Comment : I would strongly urge you not to run unit tests against a live database . It s much better faster easier to run tests against a mocked database . Comment : Ok will query the data-dictionary next time to find out . See EDIT for more details . .. . Answer : Solution : Stopped using Unitils . DBUnit alone is enough and this problem is gone . Though this decision was made because Unitils is no longer supported .", "Question : I m new to unitils built-in dbunit and spring . At the new place I m working I can see that some of the testing is with spring and others using unitils dbunit without spring . There is a push to use spring so I ve been trying to merge the following functionality . Spring tests using : .. . .. . This class has the @Autowired ProfileDao which works when using the @RunWith SpringJUnit4ClassRunner.class . Unitils tests using : .. . .. . Which correctly loads the database etc when run . What I m trying to achieve is to combine these so that I can Unitil ise my class with the @RunWith UnitilsJUnit4TestClassRunner.class annotation but also make use of spring in the normal way as in the previous class . Problem is I can t seem to unitilise my class whilst using the spring version as they re both JUnit4ClassRunner extensions . I ve tried a variety of variations but have not been able to get any to work . Can anyone advise on a decent way of doing this Thanks .. . Answer : Unitils has a Spring integration package : .. . .. . We ve not had to migrate from Spring tests but do use Spring and Unitils together . Rather than using the @RunWith annotation we subclass : .. . .. . We recently ran into a problem where our test data wasn t being loaded properly the first time . This could be a conflict between the Unitils and Spring transaction handling . I m not really sure but turning off transactions in Unitils by setting this property : .. . .. . in the unitils.properties file got around the problem .", "Question : anybody knows whether unitils project http : unitils.org is still alive . On there pages last version is 3.3 in maven repository it is 3.4.2 . Actually there is google cached version of their pages where the version is said to be 3.4.2 .. . .. . Anyway is there any replacement for this project . I kind of lack the vivid community around and really don t want to be bound to dying project . .. . Answer : Unitils seems to be almost abandoned nowadays . Project is available on the GitHub here https : github.com arteam unitils and you can look at its history and activity . Anyways my two cents.. . .. . .. . Unitils has serious drawbacks : .. . .. . Integrates many third-party libs easymock dbunit spring dbmaintainer xmlunit slf4j etc and thus forces their versions - it is a really serious drawback .. . Due to being dependent on many 3rd party libraries it is almost impossible to keep it up to-date without any company behind . Unitils 4.0 is developed since 06.2011 and was planned to release at 01.2012 but now 01.2016 after 4 years is still not released . DbUnit .. . .. . For database-driven apps it may seem that interesting way to go is a plain DbUnit + Spring-Test or alternatively some 3rd party tools : .. . .. . excilys spring-dbunit https : github.com excilys spring-dbunit that comes with handy @DataSet annotation and is actively developed on the github also is constantly updated to use the newest versions of DbUnit and Spring Framework . springtestdbunit spring-test-dbunit https : github.com springtestdbunit spring-test-dbunit which is also hosted on the github comes with a @DatabaseSetup annotation . Both are very similar but personally I find DbUnit confusing quite cumbersome and time-consuming . Why Try to maintain large amount of small xml files and you find out what I mean . Also combining multiple data sets is really hard . DbSetup .. . .. . My choice . DbSetup http : dbsetup.ninja-squad.com doesn t need external xml json files is extremely convenient and allows you to combine freely multiple data sets using fluent builders . Just look at code below : .. . .. . Everything is java so you can freely refactor it extract methods etc . Hope it helps . Comment : The version madness is complete not only inside libraries but unitils itself . The usage of mockito vs . easymock is terrible . But so far I have been kind of happy but now I have waken up to realize that I have slept to long . DBSetup looks good but for bigger table the setup can clutter the code heavily . Although I really agree about maintaining multiple .xmls been big burden . Comment : Another thing is that the projects you offered are Spring bounded . We are unfortunately not using Spring at all . Comment : @Zveratko yes and no.. . DbSetup is not bounded to Spring at all - it just needs a DataSource to operate on . All other mentioned by me possibilities : yes they need Spring - but surprisingly it s not a blocker too because you can use spring-test module within unit tests without using Spring at all in your normal classes . I went this way in one of my projects .", "Question : I used the extension unitils to initialize my database with one of the data sets . With Mysql HsqlDB and PostgreSql I didn t have any problem but with H2 I foudn problem . Is what somebody already tested H2 with unitils If so thank you to provide the contents of unitils.properties . below my configuration .. . .. . and this is the exception I get .. . .. . I used unitils-dbunit 3.3 Comment : What problem do you have Comment : I modified my question by adding my configuration and the exception that I had . .. . Answer : I found the solution and I return in order to share it . The last version of unitils doesn t support H2 database for that it is necessary to implement the necessary support . I found the solution in this jira : https : unitils.atlassian.net browse UNI-79", "Question : I have a theoretical question this time . Where is unitils @Dataset annotation processed Every annotation must have a prosessor class see http : www.javacodegeeks.com 2012 08 java-annotations-explored-explained.html .. . .. . Does this happen in org.unitils.UnitilsJUnit4 library I would like to make my own implementation for anotation no code ready yet . .. . Answer : Depends on which part of the processing that you are looking for . If you mean where the actual DataSet is processed then check out the DbUnitModule class . From the API http : www.unitils.org apidocs org unitils dbunit DbUnitModule.html : .. . .. . Loading of DbUnit data sets can be done by annotating a class or method with the DataSet annotation . The name of the data set files can be specified explicitly as an argument of the annotation . If no file name is specified it looks for a file in the same directory as the test class named : classname without packagename .xml . If you are referring to the code that actually looks for things that are annotated with @DataSet then they have a helper class called AnnotationUtils API http : www.unitils.org apidocs org unitils util AnnotationUtils.html which has a bunch of methods for accessing annotated items . This is used by the DbUnitModule mentioned above to find whatever data set is needed for a given test .", "Question : Any ideas how this can be done with Unitils dbunit Date relative to current in the DBUnit dataset http : stackoverflow.com questions 2856840 date-relative-to-current-in-the-dbunit-dataset .. . .. . The problem is that the create date -placeholder is not recognized in @Dataset . Comment : You re question is a bit vague . What have you tried so far Could you provide the logs or a description of what is happening Comment : I made this more of I need an example of using relative dates in unitils dataset -question . I have tried some code copied from the link provided but getting errors about using -placeholder in my xml . .. . Answer : A simple solution might be to just use placeholders in your xml dataset eg . xml version 1.0 encoding UTF-8 dataset user userName jdoe name doe firstname john lastLogin YESTERDAY user userName jdoe name doe firstname jane lastLogin A WEEK AGO dataset .. . .. . and do some post-processing replace the placeholders with the calculated values before you run your tests . When you are using Maven you could then first execute the post-processing fill in the values in the xml-template-dataset copy the filled-in-xml-dataset to the correct folder before any tests are executed .", "Question : I want to try to make unit test with DBUnit but I have a problem with my dataset . Here is my persistence object : .. . .. . And my dataset : .. . .. . My problem is with the name column I get this error : .. . .. . I don t understand why dbunit search a column NAME whereas my column is name . Thanks for your help . Comment : I m having this same problem . Your issue may have to do with this bug which has apparently been around for quite sometime.. . unitils.atlassian.net browse UNI-134 https : unitils.atlassian.net browse UNI-134 .. . Answer : I ve been fighting this for a while and keep coming back to this issue which doesn t seem to have a solution yet . In Unitils 3.4.1 they added a new property org.dbunit.database.IMetadataHandler.implClassName .. . .. . In my unitils.properties file I added the following line .. . .. . Yes I know according to Unitils website there is no version 3.4.1 but you can get the latest version via Maven . link-to issue report https : unitils.atlassian.net browse UNI-152 Comment : this answer should be accepted since it s the only one that makes sense here .", "Question : I m trying to run a basic test : .. . .. . But I am getting the following stack-trace : .. . .. . My POM includes the following : .. . .. . If it matters I m doing this within Eclipse Helios SR2 JUnit 4 tester . Any ideas .. . Answer : Coincidentally I was trying to pick up unitils for my db testing as well . I was able to replicate your problem with maven 2.2.1 . From my prior working experience with maven and hibernate and the site documentation those dependencies should be all that you need . If there is any problem it probably lies with the pom definitions related to hibernate and sure enough in the pom for unitils-orm the following dependencies are set as optional : .. . .. . Adding hibernate-entitymanager did resolve the problem As for whether why that pom is defined as such any valid reasons would only be known to the developers. .", "Question : I use Hibernate in create-drop mode to create tables at startup . tables are created in the public schema in hsqlDB . For some reason DBunit is not able to add data into my table : .. . .. . .. . I am using unitils annotation @DataSet . I suspect that DBunit is not using the correct schema but cannot find a solution to this issue . Note : hibernate works OK I see successful requests at startup . Has anyone faced the same problem Am I missing something Thanks .. . Answer : solution is in unitils.properties : .. . .. . database.schemaNames PUBLIC", "Question : Could anyone please share with me how Unitils @InjectInto or @InjectIntoByType annotations are being processed I have checked UnitilsJUnit4.class which is required for processing this annotation . That in turn needs UnitilsJUnit4TestClassRunner.class which extends JUnit4ClassRunner . AFAIK UnitilsJUnit4TestClassRunner does not have any implementation on how Unitils processes the annotation @InjectInto . The basic idea behind this question - This annotation does not support injection of Mockito mocks . I just want to check if it is possible to to add some implementation that can do this . If there is any other direct solution that integrates Mockito with Unitils even that is welcome . .. . Answer : Yeah Unitils doesn t support Mockito . However Mockito comes with handy mock injection utility annotations . You could write in your JUnit test something like that : .. . .. . Note that it only works with mockito mocks or spies . Comment : thanks for your reply . That is a nice piece of information but @ InjectMock works only when we have a setter or constructor based injection in the CUT.. . but in my case I am using EJB3.x which does not need these . So it may be an additional overhead in my case to write a setter method in the CUT for mock injection . Comment : Actually Mockito 1.8.5 does field injection . Version 1.9 adds it all with setter injection then field injection if setter injection is not possible . Comment : thanks it works : -", "Question : It seems to be a simple question . I have some unitils tests in a spring application . The database contains some oracle views and i just want to insert dataset into these views . I know that it is possible to set options to DBunit Table Type properties . But i find nothing for unitils . Is there some unitils properties for inserting dataset to views Thank you for help Comment : Inserts can only be performed on simple views views that are based only on one table . You cannot insert records into views that are the results of joins on multiple tables . The first thing you need to do is determine whether or not you can insert into the view . Comment : Probably you want to add data to the tables that actually are used for having the views.. . Comment : Well views are made to switch to different set of tables in db without modify java code.. . Comment : Perhaps this would be a good time for your organization to implement a proper DAO layer so that database changes don t impact your project so greatly in the future .. . Answer : Ok i think i find a way to configure unitils . But that needs some java code . I have tested this solution it seems to work . First i find some properties in unitils unitils.properties : .. . .. . So it seems to be possible to override DBUnitModule like this .. . .. . .. . .. . .. . .. . And then modify the configuration in unitils.properties . Comment : What modification to make in unitils.properties Comment : only : unitils.module.dbunit.className your.package.YourClassExtendsDbUnitModule", "Question : I m trying to setup some unit test for my application I d like to test with Unitils datasets but so far I m encountered many problems . I m convinced I have wrong setup can anybody review it for problems . I have hibernate.cfg.xml .. . .. . Unitils properties as follows .. . .. . And finally my test is .. . .. . I m getting .. . .. . I guess the schema is not created setting something in hibernate.cfg.xml doesn t help as the creation is done after this error and fails anyway with Comment : here http : jonathan.lalou.free.fr tag table-not-found-in-tablemaporg-dbunit-dataset-orderedtablenamemap tablenames I found Indeed even when you provide a dataset through a flat XML file DBUnit does not create the tables but only fills them in . Nice but I want to use in memory schema and setting up property name hibernate.hbm2ddl.auto create property in hibernate.cfg.xml will execute creation afterward only . .. . Answer : so finally I made it work the test now looks like that .. . .. . The settings I changed in unitils.properties unitils.module.dbunit.runAfter spring - this postponed loading of datasets to after the schema is created according to .. . .. . DatabaseModule.Transactional.value.default disabled this somehow disabled the transactional deadlock that was probably caused because I m using .. . .. . DatabaseModule.Transactional.value.default disabled", "Question : I am working on a new Oracle ADF project that is using Oragle 10g Database and I am using Unitils and DBMaintainer in our project for : .. . .. . updating the db structure .. . unittesting .. . read in seed data .. . read in test data .. . List item .. . .. . In our project we have 2 schemas and 2 db users that have privilegies to connect to these schemas . I have them in a folder structure with incremental names and I am using the @convention for script naming . This works fine with ant and DBMaintainer update task and I supply the multiple user names by configuring extra elements for the ant task . However I cant figure out how to make the DBMaintainer update task create the xsd schemas from my db schemas So I decided to use Unitils since its update creates xsd schemas . I haven t found any description or documentation for the Unitils ant tasks - can anyone give some hints For the time being I have figured out to run Unitils by creating a Junit test with @Dataset annotation . I can make it work with one schema and one db user . But I am out of ideas how to make it work with multiple users Here is the unitils-local.properties setup I have : .. . .. . Can any of you guys give me a tip how to make Unitils work with the second user schema I will be extremely gratefull for your help .. . Answer : I have figure out how to make dbmaintain and unitils work together on multi-database-user support but the solution is a pure ant hack . 1 . I have set up the configuration for dbmaintain using multi-database-user support . 2 . I have made a unitils-local.properties file with token keys for replacement . 3 . The init target of my ant script is generating a new unitils-local.properties file by replacing tokens for username password schema with values that are correct for the target envirnonment and then copies it to the users home-directory . 4 . I have sorted the tests into folders that are prefixed with the schema name .. . 5 . When unitils is invoked it picks up the unitils-local.properties file just created by the ant script and does its magic . Its far from pretty but it works . Comment : I was looking for a programmatic solution to this to the extent of generating unitils.properties on-the-fly but eventually reached a similar conclusion", "Question : I am working on a new Oracle ADF project that is using Oragle 10g Database and I am using Unitils and DBMaintainer in our project for : .. . .. . updating the db structure .. . unittesting .. . read in seed data .. . read in test data .. . List item .. . .. . In our project we have 2 schemas and 2 db users that have privilegies to connect to these schemas . I have them in a folder structure with incremental names and I am using the @convention for script naming . This works fine with ant and DBMaintainer update task and I supply the multiple user names by configuring extra elements for the ant task . However I cant figure out how to make the DBMaintainer update task create the xsd schemas from my db schemas So I decided to use Unitils since its update creates xsd schemas . I haven t found any description or documentation for the Unitils ant tasks - can anyone give some hints For the time being I have figured out to run Unitils by creating a Junit test with @Dataset annotation . I can make it work with one schema and one db user . But I am out of ideas how to make it work with multiple users Here is the unitils-local.properties setup I have : .. . .. . Can any of you guys give me a tip how to make Unitils work with the second user schema I will be extremely gratefull for your help .. . Answer : Check out this link : http : www.dbmaintain.org tutorial.html From Java code .. . .. . Specifically you may need to do something like : .. . .. . Also this link may be helpful : http : www.dbmaintain.org tutorial.html Multi-database user support Comment : Yes I know of this multi-database DBMaintain configuration . The trouble is that Unitils is using DBMaintain as a submodule but seems not to honor the multi-database configuration . Comment : Interesting . Yeah I ve been having similar problems with Unitils dbMaintain module not behaving the same as what is documented on dbMaintain s site . See my question here : link http : stackoverflow.com questions 6143505 using-unitils-dbmaintain-to-maintain-database-how-to-exclude-scripts-from-being . My assumption at this point is that Unitils is using an older version of dbMaintain . Comment : Follow up : my assumption was correct . Unitils is using an old version of dbMaintain under the covers . See here : stackoverflow.com a 6414416 411229 http : stackoverflow.com a 6414416 411229" ] }
[ "yes-answer-long", "yes-answer-short" ]
unit-testing
UNK_RELATION
jbox2d@box2d@142
jbox2d -- jbox2d is a java physics-engine often used in games an other physics simulations and is a port extension of the c++ physics-engine @placeholder .
{ "confidence": [ 80.76675415039062, 66.85307312011719, 51.32815933227539, 50.63178253173828, 49.96482467651367, 49.96482467651367, 49.47410583496094, 49.20136260986328, 48.85912322998047, 48.602577209472656, 47.40665817260742, 47.25857925415039, 46.56599807739258, 45.63582992553711, 45.46623229980469, 45.15266036987305, 45.1209716796875, 45.08102798461914, 44.320098876953125, 43.9869384765625, 43.5145378112793, 43.27263259887695, 43.27263259887695, 43.27263259887695, 43.27263259887695, 42.892539978027344, 42.396934509277344, 42.30392074584961, 42.16994094848633, 42.034889221191406, 41.07585144042969, 40.74773406982422, 40.74773406982422, 40.74773406982422, 40.74773406982422, 40.74773406982422, 39.89854049682617, 39.653648376464844, 39.157039642333984, 39.007755279541016, 38.9768180847168, 38.705909729003906, 38.37038803100586, 38.062950134277344, 37.32762145996094, 37.32762145996094, 37.32762145996094, 37.32762145996094, 37.32762145996094, 37.32762145996094, 37.32762145996094, 36.72119140625, 36.72119140625, 36.30052947998047, 36.30052947998047, 36.2335319519043, 35.51850509643555, 35.16967010498047, 34.922237396240234, 34.36994171142578, 33.85940933227539, 32.76531982421875, 32.76531982421875, 32.76531982421875, 32.76531982421875, 32.72074508666992, 32.72074508666992, 32.72074508666992, 32.72074508666992, 31.62665557861328, 31.62665557861328, 31.62665557861328, 31.18282699584961, 30.893245697021484, 30.893245697021484, 30.76513671875, 30.31536102294922, 29.913753509521484, 29.90123748779297, 29.90123748779297, 29.90123748779297, 29.90123748779297, 29.90123748779297, 29.220233917236328, 28.43749237060547, 28.392488479614258, 27.81520652770996, 27.57103729248047, 27.46030044555664, 27.46030044555664, 26.743289947509766, 26.743289947509766, 26.743289947509766, 26.743289947509766, 26.743289947509766, 26.16600799560547, 25.891098022460938, 24.435632705688477, 24.412818908691406, 24.412818908691406 ], "content": [ ".. . .. . JBox2d is a Java port of the C++ physics engines LiquidFun and Box2d .", "I am making a simple physics program using JBox2D .", ".. . .. . You can find the documentation for JBox2D here https : github.com jbox2d jbox2d .", "Used JBox2D version is 2.1.2.3 .", "I m quite new to Jbox2d so if anyone has any easier physics engines I could use I would also be open to suggestion", "I m doing some initial experiments for a CS course where I m trying to use JBox2D as a physics library and drawing using JavaFX .", "Taking a look into the source : .. . .. . https : github.com jbox2d jbox2d blob master jbox2d-library src main java org jbox2d dynamics World.java you can see that there is no constructor for Vec2 and boolean .", "Working on a game in Java using JBox2d .", "Here is the package for the testbed framework : github.com dmurph jbox2d tree master jbox2d-testbed src main https : github.com dmurph jbox2d tree master jbox2d-testbed src main java org jbox2d testbed framework TestbedMain.java is in the j2d folder here : github.com dmurph jbox2d tree master jbox2d-testbed src main https : github.com dmurph jbox2d tree master jbox2d-testbed src main java org jbox2d testbed framework j2d", "Also I don t know if JBox2D is Box2D the C++ one for Java and if JBox2D and Box2D the libGDX one are related at all .", "However recently I have found the existence of a library called JBox2D https : github.com jbox2d jbox2d .", "However you might find it interesting to know that the gdx-box2d extension uses JBox2d https : github.com libgdx libgdx tree master extensions gdx-box2d gdx-box2d-gwt src com badlogic gdx physics box2d gwt emu org jbox2d behind the scenes when it is not possible to wrap the native library .", "Following several jBox2D tutorials example 1 : http : thisiswhatiknowabout.blogspot.com.au 2011 12 jbox2d-tutorial.html and downloaded the source code from Git https : github.com jbox2d jbox2d - using the main library folder .", "You need to create a controller and start is as shown here : https : github.com dmurph jbox2d blob master jbox2d-testbed src main java org jbox2d testbed framework j2d TestbedMain.java", "See here for the JPanel that does the buffered rendering : https : github.com dmurph jbox2d blob master jbox2d-testbed src main java org jbox2d testbed framework j2d TestPanelJ2D.java .. . .. . and here for the debug draw : https : github.com dmurph jbox2d blob master jbox2d-testbed src main java org jbox2d testbed framework j2d DebugDrawJ2D.java .. . .. . See the TestbedMain.java file to see how the normal testbed is launched and rip out what you don t need : .. . .. . Edits : Disclaimer : I maintain jbox2d .. . .. . Here is the package for the testbed framework : https : github.com dmurph jbox2d tree master jbox2d-testbed src main java org jbox2d testbed framework .. . .. . TestbedMain.java is in the j2d folder here : https : github.com dmurph jbox2d tree master jbox2d-testbed src main java org jbox2d testbed framework j2d", "Great work with jBox2d by the way .", "I m writing a program in Java using JBox2D .", "Naturally I am now ready to add physics to the engine so I can actually start creating a game with it .", "Please advise .. . .. . Thanks .. . .. . PS if you think this physics-engine is junk which I am beginning to believe or if you know of a better engine do tell .", "If thats the case then you should not set the positions of the Body s directly but let the physics-engine Box2D handle it .", "JBox2D is a Java wrapper of the C++ library so you can write Java code that interacts with the C++ library .", "However the collision in Jbox2D is out of sync .", "I m having a little problem with jbox2d .", "This was a bug in jbox2d fixed in 2.3.1-SNAPSHOT", "Is JBox2D more complete than Box2D", "If you need this data it is usually best to use the WorldManifold https : code.google.com p jbox2d source browse trunk updating jbox2d-library src main java org jbox2d collision WorldManifold.java r 349 structure .. . .", "I m trying to draw debug lines for jBox2D .", "I have a physics world created with Earth s gravity .", "Processing is written in Java so you can use JBox2D in Processing .", "While the JBox2D library is completely written port in Java and doesn t rely on the native library .", "I m using Opengl and Jbox2d to write a real-time 2d game in Java .", "I would like to apply a force to a body in jbox2d .", "Why are you talking about JBox2D bodies", "JBox2d provides a callback class called ContactListener .", "That is because the center of the screen in JBox2D is 0 0 .", "You might have to use JBox2D directly yourself .", "The poisition updates of physics bodies is managed by the Box2D library .", "I m creating a graphical front-end for a JBox2D simulation .", "In most cases specifically Android it is faster to use the JNI wrapper instead of JBox2d it is probably also faster on iOS because RoboVM needs to translate the JBox2D bytecode .", "But I can say from experience that the 3D physics gdx-bullet JNI wrapper is much faster compared to the JBullet Java port .", "I try to get the DebugDraw running in a simple Android JBox2D project .", "Thats because in the physics simulation the body will be pushed down by gravity .", "I m creating a game in Java using JBox2D which allows the player to shoot small high speed bullets .", "If you want the 2.2.1 version of jbox2d you can grab a build from the trunk https : code.google.com p jbox2d source checkout .", "I am making a game using JBox2D and Slick2D per the title .", "I am writting a little Game where I use Slick2D and JBox2D .", "Are you really running it in the browser via GWT and this is a platform specific JBox2D problem", "I have the jbox2d-library-2.1.2.2.jar file in a folder named libs .", "I haven t bench marked gdx-box2d vs JBox2d myself .", "I m trying to make a concave polygon body in JBox2D by combining convex polygons .", "You don t need to use these libraries in order to use JBox2D from Processing .", "Even though this is a question includes references to JBox2d its really more of a general Java question .", "I m trying to make a small hobby game in Java using Slick2d JBox2d and Tiled but I ve come across an annoying problem .", "If I simply scale everything larger it will like cause errors in the physics .", "This physics layout https : github.com Jawnnypoo PhysicsLayout is supposed to have a fling feature .", "I only need geometric primitives to draw a JBox2D simulation .", "Processing also has a few libraries that simplify JBox2D like Daniel Shiffman s Box2D for Processing https : github.com shiffman Box2D-for-Processing or BoxWrap2d http : www.jbox2d.org processing doc index.html org jbox2d p5 Physics.html .", "The examples are in C++ as much as i remember but the theory is the same and you should be able to do the same things with the jBox2D wrapper .", "The thing is my program uses jbox2d which requires certain values to operate .", "JBox2D takes care of determining collisions and there is limited control over changing its behavior without modifying the library itself .", "I m currently trying to implement some physics into my app however I am running into a problem when compiling .", ".. . .. . LibGdx gdx.physics.box2d.joints.WeldJointDef http : libgdx.badlogicgames.com nightlies docs api com badlogic gdx physics box2d joints WeldJointDef.html", "I m developing a game with a similar mechanical to Crayon Physics Deluxe on libGDX https : www.youtube.com watch v avkacGQKWec .", "I ve attempted using a polygonization algorithm but it doesn t work exactly like Crayon Physics and creates a lot of bugs .", "Let s say that I m trying to use Box2d and I m new to it so I didn t get it working moving the sprite with physics .", "I am new to Box2D JBox2d in this case and I am creating a wheel-menu on an Android app .", "I don t know about jbox2d but what happened is that sl4j which is a logging facade could not find a logging implementation .", "Please note that in JBox2D it worked with pixels measurements that was not accurate at all but collisions worked well", "Using JBox2D with LiquidFun my water particles are functioning fine with the exception that they travel at very slow velocities .", "I ve built a simple simulator using JBox2D which involves a character built from a collection of bodies and four Revolute Joints .", "Only way to fix this - make your best and do it yourself or wait while someone will update jbox2d .", "This may sound stupid but I cannot for the life of me find the JAR files in the Jbox2d file folder .", "log4j .. . .. . not sure about the exact version though .. . .. . BTW jbox2d mentions this in its documentation https : code.google.com p jbox2d wiki QuickStart not building with maven : .. . .. . EDIT : any reason you don t get the dependencies from a maven repo", "To answer your question yes the world variable would be the instance of World you created when you set up your physics environment .", "Daniel Shiffman is a very good teacher but you might want to go back and try something a little simpler before trying to use a physics library .", "You can access it inside the Contact c class : .. . .. . Important : I have never used this library JBox2D however I m familiar with it since libGDX apparently use a similar one Box2D .", "I have imported a library JBox2D using Maven in IntelliJ 13 for use in an android project .", "The best I can explain it is that the sketch seems to lose its physics .. . the balls no longer fall or bounce around they cling to each other and just hover in the middle of the sketch .", "first of all thanks a lot for your time : .. . .. . I m currently trying to understand how jbox2d works and I m having some issues .", "I m new to Processing new to JBox2D and new to Stack Overflow so any help I could get would be much appreciated", "I m trying to write a simple program based on Shiffman s JBox2D Processing tutorials where you click to create a new ball then drag and release the mouse to throw it .", "Seems much easier to just get it from here http : mvnrepository.com artifact org.jbox2d jbox2d 2.1.2.2 and let gradle take care of the dependencies.. .", "Here s my code for the bodies using JBox2D : .. . .. . This is drawn using nodes in JavaFX - as written here : .. . .. . The code isn t pretty but I hope you get the idea .", "I simply extend the DebugDraw like that and put some log output : .. . .. . I use the new debug class like that : .. . .. . Afterwards I create bodies and start the physics simulation .", "if both of your 2 object have a fixture defined they will not be able to crossing one another this is an exmple of how a dynamic object who will be affected by physics in the BOX2D world must be created and also this object can t tunneling through a sensor : .. . .. . make sure to define a fixture to your box2d dynamic or static object to avoid tunneling through a sensor like in this exmple : .. . .. . according to BOX2D official documentation : .. . .. . Recall that shapes don t know about bodies and may be used independently of the physics simulation .", "I am trying to develop a game in android follwing the jbox2d example called Jbox2DTestbed upon the BodyDef I want to set a image bitmap from my resource but my code is not working .", "There was an updated to the engine w o an update to the wiki .", "This is how you create a WeldJoint http : libgdx.badlogicgames.com nightlies docs api com badlogic gdx physics box2d joints WeldJoint.html with the libgdx wrapper : .. . .. . Do not try to create Joints inside the ContactListener .", "What benefit does it have for the engine", "What use does it have in the engine", "now this is the part regarding jbox2d .. . .. . in the class Map I have : .. . .. . now this is how the static entity looks like : .. . .. . and finally the player : .. . .. . do you guys now what am I doing wrong", "Whenever I try to destroy a body in JBox2D it always give me a NullPointerException and I have checked online and they show various ways of doing it safely which I don t understand .", "Here is my code that I use : .. . .. . The bodiesContainer is an ArrayList and the particleBody is a JBox2D body i wish to destroy but every time I press the space button it crashes and gives me a NullPointerException .", ".. . .. . BASE QUESTION .. . .. . Since I have added the slick2D to jbox2D position and vice versa it s like position in screen position in screen 100 for JBox I don t get a good result .", "I ask this because I want to know if change my project from one to another in this case from Box2D to JBox2D can affect or optimize the performance of my game .", "EDIT : What use does it have for the engine", "I know they both are based on the Box2D https : github.com erincatto Box2D library for c++ because of this : .. . .. . The Box2D implementation in libgdx is a thin Java wrapper around the C++ engine .", "questions 4659517 what-does-suffix-f-mean-in-java-code 5 answers .. . .. . It seems to be used in value declarations in the engine but the documentation of JBox-2D does not explain what this unit is .", "Now to my problem : I try to use an DebugDraw for the engine .", "I have made an engine with LWJGL and I am pleased with it so far ." ] }
{ "confidence": [ 95.67462921142578, 78.49317932128906, 72.91146850585938, 71.5588150024414, 71.10018157958984, 68.60885620117188, 64.05339813232422, 59.988861083984375, 59.714874267578125, 59.714874267578125, 58.87471389770508, 58.41694641113281, 58.175872802734375, 57.06455612182617, 56.140708923339844, 55.57945251464844, 55.54310989379883, 50.086631774902344, 46.337425231933594, 46.14516830444336 ], "content": [ "Question : I have working on libGDX and use Box2D https : github.com libgdx libgdx wiki Box2d for simple 2D physic interactions inside my game . However recently I have found the existence of a library called JBox2D https : github.com jbox2d jbox2d . Is there any difference between this two libraries What the advantages of one from another I know they both are based on the Box2D https : github.com erincatto Box2D library for c++ because of this : .. . .. . The Box2D implementation in libgdx is a thin Java wrapper around the C++ engine . .. . .. . JBox2d is a Java port of the C++ physics engines LiquidFun and Box2d . But what do they mean by port and wrapping Is JBox2D more complete than Box2D which one is faster I ask this because I want to know if change my project from one to another in this case from Box2D to JBox2D can affect or optimize the performance of my game . Comment : Wrapping would mean that their is a thin essentially non-functional API which makes it easier to call the underlying API from Java . It basically acts as a proxy between Java and presumably the native implementation . A Port is where the actual code has been translated from C++ to Java so the ported version becomes presumably pure Java and doesn t rely on any external native libraries Comment : Do this make the port one slowly Comment : You d have to bench mark some times yes some times no . The port would be easier to get running on multiple platforms as you won t need to worry about ensuring that the correct libraries are installed for example also it won t suffer from issues such as updated libraries on the platform OS which might cause issues .. . Answer : As MadProgrammer said the libgdx box2d extension gdx-box2d is a JNI wrapper around the native box2d library . While the JBox2D library is completely written port in Java and doesn t rely on the native library . However you might find it interesting to know that the gdx-box2d extension uses JBox2d https : github.com libgdx libgdx tree master extensions gdx-box2d gdx-box2d-gwt src com badlogic gdx physics box2d gwt emu org jbox2d behind the scenes when it is not possible to wrap the native library . Which is only the case for the GWT backend . In most cases specifically Android it is faster to use the JNI wrapper instead of JBox2d it is probably also faster on iOS because RoboVM needs to translate the JBox2D bytecode . Which is why the extension uses that on the those backends . Of course this depends on that actual scenario so you should benchmark and compare it know the actual difference . I haven t bench marked gdx-box2d vs JBox2d myself . But I can say from experience that the 3D physics gdx-bullet JNI wrapper is much faster compared to the JBullet Java port . Please note that the gdx-box2d includes the required libraries . It does not depend on any libraries on the platform that needs to be updated . You also don t need to worry about ensuring that the correct libraries are installed . Comment : I ll have to learn how to benchmark then it s a new word for me do just porting my game from one library to another and then measure time performance for both count as bench marking or there are standard on how to benchmark Comment : Unless there s an actual performance problem you re trying to solve and you actually found that box2d is causing that problem and you verified that it is not a problem with your own code e.g . misusing the API you shouldn t even think about this . First identify the problem then try to solve . Don t try to solve problems that might or might not exist .", "Question : I m currently trying to implement some physics into my app however I am running into a problem when compiling . Compilation error : .. . .. . my code : .. . .. . .. . .. . Basically I am trying to make a 2D figure that can be moved around . I m quite new to Jbox2d so if anyone has any easier physics engines I could use I would also be open to suggestion I have the jbox2d-library-2.1.2.2.jar file in a folder named libs . I have added the following to the app build.gradle .. . Answer : I don t know about jbox2d but what happened is that sl4j which is a logging facade could not find a logging implementation . Probably all you need to do is providing one in you classpath e.g . log4j .. . .. . not sure about the exact version though .. . .. . BTW jbox2d mentions this in its documentation https : code.google.com p jbox2d wiki QuickStart not building with maven : .. . .. . EDIT : any reason you don t get the dependencies from a maven repo Seems much easier to just get it from here http : mvnrepository.com artifact org.jbox2d jbox2d 2.1.2.2 and let gradle take care of the dependencies.. .", "Question : null .. . Answer : I am making a simple physics program using JBox2D . I made a Dynamic body but they does not fall . I get information from toolbarpanel and make bodies with newpolygon and newcircle . step of world is called every 0.5s . I checked body s type is DYNAMIC by printing it . Somebody help", "Question : I need to get the list of co-ordinates for my box2d world- I m trying to get a wrap around effect so that particles that go off the side of the screen appear on the opposite side . box2d is not well documented for Processing and the only example I could find was in java I know its the parent language but it needs translating . This is here http : www.emanueleferonato.com 2012 08 23 box2d-and-the-wraparound-effect . I think the action is here : .. . .. . So I have tried translating this although I get stuck at the point of world.GetBodyList I assume world is the instantiated box2d world I have created . I that is so Processing doesn t seem to recognise this . Basically how to I just get an array of all the particle co-ordinates . Should be easier... . .. . Answer : Anything you can do in Java you can do in Processing . But the code you posted is not Java . It s C++ . Edit : George pointed out that it looks like ActionScript . Either way it s not Java Box2D is the original library written in C++ . Your code is an example of using that library . JBox2D is a Java wrapper of the C++ library so you can write Java code that interacts with the C++ library . Processing is written in Java so you can use JBox2D in Processing . Processing also has a few libraries that simplify JBox2D like Daniel Shiffman s Box2D for Processing https : github.com shiffman Box2D-for-Processing or BoxWrap2d http : www.jbox2d.org processing doc index.html org jbox2d p5 Physics.html . You don t need to use these libraries in order to use JBox2D from Processing . .. . .. . You can find the documentation for JBox2D here https : github.com jbox2d jbox2d . To answer your question yes the world variable would be the instance of World you created when you set up your physics environment . If you re using one of the Processing libraries the creation of the World instance might be hidden from you . You might have to use JBox2D directly yourself . Comment : Sebastian s snippet actually looks like Actionscript 3 not c++ but your advice is sound +1 Comment : @GeorgeProfenza Thanks George . I don t know C++ at all I just knew it wasn t Java I ve added a little note correcting myself .", "Question : This may sound stupid but I cannot for the life of me find the JAR files in the Jbox2d file folder . There is a readme that says : .. . .. . I am not sure what this means but when browsing through the file folders why are there always so many empty folders from the Netbeans add jars menu no files are detected . I also was previously using eclipse and could not get it to work with this IDE either which is why I downloaded netbeans in the first place . This may see like a newbie question but bare in mind I mostly code in python where I would simply include an import statement and include the source in the file folder . Please advise .. . .. . Thanks .. . .. . PS if you think this physics-engine is junk which I am beginning to believe or if you know of a better engine do tell . .. . Answer : They were not included . Download from another source . Comment : Do you happen to know of another source", "Question : null .. . Answer : I m doing some initial experiments for a CS course where I m trying to use JBox2D as a physics library and drawing using JavaFX . I have had some luck draw circles that fall from the top of the screen but now I have issues doing the same with rectangles or any other shape . I m able to both draw and simulate but I cannot figure out how to rotate the drawn nodes in JavaFX using values from the Body objects . Here s my code for the bodies using JBox2D : .. . .. . This is drawn using nodes in JavaFX - as written here : .. . .. . The code isn t pretty but I hope you get the idea . I am able to rotate the nodes by inserting arguments in the method but do not know how to get these values from the Body objects themselves . I hope you can help thanks", "Question : I have followed this tutorial and the testbed launches but nothing ever happens . The GUI appears but the tests never run it just sits there . The testbed is launched from the driver class and you add the testbed test . Anyone else have this problem Driver Class .. . .. . Testbed Test class .. . Answer : There was an updated to the engine w o an update to the wiki . Whoops sorry . You need to create a controller and start is as shown here : https : github.com dmurph jbox2d blob master jbox2d-testbed src main java org jbox2d testbed framework j2d TestbedMain.java", "Question : null .. . Answer : I am writting a little Game where I use Slick2D and JBox2D . Now to my problem : I try to use an DebugDraw for the engine . But every version i find on the internet doesnt work . They throw the following exception : .. . .. . If needed I can post the DebugDraw version I am using . Used JBox2D version is 2.1.2.3 . Comment : stackoverflow.com questions 9030065 http : stackoverflow.com questions 9030065 classnotfoundexception-org-slf4j-loggerfactory Comment : Oh sorry didnt found that ty", "Question : I m kind new to LibGdx and I m still learning . I m working on a small game project to learn this nice framework . However I m having some issues with my game . My game is a top down shooter . There is a human character space marine that has to shoot an alien which will be always moving in his direction until it dies . My code doesn t have any bullets yet.I was able to make the shooter rotate in the direction of the cursor as well the alien rotate in the direction of the shooter but I can t make the alien move in his direction . I m pretty sure that my method that does that is completely wrong . I ve tried a lot to fix it but I can t get it fixed I appreciate your attention guys You can find the full code of the main class here : https : github.com Igor-Lopes LibGdx blob master Splash.java L125 Comment : Are you using Box2D If thats the case then you should not set the positions of the Body s directly but let the physics-engine Box2D handle it . That means you should use forces and impulses to move the Body s . Comment : Let s say that I m trying to use Box2d and I m new to it so I didn t get it working moving the sprite with physics . Since it s a top down shooter I m using 0 as gravity . Comment : As you just started using Libgdx i suggest you to start with less complex games without using Box2D . Anyways the IMHO best way to learn Box2D is iforce2d.net b2dtut http : www.iforce2d.net b2dtut . The examples are in C++ as much as i remember but the theory is the same and you should be able to do the same things with the jBox2D wrapper . Comment : It s an assignment so I can t skip it . But thank you for your suggestion though I ll take a look at it . Comment : Depending on how much time you have for your assignment you could learn libgdx by creating smaller projects before starting to create the topdown shooter with Box2D . If there is not enough time for that you should at least read all relevant parts of the libgdx wiki to get some understanding of the Framework . Also think about the structure you want to use if you don t organize your code you will fail . .. . Answer : I don t have enough reputation points yet to add a comment and I m not sure if this is your problem but one definite bug is doing Y + X in the your moveAlien method on the line : vAlien.y + vAlien.x Gdx.graphics.getDeltaTime", "Question : I m kind new to LibGdx and I m still learning . I m working on a small game project to learn this nice framework . However I m having some issues with my game . My game is a top down shooter . There is a human character space marine that has to shoot an alien which will be always moving in his direction until it dies . My code doesn t have any bullets yet.I was able to make the shooter rotate in the direction of the cursor as well the alien rotate in the direction of the shooter but I can t make the alien move in his direction . I m pretty sure that my method that does that is completely wrong . I ve tried a lot to fix it but I can t get it fixed I appreciate your attention guys You can find the full code of the main class here : https : github.com Igor-Lopes LibGdx blob master Splash.java L125 Comment : Are you using Box2D If thats the case then you should not set the positions of the Body s directly but let the physics-engine Box2D handle it . That means you should use forces and impulses to move the Body s . Comment : Let s say that I m trying to use Box2d and I m new to it so I didn t get it working moving the sprite with physics . Since it s a top down shooter I m using 0 as gravity . Comment : As you just started using Libgdx i suggest you to start with less complex games without using Box2D . Anyways the IMHO best way to learn Box2D is iforce2d.net b2dtut http : www.iforce2d.net b2dtut . The examples are in C++ as much as i remember but the theory is the same and you should be able to do the same things with the jBox2D wrapper . Comment : It s an assignment so I can t skip it . But thank you for your suggestion though I ll take a look at it . Comment : Depending on how much time you have for your assignment you could learn libgdx by creating smaller projects before starting to create the topdown shooter with Box2D . If there is not enough time for that you should at least read all relevant parts of the libgdx wiki to get some understanding of the Framework . Also think about the structure you want to use if you don t organize your code you will fail . .. . Answer : I had the solution for awhile but I forgot to post . Here s the method to move a list of enemies towards the player .", "Question : I m new to Processing new to JBox2D and new to Stack Overflow so any help I could get would be much appreciated I m trying to write a simple program based on Shiffman s JBox2D Processing tutorials where you click to create a new ball then drag and release the mouse to throw it . Balls can collide with one another and a ring of circles keys around the edge of the sketch . Every time you click a ball object is added to an array list . Everything works fine until you start clicking rapidly creating many balls in a short period of time . The best I can explain it is that the sketch seems to lose its physics .. . the balls no longer fall or bounce around they cling to each other and just hover in the middle of the sketch . I get an error message saying Could not invoke the beginContact method for some reason with a long list of errors that starts with java.lang.reflect.InvocationTargetException at sun.reflect.GeneratedMethodAccessor2.invoke Unknown Source ... . etc etc etc .. . .. . Any help would be so very greatly appreciated My code : .. . Answer : It sounds like the bodies are spawning inside each other which is going to cause problems . You could modify your spawning algorithm so that you only spawn new bodies in empty space or you could limit how often a new body is created . Googling box2d spawning inside body returns a bunch of promising results .", "Question : I m creating a graphical front-end for a JBox2D simulation . The simulation runs incrementally and in between the updates the contents of the simulation are supposed to be drawn . Similar to a game except without input . I only need geometric primitives to draw a JBox2D simulation . This API seemed like the simplest choice but its design is a bit confusing . Currently I have one class called Window extending JFrame that contains as a member another class called Renderer . The Window class only initializes itself and provides an updateDisplay method that is called by the main loop that calls updateDisplay objects method on the Renderer . I made these two methods myself and their only purpose is to call repaint on the Renderer . Is the JPanel supposed to be used that way Or am I supposed to use some more sophisticated method for animation such that involves events and or time intervals in some back-end thread .. . Answer : Why not just use stuff from the testbed It already does everything . Just take the JPanel controller and debug draw . It uses Java 2D drawing . See here for the JPanel that does the buffered rendering : https : github.com dmurph jbox2d blob master jbox2d-testbed src main java org jbox2d testbed framework j2d TestPanelJ2D.java .. . .. . and here for the debug draw : https : github.com dmurph jbox2d blob master jbox2d-testbed src main java org jbox2d testbed framework j2d DebugDrawJ2D.java .. . .. . See the TestbedMain.java file to see how the normal testbed is launched and rip out what you don t need : .. . .. . Edits : Disclaimer : I maintain jbox2d .. . .. . Here is the package for the testbed framework : https : github.com dmurph jbox2d tree master jbox2d-testbed src main java org jbox2d testbed framework .. . .. . TestbedMain.java is in the j2d folder here : https : github.com dmurph jbox2d tree master jbox2d-testbed src main java org jbox2d testbed framework j2d Comment : Usually when you are promoting something you are affiliated with it s good etiquette to point out your affiliation . Comment : added disclaimer : Comment : Wow that would be stellar if it actually works thanks Could you provide some more information on how I m supposed to use this code Maybe a simple example I can t find TestbedMain.java . Comment : Here is the package for the testbed framework : github.com dmurph jbox2d tree master jbox2d-testbed src main https : github.com dmurph jbox2d tree master jbox2d-testbed src main java org jbox2d testbed framework TestbedMain.java is in the j2d folder here : github.com dmurph jbox2d tree master jbox2d-testbed src main https : github.com dmurph jbox2d tree master jbox2d-testbed src main java org jbox2d testbed framework j2d", "Question : I have made an engine with LWJGL and I am pleased with it so far . Naturally I am now ready to add physics to the engine so I can actually start creating a game with it . I have chosen to use Jbox2D as it seems fairly flexible and I have imported it into the project and done all the setup needed however after implementing the body system into my GameObject class and running the game all GameObjects seemed to go to the centre of the window I believe I may have made some mistakes in the code : .. . .. . the world and body hashSet are in the main class if you are wondering I think I have severely screwed up the code somehow . Also I am using the legacy pipeline of lwjgl as it is simpler and fits the engine better . Comment : Are you considering the fact that Box2D uses meters instead of pixels Comment : yes that s why I am dividing or multiplying by 30 of which is the supposed algorithm of exchange but I am doubtful... . Comment : perhaps it is the fact that box2D uses the centre of a body as its origin which is why I am dividing the size by 2 and lwjgl uses another point.. . Comment : stackoverflow.com questions 28028121 http : stackoverflow.com questions 28028121 how-many-pixels-is-a-meter-in-box2d oh jeez... . Comment : is it possible that my GameObject class has to extend the box2D body class .. . Answer : I simply set the origin of my sprites to their centre rather than the bottom left and that solved the problem like this : .. . .. . I hope this helps anyone in a similar situation sX is size X sY is sizeY", "Question : null .. . Answer : I had my glortho set up like this : .. . .. . With slick2d unicodeFont.drawstring I was getting this : .. . .. . enter image description here http : i.stack.imgur.com DjNb7.png .. . .. . The text is very blurry and that is at font-size 20 . I tried a few things and ended up changing my ortho to this : .. . .. . And the result was this : .. . .. . enter image description here http : i.stack.imgur.com udA0U.png .. . .. . It looks a little strange here but I tried in multiple fonts and it appears the text zoomed in . At a normal size like 10-12 it is barely legible . I m assuming I have scaling issue here . The thing is my program uses jbox2d which requires certain values to operate . If I simply scale everything larger it will like cause errors in the physics . Why is the text blurry and or zoomed Is there a way I can fix it by chaning my glortho Here is the relevant code : .. . .. . This is how I render :", "Question : Following several jBox2D tutorials example 1 : http : thisiswhatiknowabout.blogspot.com.au 2011 12 jbox2d-tutorial.html and downloaded the source code from Git https : github.com jbox2d jbox2d - using the main library folder . When creating a new world following error : .. . .. . Error http : i.imgur.com LR8zjwZ.png .. . .. . Cannot find a constructor that comes with Vec and Boolean . Instead result is : Vec2 and org.jbox2d.pooling.IWorldPool type which seems wrong . .. . Answer : Taking a look into the source : .. . .. . https : github.com jbox2d jbox2d blob master jbox2d-library src main java org jbox2d dynamics World.java you can see that there is no constructor for Vec2 and boolean . Available constructors are : .. . .. . 1 . public World Vec2 gravity .. . 2 . public World Vec2 gravity IWorldPool pool .. . 3 . public World Vec2 gravity IWorldPool pool BroadPhaseStrategy strategy .. . 4 . public World Vec2 gravity IWorldPool pool BroadPhase broadPhase .. . .. . that means that you have to rework your code . Maybe the tutorial bases on an older version tutorial was made 13 December 2011 I have experienced such issues with libgdx someday after an update .", "Question : I try to get the DebugDraw running in a simple Android JBox2D project . I simply extend the DebugDraw like that and put some log output : .. . .. . I use the new debug class like that : .. . .. . Afterwards I create bodies and start the physics simulation . My simulation works I render my stuff based on the simulation on a canvas . But when I want to use DebugDraw since this sometimes makes the modelling of the physical world a bit easier to debug this doesn t seem to work . The Log output is not appearing and when debugging also the breakpoint don t get hit in my SimpleDebugView . So it seems the methods are not called at all . Am I using DebugDraw wrong .. . Answer : I found the solution . I need to tell my physic world that it should draw the debug via : .. . .. . So I called this directly after doing the step and my methods get called . Somehow I thought this would happen automatically when I attach a DebugDraw but it wasn t .", "Question : I m writing a program in Java using JBox2D . I need to find the exact point of collision between two textures if and when they collide . I have the code to determine if a collision happens and can obviously just call the collision object ID to determine which textures are colliding . What I can t seem to figure out is how to grab the actual coordinates of the collision itself . I read the documentation but it is very complicated and does not address this issue directly . Here s my code : .. . Answer : To know where the collision happened you should know that sometimes there is not only one point of collision but a set of points . extracted from manual http : i.stack.imgur.com fKYHU.png .. . .. . Image extracted from this manual http : box2d.org manual.pdf .. . .. . As the above manual says : .. . .. . Box2D has functions to compute contact points for overlapping shapes . .. . These points .. . groups them into a manifold structure . .. . .. . .. . Normally you don t need to compute contact manifolds directly however you will likely use the result produced in the simulation . .. . If you need this data it is usually best to use the WorldManifold https : code.google.com p jbox2d source browse trunk updating jbox2d-library src main java org jbox2d collision WorldManifold.java r 349 structure .. . . You can access it inside the Contact c class : .. . .. . Important : I have never used this library JBox2D however I m familiar with it since libGDX apparently use a similar one Box2D . Also I don t know if JBox2D is Box2D the C++ one for Java and if JBox2D and Box2D the libGDX one are related at all . So maybe some methods can change point.x could be point.getX . You could check this site http : box2d.org forum viewtopic.php f 9 t 8005 too but this is for C++ I use their answer to answer you .", "Question : Even though this is a question includes references to JBox2d its really more of a general Java question . Working on a game in Java using JBox2d . JBox2d provides a callback class called ContactListener . The following snippet works fine when bodies collide in my world I see Contact begin . logged to console . However I d like to be able to move some collision logic into appropriate classes . Example if a Body collides with ConveyorBelt I d like to handle logic specific to ConveyorBelt inside that class . So ConveyorBelt has it s own beginContact beginContact preSolve and postSolve method definitions same for Rectangle etc .. . What would be best way to achieve this Class hierarchy . . Comment : If you can extract the object instances out of Contact then you can have custom contact handlers etc on them and call those . Comment : I m not quite sure what you mean when a Contact occurs on say a ConveyorBelt how would the beginContact method inside ConveyorBelt be called Comment : Something like beginContact Contact contact contact.getShape .beginContact contact - note that I dont know your library but there will be a similar method to this . .. . Answer : Thanks for hint @MightyPork used this in the end . .", "Question : .. . .. . UPDATE .. . .. . I have a hint . That is because the center of the screen in JBox2D is 0 0 . This is so weird because x and y are not from -1 to 1 it depends of the screen-size . This means the Util class I copied from the internet everybody shared this code is not up to-date . I still need help because I can t find any algorithm to have aspect-ratio + screen-size dependency . .. . .. . BASE QUESTION .. . .. . Since I have added the slick2D to jbox2D position and vice versa it s like position in screen position in screen 100 for JBox I don t get a good result . Screenshots below .. . .. . I m explaining with code : .. . .. . Square.java : .. . .. . And finally my display class : .. . .. . Here is the result : first frame : http : i.stack.imgur.com WgQPK.png .. . .. . some frames later : http : i.stack.imgur.com a1XyL.png .. . .. . the ground didn t move it s just another screenshot took from my hand .. . .. . In other words the cube falls down like for ever . I debugged the position of the cube and it doesn t stop to go down . With Slick2D DebugDraw it doesn t help because the cube goes through the ground anyway . Please note that in JBox2D it worked with pixels measurements that was not accurate at all but collisions worked well .. . Answer : That was because of the negative size . toPoxY reverse the y pos", "Question : I m testing the newest Box2d Testbed using Libgdx . It appears they aren t working and need to know if anyone else is having the same issue s . The first one is called Conveyor Belt https : github.com ansman box2d blob master Testbed Tests ConveyorBelt.h .. . .. . which I converted to : .. . .. . This is working by putting it in with the other Box2D tests but I noticed a few things . Libgdx doesn t have a setTangentSpeed method in its Contact.java class .. . .. . Settings has to use the org.jbox2d.common import .. . .. . Test can t be resolved to a type .. . .. . I also tried using Breakable https : github.com ansman box2d blob master Testbed Tests Breakable.h .. . .. . Which was converted to .. . .. . I Noticed : .. . .. . Libgdx doesn t have pointCount in Manifold.java . One quick fix was to change to getWorldManifold but didn t do any good .. . .. . Vector2.java doesn t contain a crs float x Vector2 v which the Vectors for m velocity won t allow .. . .. . Settings doesn t exist unless I use the com.jbox2d.common import .. . .. . How do I get these to work in Libgdx if these methods aren t included Is Libgdx not updated anymore I want to use these but it seems they are behind with porting . I even noticed in Contact.java he stopped just before the code for setTangentSpeed . I have added gwt jars to my tests with no benefit . Comment : What is your question Java port did not updated yet to the last Box2D version it is obvious . Only way to fix this - make your best and do it yourself or wait while someone will update jbox2d . Comment : From what I recall reading Box2D v2.1 was released in 2011...why is it taking so long There s no way I can do it myself but I did ask the creator and he never wrote back so I m guessing he doesn t know either .. . Answer : If you want the 2.2.1 version of jbox2d you can grab a build from the trunk https : code.google.com p jbox2d source checkout . It s almost ready for a release I just need to do a bit more optimization and inlining . edit : It looks like libgdx uses it s own wrappers to a the native C++ implementation of Box2D . This is definitely preferable performance-wise hopefully they will update their library ." ] }
[ "yes-answer-long", "yes-answer-short" ]
box2d
UNK_RELATION
uglifycss@yui-compressor@37
uglifycss -- uglifycss is a port of @placeholder for its css part to nodejs .
{ "confidence": [ 47.772911071777344, 47.280799865722656, 47.280799865722656, 43.88594055175781, 43.88594055175781, 41.952659606933594, 41.952659606933594, 41.952659606933594, 40.45252990722656, 38.799293518066406, 37.994815826416016, 36.86601257324219, 36.86601257324219, 36.86601257324219, 36.86601257324219, 35.68614959716797, 35.68614959716797, 35.58346176147461, 35.58346176147461, 35.16792678833008, 30.266042709350586, 29.282241821289062, 28.98349380493164, 25.197853088378906, 21.28284454345703, 21.28284454345703, 20.119747161865234, 19.49746322631836, 19.349563598632812, 18.58885383605957, 18.186466217041016, 17.509597778320312, 17.09143829345703, 16.937061309814453, 16.529844284057617, 16.281631469726562, 16.281631469726562, 16.234661102294922, 16.116140365600586, 15.769134521484375, 15.769134521484375, 14.952112197875977, 14.952112197875977, 14.833590507507324, 14.628395080566406, 14.628395080566406, 14.628395080566406, 14.628395080566406, 14.628395080566406, 14.628395080566406, 14.628395080566406, 14.40239429473877, 14.189519882202148, 14.088828086853027, 12.695114135742188, 12.695114135742188, 12.695114135742188, 12.695114135742188, 12.695114135742188, 12.695114135742188, 12.695114135742188, 12.695114135742188, 12.695114135742188, 12.695114135742188, 12.695114135742188, 12.695114135742188, 12.695114135742188, 12.695114135742188, 12.695114135742188, 12.695114135742188, 12.695114135742188, 12.695114135742188, 12.695114135742188, 12.695114135742188, 12.695114135742188, 12.695114135742188, 12.695114135742188, 12.695114135742188, 12.695114135742188, 12.695114135742188, 12.695114135742188, 12.695114135742188, 12.695114135742188, 12.695114135742188, 12.695114135742188, 12.695114135742188, 12.695114135742188, 12.695114135742188, 12.695114135742188, 12.695114135742188, 12.695114135742188, 12.695114135742188, 12.695114135742188, 12.695114135742188, 12.695114135742188, 12.695114135742188, 12.695114135742188, 12.695114135742188, 12.695114135742188, 12.695114135742188 ], "content": [ "https : github.com fmarcia UglifyCSS", "I has installed UglifyCSS globally with command : .. . .. . How can I get current version of installed UglifyCSS", "I import my stylesheet in my base twig file like this : .. . .. . My assetic is configured with the UglifyCSS and with the filters cssrewrite and uglifycss .", "So it s not a Symfony or assetic problem but seems to be an uglifycss problem .", "https : github.com fmarcia UglifyCSS issues 33 .. . .. . Cheers Dominik", "So to use the binary of uglifycss simply set node to null .", "If you have installed the binary of uglifycss there is no need for specifying the path to node .", "I m using uglifyjs and uglifycss with symfony to manage my asset .", "We had the same issue with the uglifycss filter running out-of-memory with big css files without a proper error message .", "If I only apply the cssrewrite filter and not the uglifycss filter the @media and @font-face parts are there just as expected .", "Set up config prod .. . .. . app-config config prod.yml .. . assetic : .. . filters : .. . uglifycss : .. . bin : kernel.root dir Resources node-modules .bin uglifyjs .. . node : null .. . apply to : .css .. . .. . .. . 2 .", "You can see what it finds by looking in app cache prod appProdProjectContainer.php and searching for uglifycss .", "Is it possible to use assetic with uglifyjs and uglifycss only on dev env and use uglified files in prod env", "I have some troubles making UglifyCSS and UglifyJS works with Assetics on my Symfony2.6 app .", "Here is my configuration : .. . .. . Here is the error : .. . .. . If I comment the uglifycss filter in my config there is no longer any problem .", "I use : uglifycss@0.0.15 Symfony v2.6.8 symfony assetic v2.6.1 .. . .. . Does anyone know what might be going wrong here", "According to http : www.w3.org TR CSS21 syndata.html comments a comment like this : .. . .. . But it turns out that uglifycss 0.0.15 has problems with a comment ending with .", "I am getting a signal 5 error from what seems like both UglifyJS and or UglifyCSS or Node itself .", "Note : I ve tagged this as uglifyjs2 because I don t have enough points for creating the tag uglifycss .. . .. . Thanks in advance :", "For my prod environment I want to use the UglifyCSS filter configured as follows config prod.yml : .. . .. . But whenever I run .. . .. . I get this error message : .. . .. . So obviously Assetic is looking for uglifycss in usr bin though I configured it to use a different path usr local bin .", ".. . .. . Version of UglifyJS I check with command : .. . .. . But when I try similar command for UglifyCSS : .. . .. . I had an error : .. . .. . Same error when I try -v and --version", "You can show the exact error message by following the following steps : .. . .. . disable uglifycss filter in your assetic configuration .. . run assetic : dump task .. . navigate to the dir where the css files are generated probably web css .. . run uglifycss filename test.css for each generated css file .. . see which file returns an error .. . .. . We solved our issue by overriding the UglifyCssFilter class and adding a custom Node.js parameter for a higher memory limit : .. . .. . You have to change the Node path to the correct location or improve the comparison in some other way .", "I have followed these instructions http : symfony.com doc current cookbook assetic uglifyjs.html in order to enable both UglifyJs2 and UglifyCss on my development-environment to start with.. . can t risk taking down the production server with this problem", "I am looking for a script that would read through an HTML file actually a Smarty template file but that shouldn t matter parse the paths out of script script and link tags and use them as input for UglifyJS UglifyCSS or other minification software .", "Symfony executes the following command to uglify the css .", "Further debugging revealed that a css comment was the issue .", "I use the following block in my base twig template to create the compressed css files : .. . .. . Until a few weeks and an upgrade to ubuntu-15.04 ago this worked fine to dump all my css files properly .", "Now my @media and my @font-family parts are gone from the compiled compressed css .", "The filters are configured be applied to all .css files .", "I m not using the bundles acme foo css absolute path but the @AcmeFooBundle .", "The problems doesn t comes from a wrong url link in my CSS but from the fact that using the apply to to apply the filters to all JS CSS files fails and that it becomes impossible to dump my assets .", "Here s a library to uglify css .", "Well this library does not uglify CSS .", "You can use either except that there is a known issue that causes the cssrewrite filter to fail when using the @AcmeFooBundle syntax for CSS Stylesheets .", "@artuska The CSS is generated by GWT not hand written .", "However when I load the app in the browser all of the CSS and JS assets return a 500 error .", "I m developing my first Symfony 2 app and I m trying Uglify to minimize my .css files .", "Sure this is the default behavior : .. . .. . If you want to deploy your code just call app console assetic : dump --no-debug and assetic will compile the css js image files for you and save it to the web directory .", "Check this out symfony.com doc current cookbook assetic asset management.html http : symfony.com doc current cookbook assetic asset management.html Notice that in the original example that included JavaScript files you referred to the files using a path like @AcmeFooBundle Resources public file.js but that in this example you referred to the CSS files using their actual publicly-accessible path : bundles acme foo css .", "I wonder are there any Grunt tasks which uglify CSS", "So why did Google uglify all CSS classes everywhere in their services", "500 Errors http : i.stack.imgur.com TMECq.png .. . .. . Here s what each Javascript file returns http : pastebin.com 0wqv5KES along with what each CSS file returns http : pastebin.com hBKT2CuM .", "On the production server however Assetic generates filenames like below when dumping assets : .. . .. . And embeds a link looking like : .. . .. . This invalidates all css and js asset links on our production server .", "Exception trace : .. . .. . My environment : .. . .. . Here are some relevant information : .. . .. . My config.yml : .. . .. . My Twig template : .. . .. . Some of the things that I ve already tested without any luck : .. . .. . 1 Execute the command without specify Applications mampstack-5.4.17-0 php bin php .. . .. . The result is .. . .. . The result file in web css is correct the content includes both .css files minimized .", "Thanx for your help", "Dominik .. . .. . .. . .. . Edit : I was able to pin it down a bit more .", "executing the same command on the bash command-line also causes the same missbehaviour .", "Any ideas", "Cheers Dominik", "Adding a space between the last and the solved my problem .", "I also opened an issue on github .", "I have index.html main.css and views folder with bunch of HTML files I want to uglify all CSS class names in all these files cos I m using BEM class name notation so my CSS class names are rather long .", "The problem is that when I load the Web page the .css is broken : .. . .. . and if I click on the href the content the browser shows is : .. . .. . .. . .. . 2 Set folder privileges with in a recursive way : .. . .. . for the folders : web inside my Symfony project and my temp folder which turns out to be : .. . .. . Could you please help me out to solve this", "Oops my question didn t mention that I also ran php app console assetic : dump on its own I don t know why I haven t mentioned that.. . and I still had the problems .", "Does anyone know what s going on here", "Did you ever solve this", "I have the same problem .", "I can fix it by symlinking the executable to usr bin uglifyjs but i wanted something local in my app Resources directory so I could deploy it with version-control .", "No haven t found a solution so far .", "Though I have to admit I haven t tried it in the last weeks .", "Maybe it s an Assetic bug that has been fixed .", "This is annoying me so I m debugging diving the source .", "So far i found this in the app cache Prod appProdProjectContainer.php : this- services assetic.filter.uglifyjs2 instance new Assetic Filter UglifyJs2Filter usr bin uglifyjs usr bin node The filter is NOT being passed the values we set in the .yml file so when the service is generated it s not finding the keys .", "Still looking.. .", "So it looks like the just forgot to pass the configuration to the service instance", "It seems more like it only reads the node and bin paths out of the environment-specific config files .", "Or only passes them if they re in the environment specific files .", "Or the env specific configurations completely override the settings from the main config file instead of merging them .", "I m not sure which .", "My Final configuration which appears to work is such : .. . .. . 1 .", "Dont put anything in config.yml about uglify .", "Leaves these in the config env .yml files .. . .. . 3 .", "Rebuild the cache .. . .. . app console cache : clear --env prod --no-debug .. . .. . .. . 4 .", "Dump Assets .. . .. . app console assetic : dump --env prod --no-debug .. . .. . .. . How i figured this out : .. . .. . I had this problem and managed to fix it .", "I think my setup might have been ever so slightly different in I had my uglify configuration split across app config.yml and app-config prod.yml .. . .. . My configuration was identical to : http : symfony.com doc current cookbook assetic uglifyjs.html : .. . .. . What i found was Symfony was ignoring my variables in config.yml when it built the cache .", "Mine looked like this : .. . .. . When i moved my bin : variable to config prod.yml and rebuild the cache cache : clear it found the setting and pulled it in .", "However node was still being passed as usr bin node .", "Looking at the source for the Uglify Filter it will use JUST the uglify path if the node variable is null .", "Note : you can have configuration in both files it s just that Symfony will not merge the configuration and environment specific configuration will overwrite your previous configuration .", "I m pretty sure .. . .. . should do the trick .", "I already tried that one before it does not work too .", "The path is simply ignored .", "It s just as-if it doesn t use this config file at all though I double- and tribble-checked everything .", "Just make a symlink .. . .. . Not so dirty and works 100", "Can I use assetic if I can t install anything on prod env", "We have had similar issues - where some features are not deployed onto production servers .", "The work round we use is to deploy the prod environment to a build-server - then once all the assets have been created then to rsync the symfony and web directory containing the generated assets to the production server .", "It is not ideal - but it does work for us .", "We also have implemented some additional filters in twig to get round some of the short comings .", "P.S .", "There is no command-line option to get the installed version .", "The only valid options are --max-line-len --expand-vars --ugly-comments and --cute-comments .", "However you can run npm list -g or npm list to get list of installed packages and their version numbers .", "Or you can even add the package name to query a specific package e.g .", "nmp list uglify-js .", "Thanks", "The npm list -g is work .", "you can also add --depth 0 so it only gives you the packages and not their dependencies .", "I simplified a little the problem for the moment I properly checked that I still meet the issue with this config .", "Also if I apply the filter directly into the stylesheet block there is no problem too ." ] }
{ "confidence": [ 63.62544250488281, 56.44322967529297, 55.296939849853516, 53.19970703125, 49.6888542175293, 49.37092971801758, 46.938716888427734, 44.374732971191406, 43.10371398925781, 41.908050537109375, 38.748085021972656, 32.958946228027344, 31.665637969970703, 16.045509338378906, 15.425142288208008, 12.592921257019043 ], "content": [ "Question : I use the following block in my base twig template to create the compressed css files : .. . .. . Until a few weeks and an upgrade to ubuntu-15.04 ago this worked fine to dump all my css files properly . Now my @media and my @font-family parts are gone from the compiled compressed css . If I only apply the cssrewrite filter and not the uglifycss filter the @media and @font-face parts are there just as expected . I use : uglifycss@0.0.15 Symfony v2.6.8 symfony assetic v2.6.1 .. . .. . Does anyone know what might be going wrong here Thanx for your help Dominik .. . .. . .. . .. . Edit : I was able to pin it down a bit more . Symfony executes the following command to uglify the css . executing the same command on the bash command-line also causes the same missbehaviour . So it s not a Symfony or assetic problem but seems to be an uglifycss problem . Any ideas Cheers Dominik .. . Answer : Further debugging revealed that a css comment was the issue . According to http : www.w3.org TR CSS21 syndata.html comments a comment like this : .. . .. . But it turns out that uglifycss 0.0.15 has problems with a comment ending with . Adding a space between the last and the solved my problem . I also opened an issue on github . https : github.com fmarcia UglifyCSS issues 33 .. . .. . Cheers Dominik", "Question : null .. . Answer : I have some troubles making UglifyCSS and UglifyJS works with Assetics on my Symfony2.6 app . I simplified a little the problem for the moment I properly checked that I still meet the issue with this config . I import my stylesheet in my base twig file like this : .. . .. . My assetic is configured with the UglifyCSS and with the filters cssrewrite and uglifycss . The filters are configured be applied to all .css files . Here is my configuration : .. . .. . Here is the error : .. . .. . If I comment the uglifycss filter in my config there is no longer any problem . Also if I apply the filter directly into the stylesheet block there is no problem too . So the problem comes from the apply to declaration but I don t see why . Oh yeah I tried too by adding the filter manually the filter to the stylesheet block : .. . .. . And then everything works fine . So in the ends it really comes down to using the apply to to apply the filter . I have exactly the same problem with uglifyjs . I checked beforehand all the paths : node bin to uglify . Thanks . Comment : Check this out symfony.com doc current cookbook assetic asset management.html http : symfony.com doc current cookbook assetic asset management.html Notice that in the original example that included JavaScript files you referred to the files using a path like @AcmeFooBundle Resources public file.js but that in this example you referred to the CSS files using their actual publicly-accessible path : bundles acme foo css . You can use either except that there is a known issue that causes the cssrewrite filter to fail when using the @AcmeFooBundle syntax for CSS Stylesheets . Comment : I m sorry I didn t get you re answer . I m not using the bundles acme foo css absolute path but the @AcmeFooBundle . I understand the known issue you re talking about and I will take it into consideration . Still I fail to see how it s related to my issue . The problems doesn t comes from a wrong url link in my CSS but from the fact that using the apply to to apply the filters to all JS CSS files fails and that it becomes impossible to dump my assets .", "Question : I m developing my first Symfony 2 app and I m trying Uglify to minimize my .css files . The problem is that when I execute the command : .. . .. . I get the following result : .. . .. . Symfony Component Process Exception RuntimeException .. . The process has been signaled with signal 5 . Exception trace : .. . .. . My environment : .. . .. . Here are some relevant information : .. . .. . My config.yml : .. . .. . My Twig template : .. . .. . Some of the things that I ve already tested without any luck : .. . .. . 1 Execute the command without specify Applications mampstack-5.4.17-0 php bin php .. . .. . The result is .. . .. . The result file in web css is correct the content includes both .css files minimized . The problem is that when I load the Web page the .css is broken : .. . .. . and if I click on the href the content the browser shows is : .. . .. . .. . .. . 2 Set folder privileges with in a recursive way : .. . .. . for the folders : web inside my Symfony project and my temp folder which turns out to be : .. . .. . Could you please help me out to solve this I ve ran out of ideas . Note : I ve tagged this as uglifyjs2 because I don t have enough points for creating the tag uglifycss .. . .. . Thanks in advance : Comment : Are you solve this problem .. . Answer : We had the same issue with the uglifycss filter running out-of-memory with big css files without a proper error message . You can show the exact error message by following the following steps : .. . .. . disable uglifycss filter in your assetic configuration .. . run assetic : dump task .. . navigate to the dir where the css files are generated probably web css .. . run uglifycss filename test.css for each generated css file .. . see which file returns an error .. . .. . We solved our issue by overriding the UglifyCssFilter class and adding a custom Node.js parameter for a higher memory limit : .. . .. . You have to change the Node path to the correct location or improve the comparison in some other way . You can let Assetic use this class by setting a service parameter in your config file :", "Question : I has installed UglifyCSS globally with command : .. . .. . How can I get current version of installed UglifyCSS P.S . .. . .. . Version of UglifyJS I check with command : .. . .. . But when I try similar command for UglifyCSS : .. . .. . I had an error : .. . .. . Same error when I try -v and --version .. . Answer : There is no command-line option to get the installed version . The only valid options are --max-line-len --expand-vars --ugly-comments and --cute-comments . However you can run npm list -g or npm list to get list of installed packages and their version numbers . Or you can even add the package name to query a specific package e.g . nmp list uglify-js . Comment : Thanks The npm list -g is work . Comment : you can also add --depth 0 so it only gives you the packages and not their dependencies .", "Question : Can I use assetic if I can t install anything on prod env Is it possible to use assetic with uglifyjs and uglifycss only on dev env and use uglified files in prod env .. . Answer : Sure this is the default behavior : .. . .. . If you want to deploy your code just call app console assetic : dump --no-debug and assetic will compile the css js image files for you and save it to the web directory .", "Question : For my prod environment I want to use the UglifyCSS filter configured as follows config prod.yml : .. . .. . But whenever I run .. . .. . I get this error message : .. . .. . So obviously Assetic is looking for uglifycss in usr bin though I configured it to use a different path usr local bin . Does anyone know what s going on here Comment : Did you ever solve this I have the same problem . I can fix it by symlinking the executable to usr bin uglifyjs but i wanted something local in my app Resources directory so I could deploy it with version-control . Comment : No haven t found a solution so far . Though I have to admit I haven t tried it in the last weeks . Maybe it s an Assetic bug that has been fixed . Comment : This is annoying me so I m debugging diving the source . So far i found this in the app cache Prod appProdProjectContainer.php : this- services assetic.filter.uglifyjs2 instance new Assetic Filter UglifyJs2Filter usr bin uglifyjs usr bin node The filter is NOT being passed the values we set in the .yml file so when the service is generated it s not finding the keys . Still looking.. . Comment : So it looks like the just forgot to pass the configuration to the service instance Comment : It seems more like it only reads the node and bin paths out of the environment-specific config files . Or only passes them if they re in the environment specific files . Or the env specific configurations completely override the settings from the main config file instead of merging them . I m not sure which . .. . Answer : My Final configuration which appears to work is such : .. . .. . 1 . Set up config prod .. . .. . app-config config prod.yml .. . assetic : .. . filters : .. . uglifycss : .. . bin : kernel.root dir Resources node-modules .bin uglifyjs .. . node : null .. . apply to : .css .. . .. . .. . 2 . Dont put anything in config.yml about uglify . Leaves these in the config env .yml files .. . .. . 3 . Rebuild the cache .. . .. . app console cache : clear --env prod --no-debug .. . .. . .. . 4 . Dump Assets .. . .. . app console assetic : dump --env prod --no-debug .. . .. . .. . How i figured this out : .. . .. . I had this problem and managed to fix it . I think my setup might have been ever so slightly different in I had my uglify configuration split across app config.yml and app-config prod.yml .. . .. . My configuration was identical to : http : symfony.com doc current cookbook assetic uglifyjs.html : .. . .. . What i found was Symfony was ignoring my variables in config.yml when it built the cache . You can see what it finds by looking in app cache prod appProdProjectContainer.php and searching for uglifycss . Mine looked like this : .. . .. . When i moved my bin : variable to config prod.yml and rebuild the cache cache : clear it found the setting and pulled it in . However node was still being passed as usr bin node . Looking at the source for the Uglify Filter it will use JUST the uglify path if the node variable is null . So to use the binary of uglifycss simply set node to null . Comment : Note : you can have configuration in both files it s just that Symfony will not merge the configuration and environment specific configuration will overwrite your previous configuration .", "Question : For my prod environment I want to use the UglifyCSS filter configured as follows config prod.yml : .. . .. . But whenever I run .. . .. . I get this error message : .. . .. . So obviously Assetic is looking for uglifycss in usr bin though I configured it to use a different path usr local bin . Does anyone know what s going on here Comment : Did you ever solve this I have the same problem . I can fix it by symlinking the executable to usr bin uglifyjs but i wanted something local in my app Resources directory so I could deploy it with version-control . Comment : No haven t found a solution so far . Though I have to admit I haven t tried it in the last weeks . Maybe it s an Assetic bug that has been fixed . Comment : This is annoying me so I m debugging diving the source . So far i found this in the app cache Prod appProdProjectContainer.php : this- services assetic.filter.uglifyjs2 instance new Assetic Filter UglifyJs2Filter usr bin uglifyjs usr bin node The filter is NOT being passed the values we set in the .yml file so when the service is generated it s not finding the keys . Still looking.. . Comment : So it looks like the just forgot to pass the configuration to the service instance Comment : It seems more like it only reads the node and bin paths out of the environment-specific config files . Or only passes them if they re in the environment specific files . Or the env specific configurations completely override the settings from the main config file instead of merging them . I m not sure which . .. . Answer : If you have installed the binary of uglifycss there is no need for specifying the path to node . I m pretty sure .. . .. . should do the trick . Comment : I already tried that one before it does not work too . The path is simply ignored . It s just as-if it doesn t use this config file at all though I double- and tribble-checked everything .", "Question : I wonder are there any Grunt tasks which uglify CSS Like in GMail code all class names are random 2-3 letters . I m using AngularJS and grunt-angular-templates Grunt task to concatenate all templates in views folder to a single templates.js templateCache file and I want to make this file as small as possible . I have index.html main.css and views folder with bunch of HTML files I want to uglify all CSS class names in all these files cos I m using BEM class name notation so my CSS class names are rather long . .. . Answer : Here s a library to uglify css . If you want to use it in grunt then wrap it in a custom grunt task . https : github.com fmarcia UglifyCSS Comment : Well this library does not uglify CSS .", "Question : Can I use assetic if I can t install anything on prod env Is it possible to use assetic with uglifyjs and uglifycss only on dev env and use uglified files in prod env .. . Answer : We have had similar issues - where some features are not deployed onto production servers . The work round we use is to deploy the prod environment to a build-server - then once all the assets have been created then to rsync the symfony and web directory containing the generated assets to the production server . It is not ideal - but it does work for us . We also have implemented some additional filters in twig to get round some of the short comings .", "Question : For my prod environment I want to use the UglifyCSS filter configured as follows config prod.yml : .. . .. . But whenever I run .. . .. . I get this error message : .. . .. . So obviously Assetic is looking for uglifycss in usr bin though I configured it to use a different path usr local bin . Does anyone know what s going on here Comment : Did you ever solve this I have the same problem . I can fix it by symlinking the executable to usr bin uglifyjs but i wanted something local in my app Resources directory so I could deploy it with version-control . Comment : No haven t found a solution so far . Though I have to admit I haven t tried it in the last weeks . Maybe it s an Assetic bug that has been fixed . Comment : This is annoying me so I m debugging diving the source . So far i found this in the app cache Prod appProdProjectContainer.php : this- services assetic.filter.uglifyjs2 instance new Assetic Filter UglifyJs2Filter usr bin uglifyjs usr bin node The filter is NOT being passed the values we set in the .yml file so when the service is generated it s not finding the keys . Still looking.. . Comment : So it looks like the just forgot to pass the configuration to the service instance Comment : It seems more like it only reads the node and bin paths out of the environment-specific config files . Or only passes them if they re in the environment specific files . Or the env specific configurations completely override the settings from the main config file instead of merging them . I m not sure which . .. . Answer : Just make a symlink .. . .. . Not so dirty and works 100", "Question : I have followed these instructions http : symfony.com doc current cookbook assetic uglifyjs.html in order to enable both UglifyJs2 and UglifyCss on my development-environment to start with.. . can t risk taking down the production server with this problem Under my config dev.yml I have configured the following I ve started with just the bin parameters but added extra configurations just in case something else was causing a problem . and in my base.html.twig file : .. . .. . and .. . .. . When I run php app console assetic : dump --env prod --verbose all files are generated with no errors . They re even minified at this point However when I load the app in the browser all of the CSS and JS assets return a 500 error . 500 Errors http : i.stack.imgur.com TMECq.png .. . .. . Here s what each Javascript file returns http : pastebin.com 0wqv5KES along with what each CSS file returns http : pastebin.com hBKT2CuM . I am getting a signal 5 error from what seems like both UglifyJS and or UglifyCSS or Node itself . I suspect the wrong thing is being sent somewhere . Any ideas I m running a local MAMP server to achieve a development-environment . Also note I ve taken the space out of Git Repos in my path to avoid obvious problems like path issues as a troubleshooting step . Update .. . .. . I tried running the same settings in config dev.yml into my config prod.yml and found that everything works perfectly on the production side . It seems that trying to load the minified assets through app dev.php causes problems.. . but I still don t know what It would be nice if minification could be tested through the dev environment which is why I m leaving the question open for both this problem and to encourage dialogue for a solution . .. . Answer : assetic s debug mode : .. . .. . you re dumping the files with --prod which has debug mode disabled by default .. . .. . .. . .. . and try to access them in the dev environment afterwards . If debug mode is enabled asset collections will be split into multiple-files that look like this : .. . .. . This is what chrome devtools shows you and a problem while dumping on-the-fly leads to the 500 errors . You didn t dump these files for debugging with the command you invoked and as long as you don t have use controller : true they won t be dumped on the fly either . If you have use controller : true .. . any non-zero exit code of a filter-run will result in a 500 error . That s what you experience . .. . .. . solution : .. . .. . Either disable debug mode for a single asset collection like this .. . .. . .. . .. . or add .. . .. . .. . to your config dev.yml to resolve the issue . Finally dump your assets with app console assetic : dump and the correct environment flag . Comment : Oops my question didn t mention that I also ran php app console assetic : dump on its own I don t know why I haven t mentioned that.. . and I still had the problems . However I didn t try your solution with debug mode in the asset collection . Instead of adding debug false I just went with filter uglifyjs2 to turn off Uglify in the dev environments .", "Question : I m using uglifyjs and uglifycss with symfony to manage my asset . I have a strange issue . Here is my configuration .. . .. . And in my view .. . .. . With this I expect to have only one file minified included in my page . On my development-machine Windows 7 php-5.4 symfony-2.7 everything is working fine . But on production environment debian 7 php5.4 symfony-2.7 all individual file is being included in the page . Can somebody help me understand what is going on .. . Answer : When you dump the assets make sure you add --env prod to the assetic : dump command . You can also force files combining with combine true parameter . But it should be set on true automatically on production env . Comment : Yes I dump my asset with --env prod option . And this generate mimified and combined files . But the inclusion in the page is not correct . It seems my site is behaving as in dev mode . Comment : You sure that your Kernel is on prod It should be like this kernel new AppKernel prod false in app.php Comment : Yes I have checked it again and my app.php file is ok . Comment : How about adding combine true to javascripts tag Comment : Great adding combine true solve the problem . Please Pawel can you add this as the answer to the question I would also like to understand why this is not causing any problem on windows .", "Question : I am looking for a script that would read through an HTML file actually a Smarty template file but that shouldn t matter parse the paths out of script script and link tags and use them as input for UglifyJS UglifyCSS or other minification software . Bonus points if the script is able to download remote resources as well . I want to minify my resources in the order they appear within my HTML files without having to manually build the list . Perhaps some gulp plugin could accomplish such a task I can write a script to do this myself but I would rather use something that has been tested and has a substantial community behind it . Comment : A pat on the back and a coupon for another pat on the back Comment : Bonus or not : Questions asking us to recommend or find a book tool software library tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam . Instead describe the problem and what has been done so far to solve it . Comment : I am not looking for the BEST tool or for opinions on which tool is better . I am simply looking for ANY such tool . Comment : What task runner are you using grunt gulp something else grunt has usemin that will do this for you . Comment : Currently I am not using a task running . I am using a file-watcher in my development-environment to do those types of tasks . I will check out usermin . .. . Answer : Apologies if you meant only in JS . Heres a bit of sed : .. . .. . Will return the value of the href or source in a script or link tag in a file .", "Question : I wonder are there any Grunt tasks which uglify CSS Like in GMail code all class names are random 2-3 letters . I m using AngularJS and grunt-angular-templates Grunt task to concatenate all templates in views folder to a single templates.js templateCache file and I want to make this file as small as possible . I have index.html main.css and views folder with bunch of HTML files I want to uglify all CSS class names in all these files cos I m using BEM class name notation so my CSS class names are rather long . .. . Answer : if the only reason to uglify is the length of classnames just don t . gzip use zopfli https : code.google.com p zopfli for the best result makes all that long BEMish classes just same 2-3 letters long but on server level . Comment : So why did Google uglify all CSS classes everywhere in their services Or may be it is only in Gmail but anyway Comment : @artuska The CSS is generated by GWT not hand written . Comment : @SamuelNeff oh that s it thank you Comment : what s the point of uglifying JS if it isn t to make long names shorter so you feed less into GZip", "Question : null .. . Answer : I ve been having problems getting the Assetic cache buster up and running on our production server . Symfony2 2.4 is configured to use the cache buster only when in production . Everything works like a charm on our development machines . On the production server however Assetic generates filenames like below when dumping assets : .. . .. . And embeds a link looking like : .. . .. . This invalidates all css and js asset links on our production server . Has anyone encountered this problem in production and if so what s your solution UPDATE .. . .. . The assetic configuration in config.yml : .. . .. . And enabling the cache buster in config prod.yml : Comment : could you please add some more details dev prod configuration to your question", "Question : null .. . Answer : CSSO generating code that IE can t deal with . My simple @keyframes code : .. . .. . CSSO is trying to be smart and making something like this : .. . .. . It seems like IE can t deal with the double frame definition it s ignoring scaling . How do I deal with this" ] }
[ "yes-answer-long", "yes-answer-short" ]
yui-compressor
UNK_RELATION
nui@user-interface@31
nui -- nui stands for natural @placeholder and refers to interfaces that are to some degree invisible or unobtrusive to the user and require little or no training to use .
{ "confidence": [ 46.00279235839844, 45.53738021850586, 45.53738021850586, 45.53738021850586, 43.61891555786133, 43.22838592529297, 42.22382354736328, 41.04240036010742, 39.41918182373047, 39.009090423583984, 38.733787536621094, 38.733787536621094, 38.733787536621094, 37.5523681640625, 37.5523681640625, 37.5523681640625, 37.5523681640625, 36.976444244384766, 36.13640213012695, 34.03273391723633, 34.03273391723633, 34.03273391723633, 32.85131072998047, 32.85131072998047, 31.435344696044922, 31.435344696044922, 31.281951904296875, 31.12276840209961, 29.974166870117188, 28.55820083618164, 26.751659393310547, 20.244342803955078, 19.048147201538086, 19.048147201538086, 18.218950271606445, 18.21169662475586, 17.992910385131836, 17.504840850830078, 17.297576904296875, 16.431949615478516, 16.31875228881836, 16.05675506591797, 15.669024467468262, 15.267986297607422, 15.267986297607422, 15.18381118774414, 15.16910171508789, 15.158858299255371, 14.907453536987305, 14.898658752441406, 14.898658752441406, 14.875333786010742, 14.807683944702148, 14.637834548950195, 14.637834548950195, 14.637834548950195, 14.637834548950195, 14.637834548950195, 14.637834548950195, 14.535808563232422, 14.086564064025879, 14.038885116577148, 14.038885116577148, 13.987679481506348, 13.834041595458984, 13.736886978149414, 13.736886978149414, 13.736886978149414, 13.736886978149414, 13.71723747253418, 13.456413269042969, 13.456413269042969, 13.456413269042969, 13.456413269042969, 13.398638725280762, 13.398638725280762, 13.398638725280762, 13.37299919128418, 13.37299919128418, 13.350907325744629, 13.350907325744629, 13.110705375671387, 13.110705375671387, 13.077271461486816, 13.077271461486816, 13.077271461486816, 13.031402587890625, 12.896220207214355, 12.857463836669922, 12.857463836669922, 12.857463836669922, 12.857463836669922, 12.857463836669922, 12.857463836669922, 12.857463836669922, 12.692736625671387, 12.652620315551758, 12.652620315551758, 12.555465698242188, 12.555465698242188 ], "content": [ "I use NUI https : github.com tombenner nui and I want to display text in button with certain font and size .", "What happens if NUI is disabled", "Does the same if NUI is disabled .", "NUI is not compatible with iOS7 at this time .", "@CharanGiri The benefit of NUI is the lack of code", "I m experiencing some weird inconsistencies with NUI https : github.com tombenner nui under iOS7 : some buttons doesn t appear to render with a background colour .", "Does anyone have an example of using NUI with a UICollectionView", "It seems that nobody ported Candescent NUI to Kinect v2 .", "I m using NUI https : github.com tombenner nui for my project and trying to apply properties for UIView the shadow and corners together it doesn t work .", "I am interested in making games and NUI interfaces with these softwares but I don t know where to start .", "I m using the NUI library for customizing appearance of my iOS app .", "and I do realize there is not a NUI category for UICollectionView yet but I m hoping for a workaround .", "I ve checked that font on test project without NUI it works fine .", "I literally want to catch a framework element using NUI of Kinect .", "I assume this is related to NUI which I ve just started implementing .", "classy.as http : classy.as does similar thing as NUI uses css .", "someone know if the new kinect have support for Candescent NUI", "I m creating a NUI for application and I binded some simple gestures to right and left arrow .", "I need to write applications with NUI for multiple simultaneous users .", "Any comments especially from people who have worked are working in multitouch io NUI are greatly appreciated .", "I worked on lots of NUI stuff during my at Microsoft so let s see what we can do.. .", "I d also like to give a shout out to Josh Blake s upcomming NUI book .", "Just a wild guess as I ve never used NUI but have you tried changing the button types to custom", "If I comment first line - I see the shadow .. . .. . Appreciate in advance for any cheats with NUI .", "I m looking to develop an NUI Application which would somehow detect recognize the hand gestures for commands and navigation .", "I am refering to this method of PyKinect nui init .py .. . .. . The above function is what I need and it isn t implemented yet .", "You can find a porting for Candescent NUI to Kinect V2 here https : github.com VentaApps Candescent-NUI-20148-for-Kinect-V2 but you have to setup your Dependencies to run coorectly you need OpenNI.net.dll OpenNI64.dll XnVNITE.net.dll and Microsoft.Kinect.dll Kinect SDK V2 dll", "OpenCV works fine but CL NUI does not because I encounter some problems with the API that have to do with the preprocessor which I am not really familiar with .", "Currently using the following code http : stackoverflow.com questions 4754392 uiview-with-rounded-corners-and-drop-shadow but wanna to find NUI solution .", "I am using Code : : Blocks and MinGW to compile and run OpenCV together with CL NUI so that I can get Kinect-Data into OpenCV .", "I want detect fingers and hands with Candescent but I can t find if the new OPENNI kinect NITE or microsoft SDK have support for the new kinect accepted too work with Candescent NUI .", "Your decision really depends on whether you would find the built-in functionality that SL5 or WPF provides for user interfaces useful", "Its sensitivity is given as 120 least-significant bit per degree per second .", "If the speed increases by 1 degree per second the measured value increases by a value equals to 120 LSB .", "This is the code from the API http : codelaboratories.com forums viewthread 442 I have it included in my project and I only get this error : .. . .. . C : Program Files x86 Code Laboratories CL NUI Platform SDK Include CLNUIDevice.h : 19 : 1 : Fehler : das Einf gen von und int ergibt kein g ltiges Pr prozessor-Token .. . .. . Translation : ...CLNUIDevice.h : 19 : 1 : Error : adding and int results in no valid preprocessor-token .. . .. . Maybe someone with knowledge about preprocessors can help me", "User strikes and holds a pose to invoke some application-wide or command usually brining up a menu 2 Hover buttons .", "You can use the event and save the last frame to use it some else place .", "You should probably paste a little more code to show the transitions .", "User just speaks a command .", "Considering it s not going to be a game but a business-application I m tempted to rule out XNA but then again I also require good performance as there will be quite some graphical stuff going on and if possible support for high resolutions video wall .", "I want to add function to print screen the canvas that the user draw on him in this function I want to add to the canvas a picture of the user from the kinect sensor .", "I have some problem with the kinect .", "Seeing as you are basically making your own user-interface you probably would not get much use from the provided 2D interface .", "User waves their hands in one direction to scroll and list and another direction to select from the list 4 Voice commands .", "Let the user swipe their left hand to scroll through and select a controller from this list .", "If the image really is only two or more distinct colours very little blur between colours it is an easy case for an edge-detection http : en.wikipedia.org wiki Edge detection algorithm .", "Then why you want to use both", "My first instinct is was to create some kind of focus test where if the x y coords fall within the interface object s bounds that object becomes active and then becomes inactive if they fall outside some other smaller bounds for some period of time .", "You can download the SDK freely but the v2-sensor may cost a little .", "but I want to use that event for other things", "Kinect Sdk don t allow use both .", "Some of the 2d objects are SVG files .", "User moves a virtual cursor over a button and holds still for a certain period of time to select the button 3 Swipe-based navigation and selection .", "There is even some nice features of ordering the blobs by descending area useful for filtering out noise .", "I could do some intermediate solution like using mouse clicks on the corners of controls to generate an xml file .", "Links to existing projects and or some good reading material books sites etc would be a big help .", "If so there are some projects on the web that will show you how to control the mouse with Kinect input but that s lame .", "On the left side of the screen show a list of your MIDI controllers with some small visual indication of their status .", "On the right side of the screen show how you are tracking the users right hand within some plane in front of their body .", "can you paste some code here", "I want that the contexts should have scroll animations No matter if the user swipe or if the tab is clicked .", "Then you could use the min x max x and the min y max y to draw your rectangles .", "As a tip if you use git using SourceTree you can see the visual difference from old version to new one :", "I decided to use UIAppearance instead .", "This is how the code for the mallet looks like .. . .. . This is how the code for detecting if the mallet hits the objects looks like .. . .. . Does anyone have any resources or give me some hints on how to work on this", "The cheap solution I found was to use the left hand as the pointer selector and the right as a controller but it seems like I can do more .", "I can use all of the joints it outputs 10 or so knees hips etc if I so choose tho I haven t felt like it yet .", "I believe during launch of Win8 lot of hardware vendors will sell multi-touch lcd monitors which i can use .", "I had set my project up to use a UICollectionView but I cannot seem to get the background of my UICollectionViewCells to set correctly .", "BasicInteractions .. . .. . This examples does several things that are of use .", "I ve seen some SVG to XAML converters but could the result-of this be used in a 3d view", "There are some solutions like doing the conversion once your visual tree is already built .", "I m using some third party libraries to gesture detection in my Kinect based application .", "I think that the data from sensor match for gesture description for some period of time .", "You can use something like the code sample from this question : http : stackoverflow.com questions 3795268 find-a-color-in-an-image-in-c .. . .. . It will help you find the x y of specific colors in your image .", "Another thing I could do that I ve seen frequently in flash apps is to put the screen-size into a variable and use math to build all interface objects in terms of screen-size .", "Now you re letting them use both hands at the same time giving immediate visual feedback of how each hand is being interpretted and not requiring them to be super precise .", "http : www.emgu.com forum viewtopic.php f 3 t 205 http : www.emgu.com forum viewtopic.php f 3 t 205 .. . .. . Edit Again : .. . .. . If Emgu is too heavyweight Aforge.NET also includes some blob detection methods .. . .. . http : www.aforgenet.com framework", "Note that it isn t strictly necessary to make the objects the same size as onscreen controls or to represent all onscreen objects some are just indicators not interactive controls .. . .. . Other considerations .. . .. . Given for now two sets of X Y coords as input left and right hands what is my best option for using them", "I need to use advanced skeleton straw man features of NITE .", "If you have a compelling reason to use XAML then WPF may be a good choice .", "However when I have different pages which I navigate between them I get an error : InvalidOperationException Unhandeled in user code - The specified visual is not an ancestor in this visual .", "I have a TabHost control not in actionbar and I want to make the tabs to change when the user swipes the context on each tab something like whatsapp emoji tabs .", "This happens in MouseController.cs Line 158 : .. . .. . With some debugging I understood that the magnetic controlls from the previous page are still in the list and that causes the problem .", "Here is the XAML where I have the magnetic controls : .. . .. . and on Button Click I navigate into another page which also has some magnetic controll :", "When iOS 7 released I had issues with some buttons rendering oddly due to being set to a system type in the storyboard they were loaded from .. .", "So to summarize the problem is .. . .. . represent the interface necessary because the default interface always expects mouse input .. . select a control .. . manipulate it using two sets of x y coords rotary continuous controller or in the case of switches preferrably use a gesture to switch it without giving taking focus .", "There are other mouse-like ideas that have been tried by hobbyists havent seen these in an actual game but frankly they suck : 1 using one hand for cursor and another hand to click where the cursor is or 2 using z-coordinate of the hand to determine whether to click .. . .. . It s not clear to me whether you are asking about how to make some existing mouse widgets work with Kinect .", "What components should I use to make Flash support with Open NI straw man features", "I m currently in the early stages of a project and have difficulty deciding which framework to use .", "You can simply use only the parts required for hardware-accelerated 3D rendering and ignore the rest .", "But if your SVG files never change you could just use an existing software renderer to render them to a texture .", "The use of frameworks such as Impact http : impactjs.com or CocoonJS http : ludei.com tech cocoonjs can help with the first part .", "To use this library I had to write kinect SkeletonFrameReady like this : .. . .. . The only problem is that variable allreadyDone is not increased once but many times .", "This class should only be used with MotionEvents reported via touch don t use for trackball events .", "If you only need a finger tracking similar to Leap Motion you may use Nimble SDK it works pretty well not perfectly with Kinect v2 in front facing mode like Candescent does but it gives use full 3d hand skeleton .", "http : www.microsoft.com en-us kinectforwindows develop developer-downloads.aspx .. . .. . ShapeGame .. . .. . This example generates random shapes some of them ellipses which fall from the top of the window .", "Also probably after the conference its paper will be published and uploaded to acm.org or even to some public library so you could see how they have done it and fortunately somebody will implement it soon as well .", "If you converted your SVG to XAML you would have to render it to a texture to use it in a SL5 3D view anyway unless it s an overlay .", "Go through this link http : thepseudocoder.wordpress.com 2011 10 13 android-tabs-viewpager-swipe-able-tabs-ftw .. . .. . You can use a gesture detector ." ] }
{ "confidence": [ 52.466888427734375, 52.18183517456055, 51.32544708251953, 50.79884719848633, 47.57374954223633, 45.236759185791016, 44.095436096191406, 43.76032638549805, 42.115535736083984, 38.3092041015625, 33.23972702026367, 30.938621520996094, 30.685775756835938, 29.507335662841797, 28.733917236328125, 21.291950225830078, 19.751724243164062, 16.497758865356445, 14.788904190063477, 14.33892822265625 ], "content": [ "Question : null .. . Answer : I m using the NUI library for customizing appearance of my iOS app . I had set my project up to use a UICollectionView but I cannot seem to get the background of my UICollectionViewCells to set correctly . Does anyone have an example of using NUI with a UICollectionView and I do realize there is not a NUI category for UICollectionView yet but I m hoping for a workaround .", "Question : null .. . Answer : I m using NUI https : github.com tombenner nui for my project and trying to apply properties for UIView the shadow and corners together it doesn t work . It shows me only borders . If I comment first line - I see the shadow .. . .. . Appreciate in advance for any cheats with NUI . p.s . Currently using the following code http : stackoverflow.com questions 4754392 uiview-with-rounded-corners-and-drop-shadow but wanna to find NUI solution .", "Question : someone know if the new kinect have support for Candescent NUI I want detect fingers and hands with Candescent but I can t find if the new OPENNI kinect NITE or microsoft SDK have support for the new kinect accepted too work with Candescent NUI . .. . Answer : You can find a porting for Candescent NUI to Kinect V2 here https : github.com VentaApps Candescent-NUI-20148-for-Kinect-V2 but you have to setup your Dependencies to run coorectly you need OpenNI.net.dll OpenNI64.dll XnVNITE.net.dll and Microsoft.Kinect.dll Kinect SDK V2 dll Comment : thanks man nice work Comment : where can I find this files", "Question : I m experiencing some weird inconsistencies with NUI https : github.com tombenner nui under iOS7 : some buttons doesn t appear to render with a background colour . The app consists of a navigation controller . The buttons within the root view appears to be working just fine : .. . .. . http : i.imgur.com aFVqn9p.png http : i.stack.imgur.com L7FgP.png .. . .. . A few segues later there is an at least to the Interface Builder identical button albeit with a different appearance all together : .. . .. . enter image description here http : i.stack.imgur.com 66ver.png .. . .. . I note that the navigation bar is inconsistent too in its rendering : .. . .. . enter image description here http : i.stack.imgur.com o5iON.png .. . .. . ... . yet sometimes : .. . .. . enter image description here http : i.stack.imgur.com TFnv4.png .. . .. . Do you guys have an idea what I might be doing wrong Comment : Just a wild guess as I ve never used NUI but have you tried changing the button types to custom When iOS 7 released I had issues with some buttons rendering oddly due to being set to a system type in the storyboard they were loaded from .. . Comment : can you paste some code here Comment : @DavidDoyle Thank you for your reply but unfortunately this doesn t seem to work . Comment : @CharanGiri The benefit of NUI is the lack of code I used the default stylesheet and only invokes NUISettings init in my main -function and NUIAppearance init in didFinishLaunchingWithOptions . .. . Answer : I decided to use UIAppearance instead . NUI is not compatible with iOS7 at this time . Comment : classy.as http : classy.as does similar thing as NUI uses css . Is saying that I think UIAppearance is better approach for the reason you ve seen .", "Question : I am new to the whole PhoneGap among other solutions like Trigger.io . I am interested in making games and NUI interfaces with these softwares but I don t know where to start . Does anyone have experience making such products with PhoneGap or the like and if so how was it done Thanks in advance . .. . Answer : You make a HTML5 JavaScript game as you normally would and then wrap it with PhoneGap . The use of frameworks such as Impact http : impactjs.com or CocoonJS http : ludei.com tech cocoonjs can help with the first part .", "Question : I am using Code : : Blocks and MinGW to compile and run OpenCV together with CL NUI so that I can get Kinect-Data into OpenCV . OpenCV works fine but CL NUI does not because I encounter some problems with the API that have to do with the preprocessor which I am not really familiar with . This is the code from the API http : codelaboratories.com forums viewthread 442 I have it included in my project and I only get this error : .. . .. . C : Program Files x86 Code Laboratories CL NUI Platform SDK Include CLNUIDevice.h : 19 : 1 : Fehler : das Einf gen von und int ergibt kein g ltiges Pr prozessor-Token .. . .. . Translation : ...CLNUIDevice.h : 19 : 1 : Error : adding and int results in no valid preprocessor-token .. . .. . Maybe someone with knowledge about preprocessors can help me Here is my code for the project http : pastebin.com A2amk1in but I cannot imagine how this would mess up things but who knows since I could not test it . .. . Answer : In the line .. . .. . remove giving you .. . .. . is the token pasting operator and can t be part of a token it is a token by itself . I presume the preprocessor used by the authors of the code was nonconforming if it accepted it but I have no idea why they thought it should be needed there . Comment : Thanks a lot that was it", "Question : I use NUI https : github.com tombenner nui and I want to display text in button with certain font and size . Here is my css file : .. . .. . And what I get from it screenshot with blended layers : .. . .. . damaged text http : i.stack.imgur.com z9ZDK.png . And it happens not only with button I tried the same on UITextField - same result . If I change font-name on Arial for example text appears correctly . I ve checked that font on test project without NUI it works fine . .. . Answer : This has to do with improperly formatted ttf files . the trick is to manually edit the hhea table . Check out this awesome article http : www.andyyardley.com 2012 04 24 custom-ios-fonts-and-how-to-fix-the-vertical-position-problem which explains exactly how to do it : Comment : Good article . Mb this is it but I cannot reconstruct my font using specified tools . Anyway thank you you give me a clue I will investigate it tomorrow and if you really guess right I mark this answer as correct . Oh and I m using .otf font Comment : IOS uses ttf s though so I am not sure how that is working for you at all . What is preventing you from using the tool Comment : It was a late night and I specified a xml file instead of font in second command - for reconstructing Thank you man you made my day Comment : As a tip if you use git using SourceTree you can see the visual difference from old version to new one :", "Question : someone know if the new kinect have support for Candescent NUI I want detect fingers and hands with Candescent but I can t find if the new OPENNI kinect NITE or microsoft SDK have support for the new kinect accepted too work with Candescent NUI . .. . Answer : It seems that nobody ported Candescent NUI to Kinect v2 . You can do it by yourself . His code is pretty good and clear . A number of months ago I really wanted to port this code to Kinect v2 even started working on that but realized that I don t want front face finger tracking but top-down something more similar to RetroDepth https : www.youtube.com watch v 96CZ QPBx0s and now I am implementing this . If you only need a finger tracking similar to Leap Motion you may use Nimble SDK it works pretty well not perfectly with Kinect v2 in front facing mode like Candescent does but it gives use full 3d hand skeleton . With Kinect v1 it works using top-down setup . But I am not sure if they still provide free licenses . Check it . If they don t provide free license you can either re-implement Candescent hand tracking features moreover you could do it more robust so it could support another depth cameras with different range near far and different resolutions actually one of the most annoying things in my opinion that Candescent has it s hard coded resolution of depth and color images . Moreover on the CHI2015 http : chi2015.acm.org will be presented a new technique for hand tracking for Kinect v2 by Microsoft https : www.youtube.com watch v A-xXrMpOHyc maybe they will integrate it soon into Kinect SDK v2 . Also probably after the conference its paper will be published and uploaded to acm.org or even to some public library so you could see how they have done it and fortunately somebody will implement it soon as well . Comment : thanks I ll try it .", "Question : I assume this is related to NUI which I ve just started implementing . I ve just placed a UITextView into my view with Interface Builder but when I go into the simulator it simply fills the entire view with the text box . Any ideas why this may be View controller in Interface Builder .. . .. . View controller in Interface Builder http : i.stack.imgur.com 4poy1.png .. . .. . View controller in iPhone Simulator .. . .. . View controller in Simulator http : i.stack.imgur.com NYFq6.png Comment : What happens if NUI is disabled Are you using autolayout Have you set up the autoresizing mask Do you have screenshots of IB versus actual Comment : Can you please provide more details about the issue Comment : Does the same if NUI is disabled . I m not using autolayout and autosizing is left as default . It s basically a untouched brand new view so I m really puzzled as to what s going on.. . Comment : Here s an IB screenshot https : dl.dropboxusercontent.com u 144706 textview1.png vs simulator screenshot https : dl.dropboxusercontent.com u 144706 textview2.png .. . Answer : I ve been able to replicate the behavior you re seeing on the simulator . If you select your text field in the IB and look at its outlets you should see something like the below where it has a Referencing Outlet to the view controller s view property . When the view controller is being loaded this relationship forces the text field to take up the whole screen . Deleting the referencing outlet should cause the screen to display correctly . enter image description here http : i.stack.imgur.com ilAXz.png Comment : Oh dear how embarrasing You re absolutely right that s what I had done . I blame a slip of the mouse.. . Thank you and very good detective work", "Question : I m looking to develop an NUI Application which would somehow detect recognize the hand gestures for commands and navigation . I don t know where to start what to learn any start up guide or roadmap will be highly appreciated . Thanks . Comment : What hardware are you using single webcam Comment : Yes for the time being only a single webcam . Comment : Maybe a good place to start and come back with specific questions software.intel.com en-us vcsource tools https : software.intel.com en-us vcsource tools perceptual-computing-sdk home .. . Answer : Kinect for Windows http : www.microsoft.com en-us kinectforwindows develop may be the place you are looking for . I ve recently developed an application which processes gestures and face expressions using Microsoft Kinect API . You can download the SDK freely but the v2-sensor may cost a little .", "Question : For the past few months I ve been looking into developing a Kinect based multitouch interface for a variety of software music synthesizers . The overall strategy I ve come up with is to create objects either programatically or if possible algorithmically to represent various controls of the soft synth . These should have .. . .. . X position .. . Y position .. . Height .. . Width .. . MIDI output channel .. . MIDI data scaler convert x-y coords to midi values .. . .. . 2 strategies I ve considered for agorithmic creation are XML description and somehow pulling stuff right off the screen ie given a running program find xycoords of all controls . I have no idea how to go about that second one which is why I express it in such specific technical language . I could do some intermediate solution like using mouse clicks on the corners of controls to generate an xml file . Another thing I could do that I ve seen frequently in flash apps is to put the screen-size into a variable and use math to build all interface objects in terms of screen-size . Note that it isn t strictly necessary to make the objects the same size as onscreen controls or to represent all onscreen objects some are just indicators not interactive controls .. . .. . Other considerations .. . .. . Given for now two sets of X Y coords as input left and right hands what is my best option for using them My first instinct is was to create some kind of focus test where if the x y coords fall within the interface object s bounds that object becomes active and then becomes inactive if they fall outside some other smaller bounds for some period of time . The cheap solution I found was to use the left hand as the pointer selector and the right as a controller but it seems like I can do more . I have a few gesture solutions hidden markov-chains I could screw around with . Not that they d be easy to get to work exactly but it s something I could see myself doing given sufficient incentive . So to summarize the problem is .. . .. . represent the interface necessary because the default interface always expects mouse input .. . select a control .. . manipulate it using two sets of x y coords rotary continuous controller or in the case of switches preferrably use a gesture to switch it without giving taking focus . Any comments especially from people who have worked are working in multitouch io NUI are greatly appreciated . Links to existing projects and or some good reading material books sites etc would be a big help . Comment : Meta-discussion about this question is happening has happened : meta.stackexchange.com q 106720 146495 http : meta.stackexchange.com q 106720 146495 .. . Answer : Woah lots of stuff here . I worked on lots of NUI stuff during my at Microsoft so let s see what we can do.. . But first I need to get this pet peeve out of the way : You say Kinect based multitouch . That s just wrong . Kinect inherently has nothing to do with touch which is why you have the select a control challenge . The types of UI consideration needed for touch body tracking and mouse are totally different . For example in touch UI you have to be very careful about resizing things based on screen-size resolution DPI.. . regardless of the screen fingers are always the same physical size and people have the same degreee of physical accuracy so you want your buttons and similar controls to always be roughly the same physical size . Research has found 3 4 of an inch to be the sweet spot for touchscreen buttons . This isn t so much of a concern with Kinect though since you aren t directly touching anything - accuracy is dictated not by finger size but by sensor accuracy and users ability to precisely control finicky lagging virtual cursors . If you spend time playing with Kinect games it quickly becomes clear that there are 4 interaction paradigms . 1 Pose-based commands . User strikes and holds a pose to invoke some application-wide or command usually brining up a menu 2 Hover buttons . User moves a virtual cursor over a button and holds still for a certain period of time to select the button 3 Swipe-based navigation and selection . User waves their hands in one direction to scroll and list and another direction to select from the list 4 Voice commands . User just speaks a command . There are other mouse-like ideas that have been tried by hobbyists havent seen these in an actual game but frankly they suck : 1 using one hand for cursor and another hand to click where the cursor is or 2 using z-coordinate of the hand to determine whether to click .. . .. . It s not clear to me whether you are asking about how to make some existing mouse widgets work with Kinect . If so there are some projects on the web that will show you how to control the mouse with Kinect input but that s lame . It may sound super cool but you re really not at all taking advantage of what the device does best . If I was building a music synthesizer I would focus on approach 3 - swiping . Something like Dance Central . On the left side of the screen show a list of your MIDI controllers with some small visual indication of their status . Let the user swipe their left hand to scroll through and select a controller from this list . On the right side of the screen show how you are tracking the users right hand within some plane in front of their body . Now you re letting them use both hands at the same time giving immediate visual feedback of how each hand is being interpretted and not requiring them to be super precise . ps.. . I d also like to give a shout out to Josh Blake s upcomming NUI book . It s good stuff . If you really want to master this area go order a copy : http : www.manning.com blake Comment : Robert - thanks a bunch for your answer good to see an ex-microsoft guy onboard . First re kinect vs multitouch . I started out screwing around with various blob-tracking solutions awhile back and gave up because when lighting conditions changed by the smallest margin imaginable system response slowed to a crawl . I got into kinect because it handles blob tracking internally and outputs one or more x y cursor coords . I have found that the resolution problem you mention if we re talking about the same thing still obtains for kinect because display resolutions and interface sizes differ . Comment : Re mouse the middleware I am using primesense nite essentially outputs 2 cursors in hand mode as well as a gesture-based click pushing your hand toward the screen . I can use all of the joints it outputs 10 or so knees hips etc if I so choose tho I haven t felt like it yet . Re your swipe that is the best I could actually come up with on my own . I am hoping other people have better ideas . Comment : Here s an example of what I consider better - anythinghonest.com amos http : anythinghonest.com amos . It uses all the available features of the new tech ipad in this case in an intuitive way while providing deep control . I may steal parts of it for my thing . Thanks again for your help . Joe Comment : I m also aware of that book - looks pretty awsome will have to pick it up .", "Question : I ve got a strange problem . I m creating a NUI for application and I binded some simple gestures to right and left arrow . The problem is when I start application . When I make gesture for the first time my application is hitting 2 times in a row . After that it works 100 as I want . Only the start is the problem . I m adding two Joints and timestamp to my history struct which is put into the ArrayList .. . .. . then in foreach loop I m comparing data .. . .. . If it hits I instantly break the lopp with .. . .. . after that I clear the history ArrayList .. . .. . So I don t get it . Why after the start it hits two times in a row edit .. . .. . history ArrayList initialization .. . .. . in loop .. . .. . Now . As you can see i m breaking here . So this code shouldn t be invoked second time in a row .. . .. . How this clears something .. . .. . edit 2 .. . .. . I ll also add that to get into this part of code the gestureStart flag need to be set to true . As you can see after getting into the if part here I m setting it to false . So it is impossible that the code instantly can get to this part .. . .. . edit 3 WORKING WORKAROUND .. . .. . I ve created kind of workaround . I ve added time control . I m comparing timestamp of invoking the code and timestamp of last gesture-recognition . If its too fast i meen couple of ms which it impossible to make I don t allow to hit an arrow . I m not sure if it s a perfect solution but it is a working solution Comment : It is not very easy to follow you but usually such things happen when something is wrong with initialization code . Comment : @AndriyBuday its hard to fallow cause the problem is strange and its hard to describe it . If you need more info just say what you need and I ll try to add it . About the initialization . ArrayList are initialized on start of the program : private List HistoryItem history new List HistoryItem 16 nothing else Comment : You should probably paste a little more code to show the transitions . Also as the problem is likely to be in the init code could you summarize what you put in there Comment : @PPC added more code . Comment : what do you mean the application is hitting two times in a row .. . Answer : Ok my problem was the code . Ofc a small bug untracable in the debug . I used one function to analyse a history of frames . The method was working in 2 modes . I ve detached that and created 2 diffrent methods each for each task and now it works great", "Question : I literally want to catch a framework element using NUI of Kinect . Assuming that I have an ellipse on my Grid or Canvas I should be able to pick an ellipse using my program . In order to do this I thought that I have to determine the exact position of the element like Transform.Position in Unity but I couldn t find such a thing in WPF . Here is my XAML code .. . .. . So my question is about finding the that element on the Grid . Having a Cursor or any element that represents the user s hand is not a problem . But after that I ll have to detect the collision between my cursor and these elements and that the part that troubles me . An event like ElementHover or ElementPicked would also help but i guess i m gonna have to write something like that myself . By the way it s about an Engineering Education Software project that aims to develop virtual environments for engineering exercises like expensive or dangerous experiments . .. . Answer : Several examples from Microsoft provided in the SDK v1.6 Toolkit give examples of how to determine the location of objects on the screen and interact with them with a custom cursor that represents the player s hand . I would suggest checking out several of the examples provided in order to get a clear picture of how interactions can work . The toolkit is found in the same location as the office Kinect for Windows SDK . http : www.microsoft.com en-us kinectforwindows develop developer-downloads.aspx .. . .. . ShapeGame .. . .. . This example generates random shapes some of them ellipses which fall from the top of the window . Those shapes interact with the skeleton produced by the Kinect . You ll see how to get the position of elements in the window and in relation to the skeleton . BasicInteractions .. . .. . This examples does several things that are of use . It shows how to produce a custom cursors based on the hand position . It also creates a ContentControl that can be hooked up to Kinect events such as a hand enter hover and exit event . It is built-in such a way because it is a ContentControl that anything can be put inside -- be it a single ellipse or a complex layout . Comment : I ve been tryin to make things work with this machine yet i wasn t aware that these new downloads even exists . Thanx man .", "Question : I need to write applications with NUI for multiple simultaneous users . I have the following options : .. . .. . 1 . OpenGL .. . 2 . Microsoft Surface SDK .. . 3 . Microsoft Windows 8.1 RT .. . .. . Of the above three options I believe that with OpenGL I can write my programs but I am confused about the other two . With Microsoft Surface SDK 2.0 I am unable to confirm that it can be used with third-party multitouch enabled devices with are Windows 7 8 ready . And also will the application only run on Windows 7 platform or will it also run on Windows 8.x platform too How will I be able to deploy Microsoft Surface SDK 2.0 application on the third-party device Microsoft Windows 8.1 RT does support multitouch gestures but I can t find anything concrete on its limitations of the number of simultaneous touches . So I would like help on getting more info on writing Microsoft SDK 2.0 application for third-party devices . .. . Answer : The Surface 2.0 SDK is essentially a set of DLLs that you reference and deploy with your app . They will work on Win7 8 and 8.1 . They are for building desktop apps though as opposed to modern apps which play nicely with things in Win8 like swiping to switch apps . Comment : And can I also leverage the power of multi-user multi-touch gesture of Surface SDK 2.0 in the apps written for Win 7 8.x too Comment : Surface 2.0 SDK is basically going to give you a bunch of WPF controls that are touch-friendly and support multiple users . If you just want the basic gesture APIs those manipulation events are built into WPF 4 taken out of the Surface 1.0 SDK and also built into the modern Win8 UI frameworks . The controls in the Win8 UI frameworks are touch-friendly but not for multiuser you can t press 2 buttons at the same time for example Comment : Thank you Robert Your answers were of great help and now I d need to go forward with using Surface SDK 2.0 as I need to leverage its multiuser features .", "Question : I am working with Kynect + Python without using Micosoft visual-studio on windows-7 . Does anybody know how to get frames from Kinect without using an event-loop I am refering to this method of PyKinect nui init .py .. . .. . The above function is what I need and it isn t implemented yet . I need it to get frames on demand without using an event-loop . How can I do this I am using the following environment and versions : .. . .. . Python 2.7.2 .. . PyKinect 2.1b1 .. . Kinect sensor from XBOX v1 .. . Kinect SDK 1.8 .. . Windows 7 .. . Answer : You cannot get RGB or depth or skeleton frame on demand . Kinect data are provided by events so you have to use them to got data . The only thing that you can do to workaround this event-based system is to save your data in a global variable and then read that variable whenever you need it . For instance let s say that you associate a function named depth frame ready to the event related to depth data : .. . .. . You can write the depth frame ready function to save data on a global variable let s say depth data . You will also need a synchronization mechanism to read and write that variable a simple Lock to avoid simultaneously writing and reading : .. . .. . Now if you need to use depth data you can refer to the global variable whenever you want . Remember to use depth lock to synchronize the access as done in the update depth data function .", "Question : null .. . Answer : I m currently working with a digital output gyroscope . Its sensitivity is given as 120 least-significant bit per degree per second . While every single component of that unit is easy to understand I don t quite get what it means altogether . Can you explain it to me Comment : If the speed increases by 1 degree per second the measured value increases by a value equals to 120 LSB . Comment : How much is 1 LSB Is it 1 Bit Comment : @Hedge Least Significant Bit - the lowest valued bit in your bit pattern i.e . 1 if the value is not floating-point", "Question : I m currently in the early stages of a project and have difficulty deciding which framework to use . I hear people say WPF is dead yet it seems to be the only way to program a Microsoft Surface app . This is one of the possible future aims of the project but not the main focus . The main focus however is : both 2d and 3d objects in the same view and kinect voice support . Some of the 2d objects are SVG files . From what I have read online so far it s not easy to render SVG graphics in XNA nor Silverlight 5 3D for that matter . I ve seen some SVG to XAML converters but could the result-of this be used in a 3d view Or vice versa Considering it s not going to be a game but a business-application I m tempted to rule out XNA but then again I also require good performance as there will be quite some graphical stuff going on and if possible support for high resolutions video wall . Taking a video wall into consideration would maybe rule out WPF as I ve read that it will only use hardware-acceleration if the resolution is lower than the texture size limit of the GPU . There is no intend to run the application in the browser or phone as such i m tempted to rule out Silverlight 5 . Any tips would be greatly be appreciated . Thanks Comment : Not only is WPF dead but so is Silverlight and WinForms I m pretty sure HTML 5 is the only technology not dead yet . Good luck doing 3D with it though . Comment : @gabe Well let s not call it all dead yet . Before the HTML 5 standard is actually done accepted and all browsers support it we will be 5 or more years further down the road . Comment : LOL @Gabe . You forgot to mention compilers and all compiled languages are dead too .. . Answer : I wouldn t rule out XNA on the basis that it s for games . You can simply use only the parts required for hardware-accelerated 3D rendering and ignore the rest . This is in fact what Silverlight 5 does So you may find that your 3D rendering code is the same between XNA and SL5 in any case . Here is a question about SVG in XNA http : gamedev.stackexchange.com questions 2196 rendering-svg-art-directly-in-xna . Basically answer is : you have to write your own hardware-accelerated SVG renderer - a stupidly difficult task . But if your SVG files never change you could just use an existing software renderer to render them to a texture . If you converted your SVG to XAML you would have to render it to a texture to use it in a SL5 3D view anyway unless it s an overlay . So there is no big win there . I don t know how 2D-3D compositing works in WPF . Your decision really depends on whether you would find the built-in functionality that SL5 or WPF provides for user interfaces useful Seeing as you are basically making your own user-interface you probably would not get much use from the provided 2D interface . The 3D API that SL5 provides is basically a cut-down version of XNA . The 3D API for WPF looks like it just renders models for you - it does not seem to buy you much over XNA . If you have a compelling reason to use XAML then WPF may be a good choice . Otherwise I d go with XNA .", "Question : I have some problem with the kinect . when I try to get color Image from the event : Sensor AllFramesReady everything is ok . example : .. . .. . But when I try to do the same code outside the event with .. . .. . I get error : This API cannot be called when an event-listener has been set .. . .. . I try to remove the event before calling this function but this don t change anything Comment : Do you delete this line kinectSensor.AllFramesReady + new EventHandler AllFramesReadyEventArgs kinectSensor AllFramesReady Comment : no before calling the above function I call to : Sensor.AllFramesReady - Sensor AllFramesReady Comment : Delete that line Comment : but I want to use that event for other things .. . Answer : You have to choice event handler or poll method . You can use the event and save the last frame to use it some else place . Comment : That was exactly what I did . but this is waste of memory and run time Comment : Save the last ColorImageFrame in a global variable is a waste of memory It s just an image and don t need any process . Please explain in more details why this is not a solution . Comment : I did not explain myself correctly the event works 30 times per second if every time I do the above calculation then it takes time . The problem here is time and not memory . There is no solution to do both Comment : Kinect Sdk don t allow use both . Then why you want to use both What exactly you want to archive Comment : I do a regular paint application - for this I need the event . I want to add function to print screen the canvas that the user draw on him in this function I want to add to the canvas a picture of the user from the kinect sensor . are you sure that kinect don t allow both why", "Question : I have an image that is a depth heatmap that I ve filtered out anything further away than the first 25 of the image . It looks something like this : enter image description here http : i.stack.imgur.com 1o3dq.png .. . .. . There are two blobs of color in the image one is my hand with part of my face behind it and the other is the desk in the lower left corner . How can I search the image to find these blobs I would like to be able to draw a rectangle around them if possible . I can also do this ignore shades and filter to black or white : enter image description here http : i.stack.imgur.com BXMRb.png .. . Answer : If the image really is only two or more distinct colours very little blur between colours it is an easy case for an edge-detection http : en.wikipedia.org wiki Edge detection algorithm . Comment : I can make them exactly two colors if needed . I m filtering a heat map Comment : Then you should be okay with an edge-detection algorithm . The problem isn t with the colours but the change over pixels . If you have very steep differences it is very easy - and this applies to a heatmap . However I can t help you with a specific implementation of the algorithm .", "Question : I have a TabHost control not in actionbar and I want to make the tabs to change when the user swipes the context on each tab something like whatsapp emoji tabs . How can I do this EDIT .. . The feel is also important . I want that the contexts should have scroll animations No matter if the user swipe or if the tab is clicked . Comment : androidexample.com Swipe screen left right top bottom http : androidexample.com Swipe screen left right top bottom index.php view article discription aid 95 aaid 118 .. . Answer : Go through this link http : thepseudocoder.wordpress.com 2011 10 13 android-tabs-viewpager-swipe-able-tabs-ftw .. . .. . You can use a gesture detector . GestureDetector .. . .. . Detects various gestures and events using the supplied MotionEvents . The GestureDetector.OnGestureListener callback will notify users when a particular motion event has occurred . This class should only be used with MotionEvents reported via touch don t use for trackball events . To use this class : .. . .. . 1 Create an instance of the GestureDetector for your View In the nTouchEvent MotionEvent method ensure you call .. . .. . 2 onTouchEvent MotionEvent . The methods defined in your callback will be executed when the events occur .. . .. . This page shows how to recognize a swipe-gesture using the GestureDetector : .. . .. . http : smartandroidians.blogspot.in 2010 04 swipe-action-and-viewflipper-in-android.html" ] }
[ "yes-answer-long", "yes-answer-short" ]
user-interface
UNK_RELATION
c++03@c++@44
c++ 03 -- c++ 03 is an older revision of the @placeholder standard .
{ "confidence": [ 50.15709686279297, 48.4368896484375, 45.2938232421875, 42.29431915283203, 42.25408172607422, 42.25408172607422, 42.09832763671875, 41.88999938964844, 41.533424377441406, 40.90235900878906, 39.655479431152344, 39.63960266113281, 39.63960266113281, 39.33440399169922, 39.33440399169922, 39.25458526611328, 39.200843811035156, 38.55394744873047, 38.020423889160156, 37.95408248901367, 37.95408248901367, 37.820526123046875, 37.820526123046875, 37.36730194091797, 37.07073974609375, 37.07073974609375, 37.03181457519531, 36.93476867675781, 36.334903717041016, 36.334903717041016, 35.6904182434082, 35.6904182434082, 35.6904182434082, 35.6904182434082, 35.6904182434082, 35.6904182434082, 35.6904182434082, 35.62649917602539, 35.62649917602539, 35.62649917602539, 35.62649917602539, 35.62649917602539, 35.468360900878906, 35.11100387573242, 34.07123565673828, 34.07123565673828, 34.07123565673828, 34.07123565673828, 34.00731658935547, 34.00731658935547, 34.00731658935547, 34.00731658935547, 34.00731658935547, 34.004478454589844, 34.004478454589844, 32.92747497558594, 32.92747497558594, 32.75532913208008, 32.6241569519043, 32.6241569519043, 32.6241569519043, 32.6241569519043, 32.6241569519043, 31.547157287597656, 31.547157287597656, 31.547157287597656, 31.547157287597656, 31.547157287597656, 31.547157287597656, 31.547157287597656, 31.547157287597656, 31.547157287597656, 31.547157287597656, 31.547157287597656, 31.547157287597656, 31.29852294921875, 31.29852294921875, 31.29852294921875, 31.06682014465332, 31.004976272583008, 31.004976272583008, 31.004976272583008, 31.004976272583008, 31.004976272583008, 31.004976272583008, 31.004976272583008, 31.004976272583008, 31.004976272583008, 30.342496871948242, 30.342496871948242, 30.11748695373535, 30.11748695373535, 30.11464500427246, 30.105911254882812, 29.927976608276367, 29.927976608276367, 29.927976608276367, 29.927976608276367, 29.927976608276367 ], "content": [ "Why was it added to the C++03 standard", "Is this regulated by the standard interested in C++03 in case there are differences", "@Downvoter : Note that this question was asked in 2009 and pertains to the C++03 standard .", "The draft standard you link-to is from 2005...is that really for C++03", "A std : : string s allocation is not guaranteed to be contiguous under the C++98 03 standard but C++11 forces it to be .", "Many of them are not fully compliant with the standard or rely on C++11 and I am stuck with C++03 at the moment sadly .", "Is it possible for C++ code to conform to both the C++03 http : en.wikipedia.org wiki C++03 standard and the C++11 http : en.wikipedia.org wiki C++11 standard but do different things depending on under which standard it is being compiled", "C++03 .", "Whereas in 03 standard is not .", "I have a copy of the 03 standard but not the 98 standard .", "The equation is always there as in 03 standard as well .. .", "It s identical in C++03", "This is a C++03 template typedef .", "enable-if is perfectly implementable in C++03 .", "It has to be C++03 98 compliant .", "While this might be fine in practice claiming that the standard text in C++98 and C++03 supports this is misleading at best .", "Readers should note that this question was asked in 2009 when the C++03 Standard was the current publication .", "Only C++03 only not C++0x", "It was not in C++03 and it was not in TR1 .", "std : : atomic is not available in C++03 .", "There is no such directive in C++03 because .. . .. . 1 .", "but I do not have it with me at this time this said I can reproduce the problem by simply forcing g++ to the C++03 standard .", "Local type as template argument is forbidden in C++03 : .. . .. . Is there any directives in Standard about checking this rule in case of template is not instantiated", "It compiles with gcc 4.4.7 which doesn t even recognize the --std c++03 option with gcc 5.3 --std c++03 and with clang 3.0 3.7 both with --std c++03", "My question is about C++03 if this makes a difference", "And yeah C++03 so the .c str is needed .", "Summarizing : clang++ is correctly following the C++03 rules g++ is following the C++11 rules even with -std c++03", "And what about C++98 C++03", "@andre they are also not available in C++03", "c++03 tag just added .", ".. . .. . EDIT : I updated this question to mention C++03 .", "What is the memory-model for concurrency in C++03", "how to get the DEDUCEDTYPE automatically with c++03", "Automatic type deduction is not possible with C++03 .", "Is this program supposed to correctly initialize the string in C++03", "AND IT HAS TO BE OLD C++ 98 03 not the newer one .", "In C++03 an object can be initialized as .. . .. . 1 .", "It s easy in C++11 but I m curious about C++03 .", "I can t find that quote in either C++98 or C++03 .", "In fact in C++98 as well as in C++03 references to references do not collapse .", "The code you show is the same in C++03 and C++11 AFAIK .", "In C++03 : .. . .. . In C++11 .. . .. . Congratulations two different results for the same expression .", "That said as far as I can remember the C++ standard at least the C++03 one does not specify exactly when the side effect of postincrement will take place .", "Until the next C++ standard the C++ memory-model is the same as C . In the C++0x standard a proper memory-model for multithreading is expected to be included see here http : en.wikipedia.org wiki C 2B 2B0x Multithreading memory-model and it will be part possibly of the next revision of the C standard C1X .", "I am working in a C++03 project .", "Sorry I meant C++03 edited it.. .", "@mb84 : The wording and paragraph number are identical in C++03 .", "These paragraphs are clearly just as strong as C++03 .", "The code is not valid C++03 although it is valid C++11 .", "VS is not following C++03 nor C++11 rules correctly .", "This is one thing that C++03 differs from C++11 .", ".. . It has to work on C++03 meaning no C++11 features .", "You may want to specify c++98 or C++03 then .", "This is not possible C++03 requires that elements of a vector be CopyConstructible and Assignable .", "@WhozCraig : No the only new thing in C++03 was value-initialization .", "This is a C++03-compatible library - it can t use external libraries like boost only builtin C++ code .", "Are there any builtins to C++ 03 library or if not then C++11 that will work efficiently on whatever hardware I happen to be on", "while C++03 does not have the constexpr feature we don t have to explicitly use the constexpr keyword since the standard-library provides many functions in C++11 as constexpr .", "C++03 just said that binding a reference to non-const to an rvalue is not possible .", "3 All names ending in t are reserved for the implementation in C++03 .", "it is weird that it does not require typename for : : two in C++03 version", "I need to support C++03 with gcc 4.6 and higher .", "Also asker explicitely says about C++03 which lacks atomics .", "If this code works with GCC in C++03 mode because it implements the C++11 semantics that s not something I m happy with :", "I have ogre rendering code which compiles with c++03 but not with c++11 .", "I have bullet physics code which compiles with c++11 but not with c++03 .", "Is it possible to compile bullet code with c++11 and call the resulting library from ogre code that is to be compiled with c++03 .", "If you do not know C++03 solution then C++11 solution is welcome also .", "There s no need for C++11 features nor compiler extensions like typeof in C++03 which are not portable .", "The system is C++03 so experimental C++14 like solutions won t be valid here .", "Where in C++03 they copied a default-constructed element in C++11 they default-construct each one .", "Yes there are number of changes that will cause the same code to result in different behavior between C++03 and C++11 .", "since C++11 .. . .. . This is primarily an issue if you are used to the new semantics and then have to write using C++03 .", "Its GCC is 4.8 but the default in GCC 4.8 is C++03.. . Or CentOS 6 with GCC 4.3 in -std c++0x mode", "Note : Can t use C++11 yet .. . .. . Update Any clean solution which works in C++03 is fine .", "Prior to c++11 there was no standard way to do that .", "Unfortunately in C++ there is no Standard Memory Model like that of Java .", "ISO standard C++ doesn t let you do this .", "Because it used as-if it was supposed to be a C++ standard header but no standard mentions it .", "@JonathanMee iterator traits already existed in C++03 and is same is trivial .", "Actually I think that my biggest problem is that I m using C++03 .", "AFAICS the answer you link-to doesn t mention sequence-points or C++03 .", ".. . .. . Footnote : the behaviour was exactly the same in C++03 but the terminology was different .", "If you don t list them in the initializer-list in C++03 are they zero-initialized", "There are only 300 C++03 tagged questions at the moment and this is not one of them .", "Value initialization didn t even exist until C++03 .", "@Gob00st : The difference is that in C++03 rounding of divisions was not fully specified .", "I m looking to support any reasonably C++03-compatible compiler .", "Just to be clear would a C++11 approach that covers non-copyable non-movable objects be acceptable or do you really need a C++03 approach", "@Cheersandhth.-Alf as-tagged c++03 seems the reason for the c-str though you re clearly right if anyone reading this is going to do it with C++11 or later .", "This answer to Where do I find the current C or C++ standard documents", "C++ itself includes the current standard which is C++14 right now .", "At the C++ library level there is no standard way to pass the desired flags .", "ISO standard C++ doesn t let you - it s a good idea to specify which version of the ISO C++ standard you have in mind", "@Mehrdad : In VS you cannot control whether it builds in C++03 or C++11 mode it has only one mode .", "C++03 doesn t come with a static-assert -type thing that s a C++11 feature .", "C++03 would have said sequence point C++11 will say sequenced before .", "If so I think adding the c++03 tag might be useful there are already many questions which imply c++ 2011 .", "I didn t fail to notice this it was an editorial error in C++03 that was corrected in C++11 ." ] }
{ "confidence": [ 41.88127517700195, 41.69816589355469, 41.167232513427734, 40.038578033447266, 39.80682373046875, 39.33722686767578, 39.24663543701172, 39.238677978515625, 39.064876556396484, 38.90928649902344, 38.88116455078125, 38.34447479248047, 37.966102600097656, 37.34157943725586, 37.33781433105469, 37.294898986816406, 37.19900894165039, 36.799964904785156, 36.4030876159668, 35.973876953125 ], "content": [ "Question : I have ogre rendering code which compiles with c++03 but not with c++11 . I have bullet physics code which compiles with c++11 but not with c++03 . Now I want to interface them . Is it possible to compile bullet code with c++11 and call the resulting library from ogre code that is to be compiled with c++03 . my gcc version 4.8.4 .. . .. . OGRE is built as static . Bullet is also build as static . Comment : Will the Bullet library be built as a static or shared library If it s a shared library then then it should work mostly fine unless you want to call some function or use some class that depends on specific C++11 functionality . If it s a static library then it will not be possible unless you link with a standard-library that have the C++11 functionality needed by the library . Comment : please see edit above .. . Answer : Yes it s possible as long as you use the same libstdc++ ABI and as the new C++ 11 ABI has been introduced with g++ 5.1 see using dual abi https : gcc.gnu.org onlinedocs libstdc++ manual using dual abi.html it should be ok for you . edit : see this answer http : stackoverflow.com questions 16190269 g-always-backward-compatible-with-older-static-libraries for a more complete answer specially regarding ABI incompatibility with g++ 4.7.0 and g++ 4.7.1", "Question : For a software I have to avoid any use of memory in the heap and only rely on stack-allocated memory . Then this prevents me from using any C++ standard containers such as vector map string well basic string which I would really like to use to ease development and data-manipulation . I found many implementations of stack allocators such as this one http : codereview.stackexchange.com questions 31528 a-working-stack-allocator which itself references two others or this one https : chromium.googlesource.com chromium src.git + master base containers stack container.h from chromium . Many of them are not fully compliant with the standard or rely on C++11 and I am stuck with C++03 at the moment sadly . Do you have any feedback about a good already existing stack allocator for C++03 or should I adapt one of the above Thanks Comment : Howard Hinnant gives a C++03 bolierplate for his allocator http : howardhinnant.github.io allocator boilerplate.html also see Questions about Hinnant s stack allocator http : stackoverflow.com q 11648202 1708801 .. . Answer : Howard Hinnant s short alloc.h http : howardhinnant.github.io short alloc.h see also here http : howardhinnant.github.io stack alloc.html is a pretty good start you will need to add C++03 boilerplate see here http : howardhinnant.github.io allocator boilerplate.html . Of course this will still go to the heap if it runs out-of-memory the alternative is to throw std : : bad-alloc .", "Question : I m doing some maintenance work and ran across something like the following : .. . .. . I know using s 0 would be safe if it was a std : : vector but is this a safe use of std : : string Comment : The use of s 0 is OK memcpy arguably less so . Why not simply do an assignment or use the string s assign member function Comment : @Neil Butterworth that is what I m asking myself while looking at this code.. . Comment : As you gain experience programming in C++ you will refrain more and more from using memset and memcpy and learn the reasoning . This is one to add to your experience . .. . Answer : A std : : string s allocation is not guaranteed to be contiguous under the C++98 03 standard but C++11 forces it to be . In practice neither I nor Herb Sutter http : herbsutter.wordpress.com 2008 04 07 cringe-not-vectors-are-guaranteed-to-be-contiguous know of an implementation that does not use contiguous storage . Notice that the s 0 thing is always guaranteed to work by the C++11 standard even in the 0-length string case . It would not be guaranteed if you did str.begin or str.begin but for s 0 the standard defines operator as : .. . .. . Returns : begin + pos if pos size otherwise a reference to an object of type T with value charT the referenced value shall not be modified .. . .. . Continuing on data is defined as : .. . .. . Returns : A pointer p such that p + i operator i for each i in 0 size . notice the square brackets at both ends of the range .. . .. . .. . .. . Notice : pre-standardization C++0x did not guarantee s 0 to work with zero-length strings actually it was explicitly undefined-behavior and an older revision of this answer explained this this has been fixed in later standard drafts so the answer has been updated accordingly . Comment : I have not been following the standard for the last few months but it was my impression was this was still in the 0x draft and therefor not actually yet required or will be if a library chooses to only implemented 03 . Comment : Sutter says in a comment to that post current ISO C++ does require str 0 to cough up a pointer to contiguous string data but not necessarily null-terminated which would in fact make the OP s usage correct . However I can t find anything that says that in the standard at least it s not in 21.3.4 lib.string.access . Comment : I think that might be right the std defect 530 says operator is contiguous but the iterator interface is not guaranteed to be and quotes 23.4.4 . I am digging out my standard to check . Comment : I skipped right over the defect link in Sutter s post that s why I missed it . In any case the defect says we almost require contiguity already key word : almost and I don t see how its reference to multiset is relevant basic string is a sequence with random-access iterators . However I think the important thing to take away is that given the existence of data and the definition of operator and at in terms of data I don t believe it s possible to write a useful and standard- conforming basic string that isn t contiguous . Comment : James : the almost is because the null for s s.length does not have to be contiguous . s n + 1 s n + 1 must be true for all n where 0 n s.length - 1 . The requirement is buried in 21.3.4 1 that s n must return the same object as s.data n for n length and data must be contiguous .", "Question : Is it possible for C++ code to conform to both the C++03 http : en.wikipedia.org wiki C++03 standard and the C++11 http : en.wikipedia.org wiki C++11 standard but do different things depending on under which standard it is being compiled Comment : I m pretty sure auto could result in a situation like this Comment : Yes . One example is when used in a template . You can come up with a situation where it can compile for both standards . Another one that I m sure would be easy to find changes for is in initialization . Comment : Here s a nice article on the situation : gustedt.wordpress.com 2013 12 15 http : gustedt.wordpress.com 2013 12 15 a-disimprovement-observed-from-the-outside-right-angle-brackets Comment : @OMGtechy : I don t think auto can cause this . With the old meaning an auto declaration requires a type name with the new meaning a type name is not permitted . Comment : Closing this as too broad would be a shame this is question likely to be asked many times and it would be good to have a solid canonical question to point to that is not closed . .. . Answer : One potentially dangerous backward-incompatible change is in constructors of sequence containers such as std : : vector specifically in the overload specifying initial size . Where in C++03 they copied a default-constructed element in C++11 they default-construct each one . Consider this example using boost : : shared-ptr so that it s valid C++03 : .. . .. . C++03 Live example http : coliru.stacked-crooked.com a 426fb7a77f020e4b .. . .. . C++11 Live example http : coliru.stacked-crooked.com a 201f0609fec61325 .. . .. . The reason is that C++03 specified one overload for both specify size and prototype element and specify size only like this allocator arguments omitted for brevity : .. . .. . This will always copy prototype into the container size times . When called with just one argument it will therefore create size copies of a default-constructed element . In C++11 this constructor signature was removed and replaced with these two overloads : .. . .. . The second one works as before creating size copies of the prototype element . However the first one which now handles calls with only the size argument specified default-constructs each element individually . My guess for the reason of this change is that the C++03 overload wouldn t be usable with a move-only element type . But it s a breaking change none the less and one seldom documented at that . Comment : While this is obviously a breaking change I prefer the C++11 behaviour . I d expect this to result in a deque holding ten separate widgets not ten widgets sharing the same resource .", "Question : Possible Duplicate : .. . C++ operator guarantees http : stackoverflow.com questions 12710801 c-operator-guarantees .. . .. . In c++ 98 03 .. . .. . 5.6-4 .. . .. . The binary operator yields the quotient and the binary operator yields the remainder from the division of the first expression by the second . If the second operand of or is zero the behavior is undefined otherwise a b b + a b is equal to a . If both operands are nonnegative then the remainder is nonnegative if not the sign of the remainder is implementation-defined . In c++ 11 : .. . .. . 5.6 -4 .. . .. . The binary operator yields the quotient and the binary operator yields the remainder from the division of the first expression by the second . If the second operand of or is zero the behavior is undefined . For integral operands the operator yields the algebraic quotient with any fractional part discarded 81 if the quotient a b is representable in the type of the result a b b + a b is equal to a . As you can see the implementation-defined for the sign bit is missing what happens to it Comment : What are you trying to do And how this comes as a obstacle for that Comment : @AnandVeeramani : some people just want to avoid undefined or in this case implementation-defined behavior . I m glad he asked this I have avoided modulo when the values could have been negative . Comment : Also see : stackoverflow.com q 3609572 485561 http : stackoverflow.com q 3609572 485561 Comment : C++ 98 03 also had this footnote : According to work underway toward the revision of ISO C the preferred algorithm for integer-division follows the rules defined in the ISO Fortran standard ISO IEC 1539 : 1991 in which the quotient is always rounded toward zero C++11 simply made that a requirement of the standard as C99 did for C . Removing the implementation defined part of the operator is a consequence of that . Comment : @moswald : you would have to avoid using operator in those cases as well since it is similarly implementation defined . .. . Answer : The algorithm says a b b + a b a which is easier to read if you remember that it s truncate a b b + a b a Using algebra a b a - truncate a b b . That is to say f a b a - truncate a b b . For what values is f a b 0 It doesn t matter if b is negative or positive . It cancels itself out because it appears in the numerator and the denominator . Even if truncate a b 0 and b is negative well it s going to be canceled out when it s a product of 0 . Therefore it is only the sign of a that determines the sign of f a b or a b . Comment : The equation is always there as in 03 standard as well .. . Comment : @Gob00st : The difference is that in C++03 rounding of divisions was not fully specified .", "Question : Is it possible for C++ code to conform to both the C++03 http : en.wikipedia.org wiki C++03 standard and the C++11 http : en.wikipedia.org wiki C++11 standard but do different things depending on under which standard it is being compiled Comment : I m pretty sure auto could result in a situation like this Comment : Yes . One example is when used in a template . You can come up with a situation where it can compile for both standards . Another one that I m sure would be easy to find changes for is in initialization . Comment : Here s a nice article on the situation : gustedt.wordpress.com 2013 12 15 http : gustedt.wordpress.com 2013 12 15 a-disimprovement-observed-from-the-outside-right-angle-brackets Comment : @OMGtechy : I don t think auto can cause this . With the old meaning an auto declaration requires a type name with the new meaning a type name is not permitted . Comment : Closing this as too broad would be a shame this is question likely to be asked many times and it would be good to have a solid canonical question to point to that is not closed . .. . Answer : The result-of a failed read from an std : : istream has changed . CppReference http : en.cppreference.com w cpp io basic 5fistream operator 5fgtgt summarizes it nicely : .. . .. . If extraction fails e.g . if a letter was entered where a digit is expected value is left unmodified and failbit is set . until C++11 .. . .. . If extraction fails zero is written to value and failbit is set . If extraction results in the value too large or too small to fit in value std : : numeric limits T : : max or std : : numeric limits T : : min is written and failbit flag is set . since C++11 .. . .. . This is primarily an issue if you are used to the new semantics and then have to write using C++03 . The following is not particularly good practice but well-defined in C++11 : .. . .. . However in C++03 the above code uses an uninitialized variable and thus has undefined behaviour . Comment : You might add that in C++03 one could have used this standardized behavior to provide a default-value as in int x 1 y 1 cin x y cout x y . With C++03 this would have correctly produce x when no y could be read .", "Question : Is it possible for C++ code to conform to both the C++03 http : en.wikipedia.org wiki C++03 standard and the C++11 http : en.wikipedia.org wiki C++11 standard but do different things depending on under which standard it is being compiled Comment : I m pretty sure auto could result in a situation like this Comment : Yes . One example is when used in a template . You can come up with a situation where it can compile for both standards . Another one that I m sure would be easy to find changes for is in initialization . Comment : Here s a nice article on the situation : gustedt.wordpress.com 2013 12 15 http : gustedt.wordpress.com 2013 12 15 a-disimprovement-observed-from-the-outside-right-angle-brackets Comment : @OMGtechy : I don t think auto can cause this . With the old meaning an auto declaration requires a type name with the new meaning a type name is not permitted . Comment : Closing this as too broad would be a shame this is question likely to be asked many times and it would be good to have a solid canonical question to point to that is not closed . .. . Answer : I point you to this article http : gustedt.wordpress.com 2013 12 15 a-disimprovement-observed-from-the-outside-right-angle-brackets and the follow-up http : gustedt.wordpress.com 2013 12 18 right-angle-brackets-shifting-semantics which has a nice example of how can change meaning from C++03 to C++11 while still compiling in both . The key part is the line in main which is an expression . In C++03 : .. . .. . In C++11 .. . .. . Congratulations two different results for the same expression . Granted the C++03 one did come up with a warning form Clang when I tested it . Comment : it is weird that it does not require typename for : : two in C++03 version Comment : Nice one getting it to boil down to evaluate to true or false for the different standards . Maybe we could use it as a feature test joke Comment : @zahir It s not a type just a value . Comment : well proper cmdline options warn about this warning : comparisons like X Y Z do not have their mathematical meaning -Wparentheses but still a nice example of how the ambiguous : : operator changes meaning either refering to the global-scope or dereferencing the one standing directly before it Comment : @example Surprisingly enough GCC gives that warning but Clang does not .", "Question : Is it possible for C++ code to conform to both the C++03 http : en.wikipedia.org wiki C++03 standard and the C++11 http : en.wikipedia.org wiki C++11 standard but do different things depending on under which standard it is being compiled Comment : I m pretty sure auto could result in a situation like this Comment : Yes . One example is when used in a template . You can come up with a situation where it can compile for both standards . Another one that I m sure would be easy to find changes for is in initialization . Comment : Here s a nice article on the situation : gustedt.wordpress.com 2013 12 15 http : gustedt.wordpress.com 2013 12 15 a-disimprovement-observed-from-the-outside-right-angle-brackets Comment : @OMGtechy : I don t think auto can cause this . With the old meaning an auto declaration requires a type name with the new meaning a type name is not permitted . Comment : Closing this as too broad would be a shame this is question likely to be asked many times and it would be good to have a solid canonical question to point to that is not closed . .. . Answer : Yes there are number of changes that will cause the same code to result in different behavior between C++03 and C++11 . The sequencing rules differences make for some interesting changes including some previously undefined-behavior becoming well defined . 1 . multiple mutations of the same variable within an initializer-list .. . .. . One very interesting corner case would multiple mutations of the same variable within an initializer-list for example : .. . .. . In both C++03 and C++11 this is well defined but the order of evaluation in C++03 is unspecified http : stackoverflow.com questions 19881803 are-multiple-mutations-of-the-same-variable-within-initializer-lists-undefined-b but in C++11 they are evaluated in the order in which they appear http : stackoverflow.com questions 14442894 are-multiple-mutations-within-initializer-lists-undefined-behavior . So if we compile using clang in C++03 mode it provide the following warning see it live http : coliru.stacked-crooked.com a 906eb652c8852d7a : .. . .. . but does not provide a warning in C++11 see it live http : coliru.stacked-crooked.com a f64b518da84ecc4e . 2 . New sequencing rules make i ++ i + 1 well defined in C++11 .. . .. . The new sequencing rules adopted after C++03 means that : .. . .. . is no longer undefined-behavior in C++11 this is covered in defect report 637 . Sequencing rules and example disagree http : www.open-std.org jtc1 sc22 wg21 docs cwg defects.html 637 .. . .. . 3 . New sequencing rules also make ++++i well defined in C++11 .. . .. . The new sequencing rules adopted after C++03 means that : .. . .. . is no longer undefined-behavior in C++11 . 4 . Slightly More Sensible Signed Left-Shifts .. . .. . Later drafts of C++11 include N3485 which I link below fixed the undefined-behavior of shifting a 1 bit into or past the sign bit http : blog.regehr.org archives 738 . This is also covered in defect report 1457 http : www.open-std.org jtc1 sc22 wg21 docs papers 2012 n3367.html 1457 . Howard Hinnant commented on the significance of this change in the thread on Is left-shifting a negative integer undefined-behavior in C++11 http : stackoverflow.com questions 19593938 is-left-shifting-a-negative-integer-undefined-behavior-in-c11 comment29091986 19593938 . 5 . constexpr functions can be treated as compile-time constant expressions in C++11 .. . .. . C++11 introduced constexpr http : en.cppreference.com w cpp language constexpr functions which : .. . .. . The constexpr specifier declares that it is possible to evaluate the value of the function or variable at compile-time . Such variables and functions can then be used where only compile-time constant expressions are allowed . while C++03 does not have the constexpr feature we don t have to explicitly use the constexpr keyword since the standard-library provides many functions in C++11 as constexpr . For example std : : numeric limits : : min http : en.cppreference.com w cpp types numeric limits min . Which can lead to different behavior for example : .. . .. . Using clang in C++03 this will cause x to be a variable-length array which is an extension http : clang.llvm.org compatibility.html vla and will generate the following warning : .. . .. . while in C++11 std : : numeric limits unsigned int : : min +2 is a compile-time constant-expression and does not require the VLA extension . 6 . In C++11 noexcept exception specifications are implicitly generated for your destructors .. . .. . Since in C++11 user defined destructor has implicit noexcept true specification as explained in noexcept destructors http : akrzemi1.wordpress.com 2013 08 20 noexcept-destructors it means that the following program : .. . .. . In C++11 will call std : : terminate but will run successfully in C++03 . 7 . In C++03 template arguments could not have internal linkage .. . .. . This is covered nicely in Why std : : sort doesn t accept Compare classes declared within a function http : stackoverflow.com a 14596065 1708801 . So the following code should not work in C++03 : .. . .. . but currently clang allows this code in C++03 mode with a warning unless you use -pedantic-errors flag which is kind of icky see it live http : coliru.stacked-crooked.com a 316202b3a33a8ec6 . 8 . is not longer ill-formed when closing multiple templates .. . .. . Using to close multiple templates is no longer ill-formed but can lead to code with different results in C++03 and C+11 . The example below is taken from Right angle brackets and backwards compatibility http : dev.krzaq.cc right-angle-brackets-and-backwards-compatibility : .. . .. . and the result in C++03 is : .. . .. . and in C++11 : .. . .. . 9 . C++11 changes some of std : : vector constructors .. . .. . Slightly modified code from this answer http : stackoverflow.com a 6474857 1708801 shows that using the following constructor from std : : vector http : en.cppreference.com w cpp container vector vector : .. . .. . produces different results in C++03 and C++11 : .. . .. . 10 . Narrowing conversions in aggregate initializers .. . .. . In C++11 a narrowing conversion in aggregate initializers is ill-formed and it looks like gcc allows this in both C++11 and C++03 although it provide a warning by default in C++11 : .. . .. . This is covered in the draft C++11 standard section 8.5.4 List-initialization paragraph 3 : .. . .. . List-initialization of an object or reference of type T is defined as follows : .. . .. . and contains the following bullet emphasis mine : .. . .. . Otherwise if T is a class type constructors are considered . The applicable constructors are enumerated and the best one is chosen through overload-resolution 13.3 13.3.1.7 . If a narrowing conversion see below is required to convert any of the arguments the program is ill-formed .. . .. . This and many more instance are covered in the draft C++ standard http : www.open-std.org jtc1 sc22 wg21 docs papers 2012 n3485.pdf section annex C.2 C++ and ISO C++ 2003 . It also includes : .. . .. . New kinds of string-literals .. . Specifically macros named R u8 u8R u uR U UR or LR will not be expanded when adjacent to a string literal but will be interpreted as part of the string literal . For example .. . .. . define u8 abc .. . const char s u8 def Previously abcdef now def .. . .. . .. . User-defined literal string support .. . Previously 1 would have consisted of two separate preprocessing tokens and the macro x would have been expanded . In this International Standard 1 consists of a single preprocessing tokens so the macro is not expanded . define x there .. . hello x 1 .. . .. . .. . Specify rounding for results of integer and .. . 2003 code that uses integer-division rounds the result toward 0 or toward negative infinity whereas this International Standard always rounds the result toward 0 . Complexity of size member-functions now constant .. . Some container implementations that conform to C++ 2003 may not conform to the specified size requirements in this International Standard . Adjusting containers such as std : : list to the stricter requirements may require incompatible changes . Change base-class of std : : ios base : : failure .. . std : : ios base : : failure is no longer derived directly from std : : exception but is now derived from std : : system error which in turn is derived from std : : runtime-error . Valid C++ 2003 code that assumes that std : : ios base : : failure is derived directly from std : : exception may execute differently in this International Standard . Comment : So most of the examples narrow down to the fact that previously undefined behaviour is now well defined Comment : @MatthiasB 2 3 and 4 are about this so at this point they are not a majority of the examples anymore . I doubt I will find many more undefined-behavior examples so as I add more then they will become a smaller set . Comment : Well 1 behaviour is unspecified so i d count it as undefined behaviour at least you cannot expect to get a specific result with c++03 now with c++11 you can 5 uses a non-standard extension of c++ . But I guess you re right . The more you look for it the more examples you ll find which are defined in both standards but produce different results . Comment : @MatthiasB yes both unspecified and undefined-behavior have undesirable results . As for extensions considering Linux depends on a number of gcc extensions http : www.ibm.com developerworks library l-gcc-hacks we should assume in the real world they matter . I was not expecting to find so many examples when I first answered this question .", "Question : GCC is great with ABI-compatibility as long as you use the same C++ standard 1 https : gcc.gnu.org onlinedocs libstdc++ manual abi.html . But it strikes me that if a shared library compiled by GCC 4.3 in C++03 mode exposes say a std : : string this is going to be a different std : : string than that understood by an executable compiled by GCC 4.8 in C++11 mode . The reason I ask is that I am planning to deploy a program compiled by GCC 4.8 in C++11 mode on CentOS 6 whose maximum packaged GCC is 4.3.. . and some of the shared-libraries be they third-party C++ libraries or more system-level stuff will presumably therefore all be C++03 . But if that were the case we d never be able to deploy any C++11 programs on older Linux distributions which seems unlikely . Am I naive to think there might be a problem here And if there is how can I resolve it Comment : inb4 just try it Well it appearing to work doesn t mean it s supposed to Comment : I couldn t imagine it could work safely . As you say if you pass around std : : strings between different parts they will likely have different layout or implementation . Even if you don t expose them in interfaces you may get symbol clashes I presume . Comment : @JohanLundberg : Mm indeed . So there must be some general guidance for this kind of thing . Or does nobody deploy C++11 with third-party CentOS-packaged dependencies on CentOS 6 Comment : If you can t build your code with the standard CentOS 6 g++ glibc libstdc++ then no it s not going to run on standard CentOS 6 installs . http : stackoverflow.com a 22111180 560648 Crap.. . Comment : Here http : stackoverflow.com questions 19729441 c11-backwards-compatibility s some related information . To resolve it you might want to ship two versions 03 11 .. . Answer : In my company we use gcc 5.1.0 compiled and used on CentOS 5.5 with old gcc on-board . When we deploy our application we also redistribute libstdc++.so and libgcc s.so compiled from gcc 5.1.0 sources . For example : .. . .. . And for starting the binary correctly we execute : .. . .. . Hope it helps . Drawbacks : At least you can t use native gdb on such an environment because DWARF format incompatibilities .", "Question : Can std : : string s throw under any circumstances Is this regulated by the standard interested in C++03 in case there are differences Comment : I don t have 03 handy but in 11 the move-constructor is the only one marked noexcept . Comment : I expected move constructors to be noexcept in C++11 and copy constructors to be allowed to throw for obvious reasons but an empty constructor.. . I m sure it can be special-cased to not allocate anything but is it done like that is the question . .. . Answer : Sure if allocation isn t possible for any reason it would throw", "Question : Local type as template argument is forbidden in C++03 : .. . .. . Is there any directives in Standard about checking this rule in case of template is not instantiated Is it possible to be sure that this rule is checked only after template instantiation attempt no instantiation compilation success Comment : May be std : : static-assert http : en.cppreference.com w cpp language static-assert could help to do so . Comment : It s not present in C++ 2003 Comment : Here s some code how to implement such yourself with older c++ versions : github.com makulik StaticInterfaces https : github.com makulik StaticInterfaces Comment : @ How could static-assert help here Comment : @Constructor : As I also explain in my answer static-assert can help here . Because this is typical question of the form How do I use X to do Y where the answer is inevitably use Z instead . Fortunately Y is mentioned so we can say that static-assert is the sought-for Z . .. . Answer : There is no such directive in C++03 because .. . .. . 1 . There are no directives in C++03 and .. . 2 . the rule does not say that instantiating template with local type as parameter in an error it says using local type as template parameter is an error . It is not supposed to be success if the template is not instantiated . On the other hand some compilers permit local types as template parameters e.g . Visual C++ no it does not follow standard but that s life so you can t use that to force compilation failure anyway . If you need to fail compilation when some combination is attempted use the standard static-assert . You can use the Boost.Static Assert http : www.boost.org doc html boost staticassert.html implementation the implementation linked by http : github.com makulik StaticInterfaces in comments or the simple implementation in this other question answer http : stackoverflow.com a 6765840 201725 1 .. . .. . 1I am not sure whether it s correct though I think that implementation may fail even if not instantiated unless the argument is argument-dependent in the enclosing template . Comment : There s also support in the Loki library http : loki-lib.sourceforge.net which is a bit more lightweight than boost IMHO . Comment : @ : I can t find any documentation for it there though . Comment : Yeah Loki s documentation is poor you should best have access to Alexandrescu s book . Comment : Yes it is well described in his Modern C++ Design book . His implementation of a static-assert is described at the beginning of the second chapter as I remember . Comment : Now I see that Z part is not so obvious . Static assert is still not necessary here . To disable Do T overload one should simply not to implement it : template typename T void Do T .", "Question : Is it possible for C++ code to conform to both the C++03 http : en.wikipedia.org wiki C++03 standard and the C++11 http : en.wikipedia.org wiki C++11 standard but do different things depending on under which standard it is being compiled Comment : I m pretty sure auto could result in a situation like this Comment : Yes . One example is when used in a template . You can come up with a situation where it can compile for both standards . Another one that I m sure would be easy to find changes for is in initialization . Comment : Here s a nice article on the situation : gustedt.wordpress.com 2013 12 15 http : gustedt.wordpress.com 2013 12 15 a-disimprovement-observed-from-the-outside-right-angle-brackets Comment : @OMGtechy : I don t think auto can cause this . With the old meaning an auto declaration requires a type name with the new meaning a type name is not permitted . Comment : Closing this as too broad would be a shame this is question likely to be asked many times and it would be good to have a solid canonical question to point to that is not closed . .. . Answer : Here s another example : .. . .. . Prints : .. . .. . See the result on Coliru http : coliru.stacked-crooked.com a 760c5a986815c70c", "Question : Is it possible for C++ code to conform to both the C++03 http : en.wikipedia.org wiki C++03 standard and the C++11 http : en.wikipedia.org wiki C++11 standard but do different things depending on under which standard it is being compiled Comment : I m pretty sure auto could result in a situation like this Comment : Yes . One example is when used in a template . You can come up with a situation where it can compile for both standards . Another one that I m sure would be easy to find changes for is in initialization . Comment : Here s a nice article on the situation : gustedt.wordpress.com 2013 12 15 http : gustedt.wordpress.com 2013 12 15 a-disimprovement-observed-from-the-outside-right-angle-brackets Comment : @OMGtechy : I don t think auto can cause this . With the old meaning an auto declaration requires a type name with the new meaning a type name is not permitted . Comment : Closing this as too broad would be a shame this is question likely to be asked many times and it would be good to have a solid canonical question to point to that is not closed . .. . Answer : This thread What differences if any between C++03 and C++0x can be detected at run-time http : stackoverflow.com a 6473994 809044 has examples copied from that thread to determine language differences for example by exploiting C++11 reference collapsing : .. . .. . and c++11 allowing local types as template parameters :", "Question : GCC is great with ABI-compatibility as long as you use the same C++ standard 1 https : gcc.gnu.org onlinedocs libstdc++ manual abi.html . But it strikes me that if a shared library compiled by GCC 4.3 in C++03 mode exposes say a std : : string this is going to be a different std : : string than that understood by an executable compiled by GCC 4.8 in C++11 mode . The reason I ask is that I am planning to deploy a program compiled by GCC 4.8 in C++11 mode on CentOS 6 whose maximum packaged GCC is 4.3.. . and some of the shared-libraries be they third-party C++ libraries or more system-level stuff will presumably therefore all be C++03 . But if that were the case we d never be able to deploy any C++11 programs on older Linux distributions which seems unlikely . Am I naive to think there might be a problem here And if there is how can I resolve it Comment : inb4 just try it Well it appearing to work doesn t mean it s supposed to Comment : I couldn t imagine it could work safely . As you say if you pass around std : : strings between different parts they will likely have different layout or implementation . Even if you don t expose them in interfaces you may get symbol clashes I presume . Comment : @JohanLundberg : Mm indeed . So there must be some general guidance for this kind of thing . Or does nobody deploy C++11 with third-party CentOS-packaged dependencies on CentOS 6 Comment : If you can t build your code with the standard CentOS 6 g++ glibc libstdc++ then no it s not going to run on standard CentOS 6 installs . http : stackoverflow.com a 22111180 560648 Crap.. . Comment : Here http : stackoverflow.com questions 19729441 c11-backwards-compatibility s some related information . To resolve it you might want to ship two versions 03 11 .. . Answer : If you build your C++11 program with the define GLIBCXX USE CXX11 ABI 0 see this https : gcc.gnu.org onlinedocs libstdc++ manual using dual abi.html and the option --abi-version 2 see this https : gcc.gnu.org onlinedocs gcc C 002b 002b-Dialect-Options.html you should be compatible with any library build with GCC 4.3 including libstdc++ . The default ABI version was 2 through 4.9 it seems like a safe assumption that CentOS uses the default ABI . The GLIBCXX USE CXX11 ABI macro will affect the standard-library s types to use the same layout as the pre C++11 version . This will introduce some C++11 conformance issues the reason why they were changed in the first place things like the complexity of std : : list : : size . The --abi-version command-line option affects the compiler s ABI calling conventions name-mangling etc . The default ABI was 2 from 3.4 through 4.9 . Comment : Did you mean ABI version 2 Comment : Ooh this is interesting . It seems that besides those changes I can still use the newer types like std : : thread as long as I statically link newer libstdc++ for my own purposes Because you can t have a conflict with something that didn t exist at all before.. . That would then be by far the easiest approach for me . Comment : oh yeah it does say abi version 2 was default through 4.9 . It s a bit unclear I suppose but you re probably right . 2 seems like a better assumption .", "Question : Is it possible for C++ code to conform to both the C++03 http : en.wikipedia.org wiki C++03 standard and the C++11 http : en.wikipedia.org wiki C++11 standard but do different things depending on under which standard it is being compiled Comment : I m pretty sure auto could result in a situation like this Comment : Yes . One example is when used in a template . You can come up with a situation where it can compile for both standards . Another one that I m sure would be easy to find changes for is in initialization . Comment : Here s a nice article on the situation : gustedt.wordpress.com 2013 12 15 http : gustedt.wordpress.com 2013 12 15 a-disimprovement-observed-from-the-outside-right-angle-brackets Comment : @OMGtechy : I don t think auto can cause this . With the old meaning an auto declaration requires a type name with the new meaning a type name is not permitted . Comment : Closing this as too broad would be a shame this is question likely to be asked many times and it would be good to have a solid canonical question to point to that is not closed . .. . Answer : The answer is a definite yes . On the plus side there is : .. . .. . Code that previously implicitly copied objects will now implicitly move them when possible . On the negative side several examples are listed in the appendix C of the standard . Even though there are many more negative ones than positive each one of them is much less likely to occur . String literals .. . .. . and .. . .. . Type conversions of 0 .. . .. . In C++11 only literals are integer null-pointer constants : .. . .. . Rounded results after integer-division and modulo .. . .. . In C++03 the compiler was allowed to either round towards 0 or towards negative infinity . In C++11 it is mandatory to round towards 0 .. . .. . Whitespaces between nested template closing braces vs .. . .. . Inside an specialization or instantiation the might instead be interpreted as an right-shift in C++03 . This is more likely to break existing code though : from http : gustedt.wordpress.com 2013 12 15 a-disimprovement-observed-from-the-outside-right-angle-brackets .. . .. . Operator new may now throw other exceptions than std : : bad-alloc .. . .. . User-declared destructors have an implicit exception specification example from What breaking changes are introduced in C++11 http : stackoverflow.com questions 6399615 what-breaking-changes-are-introduced-in-c11 .. . .. . size of containers is now required to run in O 1 .. . .. . std : : ios base : : failure does not derive from std : : exception anymore .. . .. . Code that expects it to derive directly from std : : exception might behave differently . Comment : Nice +1 . Another one is that a user declared destructor now is implicitly noexecpt true so throw in a destructor will now call std : : terminate . But I hope anyone who wrote such code will be happy about this Comment : But std : : system error itself is indirectly derived from std : : exception so catch std : : exception still catches std : : ios base : : failure . Comment : @user2665887 you are right . it can still influence the behaviour of a program but i cannot think of a minimal example right now . Comment : I m super confused as what you say about operator new is accurate it can now throw std : : bad array new length but your example doesn t show that at all . The code you show is the same in C++03 and C++11 AFAIK . Comment : The flip side of list : : size being O 1 is that splice is now O n", "Question : How to test at compile-time whether class B is derived from std : : vector How to test at compile-time whether class B is derived from template family Using : Comment : With template metaprogramming it is important to make it explicit whether you need a C++03 only or a C++11 solution is good although I am not sure that C++11 can help here . And as a smart remark given that you should never inherit from standard containers the original trait is simple : false : P Comment : C++03 . I use msvc 2010 compiler . Therefore I agree to use decltype in addition . std : : vector is for example ony . If you do not know C++03 solution then C++11 solution is welcome also . .. . Answer : I had the same situation that I needed to know if a class is derived from a vector like -class . Unfortunately there is no C++-11 or variadic macros allowed in my project . So my solution was a mixture of Kerrek s answer http : stackoverflow.com a 12182195 2056545 and this article http : www.gotw.ca publications mxc++-item-4.htm with some googletest-code at the end : .. . .. . A common solution for any templates I think would not be possible to define without usage of C++-11 or higher .", "Question : Is it possible to initialize a vector of vectors of non-copyable objects also .. . .. . I understand why the above code won t compile . What I m asking is whether there s a workaround . It seems that if std : : vector had a member function like resize from zero that didn t need a copy-constructor then this would be doable . My question is about C++03 if this makes a difference Comment : Yes it makes a difference - there are move-semantics and emplace back in C++11 . Comment : Yes it s possible in C++11 - your code would only fail to work if the type was not default constructible and not movable . Comment : If you use primitive-types instead of obj . your code could work . But based on your question . You cannot do what you want . You either choose c++11 or you do some puch bcck s . Comment : @BufBills You mean push-back s Those need copy-constructors . Comment : Just to be clear would a C++11 approach that covers non-copyable non-movable objects be acceptable or do you really need a C++03 approach I still don t think it would then work for vector but a different container type might work . .. . Answer : This is not possible C++03 requires that elements of a vector be CopyConstructible and Assignable . Rreference : C++03 lib.containers.requirements 3 .. . .. . The type of objects stored in these components must meet the requirements of CopyConstructible types 20.1.3 and the additional requirements of Assignable types . where these components means deque list queue stack vector map set bitset . There may or may not be some way to have it appear to work on a particular compiler but that is beyond the scope of Standard C++ .", "Question : For C++03 the standard says that between left and right operand of operator there is a sequence point so that all side effects of left operator have taken place before right operator is accessed . So .. . .. . is well defined and is guaranteed to output 0 . But what is about this question : is right operand only evaluated if left operand is not 0 It seems to be a detail but to me the standard guarantees only the sequence point between the operands not that right operand is never evaluated accessed in dependence of left one . E.g . Is this well defined pos could be from begin on 10 or reaches 10 . The left operand has no side effects which concur with right operand . Have I the guarantee that arr 10 0 is never performed Edit : .. . .. . Thanks to the comments and answers it is clear now : .. . .. . is the sequence point meaning . is the short-circuit meaning . The first without the second would make my example undefined . Thanks . Comment : The standard says that between left and right operand of operator there is a sequence point . I doubt . Could you quote the actual text Comment : @Nawaz en.wikipedia.org wiki Sequence point http : en.wikipedia.org wiki Sequence point Comment : @Nawaz : depends on version doesn t it C++03 would have said sequence point C++11 will say sequenced before . Comment : 5.14p2 : The result is a bool . If the second expression is evaluated every value computation and side effect associated with the first expression is sequenced before every value computation and side effect associated with the second expression . Comment : @LuchianGrigore : Wikipedia is not the standard . .. . Answer : 5.14p1 of C++11 last sentence : .. . .. . Unlike guarantees left-to-right evaluation : the second operand is not evaluated if the first operand is false . So yes it s guaranteed . Comment : I d suggest adding paragraph 2 as well since there seems to be some confusion in the comments about sequencing and side effects . Comment : Sorry I meant C++03 edited it.. . Comment : @mb84 : The wording and paragraph number are identical in C++03 . Comment : 5.14p1 of the 1998 and 2003 editions of the ISO C++ standard say exactly the same thing . Comment : @godel9 Where can I read paragraph 2 So this cited sentence is more than a sequence point Evaluation of second operand not only waits for side effects of first one to take place its happening also depends of value of first operand .", "Question : Possible Duplicate : .. . C++ operator guarantees http : stackoverflow.com questions 12710801 c-operator-guarantees .. . .. . In c++ 98 03 .. . .. . 5.6-4 .. . .. . The binary operator yields the quotient and the binary operator yields the remainder from the division of the first expression by the second . If the second operand of or is zero the behavior is undefined otherwise a b b + a b is equal to a . If both operands are nonnegative then the remainder is nonnegative if not the sign of the remainder is implementation-defined . In c++ 11 : .. . .. . 5.6 -4 .. . .. . The binary operator yields the quotient and the binary operator yields the remainder from the division of the first expression by the second . If the second operand of or is zero the behavior is undefined . For integral operands the operator yields the algebraic quotient with any fractional part discarded 81 if the quotient a b is representable in the type of the result a b b + a b is equal to a . As you can see the implementation-defined for the sign bit is missing what happens to it Comment : What are you trying to do And how this comes as a obstacle for that Comment : @AnandVeeramani : some people just want to avoid undefined or in this case implementation-defined behavior . I m glad he asked this I have avoided modulo when the values could have been negative . Comment : Also see : stackoverflow.com q 3609572 485561 http : stackoverflow.com q 3609572 485561 Comment : C++ 98 03 also had this footnote : According to work underway toward the revision of ISO C the preferred algorithm for integer-division follows the rules defined in the ISO Fortran standard ISO IEC 1539 : 1991 in which the quotient is always rounded toward zero C++11 simply made that a requirement of the standard as C99 did for C . Removing the implementation defined part of the operator is a consequence of that . Comment : @moswald : you would have to avoid using operator in those cases as well since it is similarly implementation defined . .. . Answer : The behaviour of was tightened in C++11 and is now fully specified apart from division by 0 . The combination of truncation towards zero and the identity a b b + a b a implies that a b is always positive for positive a and negative for negative a . .. . .. . The mathematical reason for this is as follows : .. . .. . Let be mathematical division and be C++ division . For any a and b we have a b a b + f where f is the fractional part and from the standard we also have a b b + a b a . a b is known to truncate towards 0 so we know that the fractional part will always be positive if a b is positive and negative is a b is negative : .. . .. . sign f sign a sign b .. . .. . a b a b + f can be rearranged to give a b a b - f . a can be expanded as a b b : .. . .. . a b b + a b a a b - f b+a b a b b . Now the left hand side can also be expanded : .. . .. . a b b - f b + a b a b b .. . .. . a b f b .. . .. . Recall from earlier that sign f sign a sign b so : .. . .. . sign a b sign f b sign a sign b sign b sign a Comment : @mata : The sign is only determined by a you have messed up the arithmetic there -1 2 -0.5 0 after truncation so 0 + x -1 so x -1 . Comment : @Mankarse : The equation is always there as in 03 standard the only thing new seems to be what s so called truncation towards zero . What this truncation towards zero all about Comment : @Gob00st : Truncation towards zero means that the fractional part of the result-of a division is discarded in the result so 5 4 1.25 1 discard 0.25 and -7 4 -1.75 -1 discard -0.75 . Comment : Yes that s always there isn t it What I meant was how s this implies that a b is always positive for positive a and negative for negative a . Whereas in 03 standard is not . Comment : @JorgeLuque : Technically you need to buy the C++ Standard from ISO of from one of the national standards bodies but the final draft of the standard http : www.open-std.org jtc1 sc22 wg21 docs papers 2013 n3690.pdf is freely available and is usually very very similar to the official standard . See isocpp.org https : isocpp.org std the-standard .", "Question : Can std : : string s throw under any circumstances Is this regulated by the standard interested in C++03 in case there are differences Comment : I don t have 03 handy but in 11 the move-constructor is the only one marked noexcept . Comment : I expected move constructors to be noexcept in C++11 and copy constructors to be allowed to throw for obvious reasons but an empty constructor.. . I m sure it can be special-cased to not allocate anything but is it done like that is the question . .. . Answer : This was changed by WG21 N4002 http : www.open-std.org jtc1 sc22 wg21 docs papers 2014 n4002.pdf . The first working paper contains it I see is WG21 N4296 http : www.open-std.org jtc1 sc22 wg21 docs papers 2014 n4296.pdf : 21.4.2 construct copy destroy : basic string noexcept : basic string Allocator Comment : Nice catch thanks" ] }
[ "yes-answer-long", "yes-answer-short" ]
c++
UNK_RELATION
utf@encoding@60
utf -- unicode transformation format 8 16 32 . . .used for @placeholder unicode code points .
{ "confidence": [ 67.72565460205078, 60.0075569152832, 59.84580612182617, 58.376285552978516, 58.19463348388672, 57.44083786010742, 55.012203216552734, 54.696773529052734, 54.696773529052734, 52.87944412231445, 52.676021575927734, 51.8551025390625, 51.658416748046875, 51.28813552856445, 51.03895950317383, 50.945396423339844, 50.84610366821289, 50.79396438598633, 50.063377380371094, 49.84113311767578, 49.2585334777832, 49.25106430053711, 49.25106430053711, 49.25106430053711, 49.25106430053711, 49.25106430053711, 47.730194091796875, 47.1202278137207, 46.92631530761719, 46.843326568603516, 46.83794403076172, 45.84556198120117, 45.645320892333984, 45.63015365600586, 45.57082748413086, 44.60658645629883, 44.39213180541992, 44.05842208862305, 43.57981872558594, 43.41807556152344, 43.34849166870117, 43.29362487792969, 43.18702697753906, 43.067203521728516, 43.067203521728516, 43.067203521728516, 43.01116180419922, 42.68404006958008, 42.549991607666016, 42.44322967529297, 42.25489044189453, 42.25489044189453, 42.25489044189453, 42.240570068359375, 41.85841751098633, 41.83268737792969, 41.219993591308594, 41.0203742980957, 40.955989837646484, 40.94282913208008, 40.522789001464844, 40.49433135986328, 40.099952697753906, 40.09436798095703, 40.05615997314453, 40.054046630859375, 39.900455474853516, 39.891754150390625, 39.511383056640625, 39.41660690307617, 39.41660690307617, 39.41660690307617, 39.41660690307617, 39.41660690307617, 39.41660690307617, 39.35563659667969, 39.29721450805664, 39.158260345458984, 39.05934524536133, 39.05934524536133, 39.05934524536133, 38.749324798583984, 38.68159484863281, 38.60429382324219, 38.60429382324219, 38.60429382324219, 38.60429382324219, 38.60429382324219, 38.5712890625, 38.41850662231445, 38.365745544433594, 38.3038444519043, 38.278690338134766, 38.191856384277344, 38.02201461791992, 37.929054260253906, 37.915740966796875, 37.90049362182617, 37.891693115234375, 37.88157653808594 ], "content": [ "Are these UTF-16 code units or Unicode code points", "You probably looking for UTF-8 to Unicode Code Points .", "Yes a string is a sequence of unicode code points which can be encoded in a number of encodings such as UTF-16 or UTF-8 etc .", "They re Unicode code points .", "The number of bytes in UTF-8 and the number of logical characters Unicode code points or UTF-32 characters ultimately don t matter .", "The transformation from 32-bit Unicode code points to UTF-8 byte sequences is described in that article - it is pretty simple to do once you get used to it .", "I understood that the Unicode code points were minimized to make all of the UTF-8 UTF-16 and UTF-32 encodings able to handle the same number of code points .", "Unicode code points 0-127 .", "Chars is the number of Unicode code points .", "Unicode code points are limited to 21 bits which limits UTF-8 to 4 bytes .", "Not all Unicode code points have exactly one 16-bit word in UTF-16 but they all fit in a wchar-t .", "UTF-8 and UTF-16 are two different ways of encoding all of the Unicode code points of which there are far more than just 65535 .", "As pure text composed from Unicode code points .", "Basically strings store a sequence of UTF-16 code units.. . which isn t the same as storing a sequence of Unicode code points .", "It is the same as UCS-2 except that UTF-16 supports Unicode code points above 0xFFFF which UCS-2 doesn t", "Once you have converted between UTF-8 and standard Unicode code points UTF-32 it should be trivial to get the Latin-1 encoding .", "There are at least 1 114 111 valid Unicode code points .", "However the range of Unicode scalar values is a restriction on the range of Unicode code points .", "Related stackoverflow.com questions 7106470 http : stackoverflow.com questions 7106470 utf-8-to-unicode-code-points", "UTF-8 UTF-16 and UTF-32 are all Unicode and all represent all Unicode characters that are currently mapped of course .", "Unicode code points beyond U+FFFF are represented by surrogate-pairs .", "Thanks to wildplasser I m able to convert between UTF-8 and Unicode code points .", "Unicode code points U+0000..U+007F are encoded in UTF-8 as a single byte 0x00..0x7F .", "There are more rules for Unicode code points U+0800 upwards that require 3 or 4 but not more bytes for the UTF-8 representation .", "There is actually a formulaic way of translating Unicode code points to UTF-8 characters but that s a whole different SO question .", "UTF-8 fills Unicode code points as follows : .. . .. . Where the right most bit is the least significant one for the number .", "UTF-32 on the other hand is fixed width all Unicode code points can be encoded in a single 32-bit code unit .", "Internally since Perl 5.8.1 all strings are kept as Unicode Code-points .", "To clarify : u blah in Python conceptually represents a sequence of Unicode code points .", "If so that s no BOM issue just an issue of the Unicode code points not being encoded into a UTF encoding but output as code points .", "And UTF-8 8-bit Unicode Transformation Format is a variable-length character-encoding for Unicode .", "Finally the U+ notation is used for Unicode code points as abstract integers not code units in UTF8 or UTF16 or anything else .", "@Sir Psycho : UTF-8 UTF-16 and UTF-32 are all able to encode all the characters of Unicode .", "So I think you want the Unicode code points .", "UTF-8 was another system for storing your string of Unicode code points those magic U+ numbers in memory using 8 bit bytes .", "What s the basis for Unicode and why the need for UTF-8 or UTF-16", "So it appears a character-per-character translation is somehow attempted where the UTF-8 representation of two of the characters is interpreted as Unicode code points instead .", "UTF-16 isn t really fixed width some Unicode code points are one 16-bit code unit others require two 16-bit code units just like UTF-8 isn t fixed width some Unicode code points require one 8-bit code units others require two three or even four 8-bit code units but not five or six despite the comment from Joel s article that mentions the possibility .", "Unicode code points u+0080..U+07FF including HEBREW LETTER DALET U+05D3 are encoded in UTF-8 as two bytes .", "However to simplify the way you detect those pairs rather than having some external envelope format as UTF-8 does the actual 16-bit values that are used by the surrogates are deliberately leaked back into the Unicode encoding and left out of the encoding - that is the surrogate values 0xD800 to 0xDFFF are not valid Unicode code points .", "Code points between 128 255 should be understood by to be the corresponding Unicode code points not just unpropertied binary values .", "UTF-8 is a nice way to encode unicode characters but we can encode also in UTF-16 or UTF-32 .", "UTF-32 is an encoding for Unicode .", "Note that it accepts Unicode UTF-16 strings not UTF-8 .", "Excel s Unicode text is UTF-16 not UTF-8 as asked for in the question .", "UTF-8 and UTF-16 are two different encodings of the world standard Unicode .", "The maximum valid code point in Unicode is U+10FFFF which makes it a 21-bit code set but not all 21-bit integers are valid Unicode code points specifically the values from 0x11000 to 0x1FFFF are not valid Unicode code points .", "UTF-16 is a way of representing Unicode but it is not The Unicode encoding .", "Unicode UTF-16 .", "Background : UTF-16 represents a sequence of Unicode characters code points as a sequence of 16-bit code units .", "UTF-8 and UTF-16 can both represent all Unicode characters .", "By Unicode do you mean UTF-8 or UTF-16", "What about other Unicode encoding such as UTF-8 or UTF-16", "Unicode .. . is a set of characters used around the world .. . UTF-8 .. . a character-encoding capable of encoding all possible characters called code points in Unicode .", "An int value represents all Unicode code points including supplementary code points .", "UTF-8 is an encoding of Unicode .", "If you expect heavy use of Unicode code points outside of the 7-bit ASCII range then you might find that UTF-16 will be more compact than UTF-8 since some UTF-8 sequences are more than two bytes long .", "UTF-8 IS Unicode .", "It is a composite character that is composed of four Unicode code points U+092A U+094D U+0930 U+0947 .", "I have used the accepted answer here http : stackoverflow.com questions 6240055 manually-converting-unicode-codepoints-into-utf-8-and-utf-16 to manually convert from unicode to UTF-8 code units .", "UTF-32 or UCS-4 is a protocol for encoding Unicode characters that uses exactly 32 bits for each Unicode code point .", "I find that the file s format is Little-endian UTF-16 Unicode .", "The BOM https : en.wikipedia.org wiki Byte order mark is specific to Unicode UTF Unicode Transformation Format encodings .", "It specifies how to store the Unicode code points physically but does not handle sorting comparisons etc .", "UTF-16 encodes Unicode into 16-bit values .", "UTF-8 can encode any Unicode character .", "Surrogates are not valid unicode code points so you shouldn t rely on them being preserved in strings or length working properly .", "All UTF encodings are equally capable of encoding all possible Unicode characters there s no difference in that regard between UTF-8 UTF-16 and UTF-32 .", "I need to escape unicode characters within a input string to either UTF-16 or UTF-32 escape sequences .", ".. . .. . Composite characters on the other hand are something much higher-level : They are visual units graphemes that are composed of multiple Unicode code points .", "@durron597 : I think you re mistaken initializing a String with a char of Unicode code points is correct .", "You need at least 24 bits to represent all 1 000 000+ Unicode code points .", "ElementTree appears to be parsing those into Unicode code points - causing the writing of the file in the cp1252 encoding to fail .", "Unicode code points beyond the latin-1 plane are shown as u... . escape sequences .", "The only real solution would be to have a list of all unicode code points corresponding to emojis .", "OS default encoding : UTF-8 .. . .. . convert UTF-8 str to UTF-16 in python : .. . .. . As you can see unicode is bridge of converting utf-8 str to utf-16 str and it s easy to understand .", "Unicode is just the character set representable as UTF7 8 16 32", "What are the differences between UTF-8 UTF-16 and UTF-32", "TL DR .. . Unicode UTF-8 .", "These are Unicode strings represented in UTF-8 .", "UTF-8 is not a language it is a Unicode encoding .", "A QChar is the more convenient UTF-16 encoding of all the Unicode code-points from 0x00 to 0xffff which covers the majority of the languages and symbols so far defined and in common use .", "UTF-32 is a fixed length encoding for code points but Unicode is a fundamentally variable-length representation of characters in that multiple code points can be used to represent a character .", "Therefore how you express a unicode code points in a PHP script depends on the encoding you want to use .", "all have to decode the characters to unicode code points before such operations can be performed there are some shortcuts though .", "@R.MartinhoFernandes The isValidCodePoint function determines whether an int value falls within the range of Unicode code points .", "How can I convert them to Unicode code points such as U+1F62C with the standard-library", "To check my understanding I use UNISTR by passing in an ASCII string which may contain escaped Unicode code points .", "It is just Unicode or UTF-16 if you like .", "UTF-32 is fixed size an UNICODE compliant .", "You must first select the proper locale with : .. . .. . or .. . .. . And then use printf or fprintf with the lc format : .. . .. . This will work only for Unicode code points small enough to fit in a wchar-t .", "A string in .NET is actually just an array of 16-bit unicode code-points characters so a string isn t in any particular encoding .", "Unicode supports 1 112 114 code points .", "In Unicode versions of Delphi Utf8String is a string with a UTF-8 code page behind it .", "You realize that Unicode is not an encoding and that UTF-8 is part of Unicode", "Latin-1 encodes just the first 256 code points of the Unicode character set whereas UTF-8 can be used to encode all code points .", "Default encoding : Unicode UTF-8 2 .", "Then decode utf-8 is used to move from str to unicode again .", "very related : UTF-8 vs Unicode http : stackoverflow.com questions 643694 utf-8-vs-unicode", "There are no such things as UTF-32 and UTF-16 and UTF-8 characters ." ] }
{ "confidence": [ 71.16554260253906, 70.52841186523438, 68.20223999023438, 67.39627838134766, 66.88825988769531, 64.90397644042969, 63.37171173095703, 62.771968841552734, 60.27425765991211, 59.60173416137695, 59.47494125366211, 59.26957702636719, 59.08317184448242, 58.83414840698242, 58.814491271972656, 58.14872360229492, 58.08084487915039, 57.811500549316406, 57.423622131347656, 57.39664077758789 ], "content": [ "Question : I have read many articles in order to know what is the maximum number of the Unicode code points but I did not find a final answer . I understood that the Unicode code points were minimized to make all of the UTF-8 UTF-16 and UTF-32 encodings able to handle the same number of code points . But what is this number of code points The most frequent answer I encountered is that Unicode code points are in the range of 0x000000 to 0x10FFFF 1 114 112 code points but I have also read in other places that it is 1 112 114 code points . So is there a one number to be given or is the issue more complicated than that Comment : possible duplicate of How many characters can be mapped with Unicode http : stackoverflow.com questions 5924105 how-many-characters-can-be-mapped-with-unicode .. . Answer : yes all the code points that can t be represented in UTF-16 including using surrogates have been declared invalid . U+10FFD seems to be the higest code point but the surrogates u+00FFFE and u+00FFFF aren t usable code points so the total count is a bit lower .", "Question : In Unicode what is the difference between composite characters and surrogate-pairs To me they sound like similar things - two characters to represent one character . What differentiates these two concepts .. . Answer : Surrogate pairs are a weird wart in Unicode . Unicode itself is nothing other than an abstract assignment of meaning to numbers . That s what an encoding is . Capital-letter-A Greek-alternate-terminal-sigma Klingon-closing-bracket-2 etc . currently numbers up to about 221 are available though not all are in use . In the context of Unicode each number is know as a code point . However the Unicode suite as a whole contains more than just this encoding . It also contains technologies to serialize code points . This is essentially just an exercise in serializing unsigned integers . Three subfamilies of technologies are specified : UTF-32 UTF-8 and UTF-16 . UTF-32 simply expresses every code-point as a 32-bit unsigned-integer . That s easy . Two variants exist for big and little endian respectively . Each 32-bit serialized integer is called the code unit of this format and this is a fixed-width format one code point per code unit . UTF-8 is a clever multi-byte format in which code points take up anything from one to six 8-bit bytes . This format is very portable since it has no ordering issues and since it is pretty compact for English near-English and computer code . The code unit of UTF-8 is one byte and this is a variable-width format 1 6 code units per code point . Finally there s UTF-16 : Initially people thought Unicode could do with only 216 numbers so this was initially deemed to be fixed-width with 16-bit code units . However it eventually became clear that we needed larger numbers . So UTF-16 is now also a variable-width format but the way this is achieved is that certain 16-bit code units act as indicators that they are part of a two-unit pair the surrogate pair . However to simplify the way you detect those pairs rather than having some external envelope format as UTF-8 does the actual 16-bit values that are used by the surrogates are deliberately leaked back into the Unicode encoding and left out of the encoding - that is the surrogate values 0xD800 to 0xDFFF are not valid Unicode code points . So in summary surrogates are the result-of forcing a serialization format for Unicode back into the encoding and distorting the design of the encoding to accommodate the serialization format . This is perhaps an unfortunate historical accident which is somewhat pointless and unsightly in retrospect but it s what we have and what we need to live with . .. . .. . Composite characters on the other hand are something much higher-level : They are visual units graphemes that are composed of multiple Unicode code points . Sometimes people refer to code points themselves as characters but that s a little bit misleading since characters should really be graphemes and they can consist of several components e.g . a base letter plus diacritics and modifiers . Comment : Wow what a great answer . Comment : @SachinKainth : Thanks glad you like it - everyone has their pet interests I suppose : - Comment : Surrogate values are valid code points they just aren t characters see unicode.org faq utf bom.html utf16-2 http : www.unicode.org faq utf bom.html utf16-2", "Question : I have heard many times when reading about Unicode that UTF-32 is a fixed width encoding . Taking fixed width encoding to mean a code which maps source symbols to a set number of bits and assuming that the source symbols in question are Unicode code points this all makes sense . However if you think of the underlying language of source symbols being graphemes things get a lot more complicated . So my question is this in the sense of graphemes is UTF-32 truly a fixed length encoding And if not is there a possible fixed length encoding in that sense Comment : Read this : The Absolute Minimum Every Software Developer Absolutely Positively Must Know About Unicode and Character Sets No Excuses http : www.joelonsoftware.com articles Unicode.html . And yes UTF-16 and UTF-32 are both fixed width . UTF-8 perhaps surprisingly isn t . Comment : @paulsm4 I ve read it just a few months ago . I love it as a starter guide to Unicode but I don t see how it answers my second question . Comment : @paulsm4 : UTF-16 isn t really fixed width some Unicode characters code points are one 16-bit code unit others require two 16-bit code units . Just like UTF-8 isn t fixed width some Unicode characters code points require one 8-bit code units others require two three or even four 8-bit code units . UTF-32 on the other hand is fixed width all characters code points are encoded in a single 32-bit code unit . Comment : Belongs on Programmers stack exchange . This Question is more theory and not problem-solution . programmers.stackexchange.com http : programmers.stackexchange.com Comment : What do you mean by think of the underlying language of source symbols being graphemes If it makes things more complicated what s the advantage of thinking like that Indeed what s the benefit of thinking that way And if you mean something to do with it can take multiple Unicode code points to get a complete character with associated diacritics combining markers misc then yes even UTF-32 isn t necessarily fixed width and there is no fixed width encoding for Unicode . .. . Answer : UTF-32 is a fixed width Encoding and by the way the only Unicode Encoding that maps the DWORD value directly to a Unicode codepoint . But there is a Limitation of values the highest value is 0x10FFFF and the entire high- as well as low-surrogate range is invalid within UTF-32 .", "Question : I have heard many times when reading about Unicode that UTF-32 is a fixed width encoding . Taking fixed width encoding to mean a code which maps source symbols to a set number of bits and assuming that the source symbols in question are Unicode code points this all makes sense . However if you think of the underlying language of source symbols being graphemes things get a lot more complicated . So my question is this in the sense of graphemes is UTF-32 truly a fixed length encoding And if not is there a possible fixed length encoding in that sense Comment : Read this : The Absolute Minimum Every Software Developer Absolutely Positively Must Know About Unicode and Character Sets No Excuses http : www.joelonsoftware.com articles Unicode.html . And yes UTF-16 and UTF-32 are both fixed width . UTF-8 perhaps surprisingly isn t . Comment : @paulsm4 I ve read it just a few months ago . I love it as a starter guide to Unicode but I don t see how it answers my second question . Comment : @paulsm4 : UTF-16 isn t really fixed width some Unicode characters code points are one 16-bit code unit others require two 16-bit code units . Just like UTF-8 isn t fixed width some Unicode characters code points require one 8-bit code units others require two three or even four 8-bit code units . UTF-32 on the other hand is fixed width all characters code points are encoded in a single 32-bit code unit . Comment : Belongs on Programmers stack exchange . This Question is more theory and not problem-solution . programmers.stackexchange.com http : programmers.stackexchange.com Comment : What do you mean by think of the underlying language of source symbols being graphemes If it makes things more complicated what s the advantage of thinking like that Indeed what s the benefit of thinking that way And if you mean something to do with it can take multiple Unicode code points to get a complete character with associated diacritics combining markers misc then yes even UTF-32 isn t necessarily fixed width and there is no fixed width encoding for Unicode . .. . Answer : One of the comments referenced Joel Spolsky s The Absolute Minimum Every Software Developer Absolutely Positively Must Know About Unicode and Character Sets No Excuses http : www.joelonsoftware.com articles Unicode.html article which was written in 2003 . At the time it served as a wake-up call it probably still does in some places . However it is not without its minor but significant technical problems though the overall thesis you need to know about Unicode and you need to know which encoding a string is in remains valid . The comment then continued : .. . .. . And yes UTF-16 and UTF-32 are both fixed width . UTF-8 isn t . UTF-16 isn t really fixed width some Unicode code points are one 16-bit code unit others require two 16-bit code units just like UTF-8 isn t fixed width some Unicode code points require one 8-bit code units others require two three or even four 8-bit code units but not five or six despite the comment from Joel s article that mentions the possibility . UTF-32 on the other hand is fixed width all Unicode code points can be encoded in a single 32-bit code unit . Indeed the maximum possible Unicode code point is U+10FFFF so Unicode is a 21-bit code set though it does not use all possible combinations of 21 bits . However code points are not identical to characters let alone graphemes . The Unicode FAQ has a section on Characters and Combining Marks http : unicode.org faq char combmark.html discusses graphemes referencing the glossary http : www.unicode.org glossary grapheme definition . The better word for what end-users think of as characters is grapheme as defined in the Unicode glossary : a minimally distinctive unit of writing in the context of a particular writing system . .. . Graphemes are not necessarily combining character sequences and combining character sequences are not necessarily graphemes . .. . Q : How are characters counted when measuring the length or position of a character in a string http : unicode.org faq char combmark.html 7 .. . .. . A : Computing the length or position of a character in a Unicode string can be a little complicated as there are four different approaches to doing so plus the potential confusion caused by combining characters . The correct choice of which counting method to use depends on what is being counted and what the count or position is used for . To address the question here : .. . .. . If you mean something to do with it can take multiple Unicode code points to get a complete character grapheme with associated diacritics combining markers etc . then yes even UTF-32 isn t necessarily fixed width and there is no fixed width encoding for Unicode . UTF-32 employs a fixed-width encoding for each Unicode code point but since it can take multiple code points to create a complete grapheme even UTF-32 does not have a 1 : 1 mapping between code points and graphemes . Of course you can also find interesting character stacks in some comments on SO . For example : .. . .. . .. . .. . .. . .. . @ s e r n m e B l a b l h b a h . . . .. . .. . .. . .. . .. . .. . Why how do Zalgo pings work http : meta.stackoverflow.com questions 266912 why-how-do-zalgo-pings-work .. . .. . How does Zalgo text work http : stackoverflow.com questions 6579844 how-does-zalgo-text-work .. . .. . .. . .. . .. . .. . x c l y O n i s e o u h . .. . .. . .. . .. . .. . .. . .. . .. . What you see of course depends on the quality of the Unicode support in your browser which in turn depends in part on the quality of the O S support . I get to see different results on two different Macs running rather different versions of Firefox even they re running the same base O S version 10.10.4 Yosemite . The second of those examples can be decoded from UTF-8 into the following sequence of Unicode code points it is only 700 bytes on disk : .. . .. . It gets tricky to decipher which parts of that are graphemes but clearly with all the stacked characters this is not a fixed amount of data per grapheme and there is no sane way to make Unicode work with a fixed width encoding per grapheme because as the Zalgo examples show combining-marks can basically be combined in arbitrary sequences . The first grapheme in the second Zalgo example contains : .. . .. . The next code point is U+0078 LATIN SMALL LETTER X the start of a new grapheme . A couple of the combining-marks appear several times each in that list . Comment : Joel s article might have been a great read but it s sadly riddled with small mistakes like the one you pointed out . Of the top of my head there s also the claim that UTF-8 goes up to 6 bytes which is severely outdated Comment : @R.MartinhoFernandes Yes that s why I don t recommend it although I am sad not to . I don t understand why he doesn t fix it . Comment : @tchrist : I ve revised the commentary on Joel s article in part in the light of your comment and R . Martinho Fernandes s comment . It mentions UTF-7 which I ve not seen serious discussion or use of in a long time . Wikipedia says UTF-7 https : en.wikipedia.org wiki UTF-7 was an experimental protocol defined by some RFCs that were never officially Internet Standards and UTF-7 was never a Unicode standard either and apparently the Internet Mail Consortium recommends against using it . Comment : I think you might want to note explicitly why a fixed length encoding is impossible namely that you can stack combining-marks infinitely But all around a beautiful answer I ll mark it as accepted shortly .", "Question : I have read many articles in order to know what is the maximum number of the Unicode code points but I did not find a final answer . I understood that the Unicode code points were minimized to make all of the UTF-8 UTF-16 and UTF-32 encodings able to handle the same number of code points . But what is this number of code points The most frequent answer I encountered is that Unicode code points are in the range of 0x000000 to 0x10FFFF 1 114 112 code points but I have also read in other places that it is 1 112 114 code points . So is there a one number to be given or is the issue more complicated than that Comment : possible duplicate of How many characters can be mapped with Unicode http : stackoverflow.com questions 5924105 how-many-characters-can-be-mapped-with-unicode .. . Answer : The maximum valid code point in Unicode is U+10FFFF which makes it a 21-bit code set but not all 21-bit integers are valid Unicode code points specifically the values from 0x11000 to 0x1FFFF are not valid Unicode code points . This is where the number 1 114 112 comes from : U+0000 . . U+10FFFF is 1 114 112 values . However there are also a set of code points that are the surrogates for UTF-16 . These are in the range U+D800 . . U+DFFF . This is 2048 code points that are reserved for UTF-16 . 1 114 112 - 2 048 1 112 064 .. . .. . There are also 66 non-characters . These are defined in part in Corrigendum 9 http : www.unicode.org versions corrigendum9.html : 34 values of the form U+nFFFE and U+nFFFF where n is a value 0x00000 0x10000 0xF0000 0x100000 and 32 values U+FDD0 - U+FDEF . Subtracting those too yields 1 111 998 allocatable characters . There are three ranges reserved for private use : U+E000 . . U+F8FF U+F0000 . . U+FFFFD and U+100000 . . U+10FFFD . And the number of values actually assigned depends on the version of Unicode you re looking at . You can find information about the latest version at the Unicode Consortium http : unicode.org versions latest . Amongst other things the Introduction there says : .. . .. . The Unicode Standard Version 7.0 contains 112 956 characters .. . .. . So only about 10 of the available code points have been allocated . I can t account for why you found 1 112 114 as the number of code points . Incidentally the upper limit U+10FFFF is chosen so that all the values in Unicode can be represented in one or two 2-byte coding units in UTF-16 using one high surrogate and one low surrogate to represent values outside the BMP or Basic Multilingual Plane which is the range U+0000 . . U+FFFF . Comment : 1 112 114 look like a typo it a the 000000..10FFFF count with the 2 and 4 transposed . Comment : @user313114 : I suppose it could be a compound typo as you suggest that is at least better than no explanation which is roughly what I ve got at the moment . I could make efforts to account for slightly smaller numbers of characters than the 1 112 064 but not for slightly larger . Comment : See Philipp s answer : stackoverflow.com questions 5924105 http : stackoverflow.com questions 5924105 how-many-characters-can-be-mapped-with-unicode", "Question : What are the differences between UTF-8 UTF-16 and UTF-32 I understand that they will all store Unicode and that each uses a different number of bytes to represent a character . Is there an advantage to choosing one over the other Comment : Watch this video if you are interested in how Unicode works youtube.com watch v MijmeoH9LT4 http : www.youtube.com watch v MijmeoH9LT4 Comment : The video focuses on UTF-8 and yes it explains well how variable-length encoding works and is mostly compatible with computers reading or writing only fixed length ASCII . Unicode guys were smart when designing UTF-8 encoding . .. . Answer : UTF8 is variable 1 to 4 bytes . UTF16 is variable 2 or 4 bytes . UTF32 is fixed 4 bytes . Comment : UTF16 is variable 2 OR 4 bytes Comment : @Philip007 : yes Comment : your answer says 2 TO 4 bytes though . Implying that it could also be 3 bytes . : Comment : UTF8 is actually 1 to 6 bytes . Comment : @Urkle No UTF-8 can not be 5 or 6 bytes . Unicode code points are limited to 21 bits which limits UTF-8 to 4 bytes . You could of course extend the principle of UTF-8 to encode arbitrary large integers but it would not be Unicode . See RFC 3629 .", "Question : I ve never understood the point of UTF-16 encoding . If you need to be able to treat strings as random-access i.e . a code point is the same as a code unit then you need UTF-32 since UTF-16 is still variable-length . If you don t need this then UTF-16 seems like a colossal waste of space compared to UTF-8 . What are the advantages of UTF-16 over UTF-8 and UTF-32 and why do Windows and Java use it as their native encoding Comment : Perhaps you could rephrase your question to not be so subjective and argumentative Comment : If only it was true for UTF-32.. . Play 5 minutes with combining characters en.wikipedia.org wiki Combining character http : en.wikipedia.org wiki Combining character and the tell me how much random everything is : - .. . Answer : UTF-16 allows all of the basic multilingual plane BMP to be represented as single code units . Unicode code points beyond U+FFFF are represented by surrogate-pairs . The interesting thing is that Java and Windows and other systems that use UTF-16 all operate at the code unit level not the Unicode code point level . So the string consisting of the single character U+1D122 MUSICAL SYMBOL F CLEF gets encoded in Java as ud824 udd22 and ud824 udd22 .length 2 not 1 . So it s kind of a hack but it turns out that characters are not variable-length . The advantage of UTF-16 over UTF-8 is that one would give up too much if the same hack were used with UTF-8 . Comment : Me thinks yes me thinks : - that the world would be better if programmers had to know of variable-length characters instead of discovering them casually as it s now a programmer could live years without knowing that a code point could be long 2 if everything was UTF-8 he could keep the head under the earth only for some months : -", "Question : The unicode standard has enough code-points in it that you need 4 bytes to store them all . That s what the UTF-32 encoding does . Yet the UTF-8 encoding somehow squeezes these into much smaller spaces by using something called variable-width encoding . In fact it manages to represent the first 127 characters of US-ASCII in just one byte which looks exactly like real ASCII so you can interpret lots of ascii text as-if it were UTF-8 without doing anything to it . Neat trick . So how does it work I m going to ask and answer my own question here because I just did a bit of reading to figure it out and I thought it might save somebody else some time . Plus maybe somebody can correct me if I ve got some of it wrong . Comment : Straight Unicode does not require 32 bits to encode all its code points . They once did lay claim to that many possible code points but after UTF-8 took off they intentionally limited themselves to 21 bits so that UTF-8 will never exceed 4 bytes per character . Unicode currently requires only 17 bits to hold all possible code points . Without this limitation UTF-8 could have gone to 6 bytes per character . Comment : @Warren : mostly accurate but Unicode is a 21-bit code U+0000 to U+10FFFF . Comment : @Warren : 4-byte-limited UTF-8 could have supported up to U+1FFFFF . The restriction to U+10FFFF was made for the sake of UTF-16 . Comment : @dan04 Do we have any easy explanation of how it is restricted to U+10FFFF by UTF-16 It would be nice to know more about this . Comment : @A-letubby : Because the UTF-16 surrogate codes are allocated such that there are 1024 lead surrogates and 1024 trail surrogates and they can only be used in pairs to make 2 20 about a million additional characters available beyond the BMP . Added to the 2 16 characters available in the BMP this makes 0x110000 possible characters . .. . Answer : UTF-8 was another system for storing your string of Unicode code points those magic U+ numbers in memory using 8 bit bytes . In UTF-8 every code point from 0-127 is stored in a single byte . Only code points 128 and above are stored using 2 3 in fact up to 6 bytes . Excerpt from The Absolute Minimum Every Software Developer Absolutely Positively Must Know About Unicode and Character Sets No Excuses http : www.joelonsoftware.com articles Unicode.html Comment : That s a good article but it seems Joel is wrong regarding the maximum length of the sequence the Wikipedia page shows 1..4 bytes per character only . Comment : As I said above when UTF-8 was first created Unicode lay claim to up to 32-bits for code points not because they really needed it only because 32-bits is a convenient value and they d already blown past the previous limit of 16-bit characters . After UTF-8 proved popular they chose to forever limit the maximum number of code points to 2 21 that being the largest value you can encode with 4 bytes of the UTF-8 scheme . There are still less than 2 17 characters in Unicode so we can more than quadruple the number of characters in Unicode with this new scheme . Comment : Ok but not the explanation asked by OP . Comment : This is not answering the question . Comment : This does not provide an answer to the question . To critique or request clarification from an author leave a comment below their post . - From Review review low-quality-posts 10163216", "Question : I need to escape unicode characters within a input string to either UTF-16 or UTF-32 escape sequences . For example the input string literal Eat drink should be escaped as Eat drink u611b . Here are the rules in a table of sorts : .. . .. . Escape Unicode code point .. . .. . .. . .. . u HEX HEX HEX HEX A Unicode code point in the range U+0 to U+FFFF inclusive corresponding to the encoded hexadecimal value . .. . .. . .. . .. . U HEX HEX HEX HEX HEX HEX HEX HEX A Unicode code point in the range U+0 to U+10FFFF inclusive corresponding to the encoded hexadecimal value . .. . .. . .. . It s simple to detect Unicode characters in general since the second byte is 0 if ASCII : .. . .. . which will not be escaped . With Unicode characters the second byte is never 0 : .. . .. . which is escaped as u611b . But how do I detect UTF-32 a string as it is to be escaped differently than UTF-16 with 8 hex numbers It is not as simple as just checking the size of the string as UTF-16 characters are multibyte e.g . : .. . .. . I m tasked to escape unescaped input string-literals like Eat drink and store them to disk in their escaped literal form Eat drink u611b UTF-16 example If my program finds a UTF-32 character it should escape those too in the form U8902611b UTF-32 example but I can t find a certain way of knowing if I m dealing with UTF-16 or UTF-32 in an input byte array . So just how can I reliably differ UTF-32 from UTF-16 characters within a wchar-t string or byte array Comment : I don t understand what you re asking . In what form are you storing the input Eat drink Your question seems as-if you re storing it as a byte array with unspecified encoding and you re attempting to guess what encoding it might be not for the whole array but for each individual character . Comment : @hvd I m tasked to escape unescaped input string-literals like Eat drink and store them to disk in their escaped literal form Eat drink u611b UTF-16 example If my program finds a UTF-32 character it should escape those too in the form like U8902611b UTF-32 example but I can t find a certain way of knowing if I m dealing with UTF-16 or UTF-32 in an input byte array . Comment : Note that Windows wchar-t is 2 bytes Linux wchar-t is 4 bytes . Windows wchar-t will take UTF-16 but not UTF-32 . Linux wchar-t will take both . If you just have a stream of bytes there is no way of differentiating unless there is a Byte Order Mark BOM character at the start of the sequence . Comment : Literals that contain any character beyond the basic source character set which is a subset of ASCII are implementation-dependent any method of dealing with them is non-portable . Whether your literals are UTF-16 UTF-32 UTF-8 or anything else is determined solely by your implementation and not by the content of the string . Comment : You can either require that requisite knowledge of the input format e.g . implied by platform or via a BOM or other means in order to produce a single transformed output or you can produce both possible outputs . In the absence of encoding knowledge there is no good way to distinguish UTF-16 bytes from UTF-32 bytes other than statistically . There is a statistics-based detector in the Windows API but it has made some quite infamous mis-identifications . .. . Answer : There are many questions within your question I will try to answer the most important ones . Q . I have a C++ string like Eat drink is it a UT8-8 UTF-16 or UTF-32 string .. . A . This is implementation-defined . In many implementations this will be a UTF-8 string but this is not mandated by the standard . Consult your documentation . Q . I have a wide C++ string like L Eat drink is it a UT8-8 UTF-16 or UTF-32 string .. . A . This is implementation-defined . In many implementations this will be a UTF-32 string . In some other implementations it will be a UTF-16 string . Neither is mandated by the standard . Consult your documentation . Q . How can I have portable UT8-8 UTF-16 or UTF-32 C++ string-literals .. . A . In C++11 there is a way : .. . .. . In C++03 no such luck . Q . Does the string Eat drink contain at least one UTF-32 character .. . A . There are no such things as UTF-32 and UTF-16 and UTF-8 characters . There are UTF-32 etc . strings . They all contain Unicode characters . Q . What the heck is a Unicode character .. . It is an element of a coded character set defined by the Unicode standard . In a C++ program it can be represented in various ways the most simple and straightforward one is with a single 32-bit integral value corresponding to the character s code point . I m ignoring composite characters here and equating character and code point unless stated otherwise for simplicity . Q . Given a Unicode character how can I escape it .. . A . Examine its value . If it s between 256 and 65535 print a 2-byte 4 hex digits escape sequence . If it s greater than 65535 print a 3-byte 6 hex digits escape sequence . Otherwise print it as you normally would . Q . Given a UTF-32 encoded string how can I decompose it to characters .. . A . Each element of the string which is called a code unit corresponds to a single character code point . Just take them one by one . Nothing special needs to be done . Q . Given a UTF-16 encoded string how can I decompose it to characters .. . A . Values code units outside of the 0xD800 to 0xDFFF range correspond to the Unicode characters with the same value . For each such value print either a normal character or a 2-byte 4 hex digits escape sequence . Values in the 0xD800 to 0xDFFF range are grouped in pairs each pair representing a single character code point in the U+10000 to U+10FFFF range . For such a pair print a 3-byte 6 hex digits escape sequence . To convert a pair v1 v2 to its character value use this formula : .. . .. . Note the first element of the pair must be in the range of 0xd800..0xdbff and the second one is in 0xdc00..0xdfff otherwise the pair is ill-formed . Q . Given a UTF-8 encoded string how can I decompose it to characters .. . A . The UTF-8 encoding is a bit more complicated than the UTF-16 one and I will not detail it here . There are many descriptions and sample implementations out there on the net look them up . Q . What s up with my L string .. . A . It is a composite character that is composed of four Unicode code points U+092A U+094D U+0930 U+0947 . Note it s not the same as a high code point being represented with a surrogate pair as detailed in the UTF-16 part of the answer . It s a case of character being not the same as code point . Escape each code point separately . At this level of abstraction you are dealing with code points not actual characters anyway . Characters come into play when you e.g . display them for the user or compute their position in a printed text but not when dealing with string encodings . Comment : Is there any easy way to convert a string containing u60A8 u597D u4E16 u754C to unicode string and print it out Comment : @Zingam I don t know what the heck is unicode string . Does my answer somehow imply that there s such thing Comment : If I wrote : a sequence of Unicode characters would that be more technically correct Is there any easy way to convert a sequence of Unicode character escape sequences u60A8 u597D u4E16 u754C to a sequence of unicode characters that are not encoded as character escape sequences Is that an OK question Thank you Comment : A Unicode character is a mathematical abstraction and so is a sequence of such . To output something to a physical file device you want an encoded string that represents that abstraction . You need to know what encoding you want in order to start . Your string is already a UTF-16 encoded string . I suggest you ask a new question because answering in comments doesn t work . Comment : ...unless you mean u.. . backslash followed by the u character in which case you have some kind of an escape sequence that you need to parse .", "Question : I have heard conflicting opinions from people - according to wikipedia see here http : en.wikipedia.org wiki UTF-8 .. . .. . They are the same thing aren t they Can someone clarify Comment : very related : Unicode UTF ASCII ANSI format differences http : stackoverflow.com questions 700187 unicode-utf-ascii-ansi-format-differences Comment : @TobiasKienzler Thank you for dual-linking these two questions together it s good to get multiple perspectives on the topic and I think any question that has an answer by Jon Skeet is worth linking to Comment : What this WIKI writes about unicode and the UTFs is ok in my opinion . Some comments on it are wierd : It is possible in UTF-8 or any other multi-byte encoding to split or truncate a string in the middle of a character which may result in an invalid string . So a string that gets UTF-8 encoded is no more a string but a byte array or byte stream . The characters that make up the string get encoded . Of course it can be decoded as well . Now of course you can cut a utf-8 sequence after the start-byte or after a following byte but why should someone do this Comment : Short answer : Unicode is the standard for computers to display and manipulate text while UTF-8 is one of the many mapping methods for Unicode .. . Answer : To expand on the answers others have given : .. . .. . We ve got lots of languages with lots of characters that computers should ideally display . Unicode assigns each character a unique number or code point . Computers deal with such numbers as bytes.. . skipping a bit of history here and ignoring memory addressing issues 8-bit computers would treat an 8-bit byte as the largest numerical unit easily represented on the hardware 16-bit computers would expand that to two bytes and so forth . Old character encodings such as ASCII are from the pre- 8-bit era and try to cram the dominant language in computing at the time i.e . English into numbers ranging from 0 to 127 7 bits . With 26 letters in the alphabet both in capital and non-capital form numbers and punctuation signs that worked pretty well . ASCII got extended by an 8th bit for other non-English languages but the additional 128 numbers code points made available by this expansion would be mapped to different characters depending on the language being displayed . The ISO-8859 standards are the most common forms of this mapping ISO-8859-1 and ISO-8859-15 also known as ISO-Latin-1 latin1 and yes there are two different versions of the 8859 ISO standard as well . But that s not enough when you want to represent characters from more than one language so cramming all available characters into a single byte just won t work . There are essentially two different types of encodings : one expands the value range by adding more bits . Examples of these encodings would be UCS2 2 bytes 16 bits and UCS4 4 bytes 32 bits . They suffer from inherently the same problem as ASCII and ISO-8859 standars as their value range is still limited even if the limit is vastly higher . The other type of encoding uses a variable number of bytes per character and the most commonly known encodings for this are the UTF encodings . All UTF encodings work in roughly the same manner : you choose a unit size which for UTF-8 is 8 bits for UTF-16 is 16 bits and for UTF-32 is 32 bits . The standard then defines a few of these bits as flags : if they re set then the next unit in a sequence of units is to be considered part of the same character . If they re not set this unit represents one character fully . Thus the most common English characters only occupy one byte in UTF-8 two in UTF-16 4 in UTF-32 but other language characters can occupy six bytes or more . Multi-byte encodings I should say multi-unit after the above explanation have the advantage that they are relatively space-efficient but the downside that operations such as finding substrings comparisons etc . all have to decode the characters to unicode code points before such operations can be performed there are some shortcuts though . Both the UCS standards and the UTF standards encode the code points as defined in Unicode . In theory those encodings could be used to encode any number within the range the encoding supports - but of course these encodings were made to encode Unicode code points . And that s your relationship between them . Windows handles so-called Unicode strings as UTF-16 strings while most UNIXes default to UTF-8 these days . Communications protocols such as HTTP tend to work best with UTF-8 as the unit size in UTF-8 is the same as in ASCII and most such protocols were designed in the ASCII era . On the other hand UTF-16 gives the best average space processing performance when representing all living languages . The Unicode standard defines fewer code points than can be represented in 32 bits . Thus for all practical purposes UTF-32 and UCS4 became the same encoding as you re unlikely to have to deal with multi-unit characters in UTF-32 . Hope that fills in some details . Comment : Conceptually UCS-2 and UCS-4 are character sets not character encodings hence the name . Comment : There are lots of errors here . No code point occupies six bytes Comment : @tchrist : Would you point out those errors in more detail Comment : @Tuukka Errors in this posting are legion . There are more than just 2 versions of ISO 8859 . ASCII didn t work for English missing things like curly quotes cent signs accents a whole lot more Unicode is not just about non-English English needs it too No codepoints occupy more than 4 bytes in ANY encoding this 6-byte business is flat-out wrong . You can t UTF-encode any Unicode scalar value as this says : surrogates the 66 other noncharacters are all forbidden . UCS-4 and UTF-32 aren t the same . There is no multi-unit UTF-32 . UTF-16 is not as efficient as they pretend c c c Comment : @syntaxerror : Only code points 128 and above are stored using 2 3 in fact up to 6 bytes . was accurate when written but later that same year twelve years ago it was invalidated . en.wikipedia.org wiki UTF-8 http : en.wikipedia.org wiki UTF-8 says The original specification covered numbers up to 31 bits the original limit of the Universal Character Set . In November 2003 UTF-8 was restricted by RFC 3629 to end at U+10FFFF in order to match the constraints of the UTF-16 character-encoding . This removed all 5- and 6-byte sequences and about half of the 4-byte sequences .", "Question : If I want to make the following work on Windows what is the correct locale and how do I detect that it is actually present : Does this code work universaly or is it just my system http : stackoverflow.com questions 4324385 does-this-code-work-universaly-or-is-it-just-my-system 4324481 .. . Answer : Basically you are out of luck : http : www.siao2.com 2007 01 03 1392379.aspx Comment : @MSalters : The point of the blog is that code page 65001 cannot be an ACP which means it cannot be used as a C++ standard-library locale . The UTF-8 UTF-16 conversion I mention is not the point of the blog but my answer to the question how to use UTF-8 on Windows . A shorter answer would be : don t use C++ Standard library for IO on Windows . Comment : @Let Me Be : Basically this boils down to the fact that wchar-t on Windows is specifically defined as a 16-bit type . The C and C++ standards require wchar-t to be able to hold any valid character from all supported encodings . But there is no way to encode all of the Unicode characters in 16 bits -- it just can t be done . Therefore the Windows C and C++ libraries do not actually support Unicode of any kind . If you want to use Unicode on Windows you have to go outside the C and C++ libraries . Yes it s stupid but what did you expect from Microsoft : P Comment : @Let Me Be : You are confusing 16-bit wchar-t and UTF-16 . They are not the same thing . UTF-8 and UTF-16 are two different ways of encoding all of the Unicode code points of which there are far more than just 65535 . You need at least 24 bits to represent all 1 000 000+ Unicode code points . The 16 in UTF-16 does not mean that all characters representable using only 16 bits for instance some Unicode characters require 32 bits two 16-bit code units when encoded using UTF-16 . But the C++ library requires wchar-t to be able to uniquely represent every supported character . Comment : @Let Me Be : No conversion to wchar-t is not the same as conversion to UTF-16 . That s precisely what I m trying to explain although probably not as well as I d like . Some UTF-16 characters are going to need more than 16 bits to be able to represent them . wchar-t being only 16-bits on Windows can therefore not represent those characters . Again the C standard requires that wchar-t be able to uniquely represent every supported character . Comment : @Let Me Be : I did read your linked question but it seems that you didn t understand the correct answer there . Some or even all of the Windows APIs may interpret wchar-t strings as UTF-16 encoded data but the C and C++ libraries do not . If they did then you could use UTF-8 as a locale for the C and C++ libraries . But you can t . And that is the answer to your question here", "Question : Google App Engine uses Python 2.5.2 apparently with UCS4 enabled . But the GAE datastore uses UTF-8 internally . So if you store u ud834 udd0c length 2 to the datastore when you retrieve it you get U0001d10c length 1 . I m trying to count of the number of unicode characters in the string in a way that gives the same result before and after storing it . So I m trying to normalize the string from u ud834 udd0c to U0001d10c as soon as I receive it before calculating its length and putting it in the datastore . I know I can just encode it to UTF-8 and then decode again but is there a more straightforward efficient way Comment : Don t try to store u ud834 udd0c . Surrogates are not valid unicode code points so you shouldn t rely on them being preserved in strings or length working properly . Comment : To clarify : u blah in Python conceptually represents a sequence of Unicode code points . So you shouldn t put UTF-16 s binary representation into them . Comment : If you deleted the sentance about encoding and decoding from your question and added it as an answer I d probably upvote it because I think it s the most correct thing to do to get what you re asking for . .. . Answer : I know I can just encode it to UTF-8 and then decode again .. . .. . Yes that s the usual idiom to fix up the problem when you have UTF-16 surrogates in UCS-4 string input . But as Mechanical snail said this input is malformed and you should be fixing whatever produced it in preference . is there a more straightforward efficient way Well.. . you could do it manually with a regex like : .. . .. . Certainly not more straightforward.. . I also have my doubts as to whether it s actually more efficient Comment : Thanks . My input comes from a yaml stream that contained the surrogate code units and fixing the stream to not contain surrogates does seem to prevent them from showing up in the unicode . So I ll look into fixing the stream . Comment : What encoding s the YAML If it s UTF-16 those surrogates should be getting converted to single Unicode characters.. . if it s UTF-8 though then the producer has made a mistake . UTF-8-with-surrogates is known as CESU-8 and shouldn t be used . Comment : I m pretty certain the regex won t be more efficient . Comment : The yaml itself is a utf-8 encoded str but the unicode characters in the source data are represented with escape sequences in the yaml . This is with PyYAML on a python without UCS4 . So yaml.dump u U0001D10C produces this str : uD834 uDD0C len 14 . Comment : I agree . Filed pyyaml.org ticket 197 http : pyyaml.org ticket 197 .", "Question : The unicode standard has enough code-points in it that you need 4 bytes to store them all . That s what the UTF-32 encoding does . Yet the UTF-8 encoding somehow squeezes these into much smaller spaces by using something called variable-width encoding . In fact it manages to represent the first 127 characters of US-ASCII in just one byte which looks exactly like real ASCII so you can interpret lots of ascii text as-if it were UTF-8 without doing anything to it . Neat trick . So how does it work I m going to ask and answer my own question here because I just did a bit of reading to figure it out and I thought it might save somebody else some time . Plus maybe somebody can correct me if I ve got some of it wrong . Comment : Straight Unicode does not require 32 bits to encode all its code points . They once did lay claim to that many possible code points but after UTF-8 took off they intentionally limited themselves to 21 bits so that UTF-8 will never exceed 4 bytes per character . Unicode currently requires only 17 bits to hold all possible code points . Without this limitation UTF-8 could have gone to 6 bytes per character . Comment : @Warren : mostly accurate but Unicode is a 21-bit code U+0000 to U+10FFFF . Comment : @Warren : 4-byte-limited UTF-8 could have supported up to U+1FFFFF . The restriction to U+10FFFF was made for the sake of UTF-16 . Comment : @dan04 Do we have any easy explanation of how it is restricted to U+10FFFF by UTF-16 It would be nice to know more about this . Comment : @A-letubby : Because the UTF-16 surrogate codes are allocated such that there are 1024 lead surrogates and 1024 trail surrogates and they can only be used in pairs to make 2 20 about a million additional characters available beyond the BMP . Added to the 2 16 characters available in the BMP this makes 0x110000 possible characters . .. . Answer : RFC3629 - UTF-8 a transformation format of ISO 10646 http : tools.ietf.org html rfc3629 is the final authority here and has all the explanations . In short several bits in each byte of the UTF-8-encoded 1-to-4-byte sequence representing a single character are used to indicate whether it s a trailing byte a leading byte and if so how many bytes follow . The remaining bits contain the payload . Comment : Ummmm silly me I thought the Unicode Standard was the final authority on UTF-8 Comment : Unicode standard defines the Unicode itself . It doesn t define various methods today s and future that can be used to encode unicode texts for a variety of purposes such as storage and transport . UTF-8 is one of those methods and the above reference is to the document that defines it .", "Question : What are the differences between UTF-8 UTF-16 and UTF-32 I understand that they will all store Unicode and that each uses a different number of bytes to represent a character . Is there an advantage to choosing one over the other Comment : Watch this video if you are interested in how Unicode works youtube.com watch v MijmeoH9LT4 http : www.youtube.com watch v MijmeoH9LT4 Comment : The video focuses on UTF-8 and yes it explains well how variable-length encoding works and is mostly compatible with computers reading or writing only fixed length ASCII . Unicode guys were smart when designing UTF-8 encoding . .. . Answer : In short : .. . .. . UTF8 : Variable-width encoding backwards compatible with ASCII . ASCII characters U+0000 to U+007F take 1 byte code points U+0080 to U+07FF take 2 bytes code points U+0800 to U+FFFF take 3 bytes code points U+10000 to U+10FFFF take 4 bytes . Good for English text not so good for Asian text . UTF16 : Variable-width encoding . Code points U+0000 to U+FFFF take 2 bytes code points U+10000 to U+10FFFF take 4 bytes . Bad for English text good for Asian text . UTF32 : Fixed-width encoding . All code points take 4 bytes . An enormous memory hog but fast to operate on . Rarely used . In long : see Wikipedia : UTF-8 http : en.wikipedia.org wiki UTF-8 UTF-16 http : en.wikipedia.org wiki UTF-16 and UTF-32 http : en.wikipedia.org wiki UTF-32 Comment : How is UTF8 is not so good for Asian text This is false . UTF-8 is perfect for Japanese for example . I run a Japanese web site and everything is encoded in UTF8 and all works fine . UTF-8 can encode any Unicode character . Comment : @spurrymoses : I m referring strictly to the amount of space taken up by the data bytes . UTF-8 requires 3 bytes per Asian character while UTF-16 only requires 2 bytes per Asian character . This really isn t a major problem since computers have tons of memory these days compared to the average amount of text stored in a program s memory . Comment : UTF-32 isn t rarely used anymore.. . on osx and linux wchar-t defaults to 4 bytes . gcc has an option -fshort-wchar which reduces the size to 2 bytes but breaks the binary compatibility with std libs . Comment : @UstamanSangat Yes if this answer is restricted to only memory requirements then I missed the point . However that point was never made within the answer nor does the question require it . It appears then that I missed a point that was never made but that you somehow were able to see without it even being said . When someone says that UTF-8 is not so good for Asian text - without restricting it to the context of memory requirements then it is wrong . Comment : If someone were to say UTF-8 is not so good for Asian text in the context of All Encoding Formats Including Those That Cannot Encode Unicode they would of course be wrong . But that is not the context . The context of memory requirements comes from the fact that the question and answer is comparing UTF-8 UTF-16 and UTF-32 which will all encode Asian text but use differing amounts of memory storage . It follows that their relative goodness would naturally be entirely in the context of memory requirements . Not so good not good .", "Question : null .. . Answer : OS default encoding : UTF-8 .. . .. . convert UTF-8 str to UTF-16 in python : .. . .. . As you can see unicode is bridge of converting utf-8 str to utf-16 str and it s easy to understand . But in java I am confused about the conversion : .. . .. . There is no decode no unicode . So what happened in this process Comment : Java is open-source so if you wanted to you could just look at the code and see what it actually does . It s already on your filesystem Comment : I know but it would be easier to understand the source code if there are some advice from expert . Comment : The fact that strings are stored in UTF-16 by the JVM internally which by the way is not necessarily the case is somewhat irrelevant . From the language perspective a String is a String and does not have an encoding - you can convert between a String and a byte using the two methods you have used which are standard encoding decoding operations . What is your real question Comment : @assylias oh Your answer is very helpful . I thought String in java is encoded in UTF-16 . if it has no encoding then the conversion using getBytes make sense . One more question If String have no encoding is it represented in unicode which we call code point and what s the relationship between UTF-16 and String After all str in python have an encoding UTF-8 ascii etc . Comment : Yes a string is a sequence of unicode code points which can be encoded in a number of encodings such as UTF-16 or UTF-8 etc . This is maybe a helpful post : stackoverflow.com a 33358306 829571 http : stackoverflow.com a 33358306 829571", "Question : I have the character . If I look in this UTF-8 table http : www.unicodetools.com unicode codepage-utf8.php I see it has the hex value F6 . If I look in the Unicode table http : www.tamasoft.co.jp en general-info unicode.html I see that has the indices E0 and 16 . If I add both I get the hex value of the code point of F6 . This is the binary value 1111 0110 . 1 How do I get from the hex value F6 to the indices E0 and 16 2 I don t know how to come from F6 to the two bytes C3 B6 .. . .. . .. . Because I didn t got the results I tried to go the other way . is represented in ISO-8859-1 as . In the UTF-8 table http : www.unicodetools.com unicode codepage-utf8.php I can see that has the decimal value 195 and has the decimal value 182 . Converted to bits this is 1100 0011 1011 0110 . Process : .. . .. . 1 . Look in a table http : www.tamasoft.co.jp en general-info unicode.html and get the unicode for the character . Calculated from the indices E0 and 16 you get the Unicode U+00F6 . 2 . According to the algorithm posted by wildplasser you can calculate the coded UTF-8 value C3 and B6 . 3 . In the binary form you get 1100 0011 1011 0110 which corresponds to the decimal values 195 and 182 . 4 . If these values are interpreted as ISO 8859-1 http : www.unicodetools.com unicode codepage-utf8.php only 1 byte then you get . PS : I found also this link http : www.utf8-chartable.de which shows the values from step 2 . Comment : You want to convert in both directions BTW : you don t convert from utf8 to iso9959-1 . You convert form utf8 to the binary value of it s code point and represent it in 8 bits . That this codepoint should be interpreted as latin1 does not matter . Comment : You ll find it much easier if you go through UTF-16 first . In UTF-8 you have E0 16 . This converts to F6 according to the UTF-8 algorithm . You then look up U+00F6 in the ISO-8859-1 table which is at position F6 . Comment : @wildplasser : If I know one direction the other should not be a problem I think . Because I didn t got the desired result with the first try I made another try the other way round . No I edited my question and added the binary value of the code point . But how can I interpret it in Latin1 now @RaymondChen : This is the ISO-8859-1 table http : htmlhelp.com reference charset latin1.gif I use . But I currently don t know how to come to the two bytes C3 and B6 . Comment : in Latin-1 is not represented as . in Latin-1 is represented using the single byte 0xF6 or 1111 0110 . If you interpret the UTF-8 encoded byte sequence for namely 0xC3B6 1100 0011 1011 0110 in Latin-1 you get the two characters 0xC3 and 0xB6 of the Latin-1 encoding . May I recommend What Every Programmer Absolutely Positively Needs To Know About Encodings And Character Sets To Work With Text http : kunststube.net encoding not the same as linked to by @Avi .. . Answer : The pages you are using are confusing you somewhat . Neither your UTF-8 table or Unicode table are giving you the value of the code point in UTF-8 . They are both simply listing the Unicode value of the characters . In Unicode every character code point has a unique number assigned to it . The character is assigned the code point U+00F6 which is F6 in hexadecimal and 246 in decimal . UTF-8 is a representation http : www.cl.cam.ac.uk mgk25 unicode.html utf-8 of Unicode using a sequence of between one and four bytes per Unicode code point . The transformation from 32-bit Unicode code points to UTF-8 byte sequences is described in that article - it is pretty simple to do once you get used to it . Of course computers do it all the time but you can do it with a pencil and paper easily and in your head with a bit of practice . If you do that transformation you will see that U+00F6 transforms to the UTF-8 sequence C3 B6 or 1100 0011 1011 0110 in binary which is why that is the UTF-8 representation of . The other half of your question is about ISO-8859-1 . This is a character-encoding commonly called Latin-1 http : en.wikipedia.org wiki ISO IEC 8859-1 . The numeric values of the Latin-1 encoding are the same as the first 256 code points in Unicode thus is F6 in Latin-1 . Once you have converted between UTF-8 and standard Unicode code points UTF-32 it should be trivial to get the Latin-1 encoding . However not all UTF-8 sequences Unicode characters have corresponding Latin-1 characters . See the excellent article The Absolute Minimum Every Software Developer Absolutely Positively Must Know About Unicode and Character Sets No Excuses http : www.joelonsoftware.com articles Unicode.html for a better understanding of character encodings and transformations between them . Comment : Yeah I read the article before I started to do the encoding . I thin this link http : www.utf8-chartable.de shows the code point in UTF-8 very well . Thanks to wildplasser I m able to convert between UTF-8 and Unicode code points . But you delivered a good summary of the topic Thanks for that", "Question : The following byte stream is identified by as UTF-8 it contains the Hebrew sentence : - . I m trying to understand the encoding . The file is UTF-8 I ve verified this by opening notepad windows-7 inputing the Hebrew character and then saving the file . The result-of which yields the following : .. . .. . Where ef bb bf is the BOM encoded in utf-8 form and d7 93 is exactly the sequence of bytes that appears in the original stream after 0a 09 new line tab in ascii . The problem here is that by unicode code pages should be coded as 05 D3 so why and how did the utf-8 encoding came to be d7 93 d7 93 in binary is 11010111 10010011 while .. . 05 D3 in binary is 00000101 11010011 .. . .. . I can t seem to find a correct transformation that will make sense for these encoding that to my understanding represent the same Unicode entity which is HEBREW LETTER DALET .. . .. . Thank you .. . Maxim . Comment : If you want a good answer it will be a good idea to specify what are you trying to do and in what language . Parsing Unicode nowadays is kinda low-level and probably you should rely on OS or specialized libraries . Comment : Note that Notepad tries to perform a heuristic-based guess http : blogs.msdn.com b oldnewthing archive 2007 04 17 2158334.aspx of the file encoding sometimes with amusing results . Comment : Jonathan is right . You should also read joelonsoftware.com articles Unicode.html http : www.joelonsoftware.com articles Unicode.html Comment : @Nir : It s Adam Batkin and not Jonathan who posted the link as you can see in my comment to his post I have actually read the article and was able to make the logical conversion from Unicode code page to utf-8 representation . I don t see how your comment contributes to the discussion as this question was already marked as answered . Comment : My bad I failed to notice the link in Adam s answer . Sorry . BTW question marked as answered does not mean that the discussion should be over . The power of SO is that everything is here for prosperity.. . .. . Answer : Unicode defines among other things a bunch of code points and gives each one a numerical value . The value for HEBREW LETTER DALET is U+05D3 or 0x05D3 . But that s just a number and that DOES NOT tell you how to encode the code point i.e . the set of actual bits in a file in memory...UTF-8 as well as UTF-16 UTF-32 and a variety of other schemes tell you how to do that . There is actually a formulaic way of translating Unicode code points to UTF-8 characters but that s a whole different SO question . It turns out that in UTF-8 HEBREW LETTER DALET is encoded as 0xD7 0x93 . By the way if you find a text-editor that allows you to save-as UTF-32 or UCS-4 you will find that that in addition to a very large file the bytes that you see with a hex-editor should match the code points from the Unicode spec . This http : www.fileformat.info info unicode char 05d3 index.htm page may give a little extra information on some of the representations for that one character . For a great introduction to Unicode I would suggest Joel Spolsky s The Absolute Minimum Every Software Developer Absolutely Positively Must Know About Unicode and Character Sets No Excuses http : www.joelonsoftware.com articles Unicode.html . Comment : This is a great answer thank you . After reading rfc3629 I was able to make the bit-manipulation to encode 05D3 into utf-8 d793 representation .", "Question : I know the web is mostly standardizing towards UTF-8 lately and I was just wondering if there was any place where using UTF-8 would be a bad thing . I ve heard the argument that UTF-8 16 etc may use more space but in the end it has been negligible . Also what about in Windows programs Linux shell and things of that nature -- can you safely use UTF-8 there Comment : For existing protocols that don t support UTF-8 that s a good reason not to use UTF-8 : I personally only like to support UTF-8 encoding as it allows unicode characters while allowing my life to revolve around the ASCII character-space opening up UTF-16 content in a dumb editor makes me eyes bleed . Comment : @pst : B e c a u s e i t l o o k s l i k e t h i s .. . Answer : If UTF-32 is available prefer that over the other versions for processing . If your platform supports UTF-32 UCS-4 Unicode natively - then the compressed versions UTF-8 and UTF-16 may be slower because they use varying numbers of bytes for each character character sequences which makes impossible to do a direct lookup in a string by index while UTF-32 uses 32-bit flat for each character speeding up some string operations a lot . Of course if you are programming in a very restricted environment like say embedded systems and can be certain there will be only ASCII or ISO 8859-x characters around ever then you can chose those charsets for efficiency and speed . But in general stick with the Unicode Transformation Formats . Comment : UTF-32 takes 4x the space of ASCII or UTF-8 when encoding ASCII characters for the same data . This can definitely matter . Plus unlike the legacy charsets like ISO-8859- and unlike UTF-8 you have byte-order endianness issues with UTF-32 and UTF-16 . Comment : UTF-32 or UCS-4 is a protocol for encoding Unicode characters that uses exactly 32 bits for each Unicode code point . All other Unicode transformation formats use variable-length encodings . The UTF-32 form of a character is a direct representation of its codepoint . http : en.wikipedia.org wiki UTF-32 UCS-4 Comment : @dkarp Just double checked and you re right . My bad Comment : @dkarp : that s why I wrote for processing in the first sentence . For storage you may want consider storage formats or compression depending on environment the speed of the components the frequency the strings are accessed and other factors . Optimisation is rarely done on one factor alone . -- But the primary factor is as I wrote the platform support . Windows for example used UTF-16 internally the last time I looked so going with UTF-16 will be best there leaving string operation optimisation to the platform library provider . Comment : @foo Sorry but I don t buy it . If you don t want to do input in UTF-32 and you don t want to do output in UTF-32 and you don t want to store bloated UTF-32 strings in memory what s the win UTF-32 isn t even one character grapheme per 32 bits it s one code point per 32 bits . Combining characters canonical equivalence joy . http : unicode.org faq char combmark.html There s a reason that very few platforms and applications use UTF-32 -- the benefits generally do not outweigh the costs .", "Question : What is the difference between the Unicode UTF8 UTF7 UTF16 UTF32 ASCII and ANSI encodings In what way are these helpful for programmers Comment : The best site to refer would be : msdn.microsoft.com en-us library dd374081 VS.85 .aspx http : msdn.microsoft.com en-us library dd374081 VS.85 .aspx Comment : very related : UTF-8 vs Unicode http : stackoverflow.com questions 643694 utf-8-vs-unicode Comment : tugay.biz 2016 07 what-is-ascii-and-unicode-and-character.html http : www.tugay.biz 2016 07 what-is-ascii-and-unicode-and-character.html .. . Answer : Going down your list : .. . .. . Unicode https : en.wikipedia.org wiki Unicode isn t an encoding although unfortunately a lot of documentation imprecisely uses it to refer to whichever Unicode encoding that particular system uses by default . On Windows and Java this often means UTF-16 in many other places it means UTF-8 . Properly Unicode refers to the abstract character set itself not to any particular encoding . UTF-16 http : en.wikipedia.org wiki UTF-16 : 2 bytes per code unit . This is the native format of strings in .NET and generally in Windows and Java . Values outside the Basic Multilingual Plane http : en.wikipedia.org wiki Basic Multilingual Plane BMP are encoded as surrogate-pairs . These are relatively rarely used - which is a good job as very few developers get them right I suspect . I very much doubt that I do . UTF-8 http : en.wikipedia.org wiki UTF-8 : Variable length encoding 1-4 bytes per code point . ASCII values are encoded as ASCII using 1 byte . UTF-7 http : en.wikipedia.org wiki UTF-7 : Usually used for mail encoding . Chances are if you think you need it and you re not doing mail you re wrong . That s just my experience of people posting in newsgroups etc - outside mail it s really not widely used at all . UTF-32 http : en.wikipedia.org wiki UTF-32 : Fixed width encoding using 4 bytes per code point . This isn t very efficient but makes life easier outside the BMP . I have a .NET Utf32String class as part of my MiscUtil http : pobox.com skeet csharp miscutil library should you ever want it . It s not been very thoroughly tested mind you . ASCII http : en.wikipedia.org wiki ASCII : Single byte encoding only using the bottom 7 bits . Unicode code points 0-127 . No accents etc . ANSI : There s no one fixed ANSI encoding - there are lots of them . Usually when people say ANSI they mean the default locale codepage for my system which is obtained via Encoding.Default http : msdn.microsoft.com en-us library system.text.encoding.default.aspx and is often Windows-1252 http : en.wikipedia.org wiki Windows-1252 but can be other locales . There s more on my Unicode page http : csharpindepth.com Articles General Unicode.aspx and tips for debugging Unicode problems http : csharpindepth.com Articles General DebuggingUnicode.aspx . The other big resource of code is unicode.org http : unicode.org which contains more information than you ll ever be able to work your way through - possibly the most useful bit is the code charts http : unicode.org charts . Comment : Unicode UTF-16 . Unicode is just the character set representable as UTF7 8 16 32 Comment : @jalf : But in the context of .NET or Windows in general when someone talks about the Unicode encoding they mean UTF-16 . Hence the more properly known as bit . Comment : @jalf : Edited answer to clarify that though . Comment : The term ANSI when applied to Microsoft s 8-bit code pages is a misnomer . They were based on drafts submitted for ANSI standardization but ANSI itself never standardized them . Windows-1252 the code page most commonly referred to as ANSI is similar to ISO 8859-1 Latin-1 except that Windows-1252 has printable characters in the range 0x80..0x9F where ISO 8859-1 has control-characters in that range . Unicode also has control-characters in that range . en.wikipedia.org wiki Windows code page https : en.wikipedia.org wiki Windows code page Comment : @jp2code : I wouldn t - but you need to distinguish between content that is sent back via HTTP from the web server and content that is sent via email . It s not the web page content that sends the email - it s the app behind it presumably . The web content would be best in UTF-8 the mail content could be in UTF-7 although I suspect that it s fine to keep that in UTF-8 these days .", "Question : I am having a problem dealing with a simple search for a two character unicode string the needle inside another string the haystack that may or may not be UTF-8 .. . .. . Part of the problem is I don t know how to specify the code for use in strpos and I don t know if PHP has to be compiled with any special support for the code or if I have to use mb strpos which I am trying to avoid since it also might not be available . ie . for example the needle is U+56DE U+590D without the space .. . .. . With preg-match it might be preg-match @ x 56DE x 590D @ haystack but that actually requires @u which might not be available and I get a Compilation failed : character value in x .. . sequence is too large anyway . I don t want to use preg-match anyway as it might be significantly slower than strpos there are other sequences that have to be searched . Can I convert U+56DE U+590D into its single byte sequence possibly 5-6 characters and then search for it via strpos I can t figure out how to convert it to bytes if so . How do you specify unicode inline in PHP anyway I mean outside of PRCE .. . .. . blah u56DE u590D doesn t work .. . .. . Thanks for any ideas .. . Answer : First your question is poorly structured . It has several questions at several points . You would probably get more answers if you used a more clear structure : 1 describe the task you re trying to accomplish 2 the limitations requirements 3 the strategy you considered 4 the difficulties you found with such strategy is there a better one . That said I ll start by the end : .. . .. . blah u56DE u590D doesn t work No . The language doesn t know anything about unicode . In PHP strings are byte arrays . Therefore how you express a unicode code points in a PHP script depends on the encoding you want to use . For UTF-8 it would be xE5 x9B x9E xE5 xA4 x8D for UTF-16 big endian would be x56 xDE x59 x0D and so on . Can I convert U+56DE U+590D into its single byte sequence possibly 5-6 characters and then search for it via strpos I can t figure out how to convert it to bytes if so . For the first part yes i.e . converting U+56DE U+590D into bytes a clarification is needed . Are these UTF-16 code units or Unicode code points For instance how is represented U+D869 U+uDED6 or U+2A6D6 If they are unicode code units it s trivial to encode them into UTF-16 . For UTF-16 big endian it s just x56 xDE x59 x0D . Otherwise it s still trivial to encode them UTF-32 but it takes a little more work to do the same in UTF-16 or UTF-8 . For the second part keep reading . Part of the problem is I don t know how to specify the code for use in strpos and I don t know if PHP has to be compiled with any special support for the code or if I have to use mb strpos which I am trying to avoid since it also might not be available . What are you trying to do Why do you need to find a position in a string strpos will give you a byte offset for a given string again interpreted in binary form . Are you trying to clip a string strpos or even mb strpos mean trouble in Unicode a glyph can be constituted by several code units so you risk clipping part of a glyph . I can t advise you more unless you tell what you re trying to do . Comment : Many thanks for the detailed reply . Sorry about the unfocused question I should not have tried to ask it at 4am All I want to do is detect if the needle exists in the haystack I don t even need the position . I ll try to post the original unicode here at the end but really it s just an example of a general question I have about the rare but necessary need to search for unicode inside unknown strings . Please let me know how you create the conversion to bytes if it s not obvious . String follows : In html-entities it s 22238 22797 google helpfully converts it Comment : @ ck You can convert html-entites to your encoding of choice e.g . utf-8 with mb convert encoding string UTF-8 HTML-ENTITIES . If you want to see a byte representation you can do unpack H convString to the result-of that . Comment : @ ck As to your other question as long as the needle and the haystack are in UTF-8 it s safe to search for it in a binary manner with strpos . This is not true for UTF-16 or UTF-32 . You may want however to normalize both strings first . See php.net Normalizer http : www.php.net Normalizer and the links under See Also in that page . Comment : Thanks to your persistence and patience I figured out exactly what I really wanted how to convert the unicode directly into it s single byte representation so I could do a binary match instead of relying on mb functions in PHP . I made a little tool with input form and converted with this : unpack unpack H GET unicode echo x .implode str split unpack 1 2 x Which shows me your original six bytes : xe5 x9b x9e xe5 xa4 x8d but now I really understand how to get there with any unicode actually UTF-8 I think . Thanks again" ] }
[ "yes-answer-long", "yes-answer-short" ]
encoding
UNK_RELATION
jersey-2.0@jax-rs@58
jersey-2 .0 -- jersey-2 .0 is the open-source early access @placeholder 2.0 jsr-339 reference implementation for building restful web-services .
{ "confidence": [ 50.46330261230469, 49.611236572265625, 48.600345611572266, 48.57401657104492, 46.0743408203125, 44.99451446533203, 44.92427444458008, 44.33824157714844, 43.6088981628418, 43.568607330322266, 43.044742584228516, 42.98688888549805, 42.635963439941406, 42.55433654785156, 42.55433654785156, 41.95985412597656, 41.631221771240234, 41.491851806640625, 41.063724517822266, 41.04948043823242, 40.88304901123047, 40.749267578125, 40.58332824707031, 40.52052307128906, 40.52052307128906, 40.52052307128906, 40.52052307128906, 39.94261932373047, 39.92137908935547, 39.87562561035156, 39.82777404785156, 39.638099670410156, 39.52473449707031, 39.24897003173828, 39.24897003173828, 39.19155502319336, 39.072593688964844, 39.072593688964844, 39.072593688964844, 38.91383743286133, 38.388431549072266, 38.322288513183594, 38.25438690185547, 37.9884147644043, 37.96940612792969, 37.961612701416016, 37.94442367553711, 37.88691711425781, 37.87186050415039, 37.840309143066406, 37.75838088989258, 37.73466873168945, 37.69233322143555, 37.69233322143555, 37.572235107421875, 37.572235107421875, 37.357975006103516, 37.357975006103516, 37.248329162597656, 37.20539093017578, 37.14323806762695, 37.14137268066406, 37.13520812988281, 37.10132598876953, 37.10132598876953, 37.10132598876953, 37.10132598876953, 37.10132598876953, 37.10132598876953, 36.84602737426758, 36.80983352661133, 36.647254943847656, 36.515262603759766, 36.46046829223633, 36.38312530517578, 36.317466735839844, 36.29283905029297, 36.29283905029297, 36.29283905029297, 36.29283905029297, 36.26136016845703, 36.26136016845703, 36.236000061035156, 36.236000061035156, 36.20237350463867, 36.1942253112793, 36.11426544189453, 36.11426544189453, 35.71089553833008, 35.656429290771484, 35.52528381347656, 35.52528381347656, 35.52528381347656, 35.52528381347656, 35.52528381347656, 35.52528381347656, 35.52528381347656, 35.49588394165039, 35.48082733154297 ], "content": [ "Jersey 2 . .", "I am building a RESTful Web Service with Java Jersey 2.17 .", "We use Jersey 2.x Jersey + Spring + tomcat to expose REST based web-services .", "Is it possible to use Jersey 2.0 on Glassfish 2.x", "They have no impact on Jersey 2.x", "I m attempting to move to Jersey 2.0 .", "You re using Jersey 2 .", "I m trying to migrate a Jersey 1.0 Client application to Jersey 2.0 .", "I have a Spring Boot application with Jersey 2 REST services .", "I tried this on both jersey 1 and jersey 2 but the result didn t changed .", "I recently switched to jersey 2 .", "There is no alternative to that in jersey 2 .", "As result-of this error I found a new solution : http : marek.potociar.net 2013 06 13 jax-rs-2-0-and-jersey-2-0-released .. . .. . With Maven archetypes generate a jersey project likes this : .. . .. . And it worked for me", "@DhanaKrishnasamy I am using jersey-2.0 with grizzly .", "How do I implement this in Jersey 2.0", "Continuation of topic Jersey 2 + HK2 - @ApplicationScoped not working http : stackoverflow.com questions 37776741 jersey-2-hk2-applicationscoped-not-working 37777212 37777212 .", "Jersey 1 uses com.sun.jersey and Jersey 2 uses org.glassfish.jersey hence the exception .", "i am using jersey restful application .", "Jersey-media-moxy - as you mentioned Jersey is an implementation of JAX-RS .", "The backend is a RESTful web service using Spring + Jersey + MySQL .", "I also understand that HK2 is available in Jersey 2.0 but I cannot seem to find docs that help with Jersey 2.0 integration .", "Jersey 2.0 is missing a lot of functionality from Jersey 1.0 .", "Documentation for jersey-2.0 says http : repo1.maven.org maven2 org glassfish jersey jersey-documentation 2.0 jersey-documentation-2.0-user-guide.pdf : .. . .. . Client instances are expensive resources .", "That is where the conflict with Jersey 2.x comes in .", "I have a Spring Boot application with Jersey 2 .", "Jersey 2.x is supported in weblogic 12c", "The APIs have changed in Jersey 2.x .", "A few things I would fix : .. . .. . You are using Jersey 1.x flavored Jersey Test Framework but your app is Jersey 2.x .", "Working from the answer to Jersey 2.3.1 on Google App Engine http : stackoverflow.com questions 19302237 jersey-2-3-1-on-google-app-engine and the accepted answer to Dependency injection with Jersey 2.0 http : stackoverflow.com questions 16216759 dependency-injection-with-jersey-2-0 17133081 17133081 I am trying to get Jersey 2.21 set up on Google App Engine .", "Have a look at stackoverflow.com questions 16216759 http : stackoverflow.com questions 16216759 dependency-injection-with-jersey-2-0 17133081 17133081 for more information .", "I use java jetty self-hosted server and jersey-2 for java RESTful api .", "I understand that Jersey is some sort of reference implementation of JAX-RS .", "I have some experience using Jersey 2.0 .", "I m using Jersey 2.7 - but I d say it should work in 2.0 .", "Is there any sample code demonstrating how to use guice-servlet with Jersey 2.0", "So jersey-container-servlet-core and jersey-container-servlet are similar packages but the former one adapts to Jersey 2.x and won t work for Jersey 3.x .", "Possible duplicate of Using SelectableEntityFiltering in Jersey 2.17 http : stackoverflow.com questions 30013354 using-selectableentityfiltering-in-jersey-2-17", "Add into Tomcat lib all libraries that you download from Jersey and are including into ext folder of the Jersey .zip .. . 2 .", "All I want are 2 resources : one with WS Jersey at api chat and a normal Jersey resource at api demo .", "Edit .. . .. . Registering Resources and Providers in Jersey 2 http : blog.dejavu.sk 2013 11 19 registering-resources-and-providers-in-jersey-2 contains additional info on how to register classes instances in Jersey 2 .", "The application is a JAX RS 2.0 application Jersey 2 using Guice as injection framework .", "Please find the below example which was working as expected with Jersey 1.x with Jackson 1.x but after migrating to Jersey 2.x and Jackson 2.x I am getting xml in json output .", "We re in the process to upgrade our Web application running on Tomcat7 from Jersey 1.7 to Jersey 2.4.1 .", "Here is the Jersey 1.x support https : github.com jersey jersey-1.x tree master jersey-fastinfoset src main java com sun jersey fastinfoset impl provider entity .", "You have downloaded Jersey 2 which RI of JAX-RS 2 .", "My Jersey-Jaxrs-RESTful application runs correctly on embedded Grizzly server .", "Glassfish Jersey .", "I found that StringMessageProvider is probably the Jersey 1 implementation of this provider and the closest related classes I found in my Jersey 2 libraries arer the classes in org.glassfish.jersey.message.internal in jersey-common .", "I have exposed some REST services using Jersey 2 in integration with Spring .", "Jersey 2.0 should work fine with unmodified Jackson 2.x JAX-RS providers from https : github.com FasterXML jackson-jaxrs-providers .", "I am using Jersey based restful Service implementation strategy to build a service which will be used to upload files .", "For example .. . .. . You can see more examples in the source code tests https : github.com jersey jersey tree master test-framework providers grizzly2 src test java org glassfish jersey test grizzly web", "The newer Jersey implementation makes more sense .", "The native implementation for Jersey 1.x was to wrap it .", "These are Jersey 1.x properties .", "There are problems with Jersey 2.20+ .", "I am stuck with creating a gradle project for a RESTful web service using the jersey library .", "I m implementing RESTFul web service using Jersey 2.22.1 with MOXY as Json Provider .", "Just few notes : .. . .. . remove the com.sun.jersey.api.json.POJOMappingFeature init parameter from your web.xml - Jersey 2.x does not recognize this property it s Jersey 1.x specific .. . remove org.glassfish.jersey.media : jersey-media-moxy : 2.0 dependency .. . add org.glassfish.jersey.media : jersey-media-json-jackson : 2.0 dependency and register JacksonFeature https : jersey.java.net apidocs latest jersey org glassfish jersey jackson JacksonFeature.html in your application see below .. . .. . After these steps Jackson should be handling Object - JSON un marshalling and it should recognize @JsonAnySetter .", "Those will be using an jersey-spring4 which will be released with Jersey 3 .", "And this is my web.xml for Jersey 2.0 .. . .. . Where com.myservice.services is the package where I have my services .. . .. . Thanks for your comments", "Exclusion of spring-core spring-web and spring-beans from jersey-spring3 .", "I had recently migrated my REST APIs from Jersey 1 to Jersey 2 2.22.1 to be exact .", "If you project is using org.glassfish you are using Jersey 2 .", "This includes migrating from Jersey 1.x to 2.x .", "In my code I had : .. . .. . But JSONJAXBContext and JSONConfiguration are not defined in jersey 2.x .", "I have a jersey-2 hk2 application which uses JPA persistence .", "What is the proper way to initialize an EntityManager in a jersey-2 hk2 application", "I m trying to setup a REST client based on jersey 2 .", "http : stackoverflow.com questions 17396165 using-jersey-2-0-how-do-you-register-a-bindable-instance-per-request .. . 3 .", "Can you use ResourceConfig getResources https : jersey.java.net apidocs 2.0 jersey org glassfish jersey server ResourceConfig.html getResources on your ResourceConfig object then get the info you need by iterating through the Set Resource https : jersey.java.net apidocs 2.0 jersey org glassfish jersey server model Resource.html it returns", "I m trying to make a simple example of a web application using Jersey 2 and JSP and to deploy it on Glassfish 4 .", "See NoSuchMethodError on Values.lazy Jersey 2.5.1 http : stackoverflow.com questions 21742665 nosuchmethoderror-on-values-lazy-jersey-2-5-1 21743658 and https : java.net jira browse JERSEY-2394 for more details .", "After looking into the code https : github.com jersey jersey blob ba7a00a3e3271219ded6faa7de7382d366637e32 containers jersey-servlet-core src main java org glassfish jersey servlet internal ResponseWriter.java L190 to which alexey pointed to for Jersey 2.13 I found out that the code path in question can be avoided by setting the property jersey.config.server.response.setStatusOverSendError to true .", "For reference my unanswered question here : Jersey 2 JSON Jettison unwrapping root element http : stackoverflow.com questions 35870377 jersey-2-json-jettison-unwrapping-root-element", "The web application ROOT appears to have started a thread named jersey-client-async-executor-0 but has failed to stop it .", "This is not a Jersey resource. .", "Spring or Jersey", "Jersey 2.4.1 .", "Is this a restriction in jersey", "I am using Jersey 2.23 .", "I m trying to use Jersey with HK2 .", "I really need to follow the same or similar pattern to implement this cross-cutting transaction injection in my RESTful jersey resources .", "His reason was that the RESTful class usually uses the HttpHeaders injected by Jersey yet not available in the CDI or EJB containers .", "This particular implementation has been added in jersey 2.5 as a part of the ticket JERSEY-2072 https : java.net jira browse JERSEY-2072 .", "Use jersey-spring3 .", "to use jersey latest version jersey 2.8 we should get rid of com.sun.jersey.api Jersey APIs are now in org.glassfish.jersey package .", "Note the ServiceLocatorProvider https : jersey.java.net apidocs 2.19 jersey org glassfish jersey ServiceLocatorProvider.html is only available Jersey 2.6 and up .", "I am currently building a Java application with Jersey JAX-RS and Moxy .", "Add into Web-Inf lib of my project javax.ws.rs-api-2.jar that you can find in api folder of Jersey .. . .. . With this I don t have problems to run Tomcat with Jersey .", "I am having a hard time to configure Jersey 2 + Spring 4 correctly right now .", "I had the same problem for JAX-RS 2 jersey and the below annotation fixed it", "does anyone have comprehensive list of maven dependencies needed fro Jersey 2.x 2.6", "http : stackoverflow.com questions 18463311 jersey-2-how-to-replace-injectableprovider-and-abstracthttpcontextinjectable might be the similar question .", "https : github.com Squarespace jersey2-guice seems to be the first genuine Guice integration for Jersey 2 but it requires version 2.11+ .", "This is a minimum working PoC which wires Jersey 2 and Guice together : .. . .. . https : github.com phxql jersey2-guice", "Here is a blog entry about this that might help : http : blorn.com post 107397841765 guice-and-jersey-2-the-easy-way", "But we try to deploy or run it as a Uber jar we seem to be getting .. . .. . because Jersey 1.0 jars are getting loaded before Jersey 2.0 jars .", "Per this bug it should work : java.net jira browse JERSEY-883 https : java.net jira browse JERSEY-883" ] }
{ "confidence": [ 59.44561767578125, 56.787559509277344, 56.670921325683594, 54.49718475341797, 54.131141662597656, 54.131141662597656, 53.7933349609375, 53.36834716796875, 52.810733795166016, 51.99253845214844, 51.78383255004883, 51.66485595703125, 51.66485595703125, 51.33699035644531, 51.157779693603516, 51.06085968017578, 50.701942443847656, 50.15475845336914, 50.06614685058594, 49.68831253051758 ], "content": [ "Question : I m attempting to move to Jersey 2.0 . Which is giving me pains with Jackson and the docs recommend using Moxy . I got Moxy working for get and post calls where everything matches nicely however I have a need to deal with possible unknown elements . This worked well with prior to changing to jersey-2.0 and even though it doesn t cause any problems when I leave it in it never gets called . How do I implement this in Jersey 2.0 I m fine with Moxy or Jackson . my dependencies .. . .. . This has no effect in my web.xml Comment : I have no idea why anyone would recommend using MOXy for JSON as far as I know it suffers from same problems as Jettison its XML support is probably fine but JSON support seems shady . So make sure you know why you are choosing one implementation over another . .. . Answer : You can use jersey-media-json-jackson module instead of MOXy to take advantage of the annotation I am not sure whether MOXy has support for a similar feature . Just few notes : .. . .. . remove the com.sun.jersey.api.json.POJOMappingFeature init parameter from your web.xml - Jersey 2.x does not recognize this property it s Jersey 1.x specific .. . remove org.glassfish.jersey.media : jersey-media-moxy : 2.0 dependency .. . add org.glassfish.jersey.media : jersey-media-json-jackson : 2.0 dependency and register JacksonFeature https : jersey.java.net apidocs latest jersey org glassfish jersey jackson JacksonFeature.html in your application see below .. . .. . After these steps Jackson should be handling Object - JSON un marshalling and it should recognize @JsonAnySetter . To register JacksonFeature in your application see dedicated section in users guide 8.1.4 Jackson https : jersey.java.net nonav documentation 2.0 media.html json.jackson : Comment : This also answers a simlar question stackoverflow.com questions 17622672 http : stackoverflow.com questions 17622672 how-to-enable-feature-pojo-mapping-using-jersey-2-0-and-servlet-3-0-without-a-we I asked a while ago .", "Question : Is there any sample code demonstrating how to use guice-servlet with Jersey 2.0 Comment : Any particular reason you want to use guice-servlet Jersey 2.0 is fully integrated with HK2 dependency-injection out of the box which as far as I have seen is very similar to Guice DI . Have a look at stackoverflow.com questions 16216759 http : stackoverflow.com questions 16216759 dependency-injection-with-jersey-2-0 17133081 17133081 for more information . Comment : @joscarsson I have no desire to learn yet another DI framework . HK2 is not nearly as mature as Guice both from a functionality and community perspective . .. . Answer : There is a page at HK2 official about correct guice implementation : https : hk2.java.net guice-bridge .. . .. . You should create your Injector something like this : .. . .. . And code from the doc should be upgraded like : .. . .. . Using the maven-dependency at your pom.xml .. . .. . https : github.com phxql jersey2-guice doesn t work with jersey 2.22 and guice 4.0 . Comment : The official bridge is horribly broken . See java.net jira browse HK2-139 https : java.net jira browse HK2-139 and java.net jira browse JERSEY-1950 https : java.net jira browse JERSEY-1950 for more information .", "Question : I am trying to create a custom http param binding for my restful service . Please see the example below . You can see that there is a UserAuthHeaderParam annotation in the function signature . What I want to do is have a custom http param binding other than the standard javax.ws.rs . Param . I have try to implement org.glassfish.hk2.api.InjectionResolver which basically extract the value from http header : .. . .. . When I call the restful service the server get below exceptions . It indicates that the framework fails to resolve the param in the function signature : .. . .. . Please help . Any advise is appreciated . I do make a lot of search on google but fails to make it work . Jersey 2 . . How to replace InjectableProvider and AbstractHttpContextInjectable of Jersey 1 . http : stackoverflow.com questions 18463311 jersey-2-how-to-replace-injectableprovider-and-abstracthttpcontextinjectable might be the similar question . -- UPDATES : I use AbstractBinder to bind my resolver to UserAuthHeaderParam : .. . .. . Thank you Comment : Where is the @Service Comment : @MingtaoZhang I register a AbstractBinder . edit my question to add this details Comment : which version of jersey jar are you using are you running it on any application server or grizzly Comment : @DhanaKrishnasamy I am using jersey-2.0 with grizzly . Comment : @yzandrew why you want do create a custom Http Param maybe you can use a @HeaderParam and pass the UserAuth value through HTTP Headers to your REST API .. . Answer : I don t know how to resolve your exception . However may I propose you a different way to do the same thing . I hope it helps . I ve faced exactly the same problem : I need extra parameters in the http header btw also related to authentication . Besides I need to send them in every call since I want to do a typical rest implementation without maintaining a session . I m using Jersey 2.7 - but I d say it should work in 2.0 . I ve followed their documentation https : jersey.java.net documentation 2.0 filters-and-interceptors.html .. . .. . It s quite clear there but anyway I copy-paste my implementation below . It works fine . True there are some other ways to secure a rest service for example this is a good one : http : www.objecthunter.net tinybo blog articles 89 .. . .. . But they depend on the application server implementation and the database you use . The filter in my opinion is more flexible and easier to implement . The copy-paste : I ve defined a filter for authentication which applies to every call and it is executed before the service thanks to @PreMatching . You have to include this filter class in your implementation of ResourceConfig .. . .. . Hope it helps Comment : Thank you for your solution I have to stick on custom binding . Please see my comments to lpiepiora for the detail reason . However your solution might help other people with similar problem .", "Question : I m developing a rest service with Jersey 2.0 I downloaded from http : repo1.maven.org maven2 org glassfish jersey bundles jaxrs-ri 2.5 jaxrs-ri-2.5.zip and I m using Tomcat 7.0.47 . I run Tomcat from Eclipse and my machine is a Mac . I m using the Eclipse tool to generate a WAR and to deploy the service . This is my web.xml : .. . .. . I include all Jersey jars into WEB-INF lib except javax.servlet-api-3.0.1.jar that it is into Apache lib When I deploy in Tomcat it shows a very strange error caused by : Comment : Are you sure you have understood ClassNotFoundExceptions I m asking because you had a similar question lately.. . stackoverflow.com questions 20762707 http : stackoverflow.com questions 20762707 resteasy-service-deploy-in-tomcat-7-0-47 Comment : Hehehe of course my friend . I have the same problems that with Resteasy . Comment : And of course I do the same : include libraries in web-inf lib etc Comment : Ok then maybe you want to have a look at tomee.apache.org apache-tomee.html http : tomee.apache.org apache-tomee.html . This is tomcat + javaee libs on top . Take a look particularily at the JAX-RS version . tomee.apache.org downloads.html http : tomee.apache.org downloads.html Comment : Does it work under Mac Oh I need to use Tomcat because it s part of a project that is using Tomcat : .. . Answer : My solution : .. . .. . 1 . Add into Tomcat lib all libraries that you download from Jersey and are including into ext folder of the Jersey .zip .. . 2 . Add into Web-Inf lib of my project only libraries that are under lib folder of the Jersey zip file .. . 3 . Add into Web-Inf lib of my project javax.ws.rs-api-2.jar that you can find in api folder of Jersey .. . .. . With this I don t have problems to run Tomcat with Jersey . And this is my web.xml for Jersey 2.0 .. . .. . Where com.myservice.services is the package where I have my services .. . .. . Thanks for your comments Comment : Thanks for pointing out the jars in the ext folder I missed those at first . And of course the servlet mapping piece is quite important and not mentioned in the Jersey getting started guide either . Comment : You are welcome : Comment : Already did Thanks again . Comment : Thanks @jjmartinez +1 Comment : You are welcome @JossefHarush", "Question : Is there any sample code demonstrating how to use guice-servlet with Jersey 2.0 Comment : Any particular reason you want to use guice-servlet Jersey 2.0 is fully integrated with HK2 dependency-injection out of the box which as far as I have seen is very similar to Guice DI . Have a look at stackoverflow.com questions 16216759 http : stackoverflow.com questions 16216759 dependency-injection-with-jersey-2-0 17133081 17133081 for more information . Comment : @joscarsson I have no desire to learn yet another DI framework . HK2 is not nearly as mature as Guice both from a functionality and community perspective . .. . Answer : https : github.com Squarespace jersey2-guice seems to be the first genuine Guice integration for Jersey 2 but it requires version 2.11+ . NOTE : I haven t tested this but the idea is sound . Comment : I just whipped up a quick example using jersey2-guice with embedded Jetty at github.com hansenc jersey2-guice-example https : github.com hansenc jersey2-guice-example and it seems to work as advertised . Comment : There are problems with Jersey 2.20+ . 2.19 works fine . Issue github.com Squarespace jersey2-guice issues 32 https : github.com Squarespace jersey2-guice issues 32 Good example nailedtothex.org roller kyle entry lean-example-of-tomcat-82 http : www.nailedtothex.org roller kyle entry lean-example-of-tomcat-82", "Question : Is there any sample code demonstrating how to use guice-servlet with Jersey 2.0 Comment : Any particular reason you want to use guice-servlet Jersey 2.0 is fully integrated with HK2 dependency-injection out of the box which as far as I have seen is very similar to Guice DI . Have a look at stackoverflow.com questions 16216759 http : stackoverflow.com questions 16216759 dependency-injection-with-jersey-2-0 17133081 17133081 for more information . Comment : @joscarsson I have no desire to learn yet another DI framework . HK2 is not nearly as mature as Guice both from a functionality and community perspective . .. . Answer : GWizard https : github.com stickfigure gwizard includes a module that gives you out-of-the-box integration between Jersey2 and Guice . Here s an example of a complete JAX-RS service : .. . .. . Note that this is based on the Squarespace jersey2-guice adapter https : github.com Squarespace jersey2-guice which may not function properly with future point releases of Jersey . GWizard also offers a RESTEasy JAX-RS module which is preferred . Here is a blog entry about this that might help : http : blorn.com post 107397841765 guice-and-jersey-2-the-easy-way", "Question : Is there any sample code demonstrating how to use guice-servlet with Jersey 2.0 Comment : Any particular reason you want to use guice-servlet Jersey 2.0 is fully integrated with HK2 dependency-injection out of the box which as far as I have seen is very similar to Guice DI . Have a look at stackoverflow.com questions 16216759 http : stackoverflow.com questions 16216759 dependency-injection-with-jersey-2-0 17133081 17133081 for more information . Comment : @joscarsson I have no desire to learn yet another DI framework . HK2 is not nearly as mature as Guice both from a functionality and community perspective . .. . Answer : Here is an example using Embedded Jetty it should probably work for Jetty server too .. . .. . jetty-jersey-HK2-Guice-boilerplate https : github.com t-tang jetty-jersey-HK2-Guice-boilerplate .. . .. . If you are planning to use Guice for your application all Guice components injected into Jersey need to be declared as a binding in the Guice config . If you don t want to declare every binding in Guice config there is an adapter here : .. . .. . guice-bridge-jit-injector https : github.com t-tang guice-bridge-jit-injector", "Question : Is there any sample code demonstrating how to use guice-servlet with Jersey 2.0 Comment : Any particular reason you want to use guice-servlet Jersey 2.0 is fully integrated with HK2 dependency-injection out of the box which as far as I have seen is very similar to Guice DI . Have a look at stackoverflow.com questions 16216759 http : stackoverflow.com questions 16216759 dependency-injection-with-jersey-2-0 17133081 17133081 for more information . Comment : @joscarsson I have no desire to learn yet another DI framework . HK2 is not nearly as mature as Guice both from a functionality and community perspective . .. . Answer : I ve already done in this sample : .. . .. . https : github.com jbescos tododev .. . .. . You have to register the class https : github.com jbescos tododev blob master jersey2-guice src main java es tododev rest ApplyGuiceContextFilter.java in your ResourceConfig and the guice injector binded in an AbstractModule . This is the ResouceConfig :", "Question : null .. . Answer : Working from the answer to Jersey 2.3.1 on Google App Engine http : stackoverflow.com questions 19302237 jersey-2-3-1-on-google-app-engine and the accepted answer to Dependency injection with Jersey 2.0 http : stackoverflow.com questions 16216759 dependency-injection-with-jersey-2-0 17133081 17133081 I am trying to get Jersey 2.21 set up on Google App Engine . My configuration is similar to that shown in the above questions . I get the stack-trace shown below when starting the devserver . Searching around it is unclear to me whether anyone actually has the lastest version of Jersey working on App Engine . Am I just barking up the wrong tree here or should I be able to get it to work", "Question : I am coming from Node.js background and have quite a good understanding of RESTful web-services . Now I am trying to build RESTful web-services using Java . I understand core Java but completely new to Java based web development . I come to conclusion after some tutorials that I need to use Jersey framework to build my RESTful API . I understand that Jersey is some sort of reference implementation of JAX-RS . But I fail to understand relationship between various other terms and components like JAXB Jackson EclipseLink Moxy jersey-media-moxy Jettison JSON-P JSON XML etc . that come across my readings . The only thing that I could conclude was it is not so straight forward like JavaScript to covert Java objects into XML or JSON equivalent . My question is what is the relationship between these terms mentioned above and how they fit together if I am developing a Java based RESTful API . .. . Answer : There sure is a lot of terminology in the Java world and that can create a significant learning curve for new developers . It s not that it s particularly difficult to pass JSON or XML documents around using Java it s just that the various bits and pieces you need to do it have sprouted terminology over the years . I ve tried to list my understanding of the terms you ve used below.. . .. . .. . XML http : www.w3schools.com xml - you know what XML is right The extensible markup language . It s what we had before JSON became the big thing . JSON http : www.w3schools.com json - oh well JSON is the new big thing . It s a human-readable object serialisation format less verbose than XML . Very popular nowadays . It s the new magic bullet good for what ails ya gonna solve all your problems.. . .. . .. . JAXB https : jaxb.java.net - the Java Architecture for XML Binding in the Java ecosystem is the primary mechanism for turning XML data into objects which you can then interact with and vice versa . It s important to realise that it s an API and not an implementation so it mostly defines a set of annotations and simple classes interfaces in the javax.xml.bind package . To do anything useful with JAXB you need an implementation . There s a reference implementation included in the Glassfish application server . Most application servers will have some kind of implementation of JAXB . Jackson https : github.com FasterXML jackson - a library for data-binding . It supports both XML and JSON as document formats and implements the JAXB API . You can use Jackson as your implementation of JAXB or you can just use the Jackson API directly . EclipseLink Moxy https : wiki.eclipse.org EclipseLink FAQ MOXy - an alternative implementation of the JAXB API . Like Jackson it also has its own API . You can choose to use it or not . You probably don t want to use both Jackson and Moxy . Jersey-media-moxy - as you mentioned Jersey is an implementation of JAX-RS . One aspect of JAX-RS is passing documents around - often XML or JSON . To do that Jersey needs to know what underlying library to use for data-binding or stream processing . So jersey-media-moxy exists as a kind of jersey plugin dependency which you can use to configure Jersey to use Moxy for your object serialisation needs . There s an equivalent package for using jackson called jersey-media-json-jackson . Jettison https : github.com codehaus jettison - Yet Another serialisation library for converting Java objects to Json and back . JSON-P https : jsonp.java.net - an API for processing JSON either as a stream of events or via data-binding to an object . This API is still in development . You might ask how it is that anybody does json processing without it - the answer is that they either utilise proprietary library APIs such as Jackson or Moxy or they use a library which repurposes the JAXB API to work with JSON Jackson definitely allows this I m not sure about Moxy . JSON-P will make it easier to work directly with JSON features without all the XML-concepts which JAXB brings in .", "Question : Is there any sample code demonstrating how to use guice-servlet with Jersey 2.0 Comment : Any particular reason you want to use guice-servlet Jersey 2.0 is fully integrated with HK2 dependency-injection out of the box which as far as I have seen is very similar to Guice DI . Have a look at stackoverflow.com questions 16216759 http : stackoverflow.com questions 16216759 dependency-injection-with-jersey-2-0 17133081 17133081 for more information . Comment : @joscarsson I have no desire to learn yet another DI framework . HK2 is not nearly as mature as Guice both from a functionality and community perspective . .. . Answer : For those interested there is a sample of guice jersey integration available at https : github.com mycom-int jersey-guice-aop . Comment : It s not clear what you re doing here especially because you talk about unidirectional injection but don t explain which direction you mean . You need a bi-directonal bridge because Jersey will always ask HK2 to inject in which can you want HK2 to delegate to Guice and on the flip side when you ask Guice to inject an Object which happens to contain a Jersey type e.g . UriInfo you need Guice to delegate to HK2 for injection . In short : a unidirectional bridge is not enough . Comment : Maybe to clarify : uni directional bridge is enough to inject Guice resources into Jersey . If you want to use AOP and mix Guice and HK2 then you definitely need the bi-directional bridge . Comment : You re going to have a very hard time not mixing Guice and HK2 . I ll give a specific example : if you inject a Jersey resource using Guice but it references UriInfo then Guice will need to delegate to HK2 to get an instance but won t be able to .", "Question : I am trying to create a custom http param binding for my restful service . Please see the example below . You can see that there is a UserAuthHeaderParam annotation in the function signature . What I want to do is have a custom http param binding other than the standard javax.ws.rs . Param . I have try to implement org.glassfish.hk2.api.InjectionResolver which basically extract the value from http header : .. . .. . When I call the restful service the server get below exceptions . It indicates that the framework fails to resolve the param in the function signature : .. . .. . Please help . Any advise is appreciated . I do make a lot of search on google but fails to make it work . Jersey 2 . . How to replace InjectableProvider and AbstractHttpContextInjectable of Jersey 1 . http : stackoverflow.com questions 18463311 jersey-2-how-to-replace-injectableprovider-and-abstracthttpcontextinjectable might be the similar question . -- UPDATES : I use AbstractBinder to bind my resolver to UserAuthHeaderParam : .. . .. . Thank you Comment : Where is the @Service Comment : @MingtaoZhang I register a AbstractBinder . edit my question to add this details Comment : which version of jersey jar are you using are you running it on any application server or grizzly Comment : @DhanaKrishnasamy I am using jersey-2.0 with grizzly . Comment : @yzandrew why you want do create a custom Http Param maybe you can use a @HeaderParam and pass the UserAuth value through HTTP Headers to your REST API .. . Answer : If your need is to retrieve all the http-headers binding into one object a solution could be to use the @Context annotation to get javax.ws.rs.core.HttpHeaders which contains the list of all request headers . Comment : Thank you for you reply . I think custom binding is a better way for me . I can bind the http-headers query param path param into a protobuff object which is then used as part of model object in my business logic .", "Question : I am trying to create a custom http param binding for my restful service . Please see the example below . You can see that there is a UserAuthHeaderParam annotation in the function signature . What I want to do is have a custom http param binding other than the standard javax.ws.rs . Param . I have try to implement org.glassfish.hk2.api.InjectionResolver which basically extract the value from http header : .. . .. . When I call the restful service the server get below exceptions . It indicates that the framework fails to resolve the param in the function signature : .. . .. . Please help . Any advise is appreciated . I do make a lot of search on google but fails to make it work . Jersey 2 . . How to replace InjectableProvider and AbstractHttpContextInjectable of Jersey 1 . http : stackoverflow.com questions 18463311 jersey-2-how-to-replace-injectableprovider-and-abstracthttpcontextinjectable might be the similar question . -- UPDATES : I use AbstractBinder to bind my resolver to UserAuthHeaderParam : .. . .. . Thank you Comment : Where is the @Service Comment : @MingtaoZhang I register a AbstractBinder . edit my question to add this details Comment : which version of jersey jar are you using are you running it on any application server or grizzly Comment : @DhanaKrishnasamy I am using jersey-2.0 with grizzly . Comment : @yzandrew why you want do create a custom Http Param maybe you can use a @HeaderParam and pass the UserAuth value through HTTP Headers to your REST API .. . Answer : here is my actual implementatipn of UserAuthHeaderParamValueFactoryProvider class", "Question : I m working with Spring-Jersey3 and cannot figure out how to unit test the RESTFul API with Spring beans .. . .. . Controller .. . .. . Service Interface .. . .. . Service Implementation .. . .. . ResourceRegister.java Jersey resource register .. . .. . web.xml .. . .. . serviceContext.xml Application Context .. . .. . Unit test -- I really have no Idea how to test this .. . .. . Project Source Code https : github.com Mrshll187 SpringJersey .. . .. . Problem : Dependency injection returns null .. . Answer : A few things I would fix : .. . .. . You are using Jersey 1.x flavored Jersey Test Framework but your app is Jersey 2.x . See below for 2.x dependency . I ve never used the Jersey 1.x flavored Test Framework but with Jersey 2.x the In-Memory container https : jersey.java.net documentation latest test-framework.html d0e16898 doesn t support servlet dependent features . See below for different dependency . With Jersey Test Framework you do not need to create the Client yourself . There is one created and we can simple call JerseyTest s target String path method to get back a WebTarget Jersey 2.x WebResource is Jersey 1.x .. . .. . Here is a refactor that works . Dependency I only added this dependency and didn t take anything out as your GitHub project didn t include anything test related as your code example above does .. . .. . Test .. . .. . For those not use an xml context file you can use an annotation config application context and add it as an init param .. . .. . Other Resources : .. . .. . Jersey Test Framework Documentation https : jersey.java.net documentation latest test-framework.html .. . More examples from Test Framework source code tests https : github.com jersey jersey tree master test-framework providers grizzly2 src test java org glassfish jersey test grizzly web . Hint : the link I provided is for grizzly web container examples but if you traverse back to providers https : github.com jersey jersey tree master test-framework providers you can look at each provider and go to the test packages for examples for those providers .. . .. . .. . .. . UPDATE .. . .. . So after a few more test here are a couple interesting things I discovered .. . .. . One : .. . .. . With the above dependency even if we don t configure the DeploymentContext and just override Application configure in the JerseyTest it will still work . Can t really explain it but it appears the descriptor is still picked up . Two : .. . .. . Even if we get rid of the above dependency grizzly and use the in-memory dependency the same simple previous test works . The documentation states .. . .. . In-Memory container is not a real container . It starts Jersey application and directly calls internal APIs to handle request created by client provided by test framework . There is no network communication involved . This containers does not support servlet and other container dependent features but it is a perfect choice for simple unit tests . So I am not completely sure what Servlet features they are referring to as this test still works .. . .. . What I don t understand in particular is this statement .. . .. . There is no network communication involved .. . .. . because when I run the test I see a log .. . .. . INFO : Creating InMemoryTestContainer configured at the base URI http : localhost : 9998 Comment : So I m trying to figure out where this overridden method is coming from DeploymentContext configureDeployment . I ve bumped several version of JerseyTest framework and cannot find where this method is coming from Comment : I would get rid of all the Jersey related dependencies that aren t org.glassfish.jersey . My Guess is you are still using the older JerseyTest which doesn t have that method . Comment : Well done sir . A very earnest thank you . Comment : And I will agree - this testing framework does some crazy magic behind the scenes", "Question : So I have a tomcat 8 + jersey 2.5.1 + weld CDI app that works very well in most cases . Where it fails is that I am unable to intercept jersey resource method calls with a CDI interceptor . This makes sense because a jersey resource class is not a CDI bean . Then is there any way to make a CDI interceptor work in jersey Another way to ask this question : Can a CDI bean be used as a Jersey resource Thanks EDIT : Before I wrote my RESTful resources using Jersey I had CDI interceptors that were used to begin and commit database transactions . I really need to follow the same or similar pattern to implement this cross-cutting transaction injection in my RESTful jersey resources . That is the main reason for asking this question . Thanks again Comment : YOu should be able to use a CDI bean as a Jersey resource in an EE container . In Tomcat servlet container it s a little more difficult since it s not built-in . Per this bug it should work : java.net jira browse JERSEY-883 https : java.net jira browse JERSEY-883 Comment : Thanks . That bug does say that CDI interceptors should work . Comment : I got rid of jersey in my app and replaced it with straight servlets . Now things work as they should and I dont have to deal with the ResourceConfig crud . Additionally I dont have to deal with java.net jira browse HK2-181 https : java.net jira browse HK2-181 and can use lambda expressions in my java8 code . Thanks to everyone who attended this question .. . Answer : Adam Bien in one presentation http : www.youtube.com watch v vvtuFLz2prk recommends that you separate your Service CDI or EJB class from your RESTful resources class . His reason was that the RESTful class usually uses the HttpHeaders injected by Jersey yet not available in the CDI or EJB containers . The hazard is that your RESTful classes could be injected a Null reference of HttpHeaders if any CDI client like the JSF framework uses it . Thanks to your self-answered question . You have just showed a second use-case that validates Adam Bien s recommendation . Simply keep them apart Comment : I m not sure how this answers the question . For example one use I have today is a CDI interceptor on certain REST APIs that checks for an active user login before activating the REST resource . Comment : Yeah even I am not sure how this answers the question .", "Question : I m trying to upgrade to Jersey 2.0 and I m having a lot of trouble because the groupIds and artifactIds of Jersey have completely changed and I can t find a migration plan in the Jersey docs https : jersey.java.net nonav documentation 2.0 index.html . Here s what my pom.xml used to look like and this compiled fine : .. . .. . What should these be changed to This unrelated StackOverflow question was somewhat helpful http : stackoverflow.com questions 16216759 dependency-injection-with-jersey-2-0 but I m having trouble finding things like where the @Ref annotation moved to . .. . .. . Update .. . .. . 1 . It seems that @Ref no longer exists or at least it s not mentioned in the documentation anymore https : jersey.java.net nonav documentation 2.0 uris-and-links.html . Now you use a UriBuilder . 2 . I found a very helpful section in the documentation that answers my maven issues https : jersey.java.net nonav documentation 2.0 modules-and-dependencies.html . 3 . The HTTPBasicAuthFilter has been renamed to HttpBasicAuthFilter . Notice the capitalization . 4 . Client client Client.create has become Client client ClientBuilder.newClient .. . 5 . This : .. . .. . String json client .. . .resource getBaseUrl + url .. . .accept MediaType.APPLICATION JSON TYPE .. . .get String.class .. . .. . .. . has become .. . .. . String json client .. . .target getBaseUrl .. . .path url .. . .request MediaType.APPLICATION JSON TYPE .. . .get String.class Comment : @PaulBellora No it s not solved . This is just the information I have . There s more issues . .. . Answer : It is pain in the neck I have to say . We are currently knee deep into migrating relatively large 3+ years old client-server project and boy do I want to bite my neck off . Hopefully we are at the end of the struggle.. . While there is a migration guide indeed it is not comprehensive by any means . UniformInterfaceException and others is no more . Instead it is replaced by WebApplication exception and successors . There is not a word about that in the migration guide and this is very very important . JSON support .. . .. . The migration guide says : .. . .. . JSON Support has undergone certain changes in Jersey 2.x . The most visible difference for the developer is in the initialization and configuration . .. . In Jersey 1.x the JAXB JSON Support was implemented as a set of MessageBodyReaders and MessageWriters in the jersey-json module . Internally there were several implementations of JSON to Object mapping ranging from Jersey s own custom solution to third party providers such as Jackson or Jettison . The configuration of the JSON support was centralized in the JSONConfiguration and JSONJAXBContext classes . Great . What if you have chosen the Jersey s own custom solution which we did for whatever reason There is no alternative to that in jersey 2 . I tried to produce the same JSON format using Jettison Jackson and Moxy providers . I did not succeed . For reference my unanswered question here : Jersey 2 JSON Jettison unwrapping root element http : stackoverflow.com questions 35870377 jersey-2-json-jettison-unwrapping-root-element", "Question : I am trying to create a custom http param binding for my restful service . Please see the example below . You can see that there is a UserAuthHeaderParam annotation in the function signature . What I want to do is have a custom http param binding other than the standard javax.ws.rs . Param . I have try to implement org.glassfish.hk2.api.InjectionResolver which basically extract the value from http header : .. . .. . When I call the restful service the server get below exceptions . It indicates that the framework fails to resolve the param in the function signature : .. . .. . Please help . Any advise is appreciated . I do make a lot of search on google but fails to make it work . Jersey 2 . . How to replace InjectableProvider and AbstractHttpContextInjectable of Jersey 1 . http : stackoverflow.com questions 18463311 jersey-2-how-to-replace-injectableprovider-and-abstracthttpcontextinjectable might be the similar question . -- UPDATES : I use AbstractBinder to bind my resolver to UserAuthHeaderParam : .. . .. . Thank you Comment : Where is the @Service Comment : @MingtaoZhang I register a AbstractBinder . edit my question to add this details Comment : which version of jersey jar are you using are you running it on any application server or grizzly Comment : @DhanaKrishnasamy I am using jersey-2.0 with grizzly . Comment : @yzandrew why you want do create a custom Http Param maybe you can use a @HeaderParam and pass the UserAuth value through HTTP Headers to your REST API .. . Answer : If all you want is to pass value directly from the header to the method you don t need to create custom annotations . Let s say you have a header Authorization then you can easily access it by declaring your method like this : .. . .. . You can test it by calling curl e.g . Given that the answer to your question how to create custom binding is as follows . First you have to declare your annotation like this : .. . .. . Having your annotation declared you have to define how it will be resolved . Declare the Value Factory Provider this is where you ll have access to the header parameters - see my comment : .. . .. . Now declare an injection resolver .. . .. . and a Binder for your configuration .. . .. . now the last thing in your ResourceConfig add register new HeaderParamResolverBinder like this .. . .. . Given that you should be now able to use the value as you wanted : .. . .. . I hope this helps . Comment : Does this work when you mix with other existing annotations say @PathParam in same method Comment : @DhanaKrishnasamy well you cannot have annotation on the same method argument obviously but you can have a method like @Path id public String getResult @UserAuthHeaderParam String user @PathParam id Integer id if that s what you re asking for Comment : @lpiepiora Thank you for your solution What I actually need is to binding all the HTTP headers into one object . So I have to create a custom binding . And I am sorry about the late reply . I was working on several projects so I haven t have a chance to try your solution . I will reply once I verify it . It should be early next week Thanks again Comment : @lpiepiora Your solution works for me It s exactly what I need . Comment : Thanks very useful post Only one question I can t find AbstractHttpContextValueFactory on Jersey2.6 . Do you know what we can use in-place Thanks again", "Question : Is there any sample code demonstrating how to use guice-servlet with Jersey 2.0 Comment : Any particular reason you want to use guice-servlet Jersey 2.0 is fully integrated with HK2 dependency-injection out of the box which as far as I have seen is very similar to Guice DI . Have a look at stackoverflow.com questions 16216759 http : stackoverflow.com questions 16216759 dependency-injection-with-jersey-2-0 17133081 17133081 for more information . Comment : @joscarsson I have no desire to learn yet another DI framework . HK2 is not nearly as mature as Guice both from a functionality and community perspective . .. . Answer : This is a minimum working PoC which wires Jersey 2 and Guice together : .. . .. . https : github.com phxql jersey2-guice Comment : -1 this doesn t support injecting guice types into constructors . Comment : In MyResource a TimeService is injected with Guice see github.com phxql jersey2-guice blob master src main java de https : github.com phxql jersey2-guice blob master src main java de mkammerer poc jersey2guice jersey MyResource.java L17 Comment : That doesn t make a difference . The HK2 bridge does not support constructor-injection . Comment : I don t get it if you deploy the war to an application server it s working . Comment : Sorry here is what I meant : java.net jira browse HK2-139 https : java.net jira browse HK2-139", "Question : Documentation for jersey-2.0 says http : repo1.maven.org maven2 org glassfish jersey jersey-documentation 2.0 jersey-documentation-2.0-user-guide.pdf : .. . .. . Client instances are expensive resources . It is recommended a configured instance is reused for the creation of Web resources . The creation of Web resources the building of requests and receiving of responses are guaranteed to be thread safe . Thus a Client instance and WebResource instances may be shared between multiple threads .. . .. . Is client still thread-safe in version 2.1 I cannot find information about thread-safety in docs for 2.1 . http : repo1.maven.org maven2 org glassfish jersey jersey-documentation 2.1 jersey-documentation-2.1-user-guide.pdf Comment : I opened a ticket for you me lol : java.net jira browse JERSEY-3094 https : java.net jira browse JERSEY-3094 .. . Answer : I think based on the 2.1 release notes https : jersey.java.net release-notes 2.1.html nothing has changed in that regard but I cannot find the motivation for this change in documentation .", "Question : I am using Jersey based restful Service implementation strategy to build a service which will be used to upload files . My service class name is : UploadFileService.java See Code below .. . .. . These are the JAR files I have inside my lib : .. . .. . .. . aopalliance-repackaged-2.4.0-b10.jar .. . asm-debug-all-5.0.2.jar .. . hk2-api-2.4.0-b10.jar .. . hk2-locator-2.4.0-b10.jar .. . hk2-utils-2.4.0-b10.jar .. . javassist-3.18.1-GA.jar .. . javax.annotation-api-1.2.jar .. . javax.inject-2.4.0-b10.jar .. . javax.servlet-api-3.0.1.jar .. . javax.ws.rs-api-2.0.1.jar .. . jaxb-api-2.2.7.jar .. . jersey-client.jar .. . jersey-common.jar .. . jersey-container-servlet-core.jar .. . jersey-container-servlet.jar .. . jersey-core-1.11.jar .. . jersey-guava-2.17.jar .. . jersey-media-jaxb.jar .. . jersey-multipart-1.18.jar .. . jersey-server.jar .. . org.osgi.core-4.2.0.jar .. . osgi-resource-locator-1.0.1.jar .. . persistence-api-1.0.jar .. . validation-api-1.1.0.Final.jar .. . .. . .. . I am getting the following error when I am trying to up my tomcat server : .. . .. . Over the internet I found there are plenty of example which shows How to upload MULTIPART file using RESTFul API . But with same solution . I am not able to run those code as well . I think I am doing something wrong with the JAR files . Could anyone please help me on this .. . Answer : I too got the same exception.I did the following changes in web.xml .. . .. . and changed jersey 2.7 to 2.9 .I do not know what change of this 2 has solved the issue ." ] }
[ "yes-answer-long", "yes-answer-short" ]
jax-rs
UNK_RELATION
playready@drm@39
playready -- playready is the current @placeholder solution from microsoft .
{ "confidence": [ 53.60338592529297, 45.843814849853516, 45.39192199707031, 44.390777587890625, 42.931419372558594, 42.931419372558594, 42.50790023803711, 41.12455749511719, 41.12455749511719, 40.84490966796875, 40.84490966796875, 39.690704345703125, 39.524837493896484, 39.524837493896484, 39.524837493896484, 39.3587646484375, 39.19355010986328, 38.58839416503906, 38.370635986328125, 38.370635986328125, 38.370635986328125, 38.370635986328125, 38.370635986328125, 38.030799865722656, 37.4537353515625, 37.4537353515625, 37.4537353515625, 37.4537353515625, 36.98728942871094, 36.98728942871094, 36.68463134765625, 36.31254577636719, 36.31254577636719, 36.31254577636719, 36.31254577636719, 36.31254577636719, 36.31254577636719, 36.31254577636719, 36.299530029296875, 36.299530029296875, 35.6251106262207, 35.6251106262207, 35.493247985839844, 35.15834045410156, 35.15834045410156, 34.91618347167969, 34.91618347167969, 34.91618347167969, 33.774993896484375, 33.774993896484375, 33.774993896484375, 33.774993896484375, 33.774993896484375, 33.774993896484375, 33.72541809082031, 33.577213287353516, 33.45915222167969, 32.83173370361328, 32.0758056640625, 31.985599517822266, 31.985599517822266, 31.985599517822266, 31.985599517822266, 31.985599517822266, 31.985599517822266, 31.985599517822266, 31.985599517822266, 31.985599517822266, 31.985599517822266, 31.985599517822266, 31.985599517822266, 31.879552841186523, 31.07723617553711, 30.831396102905273, 30.831396102905273, 30.831396102905273, 30.831396102905273, 30.831396102905273, 30.831396102905273, 30.831396102905273, 30.831396102905273, 30.831396102905273, 30.541133880615234, 30.346397399902344, 30.346397399902344, 30.30154800415039, 29.946269989013672, 29.581661224365234, 29.44805145263672, 29.44805145263672, 29.44805145263672, 29.44805145263672, 29.44805145263672, 29.44805145263672, 29.44805145263672, 29.44805145263672, 29.44805145263672, 29.44805145263672, 29.44805145263672 ], "content": [ "You will find the PlayReady Envelope format specified in the Microsoft PlayReady Documentation Pack available to Microsoft PlayReady technology licensees .", "When Microsoft did NOT offer PlayReady service", "If you are simply looking to enable PlayReady playback on Android you will want to use the Microsoft PlayReady Client SDK for Android http : www.microsoft.com playready features ClientOptions.aspx .", "Will the final solution involve PlayReady Scalable Key Rotation", "I could not find the relevant information in PlayReady documentation that was provided by Microsoft .", "The relevant section is Specifications - Microsoft PlayReady Format Specification - 3 .", "It includes PlayReady encoding demo .", "PlayReady and Windvine are both supported .", "This is the same for HLS and PlayReady .", "You could either use PlayReady license server provided in the cloud or set up your own PlayReady license server .", "There are different implementation of PlayReady for Android devices each of which potentially stores the PlayReady database in a different location .", "Media services is releasing PlayReady As a service please check out the announcement here : http : mingfeiy.com playready .", "ISMV are not playready protected - these are just files for smooth streaming .", "That option tells it to generate PlayReady a certificate chain .", "Is there a way to programmatically clear the cached Playready licence", "Install smooth streaming and playready ADK .", "On what bases microsoft playready will give license expired for non persistance license type", "I found a service provider list on Microsoft PlayReady site : http : www.microsoft.com playready licensing asp .. . .. . But none of them seems to provide any form of free trial .", "Azure media services does not include PlayReady server .", "It includes however the possibility to protect the content with PlayReady server .", "Azure media services NOW supports PlayReady as a service .", "I m using the MediaDrm API for PlayReady decryption .", "The URL is inside the LA URL tags in the playready header :", "The resulting HLS Asset will be encrypted with PlayReady and the .m3u8 will contain the proprietary PlayReady tags for use by a player framework that is capable of getting a license and decrypting the content .", "Microsoft does not provide a PlayReady player SDK for iOS at this time so you have to go to a third party DRM company .", "Microsoft now have a client SDK for iOS http : www.microsoft.com playready features ClientOptions.aspx", "anyone knows how to playback a local video file on Android devices using Microsoft Playready SDK", "I want to extend the Microsoft PlayReady SDK for securing the content but I am a little bit confused about how to do it .", "While there are Android devices that do include PlayReady e.g .", "Google provides a reference application for EME with PlayReady .", "The HLS stream encrypted with PlayReady as well as the MPEG DASH stream with PlayReady do not work at all on the ChromeCast Receiver Sample .", "I am trying Playready protect HLS streams using transform manager .", "Azure Media Services supports the protection and streaming of HLS with PlayReady .", "Are there any tools available for adding Playready protection to MP4 content", "Then you need to obtain PlayReady SDK and run the encryptor to encrypt the WMV file .", "However i wonder is there a free PlayReady server available online for testing", "I have a wp7 app that will play Playready protected live smooth stream .", "This version did not have support for sending the PlayReady CustomData element in license requests .", "For dev testing purposes you can use the Microsoft PlayReady Test server http : playready.directtaps.net .", "Delete ProgramData Microsoft PlayReady note that this will also delete all persistent licenses .. . 3 .", "If you do not have this Device PK MSI installer perhaps you only have the Microsoft PlayReady Certificate Generation Kit MSI then I recommend that you contact Microsoft to legally obtain a copy of the latest PlayReady Device PK MSI .", "On Mac and Windows these licenses are stored in specific directories like : Library Application Support Microsoft PlayReady mspr.hds mac C : ProgramData Microsoft PlayReady mspr.hds windows .. . .. . You can just remove these files in order to clear the stored licenses .", "PlayReady Support .. . .. . When I tried to play PlayReady protected low bitrate ismv file I was expecting some sort of call back MediaProtocolMessageStream.onKeyRequested .", "I have an issue running PlayReady protected streams in my UWP app .", "Turns out that by default PlayReady is disabled when using remote desktop .", "I am attempting to create the properly DER encoded ECC parameters for the custom Microsoft P160 PlayReady curve to feed into a HSM .", "Are EME and CDM implemented on Android 4.4 with Chrome for playback a mpeg-dash streaming which is encrypted by Microsoft playready", "Microsoft published this video-player reference with PlayReady encyrpted content plays back in IE11 and Edge on Win8.1 10 .", ".. . .. . So does anybody know how PlayReady or Widevine supposed to work with Chromecast", "Yes you can use com.microsoft.playready for PlayReady and com.widevine.alpha for widevine .", "Does anyone have any experience with the PlayReady P160 curve parameters", "Yes the PlayReady license request and response can be viewed via Wireshark .", "I wonder whether anyone has tried using NdkMediaDrm with PlayReady", "This player will use the WideVine CDM on Chrome and the PlayReady CDM on IE11+ on Win8.1+ .", "As far as the PlayReady Device Porting Kit is concerned one playback is equal to one Drm Reader Bind call .", "Here are some test streams you could use to test your PlayReady implementation : .. . .. . PlayReady Encrypted Smooth Streaming : http : htmlsamples.origin.mediaservices.windows.net 66446cae-fd27-4c8f-a1c2-a38a9771ac09 Testing.ism Manifest .. . .. . PlayReady Encrypted HLS : http : htmlsamples.origin.mediaservices.windows.net 66446cae-fd27-4c8f-a1c2-a38a9771ac09 Testing.ism Manifest format m3u8-aapl .. . .. . PlayReady Encrypted DASH : http : htmlsamples.origin.mediaservices.windows.net 66446cae-fd27-4c8f-a1c2-a38a9771ac09 Testing.ism Manifest format mpd-time-csf .. . .. . Here is how you could configure PlayReady license server on Azure with a few steps : https : www.youtube.com watch v k6WWfZxE42w .. . .. . This is a blog post for PlayReady and AES key service via Azure Media Services : http : azure.microsoft.com blog 2015 01 29 azure-media-services-enhances-streaming-security-with-general-availability-of-drm-technology .. . .. . Please reach out to yanmf@microsoft if you have any questions .", "Samsung s PlayReady implementation as implementation by any other vendor should already have unique client Id per device - it is implemented as part of porting PlayReady to target-platform .", "If you have PlayReady Device PK 2.0.0 : .. . .. . If you need it a test root certificate is located here : c : PlayReady Device PK 2.0.0 test ToolTests files rootcert.dat .. . There are some example test group model certificates bgroupcert and their associated test private keys zgpriv are located here : C : PlayReady Device PK 2.0.0 test devicedevcert .. . There are also some example files that you may find informative in the C : PlayReady Device PK 2.0.0 Samples sub-directory such as : .. . SampleDACResponsePR.dat .. . SampleDACResponseWMDRMPD.xml .. . SamplePrivKeys.xml .. . It looks like there are also some potentially useful files in the C : PlayReady Device PK 2.0.0 test certs files sub-directory such as : .. . companyprivkey.xml .. . companypubkeymodulusb64.txt .. . rootprivkey.xml .. . rootpubkeymodulusb64.txt .. . testrootprivkey.dat .. . testrootpubkey.dat .. . unsignedtemplate.xml .. . .. . That said you should be able to use the following tools and some of the files above to simulate test the full certificate request and generation process : .. . .. . C : PlayReady Device PK 2.0.0 Tools generatecompanycertrequest.exe .. . C : PlayReady Device PK 2.0.0 Tools generatekeypair.exe .. . C : PlayReady Device PK 2.0.0 Tools generatemodelcert.exe .. . .. . Note : Since PlayReady certificate chains are in binary format i.e .", "Found the way on how to do it you need to make few changes to sample application provided for Playready found here http : code.msdn.microsoft.com windowsapps Simple-PlayReady-sample-5c1aefaf .. . .. . 1 .", "I would be happy to take a look and try some other PlayReady-supporting players as well .", "It is possible to protect a stand-alone HLS video using PlayReady though I am not aware of any freely available tools for this .", "To just update on this Azure Media Services just announced first-party PlayReady service as well .", "I am trying to develop an encryption tools that takes clear Smooth Streaming files and encrypt them with PlayReady DRM .", "You still need the PlayReady license server that delivers the content encryption key to the player .", "The expression-encoder can create .ismv files which are playready protected mp4 files .", "You ll need to run IIS Transform Manager job to make them PlayReady protected .", "My wording is wrong here - it should be : The expression can create encrypted playready protected .ismv files .", "The free trial includes access to a PlayReady and Windows Media DRM license server and all the licensing related functionality that goes along with that .", "Windows Azure Media Services does not currently offer a PlayReady server it just enables you to encrypt content you encode there .", "I do have a legal copy of PlayReady Device Porting Kit Version 2.0.0 .", "Background : When issuing Playready DRM licenses you can specify an expiration time on the license .", "Below is an exert from another source http : cryptome.org ms-drm.htm concerning the P160 PlayReady curve parameters .", "If you need further help and can prove that you work for a PlayReady licensee feel free to contact me for a one-on-one chat via saares@axinom.com .", "I tested it and it works fine with SmoothStreaming PlayReady test stream : http : playready.directtaps.net smoothstreaming SSWSS720H264PR SuperSpeedway 720.ism Manifest", "it works on browsers supporting MSE Media Source Extensions and for PlayReady DRM also EME Encrypted Media Extensions .", "I ve been looking at potentially hosting my own playready server but the licenses cost 30k", "I think this error can be fixed in PlayReady SDK 2.1 without being 100 sure .", "Yes it is but you have to deploy an update to the PlayReady server which not everybody can do .", "Reinstall Silverlight 5 .. . .. . On some machines I have needed to repeat this process multiple times to get PlayReady working again .", "I am using the Android NDK MediaDrm API to decrypt video access units with PlayReady .", "There is a fairly common practice to individualize the client of an app using the PlayReady IBX Individualization Black Box .", "I would like to use offline play back for playready enabled azure-media-services .", "not XML you will need to use bcertdump to view them similar to : c : PlayReady Device PK 2.0.0 Tools bcertdump.exe -b : . rootcert.dat -v .. . .. . Also if when you have PlayReady Device PK 2.5.0 things may be organized and work slightly differently .", "Disclaimer : I work for Axinom who provides the SilverHD DRM service . .. . .. . Alternatively Microsoft has a public PlayReady test server http : playready.directtaps.net pr doc customrights that you can use for free .", "What you are looking for can be found in a subdirectory below the test directory of the source code that is provided when you install the Microsoft PlayReady Device Porting Kit PK .", "I m trying to do so but this code : acq.AcquireLicenseAsync mediaSource.Buffer.DrmHeader.DrmHeaderBin DrmHeader is PlayReady Header from parsed file and acq is my custom license acquirer is not working properly : .", "I can see that device tries to get the license from the LA URL license acquisition URL - extracted from stream PlayReady ProtectionHeader .", "I am currently working on a system where there is a clear use-case to over write the current Playready DRM licence that the player is currently using to decrypt a live stream .", "Hi Guys just wondering if anyone implemented the descrambling method of a playready content using the nexstream SDK .", "For PlayReady you can include all the info that s needed in your Manifest and it will just work -- no need for the extra API s .", "308195020101302006072a8648ce3d010102150089abcdef012345672718281831415926141424f7302c041437a5abccd277bce87632ff3d4780c009ebe4149704140dd8dabf725e2f3228e85f1ad78fdedf9328239e0429048723947fd6a3a1e53510c07dba38daf0109fa120445744911075522d8c3c5856d4ed7acda379936f02150089abcdef012345672716b26eec14904428c2a675 .. . .. . Although mathematically these curve parameters are accepted by the HSM and OpenSSL the P160 curve points produced are not acceptable to PlayReady .", "Is it possible to encrypt decrypt smaller segments of a file for HTTP Live Streaming with industry-standard encryption techniques such as PlayReady and AES-128", "In some PlayReady clients I ve been exposed to I ve observed the latter approach download in full first .", "I m guessing the PlayReady implementations you see are only doing it on a file basis because that is slightly easier to implement .", "I am trying my hands on Windows 8 Application development and was trying for Playready and Smooth streaming .", "There are sample applications available which explain on how to implement smooth streaming and playready individually .", "But I am not able to find a way on how to implement smooth streaming and playready together .", "Add reference for smooth streaming in your playready sample application and change the platform target to x64 for the project .", "What is the working approach to put custom data into the license challenge for playready von Samsung smart TV" ] }
{ "confidence": [ 57.43334197998047, 56.09149932861328, 54.99235534667969, 54.76847839355469, 54.65997314453125, 53.95372772216797, 53.72163391113281, 52.91355895996094, 52.152862548828125, 51.361671447753906, 51.338104248046875, 50.44208526611328, 50.3614616394043, 48.790164947509766, 47.924949645996094, 47.8521728515625, 47.71599578857422, 47.36868667602539, 47.15842819213867, 46.74455642700195 ], "content": [ "Question : I m trying to encrypt arbitrary content using the PlayReady envelope format in order to send it to a 3rd party app which supports that format . I was not able to find the format specification online . Does anybody know where I can find the spec or is it supported only by opaque services provided by Microsoft .. . Answer : You will find the PlayReady Envelope format specified in the Microsoft PlayReady Documentation Pack available to Microsoft PlayReady technology licensees . The relevant section is Specifications - Microsoft PlayReady Format Specification - 3 . Envelope File Format .", "Question : I am writing a tool suite that among other things must support PlayReady Model Certificate generation from various Device Company CA certificates which we will receive from customers . In order to properly test the software end-to-end I need to obtain some test Company certificates . I could not find the relevant information in PlayReady documentation that was provided by Microsoft . Is there a way to obtain such certificates easily Thinking about it there probably should exist a root certificate for testing purposes only - I could not find any info on that as well .. . .. . Thanks in advance . .. . Answer : What you are looking for can be found in a subdirectory below the test directory of the source code that is provided when you install the Microsoft PlayReady Device Porting Kit PK . If you do not have this Device PK MSI installer perhaps you only have the Microsoft PlayReady Certificate Generation Kit MSI then I recommend that you contact Microsoft to legally obtain a copy of the latest PlayReady Device PK MSI . If you have PlayReady Device PK 2.0.0 : .. . .. . If you need it a test root certificate is located here : c : PlayReady Device PK 2.0.0 test ToolTests files rootcert.dat .. . There are some example test group model certificates bgroupcert and their associated test private keys zgpriv are located here : C : PlayReady Device PK 2.0.0 test devicedevcert .. . There are also some example files that you may find informative in the C : PlayReady Device PK 2.0.0 Samples sub-directory such as : .. . SampleDACResponsePR.dat .. . SampleDACResponseWMDRMPD.xml .. . SamplePrivKeys.xml .. . It looks like there are also some potentially useful files in the C : PlayReady Device PK 2.0.0 test certs files sub-directory such as : .. . companyprivkey.xml .. . companypubkeymodulusb64.txt .. . rootprivkey.xml .. . rootpubkeymodulusb64.txt .. . testrootprivkey.dat .. . testrootpubkey.dat .. . unsignedtemplate.xml .. . .. . That said you should be able to use the following tools and some of the files above to simulate test the full certificate request and generation process : .. . .. . C : PlayReady Device PK 2.0.0 Tools generatecompanycertrequest.exe .. . C : PlayReady Device PK 2.0.0 Tools generatekeypair.exe .. . C : PlayReady Device PK 2.0.0 Tools generatemodelcert.exe .. . .. . Note : Since PlayReady certificate chains are in binary format i.e . not XML you will need to use bcertdump to view them similar to : c : PlayReady Device PK 2.0.0 Tools bcertdump.exe -b : . rootcert.dat -v .. . .. . Also if when you have PlayReady Device PK 2.5.0 things may be organized and work slightly differently . Comment : I do have a legal copy of PlayReady Device Porting Kit Version 2.0.0 . There are 53 subdirectories under test . Can you please be more specific as to what to look for Thank you . Comment : Excellent I have edited my answer to include requested details . Comment : I am accepting your answer although I still do not have what I need : I was able to use the code in test certs to generate what seems to be a customer certificate . However that certificate is in XML form . What I need is a binary certificate chain that starts with CHAI that I can feed to generatemodelcert.exe . I will prowl around the code to see if that is possible . Comment : Make sure that you specify the -z : PR option when using the generatemodelcert.exe tool . That option tells it to generate PlayReady a certificate chain . I thought that option was the default which is why I did not mention it . Check out the full help on that command for all the options parameters . Comment : -z is not my problem -b is", "Question : Background : When issuing Playready DRM licenses you can specify an expiration time on the license . From what I understand if the license hasn t expired the license is stored somewhere on the client and subsequent requests can just use this license instead of making another drm request to obtain a new license . On Mac and Windows these licenses are stored in specific directories like : Library Application Support Microsoft PlayReady mspr.hds mac C : ProgramData Microsoft PlayReady mspr.hds windows .. . .. . You can just remove these files in order to clear the stored licenses . I wasn t able to find documentation on how to clear the licenses on mobile-devices Android or iOS . Could someone please advise Comment : Do you have any idea on how to clear license on ios .. . Answer : There are different implementation of PlayReady for Android devices each of which potentially stores the PlayReady database in a different location . Your best bet is to contact the vendor of the PlayReady SDK that you use if 3rd party or simply use a filesystem browser to find the equivalent file on the Android device .", "Question : I am trying to do an experiment with encrypted Microsoft smooth streaming streams . And i have a IIS server with transform manager installed . However i wonder is there a free PlayReady server available online for testing It can be a trial or functionality limited version . I just want to do a quick POC before invest more into this . I found a service provider list on Microsoft PlayReady site : http : www.microsoft.com playready licensing asp .. . .. . But none of them seems to provide any form of free trial . Does anybody know any service i can use or is there an alternative way of applying DRM to smooth streaming UPDATE : .. . .. . Thanks all for the answers and thanks to Sander http : stackoverflow.com users 2928 sander i have actually found one usable : http : playready.directtaps.net pr doc slee .. . .. . FYI Comment : Looks like there isn t . But you can easily build up you own local one . .. . Answer : Here are some test streams you could use to test your PlayReady implementation : .. . .. . PlayReady Encrypted Smooth Streaming : http : htmlsamples.origin.mediaservices.windows.net 66446cae-fd27-4c8f-a1c2-a38a9771ac09 Testing.ism Manifest .. . .. . PlayReady Encrypted HLS : http : htmlsamples.origin.mediaservices.windows.net 66446cae-fd27-4c8f-a1c2-a38a9771ac09 Testing.ism Manifest format m3u8-aapl .. . .. . PlayReady Encrypted DASH : http : htmlsamples.origin.mediaservices.windows.net 66446cae-fd27-4c8f-a1c2-a38a9771ac09 Testing.ism Manifest format mpd-time-csf .. . .. . Here is how you could configure PlayReady license server on Azure with a few steps : https : www.youtube.com watch v k6WWfZxE42w .. . .. . This is a blog post for PlayReady and AES key service via Azure Media Services : http : azure.microsoft.com blog 2015 01 29 azure-media-services-enhances-streaming-security-with-general-availability-of-drm-technology .. . .. . Please reach out to yanmf@microsoft if you have any questions . Comment : These test streams are no longer there any chance you could make them available again", "Question : I am looking at hosting DRM-protected content using azure-media-services . It s noted in the media services diagram that you can upload encrypt and play DRM protected content but it doesn t explicitly say where the playready server fits in I ve been looking at potentially hosting my own playready server but the licenses cost 30k Are there alternatives I need to stream to the silverlight player . .. . Answer : No . Azure media services does not include PlayReady server . It includes however the possibility to protect the content with PlayReady server . For dev testing purposes you can use the Microsoft PlayReady Test server http : playready.directtaps.net . If you want to give a shot you can download the WaMediaWeb https : github.com astaykov WaMediaWeb demo project . It includes PlayReady encoding demo . Just go through the readme as there are some important points listed mostly how the conversion would flow . UPDATE NOV . 2014 .. . .. . Please note that original question and answer was in 2012 When Microsoft did NOT offer PlayReady service Azure media services NOW supports PlayReady as a service . As well as simple AES Encryption .", "Question : I am trying Playready protect HLS streams using transform manager . It seems that the output can only be played using URL t 200-m3u8-aapl.ism manifest format m3u8-aapl .. . .. . 1 . I believe a standard HTTP server wont be able to stream it as it wont be able to interpret manifest call . What kind of server capabalities are required 2 . Is there any way I can achieve following workflow : Create HLS stream using apple segmenter - Playready protect that package which tool .. . Answer : Azure Media Services supports the protection and streaming of HLS with PlayReady . To achieve the workflow you have to first encode a video to Smooth Streaming format and then run it through the Encryptor task here http : msdn.microsoft.com en-us library hh973610.aspx with your PlayReady settings . Once you have an encrypted Smooth Streaming Asset you can then create a second HLS PlayReady protected asset by passing the file through the Packager task here http : msdn.microsoft.com en-us library hh973635.aspx . The resulting HLS Asset will be encrypted with PlayReady and the .m3u8 will contain the proprietary PlayReady tags for use by a player framework that is capable of getting a license and decrypting the content . There are several third party DRM companies that provide such player frameworks . Microsoft does not provide a PlayReady player SDK for iOS at this time so you have to go to a third party DRM company . Comment : Microsoft now have a client SDK for iOS http : www.microsoft.com playready features ClientOptions.aspx", "Question : Are there any tools available for adding Playready protection to MP4 content Thanks Comment : Be aware that simply encrypting the video won t help . You still need the PlayReady license server that delivers the content encryption key to the player . .. . Answer : You have to use Microsoft Expression Encoder to convert MP4 - WMV . Then you need to obtain PlayReady SDK and run the encryptor to encrypt the WMV file . This will given you what you need . If you need to protect the content in order to share via adaptive streaming use a Transformation Manager IIS extension . Comment : This is not correct . You don t have to convert it to WMV . The expression-encoder can create .ismv files which are playready protected mp4 files . Comment : This is not correct either . ISMV are not playready protected - these are just files for smooth streaming . You ll need to run IIS Transform Manager job to make them PlayReady protected . Comment : You are right . My wording is wrong here - it should be : The expression can create encrypted playready protected .ismv files . These files are suitable for download protected file -use-case . And yes : You can also put the files on an IIS together with ismc and ism file to stream them . BTW . : my downvote was too harsh .", "Question : I wonder whether anyone has tried using NdkMediaDrm with PlayReady If so is there any documentation available .. . Answer : The NdkMediaDrm API is designed for interacting with DRM technologies built into the Android operating-system by the device s manufacturer . While there are Android devices that do include PlayReady e.g . most Samsung devices I lack information on whether they expose PlayReady through this API . If you are simply looking to enable PlayReady playback on Android you will want to use the Microsoft PlayReady Client SDK for Android http : www.microsoft.com playready features ClientOptions.aspx . Comment : Thanks I hadn t realised it wasn t a standard thing . I know that the ADT-1 https : developer.android.com tv adt-1 index.html devices expose playready through this API are you aware of any documentation for this Comment : No I do not have any familiarity with those devices .", "Question : I am trying to do an experiment with encrypted Microsoft smooth streaming streams . And i have a IIS server with transform manager installed . However i wonder is there a free PlayReady server available online for testing It can be a trial or functionality limited version . I just want to do a quick POC before invest more into this . I found a service provider list on Microsoft PlayReady site : http : www.microsoft.com playready licensing asp .. . .. . But none of them seems to provide any form of free trial . Does anybody know any service i can use or is there an alternative way of applying DRM to smooth streaming UPDATE : .. . .. . Thanks all for the answers and thanks to Sander http : stackoverflow.com users 2928 sander i have actually found one usable : http : playready.directtaps.net pr doc slee .. . .. . FYI Comment : Looks like there isn t . But you can easily build up you own local one . .. . Answer : A time-limited free trial of SilverHD DRM http : axinom.com drm is available for commercial users - the contact details to get a trial account are on the website . The free trial includes access to a PlayReady and Windows Media DRM license server and all the licensing related functionality that goes along with that . Disclaimer : I work for Axinom who provides the SilverHD DRM service . .. . .. . Alternatively Microsoft has a public PlayReady test server http : playready.directtaps.net pr doc customrights that you can use for free . Basically it will always provide a persistent license in response to any license request made to it . Not very flexible and the URL query-string customization options tend to not actually work but maybe it suits your needs If you describe your needs in more detail I might be able to offer more specific advice on how to proceed with evaluating PlayReady . Comment : Thanks i found that playready.directtaps.net pr doc slee http : playready.directtaps.net pr doc slee is just what i need all i need is to do some POC hack on a DRM protected smooth streaming media stream", "Question : I have build a custom app Android platform that live streams my mic and camera to a wowza server . I want to extend the Microsoft PlayReady SDK for securing the content but I am a little bit confused about how to do it . Far as I read here see link below I only need to follow the steps indicated there and that is it . Or this tutorial works only with GoCoder http : www.wowza.com forums content....28PlayReady 29 .. . .. . After I read the PlayReady documentation I found out that I also need to implement some code in my app but it doesn t mention for which server I stream or something else.Just how to implement their SDK . My app functionality is similar to GoCoders . It streams the media using an rtsp connection and the video is a H.264 format . My question is what is the proper way to implement the PlayReady SDK and make it work with my app and the wowza servers I mean crypting securing my videos Thank you .. . .. . Bob .. . .. . P.S . My app is not public yet . .. . Answer : Bob - DRM can be pretty complex and in most cases suited best suited for high value content if you want to do that route there is some lifting to do . The article you noted above tells you how to set up the BuyDRM PlayReady module on Wowza Streaming Engine with any incoming source not just GoCoder . Once you have enabled PlayReady on the Wowza server you will not need to do anything more in the app as far as encoding goes the encryption is all done on the server . What you will need however is a custom player that can play back this encrypted stream as well as a PlayReady key server to manage access . You may want to consider a somewhat lighter solution like secure token and streamlock which is focused more on preventing unauthorized playback and transport encryption rather than content encryption .", "Question : I am trying to do an experiment with encrypted Microsoft smooth streaming streams . And i have a IIS server with transform manager installed . However i wonder is there a free PlayReady server available online for testing It can be a trial or functionality limited version . I just want to do a quick POC before invest more into this . I found a service provider list on Microsoft PlayReady site : http : www.microsoft.com playready licensing asp .. . .. . But none of them seems to provide any form of free trial . Does anybody know any service i can use or is there an alternative way of applying DRM to smooth streaming UPDATE : .. . .. . Thanks all for the answers and thanks to Sander http : stackoverflow.com users 2928 sander i have actually found one usable : http : playready.directtaps.net pr doc slee .. . .. . FYI Comment : Looks like there isn t . But you can easily build up you own local one . .. . Answer : I must admit I ve not looked closely at this but have you checked out Azure Media Services http : www.windowsazure.com en-us home features media-services They have a free trial and it looks like they support PlayReady and a bunch of other things http : www.windowsazure.com en-us develop net how-to-guides media-services . Doesn t look like they have a portal at the moment coming in future release http : social.msdn.microsoft.com Forums en-US MediaServices thread 431ef036-0939-4784-a939-0ecb31151ded so you have to do the uploading etc . with code . Comment : Windows Azure Media Services does not currently offer a PlayReady server it just enables you to encrypt content you encode there . Comment : Hi Azure Media Services currently support PlayReady license service you could easily configure one for testing purpose : azure.microsoft.com blog 2014 09 10 http : azure.microsoft.com blog 2014 09 10 announcing-public-availability-of-azure-media-services-content-protection-services", "Question : I am attempting to create the properly DER encoded ECC parameters for the custom Microsoft P160 PlayReady curve to feed into a HSM . I have found a few sources that specify the definition of the P160 curve since it is non-standard and custom . Below is a link-to one source . In particular the PlayReady curve values are discussed in Section 6.4.2 http : www.scribd.com doc 55582525 45 Elliptic-Curve-Cryptography of the book Elementary Number Theory A Computational Approach by William Stein . Below is an exert from another source http : cryptome.org ms-drm.htm concerning the P160 PlayReady curve parameters . For ECC Microsoft is using an elliptic-curve over Zp where p is a 160 bit prime number given below . The curve consists of the points that lie on the curve y 2 x 3+ax+b where the operations are done over the field Zp and a and b are coefficients that are given below . All values are represented as packed binary values : in other words a single value over Zp is encoded simply as 20 bytes stored in little endian order . A point on the elliptic-curve is therefore a 40 byte block which consists of two 20 byte little endian values the x coordinate followed by the y coordinate . Here are the parameters for the elliptic-curve used in MS-DRM : .. . .. . p modulus : 89abcdef012345672718281831415926141424f7 .. . coefficient a : 37a5abccd277bce87632ff3d4780c009ebe41497 .. . coefficient b : 0dd8dabf725e2f3228e85f1ad78fdedf9328239e .. . generator x : 8723947fd6a3a1e53510c07dba38daf0109fa120 .. . generator y : 445744911075522d8c3c5856d4ed7acda379936f .. . Order of curve : 89abcdef012345672716b26eec14904428c2a675 .. . .. . These constants are fixed and used by all parties in the MS-DRM system . The nerd appeal of the modulus is high when you see this number in hexadecimal : it includes counting in the hexadecimal as well as the digits of fundamental constants e pi and sqrt 2 . Based on this information I have created the following hex-encoding of the DER encoded curve parameters for the P160 curve using BouncyCastle as my base ASN.1 library . Note that no seed value is specified in these curve parameters . 308195020101302006072a8648ce3d010102150089abcdef012345672718281831415926141424f7302c041437a5abccd277bce87632ff3d4780c009ebe4149704140dd8dabf725e2f3228e85f1ad78fdedf9328239e0429048723947fd6a3a1e53510c07dba38daf0109fa120445744911075522d8c3c5856d4ed7acda379936f02150089abcdef012345672716b26eec14904428c2a675 .. . .. . Although mathematically these curve parameters are accepted by the HSM and OpenSSL the P160 curve points produced are not acceptable to PlayReady . I am able to use the same process to produce valid P256 curve points that are acceptable to PlayReady so I do no believe my methods are flawed . Does anyone have any experience with the PlayReady P160 curve parameters .. . Answer : After researching with Microsoft the solution was found . Apparently one must byte swap the public-key x y points and the private key to get the PlayReady tool kit to accept the EC key pair only for the P160 curve . This odd byte swapping was not required for the P256 EC key pair . Comment : That answer swapping public and private key does not make any sense to me hopefully it does make sense to others .", "Question : Second bind call failed with license expire for Non persistence license in Play ready .. . .. . I am working to support one service : .. . .. . Play back sequence of service is below : .. . .. . 1 . do WI . 2 . Call Bind -- failed with License not found .. . 3 . do LA Acquire License . 4 . call Bind -- success .. . 5 . call commit -- success .. . .. . 6 . call Manifest URL .. . .. . 7 . Player tries to play the content . 8 . found its encrypted . 9 . Bind -- failed with License expired . My Question : .. . .. . why second Bind is failed with License expired License type from service provider is Non persistence . Is there any other reason behind this for License expire On what bases microsoft playready will give license expired for non persistance license type Please help me regarding this . .. . Answer : Nonpersistent licenses are only usable for one playback not until the application is restarted . As far as the PlayReady Device Porting Kit is concerned one playback is equal to one Drm Reader Bind call . This is why your second call fails . While the information about license persistence is public any more in-depth information is NDA-protected and I cannot discuss it on a public website . If you need further help and can prove that you work for a PlayReady licensee feel free to contact me for a one-on-one chat via saares@axinom.com . Comment : Hi Thanks for your help . Comment : On what bases microsoft playready will give license expired for non persistance license type Comment : i.e in my view for non persistance licenses there is no constrains with it...so ideally it should not give License expired .", "Question : Google provides a reference application for EME with PlayReady . See EME with PlayReady : http : goo.gl 0vdok .. . .. . Which browser operating-system combination supports this reference setup According to the documentation from Microsoft Internet Explorer 11 should support EME PR on Win 8.1 or Win 10 but in my tests the Internet Explorer does not recognize the video format . .. . Answer : You are correct in stating that IE11 on Win8.1+ supports the PlayReady Content Decryption Module CDM with EME . I am not sure about the player at the link you provided http : goo.gl 0vdok but one good way to test this fact is to use a player which correctly uses whatever CDM is in the current browser such as this one : http : www.dash-player.com demo drm-test-area . This player will use the WideVine CDM on Chrome and the PlayReady CDM on IE11+ on Win8.1+ . Comment : Thanks for your response . Can you please also share the values you entered in the player at LA URL MPD Many thanks in advance . Comment : I just left the default values that are pre-entered there -- they worked out of the box for me . Comment : Ah.. . ok . But does the reference player from dash-player.com also support the video from goo.gl 0vdok http : goo.gl 0vdok in your tests I will also test it but right now I just read that EME PR is not support on Win8.1 or Win10 if you run it in a virtual-machine . I used Paralells on OSX . Now I am on the way to setup a PC properly and run the test again . Comment : I suspect if you run in a VM you d run smack into secure content path protection Microsoft implements throughout the Windows driver stack . See Protected Media Path https : msdn.microsoft.com en-us library windows desktop aa376846 v vs.85 .aspx for more details . Comment : hm.. . I setup Win 10 with IE 11 on a PC and tried to run the example dash-player.com demo drm-test-area http : www.dash-player.com demo drm-test-area but the video playback does not start . On the bottom of the page is also a chart available that shows the current bitrate . The strange thing is that I see there that the player seems to get video data but actually the video is not visible . Really strange . @Guido Domenici : Which OS browser combination do you use and did you install any PlayReady runtime extension", "Question : I am trying to develop an encryption tools that takes clear Smooth Streaming files and encrypt them with PlayReady DRM . The only solution I found is using IIS Transform Manager . My problem is that I want an offline tool without any dependency to IIS . I already have my tool encrypting regular files and I want to achieve that for SS as well. . .. . .. . Any tool lib you know Thanks Comment : What tool do you use for encrypting regular files I assume you refer to WMV .. . Answer : You could user Azure Media Services to encrypt Smooth Streaming file with PlayReady license here is how : https : www.youtube.com watch v nQCM1jFdi 4 . You could either use PlayReady license server provided in the cloud or set up your own PlayReady license server . Meanwhile Azure Media Services offer dynamic decryption capability that encrypt stream on the fly . For more information please refer to my blog post : http : azure.microsoft.com blog 2014 09 10 announcing-public-availability-of-azure-media-services-content-protection-services .", "Question : After upgrade from Silverlight 4 to Silverlight 5 I get System.Exception 6028 when MediaElement in my own player tries to play DRM h264 video . It happens when I already have license stored on my computer . This happens on Silverlight 5.0.61118.0 . I would appreciate any help on identifying cause of that exception and finding solution other than deleting licenses and acquiring them again . EDIT : I deleted all PlayReady licenses on my PC but after some time I did get that system exception again . One good thing about it is I could copy this exception message : .. . .. . I did checked one more thing . DRM server which my app is asking for licence is 1.5.2 version . .. . Answer : I have found that upgrading to Silverlight 5 often breaks the PlayReady installation used by Silverlight with nonsensical errors being raised when you attempt playback . The fix that has worked for me is : .. . .. . 1 . Uninstall Silverlight 5 .. . 2 . Delete ProgramData Microsoft PlayReady note that this will also delete all persistent licenses .. . 3 . Restart . 4 . Reinstall Silverlight 5 .. . .. . On some machines I have needed to repeat this process multiple times to get PlayReady working again . Comment : It might be hard and useless to ask your service clients to remove persistent licenses from their machines . Only few simple changes in my player code and no action from users are needed .", "Question : I am trying Playready protect HLS streams using transform manager . It seems that the output can only be played using URL t 200-m3u8-aapl.ism manifest format m3u8-aapl .. . .. . 1 . I believe a standard HTTP server wont be able to stream it as it wont be able to interpret manifest call . What kind of server capabalities are required 2 . Is there any way I can achieve following workflow : Create HLS stream using apple segmenter - Playready protect that package which tool .. . Answer : To just update on this Azure Media Services just announced first-party PlayReady service as well . You could obtain a PlayReady server in the cloud and use Media Services either statically encrypted a smooth streaming asset then package the content into HLS or even better you could encode your asset into Multi-bit-rates MP4 and we do dynamic encryption with PlayReady and deliver the stream in HLS DASH and Smooth Streaming on the fly . For more information you could check out my blog at http : azure.microsoft.com blog 2014 09 10 announcing-public-availability-of-azure-media-services-content-protection-services .", "Question : Google provides a reference application for EME with PlayReady . See EME with PlayReady : http : goo.gl 0vdok .. . .. . Which browser operating-system combination supports this reference setup According to the documentation from Microsoft Internet Explorer 11 should support EME PR on Win 8.1 or Win 10 but in my tests the Internet Explorer does not recognize the video format . .. . Answer : Microsoft published this video-player reference with PlayReady encyrpted content plays back in IE11 and Edge on Win8.1 10 . You can also input your stream to test : http : aka.ms azuremediaplayer url 2F 2Famssamples.streaming.mediaservices.windows.net 2F91492735-c523-432b-ba01-faba6c2206a2 2FAzureMediaServicesPromo.ism 2Fmanifest . You could also see Widevine encrypted content playback in Chrome using the same player . Azure Media Player is a JavaScript player that detects the browser capability and choose appropriate streaming protocols and DRM technology accordingly . It is free to use with Azure Media Services . Cheers Mingfei Yan", "Question : I am trying my hands on Windows 8 Application development and was trying for Playready and Smooth streaming . There are sample applications available which explain on how to implement smooth streaming and playready individually . But I am not able to find a way on how to implement smooth streaming and playready together . Is there any way to do it .. . Answer : Found the way on how to do it you need to make few changes to sample application provided for Playready found here http : code.msdn.microsoft.com windowsapps Simple-PlayReady-sample-5c1aefaf .. . .. . 1 . Install smooth streaming and playready ADK . 2 . Add reference for smooth streaming in your playready sample application and change the platform target to x64 for the project . 3 . Modify the MEDIA to use some manifest url for eg . : http : playready.directtaps.net smoothstreaming TTLSS720VC1PR To The Limit 720.ism Manifest and modify LAURL to use a valid license url for eg : http : playready.directtaps.net pr svc rightsmanager.asmx PlayRight 1 UseSimpleNonPersistentLicense 1 http : playready.directtaps.net pr svc rightsmanager.asmx PlayRight 1 UseSimpleNonPersistentLicense 1 .. . .. . 4 . In PLayback.cs - public void Play MediaElement mediaElement string strMediaPath add following lines .. . .. . extensions.RegisterByteStreamHandler Microsoft.Media.AdaptiveStreaming.SmoothByteStreamHandler .ism text xml .. . .. . extensions.RegisterByteStreamHandler Microsoft.Media.AdaptiveStreaming.SmoothByteStreamHandler .ism application vnd.ms-sstr+xml .. . .. . It worked fine for me .", "Question : I am looking at hosting DRM-protected content using azure-media-services . It s noted in the media services diagram that you can upload encrypt and play DRM protected content but it doesn t explicitly say where the playready server fits in I ve been looking at potentially hosting my own playready server but the licenses cost 30k Are there alternatives I need to stream to the silverlight player . .. . Answer : Media services is releasing PlayReady As a service please check out the announcement here : http : mingfeiy.com playready . And our service just hits GA : http : azure.microsoft.com blog 2015 01 29 azure-media-services-enhances-streaming-security-with-general-availability-of-drm-technology ." ] }
[ "yes-answer-long", "yes-answer-short" ]
drm
UNK_RELATION
c++builder-xe7@android@127
c++ builder-xe7 -- embarcadero c++ builder-xe7 is a c++ solution for rapidly building highly connected apps for windows mac ios @placeholder gadgets and wearables .
{ "confidence": [ 91.00668334960938, 77.79948425292969, 69.31149291992188, 68.97676086425781, 68.3736572265625, 64.30489349365234, 61.91803741455078, 61.82603454589844, 60.06512451171875, 57.59844970703125, 55.485267639160156, 53.00640869140625, 47.60158920288086, 46.96941375732422, 45.48982238769531, 43.95348358154297, 43.79588317871094, 43.619361877441406, 43.4986686706543, 43.400299072265625, 43.009544372558594, 43.009544372558594, 43.009544372558594, 42.763916015625, 42.674476623535156, 42.156593322753906, 41.840301513671875, 41.08061599731445, 41.053226470947266, 41.0465087890625, 40.285057067871094, 40.19561767578125, 39.62393569946289, 39.37439727783203, 39.36144256591797, 39.36144256591797, 39.03950500488281, 38.52259826660156, 38.15370178222656, 38.15370178222656, 36.92632293701172, 36.92632293701172, 36.461181640625, 36.461181640625, 36.03204345703125, 35.08189392089844, 34.99905014038086, 34.811134338378906, 34.79401397705078, 34.74998474121094, 34.541839599609375, 34.44746017456055, 34.44746017456055, 34.44746017456055, 34.37784194946289, 34.24806213378906, 33.73115539550781, 32.859962463378906, 32.3543701171875, 32.13488006591797, 32.13488006591797, 31.978740692138672, 31.857723236083984, 31.56403160095215, 31.440000534057617, 30.63991928100586, 30.637741088867188, 30.550397872924805, 30.318132400512695, 30.241188049316406, 30.215591430664062, 30.141267776489258, 29.950336456298828, 29.656017303466797, 29.656017303466797, 29.656017303466797, 29.656017303466797, 29.26494598388672, 29.18045997619629, 29.11956024169922, 28.60265350341797, 28.554983139038086, 28.466453552246094, 28.10240936279297, 28.071537017822266, 27.762327194213867, 27.505666732788086, 27.26568031311035, 26.49557113647461, 26.086259841918945, 25.836639404296875, 25.75705909729004, 25.62354850769043, 25.62354850769043, 25.62354850769043, 24.72179412841797, 24.588417053222656, 24.588417053222656, 24.41440200805664, 24.40608787536621 ], "content": [ "Using Embarcadero C++Builder XE7 .", "I m using C++ Builder XE7 .", "The app is built using the iOS 8.2 SDK in Embarcadero RAD Studio XE7 C++ Builder .", "I m not an expert in C++ but need to update an old project to Embarcadero C++ Builder XE7 .", "I m working with C++Builder XE6 XE7 .", "I need to connect to a server with SSL in C++Builder XE7 .", "I ve been able to generate the runtime and design packages in 32bits with Embarcadero C++ Builder XE7 .", "So now I want to migrate to C++ Builder XE7 with TeeChart 2015 .", "During the installation C++ Builder https : en.wikipedia.org wiki C 2B 2BBuilder XE7 shows the error : .. . .. . Invalid Serial Number .", "Is it possible - only compile make source in C++ Builder XE7 without the long delay of linking", "The following code produces an error in C++Builder XE7 using the 32-bit compiler : .. . .. . The error is : .. . .. . I don t get it .", "Just faced a similar problem with C++ Builder XE7 and thought I would share what I found .", "I use C++ Builder XE 7 and vcl .", "last time I jumped from cpp builder 6 to xe7 and I can t find ShellListView and ShellTreeView .", "But since this does involve a literal string and since you are using XE7 I believe you should be able to bypass this more explicitly by expressing the literal as a raw string as per C++11 which is should be supported by C++ Builder XE7 : .. . .. . Note that with raw string-literals you specifically do not escape chars .", "possible duplicate of How to programmatically construct components at runtime using C++ Builder", "And I get these errors : .. . .. . Can you please explain what i did wrong or where i can found Embarcadero C++ Builder tutorials", "They want me to do a program in C++ builder but I only know C . What I studied .", "Use : : instead of . : .. . .. . This is documented in Embarcadero s DocWiki : .. . .. . Strongly Typed Enums C++0x http : docwiki.embarcadero.com RADStudio XE7 en Strongly Typed Enums C++0x", "I have RAD Studio XE7 installed on my computer and i have everything like VCL Forms for Delphi C++.etc but how do i manage to get FireMonkey HD and 3D application frameworks for Delphi and C++ Builder both in RAD Studio XE7.Do I have to download it or it is already in RAD Studio XE7 and I have to follow some steps to get FireMonkey .", "the static lib is it compiled with C++Builder or somewhere else", "This also worked for me with C++ Builder XE6 .", "@IInspectable : This is C++ Builder which shares the Delphi RTL .", "Bcc32 in XE7 doesn t have the full C++11 implemented so delete didn t work .", "It occurs using Embarcadero s XE7 .", "C++Builder just recently gained a new 32-bit C++11 compiler for Windows http : docwiki.embarcadero.com RADStudio Seattle en What 27s New New Clang-enhanced C.2B.2B Compiler for 32-bit Windows in C++Builder 10 Seattle the 32-bit OSX compiler does not support C++11 yet AFAIK .", "Yes i m also used to the C++Builder quirks but this was a new one for me.. .", "They no longer exist as separate projects in XE7 .", "Program is built-in 32bit Debug using XE7 .. . .. . Thanks", "The Embarcadero XE7 project is like this : .. . .. . In Visual Studio I do something like : .. . .. . I have no idea why crashes in 64bit .", "I have an app writen in C++ Bulder XE3 and now i want to upgrate to XE7 .", "Installing XE8 fixed XE7 .", "The standard keyboard shortcut is Alt + F9 - the same as it always has been ever since the times of Turbo C C++ with the possible exception of some early C++Builder incarnations .", "Until recently I had been using antiquated C++ compilers C++Builder 5 6 so I have not kept up-to-date with the C++ standards and the changes for C++11 .", "I remember you asking about converting a lib into the C++Builder format .", "I developed all my code at C++ Builder XE with TeeChart 2011 .", "http : stackoverflow.com questions 15441837 how-to-programmatically-construct-components-at-runtime-using-c-builder", "For anyone else with this issue Disk Cleanup is the Windows tool cleanmgr.exe and not a feature of C++ Builder .", "di ID2D1Bitmap is a DelphiInterface http : docwiki.embarcadero.com Libraries XE7 en System.DelphiInterface .", "I have styled our application with Bitmap Style Designer in XE7 .", "I already found the answer but not easily as there are not yet many examples of using C++ Builder to access Android API .", "C++Builder ships with Indy which has a TIdTCPClient component that you can use for implementing custom protocols .", "Can I use in the same time XE3 and XE7", "one is with xe3 and the other one is new so it is xe7", "I have created a WSDL service using RAD Studio C++ Builder and it works fine tested it using Microsoft Visual Studio .", "64-bit versions on C++Builder are based on LLVM compiler backend which produces ELF object-files as far as i know .. . .. . I don t know if something like coff2elf is bundled with C++Builder XE7 but probably you can use opensource tools like Object File Converter look for it here : http : www.agner.org optimize objconv", "I am trying to use the code below to open an .xlsx file from C++Builder in RAD Studio XE7 : .. . .. . But the last line causes exception with message : .. . .. . Project2.exe raised exception class EOleException with message .xlsx .", "You must declare overloaded version as virtual too : .. . .. . Does not know if C++Builder supports C++11 but if it does try also to delete overload which you want to hide : .. . .. . instead of placing it into private section .", "It is already a pointer more specifically it is a typedef for the System : : DelphiInterface http : docwiki.embarcadero.com RADStudio XE7 en Delphi Interfaces class which is a C++ smart pointer http : en.wikipedia.org wiki Smart pointer wrapper around a Delphi interface pointer .", "C : Program Files x86 Embarcadero was excluded from all antivirus scans .", "This has been asked before here http : stackoverflow.com questions 23107535 c-builder-xe5-error-detected-lme288 but no real explanation or solution was presented .", "This is clearly a bug in C++Builder that existed for many years and is still not fixed even in XE8 as of 2015 .", "I m facing some problems when using this autogenerated file in C++ Builder Seattle AppMethod .", "And you apparently know for a fact that there is no possibility that anyone here could have had a similar experience using WPTools with C++Builder .", "You can set the TEdit : : NumbersOnly http : docwiki.embarcadero.com Libraries XE7 en Vcl.StdCtrls.TEdit.NumbersOnly property to true so the user cannot enter a non-numeric value unless they use copy-paste but let s ignore that for the moment and then use the RTL s StrToInt http : docwiki.embarcadero.com Libraries XE7 en System.SysUtils.StrToInt function or System : : UnicodeString : : ToInt http : docwiki.embarcadero.com Libraries XE7 en System.UnicodeString.ToInt method to convert it as-is : .. . .. . Or you can use the RTL s System : : Sysutils : : TryStrToInt http : docwiki.embarcadero.com Libraries XE7 en System.SysUtils.TryStrToInt function : .. . .. . Or you can use the STL s std : : wistringstream http : en.cppreference.com w cpp io basic istringstream class : .. . .. . Or since you have a C background you can use the C wtoi http : en.cppreference.com w cpp string byte atoi function which doesn t offer much in the way of error checking : .. . .. . Or you can use the C wcstol http : en.cppreference.com w cpp string wide wcstol function : .. . .. . Or you can use the C swscanf http : en.cppreference.com w cpp io c fwscanf function :", "Read the documentation : Standard RTL Path Functions across the Supported Target Platforms http : docwiki.embarcadero.com RADStudio XE7 en Standard RTL Path Functions across the Supported Target Platforms", "All my problems started with XE7 on Windows 10 along the way several things fixed it for me for a short time .", "C++Builder s 64-bit compiler for Windows introduced in XE2 supports C++11 .", "The correct syntax in C++ is :", "I have a dll-ready interface done in XE7 that I want to use in Visual Studio 2013 .", "The problem on XE7 as demonstrated only occurs in the second line of the test method all other cases compile fine .", "The two main processes A and C and the broker in the middle B .", "According to this documentation http : docwiki.embarcadero.com RADStudio XE7 en Published I need to place the property under the published section of my header file .", "Per Embarcadero s documentation : .. . .. . Differences Between Clang-based C++ Compilers and Previous-Generation C++ Compilers http : docwiki.embarcadero.com RADStudio XE7 en Differences Between Clang-based C++ Compilers and Previous-Generation C++ Compilers .. . .. . Object and Library File Format .. . .. . BCC32 and its associated tools use OMF in .obj and .lib files .", "What I eventually found was that there is an OLEVariant type in C++ Builder that contains data types compatible with OLE automation and at runtime can convert as required .", "I believe I have set all of these correctly but how can I fix it so the IPA generated by XE7 is properly detected by Application Loader as being built with a later SDK than iOS 6.0", "C : Program Files x86 Embarcadero Studio 17.0 bin for RAD Studio Seattle and copy mine in its place .", "In my experience this is caused when a library or control that your project uses decides that it needs DATA.BIND.OBJECTSCOPE e.g . due to a uses clause in Delphi code or a pragma link in C++Builder code .", "Process B starts process C . .. . Process B terminates .", "There is no : operator in the C++ language .", "This compiles the current .cpp file compiler switch -c .", "BCC64.EXE the C++ 64-bit Windows Compiler http : docwiki.embarcadero.com RADStudio XE7 en BCC64.EXE the C++ 64-bit Windows Compiler .. . .. . Compiled object file .. . ELF64 format .. . .. . pragma link http : docwiki.embarcadero.com RADStudio XE7 en Pragma link .. . .. . Do not specify the file extension .ext of modulename as long as you are using default file types .", "This bug in builder makes me seethe .", "This problem has been around for a long time and is not limited to XE3 XE5 XE7 XE8.. .", "I have added the exact code that XE7 s Delphi compiler auto-generates for the .hpp file .", "But I use FireDAC for connection with PostgreSQL and in XE3 the connection is called ADConnection and query ADQuery and in XE7 FDConnection and FDQuery .", "In short there is a tool refind that comes with the installer of XE7 and does the conversion for all the AD -components to FD -components .", "Copy bcc32.exe and ilink32.exe to prevent UAC s block and to back them up .. . .. . D : copy C : Program Files x86 Embarcadero RAD Studio 12.0 bin bcc32.exe . .. . .. . D : copy C : Program Files x86 Embarcadero RAD Studio 12.0 bin ilink32.exe . .. . .. . 2 .", "2 . you are passing the std : : auto-ptr http : en.cppreference.com w cpp memory auto-ptr itself to ShowMessage but it expects a System : : UnicodeString http : docwiki.embarcadero.com Libraries XE7 en System.UnicodeString instead thus the compiler error message .", "Changed Project Options C++ Linker : Advanced : Minimum iOS version supported to 6.0 .", "Problems I got untill now : .. . .. . ilink32 Error Error : Unresolved external MathFuncs : : MyMathFuncs : : Add double double referenced from C : USERS MAURO DESKTOP PROJETO WIN32 DEBUG FILE1.OBJ .. . .. . ilink32 Error Error : Unresolved external MathFuncs : : MyMathFuncs : : Subtract double double referenced from C : USERS MAURO DESKTOP PROJETO WIN32 DEBUG FILE1.OBJ .. . .. . ilink32 Error Error : Unresolved external MathFuncs : : MyMathFuncs : : Multiply double double referenced from C : USERS MAURO DESKTOP PROJETO WIN32 DEBUG FILE1.OBJ .. . .. . ilink32 Error Error : Unresolved external MathFuncs : : MyMathFuncs : : Divide double double referenced from C : USERS MAURO DESKTOP PROJETO WIN32 DEBUG FILE1.OBJ .. . .. . Details of the compiler : - C++ builder XE7 .", "now i am trying to use this in as application in RAD studio C++ .", "Try the same C C++ code in Visual Studio and see what happens", "bcc32 is in many respects not very compliant with the C++ standard .", "If it is compiled completely with C++Builder maybe you can step into the function-call and see internally where it is generating the AV but I m guessing that if this was the case you would have tried that already", "It compiles fine for me in C++ .", "The problem seems very specifically related to the use of C++ and thus the way that C++ compilers deal with literal strings or at least this particular C++ compiler .", "In the documentation is an article that explains everything in detail what you have to do : Migrate AnyDAC to FireDAC http : docwiki.embarcadero.com RADStudio XE7 en Migrating AnyDAC Applications to FireDAC .", "One guy had even reinstalled Builder and still had the problem .", "http : stackoverflow.com questions 3350385 how-to-return-an-object-in-c .. . .. . C++ return a class object by reference http : stackoverflow.com questions 8914509 c-return-a-class-object-by-reference .. . .. . Fill a TStringList in a DLL http : stackoverflow.com questions 11777592 fill-a-tstringlist-in-a-dll unfortunately Delphi .. . .. . Since now Thanks A LOT", "The aim of the code is to return a TMemo to be equalized to an existing object something like that : .. . .. . Here are the files : .. . .. . CriptLib.h : .. . .. . CriptLib.cpp : .. . .. . Errors I ve gotten untill now : .. . .. . ilink32 Error Error : Unresolved external fastcall System : : Internal : : Strhlpr : : UnicodeFree System : : UnicodeString referenced from C : PROGRAM FILES X86 EMBARCADERO STUDIO 15.0 LIB WIN32 DEBUG VCLE.LIB ustring .. . .. . ilink32 Error Error : Unresolved external fastcall System : : Syncobjs : : TInterlocked : : Increment int referenced from C : PROGRAM FILES X86 EMBARCADERO STUDIO 15.0 LIB WIN32 DEBUG VCLE.LIB ustring .. . .. . ilink32 Error Error : Unresolved external fastcall System : : Internal : : Strhlpr : : UnicodeAssign System : : UnicodeString System : : UnicodeString referenced from C : PROGRAM FILES X86 EMBARCADERO STUDIO 15.0 LIB WIN32 DEBUG VCLE.LIB ustring .. . .. . ilink32 Error Error : Unresolved external fastcall System : : Internal : : Strhlpr : : UnicodeSetLength System : : UnicodeString int referenced from C : PROGRAM FILES X86 EMBARCADERO STUDIO 15.0 LIB WIN32 DEBUG VCLE.LIB ustring .. . .. . ilink32 Error Error : Unresolved external System : : Sysutils : : Exception : : referenced from C : USERS USER DOCUMENTS DESENVOLVIMENTO BASE TT2 WIN32 DEBUG CRIPTLIB.OBJ .. . .. . ilink32 Error Error : Unresolved external fastcall System : : Sysutils : : Exception : : Exception System : : UnicodeString referenced from C : USERS USER DOCUMENTS DESENVOLVIMENTO BASE TT2 WIN32 DEBUG CRIPTLIB.OBJ .. . .. . ilink32 Error Error : Unresolved external fastcall System : : Sysutils : : Exception : : Exception referenced from C : USERS USER DOCUMENTS DESENVOLVIMENTO BASE TT2 WIN32 DEBUG CRIPTLIB.OBJ .. . .. . ilink32 Error Error : Unresolved external fastcall System : : TObject : : TObject referenced from C : USERS USER DOCUMENTS DESENVOLVIMENTO BASE TT2 WIN32 DEBUG CRIPTLIB.OBJ .. . .. . ilink32 Error Error : Unresolved external System : : Sysconst : : SRangeError referenced from C : PROGRAM FILES X86 EMBARCADERO STUDIO 15.0 LIB WIN32 DEBUG VCLE.LIB ustring .. . .. . ilink32 Error Error : Unresolved external fastcall System : : LoadResString System : : TResStringRec referenced from C : PROGRAM FILES X86 EMBARCADERO STUDIO 15.0 LIB WIN32 DEBUG VCLE.LIB syssupp .. . .. . ilink32 Error Error : Unresolved external System : : Sysutils : : ERangeError : : referenced from C : PROGRAM FILES X86 EMBARCADERO STUDIO 15.0 LIB WIN32 DEBUG VCLE.LIB ustring .. . .. . ilink32 Error Error : Unresolved external fastcall System : : UniqueString System : : UnicodeString referenced from C : PROGRAM FILES X86 EMBARCADERO STUDIO 15.0 LIB WIN32 DEBUG VCLE.LIB ustring .. . .. . ilink32 Error Error : Unresolved external fastcall System : : Internal : : Strhlpr : : UnicodeFromPChar System : : UnicodeString char bool referenced from C : PROGRAM FILES X86 EMBARCADERO STUDIO 15.0 LIB WIN32 DEBUG VCLE.LIB ustring .. . .. . ilink32 Error Error : Unable to perform link .. . .. . References used to try to build this project : .. . .. . How to return an object in C++", "Batch scripts are text-files that you can take with you to practically any UNIX Linux Mac and even run on Windows under MSYS or Cygwin .", "And yes C++ code can call into a Delphi package .", "I m still learning some uses of the C++ language .", "Export flat C-style standalone functions instead .", "Your example can be vastly simplified using the TEdit : : Text http : docwiki.embarcadero.com Libraries XE7 en Vcl.StdCtrls.TEdit.Text property : .. . .. . The simplest solution to your problem would be to use the TCSpinEdit component instead of TEdit as TCSpinEdit only allows numeric-input in the first place and has a Value property that returns an int : .. . .. . But if you have to stick with TEdit there are many ways to check a UnicodeString for numeric content .", "There does not seem to be any mechanism to export colour tab spacing code-completion options etc . from an earlier version of RAD Studio in my case XE3 to the current XE7 .", "You can use XE3 and XE7 next to each other I do that too but once you migrated the code from ADAC to FDAC your project won t compile any longer on XE3 .", "I copied all files .exe .obj etc from the output directory Win32 Debug from that computer to the one where I had the problem and that magically set C++ Builder straight all builds afterward started to work .", "C++11 introduced a new std : : unique-ptr http : en.cppreference.com w cpp memory unique-ptr class to replace std : : auto-ptr and std : : unique-ptr supports new and delete however C++Builder s 32bit compiler does not support C++11 yet - that is in the works - but its 64bit compiler does : .. . .. . include memory .. . .. . void fastcall TForm1 : : Button1Click TObject Sender .. . .. . int Size Edit1- GetTextLen Get length of string in Edit1 .. . Size++ Add room for null character .. . .. . std : : unique-ptr Char Buffer new Char Size Creates Buffer dynamic variable .. . .. . Edit1- GetTextBuf Buffer.get Size Puts Edit1- Text into Buffer .. . .. . ShowMessage Buffer.get .. . .. . .. . .. . Now with that said if you are going to continue using C++Builder you should learn how to use its built-in functionalities like UnicodeString which the RTL VCL relies heavily on use the System : : String alias for most code use UnicodeString directly only when absolutely necessary ." ] }
{ "confidence": [ 73.24380493164062, 65.9896240234375, 65.89019775390625, 65.4693374633789, 64.04386138916016, 60.24170684814453, 60.11519241333008, 59.75705337524414, 59.737876892089844, 59.737876892089844, 59.737876892089844, 59.04909133911133, 58.804378509521484, 58.804378509521484, 58.3768196105957, 58.199676513671875, 57.44116973876953, 56.505828857421875, 56.23461151123047, 56.06234359741211 ], "content": [ "Question : I m not an expert in C++ but need to update an old project to Embarcadero C++ Builder XE7 . This code does not compile the fpFixed line : .. . .. . Where Pitch is : .. . .. . and .. . .. . Error : E2451 Undefined symbol fpFixed .. . .. . Another two attempts : .. . .. . Error for both : E2108 Improper use of typedef TFontPitch .. . .. . But this - strangely - compiles with no warning : .. . .. . What is the explanation of this and am I doing something wrong here Just came to this solution by trial and error . .. . Answer : NewText- Font- Pitch TFontPitch.fpFixed .. . NewText- Font- Pitch System : : Uitypes : : TFontPitch.fpFixed .. . .. . You were on the right track with this but you used the wrong syntax . Use : : instead of . : .. . .. . This is documented in Embarcadero s DocWiki : .. . .. . Strongly Typed Enums C++0x http : docwiki.embarcadero.com RADStudio XE7 en Strongly Typed Enums C++0x", "Question : last time I jumped from cpp builder 6 to xe7 and I can t find ShellListView and ShellTreeView . I searched through whole forum but I couldn t find answear . Can someone explain me where is it cause I m looking for it about 3h . Thanks for help : .. . Answer : You have to : .. . .. . locate the DemoDirInstall Path CPP Apps ShellControls folder .. . .. . DemoDirInstall Path is somewhere near C : Documents and Settings All Users Documents RAD Studio XXX Demos .. . .. . load the ShellControls.groupproj .. . .. . build bcbshlctrls.bpl the runtime package .. . build and install dclshlctrls.bpl the designtime package .. . .. . The directory also contains code that demonstrates the creation of components which use the Windows Shell API .", "Question : null .. . Answer : During the installation C++ Builder https : en.wikipedia.org wiki C 2B 2BBuilder XE7 shows the error : .. . .. . Invalid Serial Number . Deleting all files cglm.ini does not help . Is there a way to fix it Comment : Did you find a solution", "Question : Suddenly out of the blue I get the LME288 linker-error . I have no AV installed and the project has been running fine for over a year . I have tried : .. . .. . Incremental linker disabled enabled no difference.. . .. . Manually removing all files in debug still no change.. . .. . Full Build no difference.. . .. . Reboot computer no changes.. . This has been asked before here http : stackoverflow.com questions 23107535 c-builder-xe5-error-detected-lme288 but no real explanation or solution was presented . What else can I do to fix this EDIT .. . I tried to rebuild a couple of other projects that has been running fine for years and now I get the LME288 error on all my projects . Comment : This has been reported to QualityCentral several times over the years : 102099 http : qc.embarcadero.com wc qcmain.aspx d 102099 106085 http : qc.embarcadero.com wc qcmain.aspx d 106085 and 109265 http : qc.embarcadero.com wc qcmain.aspx d 109265 Comment : All three reports are closed without any solution or workaround . I doubt this problem is project related . One guy had even reinstalled Builder and still had the problem . It must be some cached files being corrupted . I m cleaning up all my temp folders to see if it helps . Comment : I cleaned the disk from all temporary files emptied the trashbin and now it works again . Comment : @MaxKielland a similar fix is suggested in the last comment to QC 102099 http : qc.embarcadero.com wc qcmain.aspx d 102099 . Would be nice if this was enough of a clue for QC to try and fix the problem Comment : This bug in builder makes me seethe . I have had a huge exchange with Embarcadero support trying to get to the bottom of it . All my problems started with XE7 on Windows 10 along the way several things fixed it for me for a short time . Installing XE8 fixed XE7 . Cleaning up my project by removing non-version controlled files . However the one thing that has given me the biggest fix fine for a few months until today was making a new user account on my PC . Now I am sitting here raging at the time I m wasting I will never ever use Builder again by choice because of this bug . .. . Answer : I fixed this by ensuring that the Embarcadero installation folder e.g . C : Program Files x86 Embarcadero was excluded from all antivirus scans .", "Question : I am new in programming . Actually I am in 2nd year of college and starting an internship . They want me to do a program in C++ builder but I only know C . What I studied . And I don t have any knowledge about OOP . So my question is . I have TEdit1 and I want to verify if the data introduced in that textbox is a number . I know to verify if it is a number but I don t know how to put data from TEdit into string . I wrote some code but it doesn t work . And I get these errors : .. . .. . Can you please explain what i did wrong or where i can found Embarcadero C++ Builder tutorials I searched all google and didn t find something to help me . .. . Answer : Your code has several mistakes in it : .. . .. . 1 . you are declaring two Buffer variables in the same scope . That is not allowed . You need to remove one of them . 2 . you are passing the std : : auto-ptr http : en.cppreference.com w cpp memory auto-ptr itself to ShowMessage but it expects a System : : UnicodeString http : docwiki.embarcadero.com Libraries XE7 en System.UnicodeString instead thus the compiler error message . You can use the std : : auto-ptr : : get method to get the wchar-t pointer and pass it to ShowMessage as UnicodeString has a constructor that accepts wchar-t as input : .. . .. . ShowMessage Buffer.get .. . .. . .. . 3 . despite the above you actually cannot use a pointer from new with std : : auto-ptr to begin with . std : : auto-ptr uses delete instead of delete to free the memory being pointed at . You must always use delete with new and delete with new . So while the code will compile it will not free the memory correctly at runtime . C++11 introduced a new std : : unique-ptr http : en.cppreference.com w cpp memory unique-ptr class to replace std : : auto-ptr and std : : unique-ptr supports new and delete however C++Builder s 32bit compiler does not support C++11 yet - that is in the works - but its 64bit compiler does : .. . .. . include memory .. . .. . void fastcall TForm1 : : Button1Click TObject Sender .. . .. . int Size Edit1- GetTextLen Get length of string in Edit1 .. . Size++ Add room for null character .. . .. . std : : unique-ptr Char Buffer new Char Size Creates Buffer dynamic variable .. . .. . Edit1- GetTextBuf Buffer.get Size Puts Edit1- Text into Buffer .. . .. . ShowMessage Buffer.get .. . .. . .. . .. . Now with that said if you are going to continue using C++Builder you should learn how to use its built-in functionalities like UnicodeString which the RTL VCL relies heavily on use the System : : String alias for most code use UnicodeString directly only when absolutely necessary . Your example can be vastly simplified using the TEdit : : Text http : docwiki.embarcadero.com Libraries XE7 en Vcl.StdCtrls.TEdit.Text property : .. . .. . The simplest solution to your problem would be to use the TCSpinEdit component instead of TEdit as TCSpinEdit only allows numeric-input in the first place and has a Value property that returns an int : .. . .. . But if you have to stick with TEdit there are many ways to check a UnicodeString for numeric content . You can set the TEdit : : NumbersOnly http : docwiki.embarcadero.com Libraries XE7 en Vcl.StdCtrls.TEdit.NumbersOnly property to true so the user cannot enter a non-numeric value unless they use copy-paste but let s ignore that for the moment and then use the RTL s StrToInt http : docwiki.embarcadero.com Libraries XE7 en System.SysUtils.StrToInt function or System : : UnicodeString : : ToInt http : docwiki.embarcadero.com Libraries XE7 en System.UnicodeString.ToInt method to convert it as-is : .. . .. . Or you can use the RTL s System : : Sysutils : : TryStrToInt http : docwiki.embarcadero.com Libraries XE7 en System.SysUtils.TryStrToInt function : .. . .. . Or you can use the STL s std : : wistringstream http : en.cppreference.com w cpp io basic istringstream class : .. . .. . Or since you have a C background you can use the C wtoi http : en.cppreference.com w cpp string byte atoi function which doesn t offer much in the way of error checking : .. . .. . Or you can use the C wcstol http : en.cppreference.com w cpp string wide wcstol function : .. . .. . Or you can use the C swscanf http : en.cppreference.com w cpp io c fwscanf function : Comment : XE5 s bcc32 has std : : unique-ptr . It s not quite compliant it requires its template parameter to be a complete type in some situations where C++11 allows an incomplete-type but it s good enough for many uses including pImpls Comment : ShowMessage Edit1- Text would be another option Comment : @MattMcNabb : sure that would address the specific example Cantor gave but not the overall task Cantor is trying to solve .", "Question : Suddenly out of the blue I get the LME288 linker-error . I have no AV installed and the project has been running fine for over a year . I have tried : .. . .. . Incremental linker disabled enabled no difference.. . .. . Manually removing all files in debug still no change.. . .. . Full Build no difference.. . .. . Reboot computer no changes.. . This has been asked before here http : stackoverflow.com questions 23107535 c-builder-xe5-error-detected-lme288 but no real explanation or solution was presented . What else can I do to fix this EDIT .. . I tried to rebuild a couple of other projects that has been running fine for years and now I get the LME288 error on all my projects . Comment : This has been reported to QualityCentral several times over the years : 102099 http : qc.embarcadero.com wc qcmain.aspx d 102099 106085 http : qc.embarcadero.com wc qcmain.aspx d 106085 and 109265 http : qc.embarcadero.com wc qcmain.aspx d 109265 Comment : All three reports are closed without any solution or workaround . I doubt this problem is project related . One guy had even reinstalled Builder and still had the problem . It must be some cached files being corrupted . I m cleaning up all my temp folders to see if it helps . Comment : I cleaned the disk from all temporary files emptied the trashbin and now it works again . Comment : @MaxKielland a similar fix is suggested in the last comment to QC 102099 http : qc.embarcadero.com wc qcmain.aspx d 102099 . Would be nice if this was enough of a clue for QC to try and fix the problem Comment : This bug in builder makes me seethe . I have had a huge exchange with Embarcadero support trying to get to the bottom of it . All my problems started with XE7 on Windows 10 along the way several things fixed it for me for a short time . Installing XE8 fixed XE7 . Cleaning up my project by removing non-version controlled files . However the one thing that has given me the biggest fix fine for a few months until today was making a new user account on my PC . Now I am sitting here raging at the time I m wasting I will never ever use Builder again by choice because of this bug . .. . Answer : I resolved the problem by using editbin to set the LARGEADDRESSAWARE flag in ilink32.exe . This solution came from Hiroyuki Shimada posted at http : qc.embarcadero.com wc qcmain.aspx d 134775 on 1 12 2016 . He also applied it to bcc32.exe I didn t need to . As a public service I have posted my patched ilink32.exe at this location : https : s3.amazonaws.com public-mfay ilink32.exe .. . .. . To use it rename your ilink32.exe in your RAD Studio binaries directory e.g . C : Program Files x86 Embarcadero Studio 17.0 bin for RAD Studio Seattle and copy mine in its place . I am using RAD Studio 10 Seattle Update 1 on Windows 10 . This problem has been around for a long time and is not limited to XE3 XE5 XE7 XE8.. . There is now a lengthy discussion lament as to why this was fixed in one version of RAD Studio but backed out in a later version apparently LAA resulted in failures when linking incrementally with the static RTL . See : https : quality.embarcadero.com browse RSP-13247 .. . .. . Also in the above link posted 28-Mar-2016 : apparently this patch does NOT address the linker errors EXE1825 or out-of-memory . Read below if you want to see how my ilink32.exe was created.. . .. . .. . .. . .. . 1 . Copy bcc32.exe and ilink32.exe to prevent UAC s block and to back them up .. . .. . D : copy C : Program Files x86 Embarcadero RAD Studio 12.0 bin bcc32.exe . .. . .. . D : copy C : Program Files x86 Embarcadero RAD Studio 12.0 bin ilink32.exe . .. . .. . 2 . Set Large Address Aware flag in their PE header with editbin.exe tool included in MS Visual Studio but see below : .. . .. . D : editbin LARGEADDRESSAWARE bcc32.exe .. . .. . D : editbin LARGEADDRESSAWARE ilink32.exe .. . .. . 3 . Overwrite them on the original locations . Explorer will make this operation easier to force UAC to allow us copying them . For those of you reluctant to install MS Visual Studio just to run editbin which MS claims must be run from within the IDE there is a simpler standalone installation : http : www.masm32.com download.htm which creates c : masm32 bin editbin.exe . I got a few warnings involving ordinals 201 and 203 during MASM32 installation but its self-test passed and all I needed was editbin.exe . Comment : In your case were you actually running into large file problems Some of the other people having LME288 only had small projects and the error did seem to be caused by corrupted or badly-permissioned temporary file so perhaps the same error-code is used for two quite separate problems . Comment : 50 000 lines-of-code in 40 modules so medium-sized . The problem could occur in a pristine build directory with no temporary files .", "Question : Suddenly out of the blue I get the LME288 linker-error . I have no AV installed and the project has been running fine for over a year . I have tried : .. . .. . Incremental linker disabled enabled no difference.. . .. . Manually removing all files in debug still no change.. . .. . Full Build no difference.. . .. . Reboot computer no changes.. . This has been asked before here http : stackoverflow.com questions 23107535 c-builder-xe5-error-detected-lme288 but no real explanation or solution was presented . What else can I do to fix this EDIT .. . I tried to rebuild a couple of other projects that has been running fine for years and now I get the LME288 error on all my projects . Comment : This has been reported to QualityCentral several times over the years : 102099 http : qc.embarcadero.com wc qcmain.aspx d 102099 106085 http : qc.embarcadero.com wc qcmain.aspx d 106085 and 109265 http : qc.embarcadero.com wc qcmain.aspx d 109265 Comment : All three reports are closed without any solution or workaround . I doubt this problem is project related . One guy had even reinstalled Builder and still had the problem . It must be some cached files being corrupted . I m cleaning up all my temp folders to see if it helps . Comment : I cleaned the disk from all temporary files emptied the trashbin and now it works again . Comment : @MaxKielland a similar fix is suggested in the last comment to QC 102099 http : qc.embarcadero.com wc qcmain.aspx d 102099 . Would be nice if this was enough of a clue for QC to try and fix the problem Comment : This bug in builder makes me seethe . I have had a huge exchange with Embarcadero support trying to get to the bottom of it . All my problems started with XE7 on Windows 10 along the way several things fixed it for me for a short time . Installing XE8 fixed XE7 . Cleaning up my project by removing non-version controlled files . However the one thing that has given me the biggest fix fine for a few months until today was making a new user account on my PC . Now I am sitting here raging at the time I m wasting I will never ever use Builder again by choice because of this bug . .. . Answer : The solution is very simple : the windows PATH environment variable exceeds its limit of 2047 bytes . Please see my description here : http : blog.bitart.at lme288 German", "Question : Suddenly out of the blue I get the LME288 linker-error . I have no AV installed and the project has been running fine for over a year . I have tried : .. . .. . Incremental linker disabled enabled no difference.. . .. . Manually removing all files in debug still no change.. . .. . Full Build no difference.. . .. . Reboot computer no changes.. . This has been asked before here http : stackoverflow.com questions 23107535 c-builder-xe5-error-detected-lme288 but no real explanation or solution was presented . What else can I do to fix this EDIT .. . I tried to rebuild a couple of other projects that has been running fine for years and now I get the LME288 error on all my projects . Comment : This has been reported to QualityCentral several times over the years : 102099 http : qc.embarcadero.com wc qcmain.aspx d 102099 106085 http : qc.embarcadero.com wc qcmain.aspx d 106085 and 109265 http : qc.embarcadero.com wc qcmain.aspx d 109265 Comment : All three reports are closed without any solution or workaround . I doubt this problem is project related . One guy had even reinstalled Builder and still had the problem . It must be some cached files being corrupted . I m cleaning up all my temp folders to see if it helps . Comment : I cleaned the disk from all temporary files emptied the trashbin and now it works again . Comment : @MaxKielland a similar fix is suggested in the last comment to QC 102099 http : qc.embarcadero.com wc qcmain.aspx d 102099 . Would be nice if this was enough of a clue for QC to try and fix the problem Comment : This bug in builder makes me seethe . I have had a huge exchange with Embarcadero support trying to get to the bottom of it . All my problems started with XE7 on Windows 10 along the way several things fixed it for me for a short time . Installing XE8 fixed XE7 . Cleaning up my project by removing non-version controlled files . However the one thing that has given me the biggest fix fine for a few months until today was making a new user account on my PC . Now I am sitting here raging at the time I m wasting I will never ever use Builder again by choice because of this bug . .. . Answer : I found a workaround that seems to work . It seems to have something to do with corrupted temporary files . I managed to get it to work again after I did a Disk Cleanup on my system disk . I Deleted all files in the list all checkboxes checked and also the Clean up system files .. . .. . After that I could compile and link even without rebooting . Even the incremental link began to work again Comment : Thanks for sharing This also worked for me with C++ Builder XE6 . For anyone else with this issue Disk Cleanup is the Windows tool cleanmgr.exe and not a feature of C++ Builder . Comment : I wonder if it could be related to temporary files being owned by Administrator and you are running C++B as user and so it cannot write the required temporary files Comment : Sometimes it helps sometimes not . I wish I could withdraw my upvote . Comment : I ve tried this before and it appeared to work but today I spent 3 hours trying everything that I could think of with no luck . I lost the count on how many times I run the Disk Clenaup restarted cleaned by hand all temps ran as Administrator and so on . What appears to did the trick was to change the amount of virtual-memory . I had it to Size managed by the OS but I set it manually somewhat bigger and now it works.. . lets see for how long : Comment : I had to reboot after running Disk Cleanup and that fixed it .", "Question : Suddenly out of the blue I get the LME288 linker-error . I have no AV installed and the project has been running fine for over a year . I have tried : .. . .. . Incremental linker disabled enabled no difference.. . .. . Manually removing all files in debug still no change.. . .. . Full Build no difference.. . .. . Reboot computer no changes.. . This has been asked before here http : stackoverflow.com questions 23107535 c-builder-xe5-error-detected-lme288 but no real explanation or solution was presented . What else can I do to fix this EDIT .. . I tried to rebuild a couple of other projects that has been running fine for years and now I get the LME288 error on all my projects . Comment : This has been reported to QualityCentral several times over the years : 102099 http : qc.embarcadero.com wc qcmain.aspx d 102099 106085 http : qc.embarcadero.com wc qcmain.aspx d 106085 and 109265 http : qc.embarcadero.com wc qcmain.aspx d 109265 Comment : All three reports are closed without any solution or workaround . I doubt this problem is project related . One guy had even reinstalled Builder and still had the problem . It must be some cached files being corrupted . I m cleaning up all my temp folders to see if it helps . Comment : I cleaned the disk from all temporary files emptied the trashbin and now it works again . Comment : @MaxKielland a similar fix is suggested in the last comment to QC 102099 http : qc.embarcadero.com wc qcmain.aspx d 102099 . Would be nice if this was enough of a clue for QC to try and fix the problem Comment : This bug in builder makes me seethe . I have had a huge exchange with Embarcadero support trying to get to the bottom of it . All my problems started with XE7 on Windows 10 along the way several things fixed it for me for a short time . Installing XE8 fixed XE7 . Cleaning up my project by removing non-version controlled files . However the one thing that has given me the biggest fix fine for a few months until today was making a new user account on my PC . Now I am sitting here raging at the time I m wasting I will never ever use Builder again by choice because of this bug . .. . Answer : As Drewski http : stackoverflow.com a 32887736 3235496 I ran into the LME288 error after the upgrade to Windows 10 x64 . The error disappeared changing the Data Execution Prevention settings for ilink32.exe : .. . .. . System properties - Advanced system settings - Performance - Settings - Data Execution Prevention .. . Turn on DEP for all programs and services except those I select - ilink32.exe . Comment : The fact that this works is a bit worrying", "Question : Suddenly out of the blue I get the LME288 linker-error . I have no AV installed and the project has been running fine for over a year . I have tried : .. . .. . Incremental linker disabled enabled no difference.. . .. . Manually removing all files in debug still no change.. . .. . Full Build no difference.. . .. . Reboot computer no changes.. . This has been asked before here http : stackoverflow.com questions 23107535 c-builder-xe5-error-detected-lme288 but no real explanation or solution was presented . What else can I do to fix this EDIT .. . I tried to rebuild a couple of other projects that has been running fine for years and now I get the LME288 error on all my projects . Comment : This has been reported to QualityCentral several times over the years : 102099 http : qc.embarcadero.com wc qcmain.aspx d 102099 106085 http : qc.embarcadero.com wc qcmain.aspx d 106085 and 109265 http : qc.embarcadero.com wc qcmain.aspx d 109265 Comment : All three reports are closed without any solution or workaround . I doubt this problem is project related . One guy had even reinstalled Builder and still had the problem . It must be some cached files being corrupted . I m cleaning up all my temp folders to see if it helps . Comment : I cleaned the disk from all temporary files emptied the trashbin and now it works again . Comment : @MaxKielland a similar fix is suggested in the last comment to QC 102099 http : qc.embarcadero.com wc qcmain.aspx d 102099 . Would be nice if this was enough of a clue for QC to try and fix the problem Comment : This bug in builder makes me seethe . I have had a huge exchange with Embarcadero support trying to get to the bottom of it . All my problems started with XE7 on Windows 10 along the way several things fixed it for me for a short time . Installing XE8 fixed XE7 . Cleaning up my project by removing non-version controlled files . However the one thing that has given me the biggest fix fine for a few months until today was making a new user account on my PC . Now I am sitting here raging at the time I m wasting I will never ever use Builder again by choice because of this bug . .. . Answer : Fixed for XE10 and Windows 10 x64 with Bitdefender IS 2016 : .. . .. . Bitdefender - Modules - Antivirus - Exclusions - Excluded Processes - Add .. . bin ilink32.exe - Allow", "Question : Suddenly out of the blue I get the LME288 linker-error . I have no AV installed and the project has been running fine for over a year . I have tried : .. . .. . Incremental linker disabled enabled no difference.. . .. . Manually removing all files in debug still no change.. . .. . Full Build no difference.. . .. . Reboot computer no changes.. . This has been asked before here http : stackoverflow.com questions 23107535 c-builder-xe5-error-detected-lme288 but no real explanation or solution was presented . What else can I do to fix this EDIT .. . I tried to rebuild a couple of other projects that has been running fine for years and now I get the LME288 error on all my projects . Comment : This has been reported to QualityCentral several times over the years : 102099 http : qc.embarcadero.com wc qcmain.aspx d 102099 106085 http : qc.embarcadero.com wc qcmain.aspx d 106085 and 109265 http : qc.embarcadero.com wc qcmain.aspx d 109265 Comment : All three reports are closed without any solution or workaround . I doubt this problem is project related . One guy had even reinstalled Builder and still had the problem . It must be some cached files being corrupted . I m cleaning up all my temp folders to see if it helps . Comment : I cleaned the disk from all temporary files emptied the trashbin and now it works again . Comment : @MaxKielland a similar fix is suggested in the last comment to QC 102099 http : qc.embarcadero.com wc qcmain.aspx d 102099 . Would be nice if this was enough of a clue for QC to try and fix the problem Comment : This bug in builder makes me seethe . I have had a huge exchange with Embarcadero support trying to get to the bottom of it . All my problems started with XE7 on Windows 10 along the way several things fixed it for me for a short time . Installing XE8 fixed XE7 . Cleaning up my project by removing non-version controlled files . However the one thing that has given me the biggest fix fine for a few months until today was making a new user account on my PC . Now I am sitting here raging at the time I m wasting I will never ever use Builder again by choice because of this bug . .. . Answer : We has the same issue and solved it by increasing the virtual-memory for Windows it was very low 800Mo it is now about 4 Go", "Question : I ve just downloaded last version of VirtualTreeView https : code.google.com p virtual-treeview . I ve been able to generate the runtime and design packages in 32bits with Embarcadero C++ Builder XE7 . But when trying to build the runtime one in 64 bits I m getting this error : .. . .. . DCC Fatal Error E2202 Required package DesignIDE not found .. . .. . I ve already checked that the runtime package doesn t require designide.bpi . Any idea of what I m missing .. . Answer : I just downloaded the latest version from the VirtualTree from here : https : virtual-treeview.googlecode.com svn-trunk . Since the designtime package doesn t have a 64 bit configuration Which makes sense because the IDE is a 32-bit app you must have tried to compile the runtime package . But I can compile the runtime package without a problem . That s why I would like to ask you if you tried to compile the same version as me", "Question : Suddenly out of the blue I get the LME288 linker-error . I have no AV installed and the project has been running fine for over a year . I have tried : .. . .. . Incremental linker disabled enabled no difference.. . .. . Manually removing all files in debug still no change.. . .. . Full Build no difference.. . .. . Reboot computer no changes.. . This has been asked before here http : stackoverflow.com questions 23107535 c-builder-xe5-error-detected-lme288 but no real explanation or solution was presented . What else can I do to fix this EDIT .. . I tried to rebuild a couple of other projects that has been running fine for years and now I get the LME288 error on all my projects . Comment : This has been reported to QualityCentral several times over the years : 102099 http : qc.embarcadero.com wc qcmain.aspx d 102099 106085 http : qc.embarcadero.com wc qcmain.aspx d 106085 and 109265 http : qc.embarcadero.com wc qcmain.aspx d 109265 Comment : All three reports are closed without any solution or workaround . I doubt this problem is project related . One guy had even reinstalled Builder and still had the problem . It must be some cached files being corrupted . I m cleaning up all my temp folders to see if it helps . Comment : I cleaned the disk from all temporary files emptied the trashbin and now it works again . Comment : @MaxKielland a similar fix is suggested in the last comment to QC 102099 http : qc.embarcadero.com wc qcmain.aspx d 102099 . Would be nice if this was enough of a clue for QC to try and fix the problem Comment : This bug in builder makes me seethe . I have had a huge exchange with Embarcadero support trying to get to the bottom of it . All my problems started with XE7 on Windows 10 along the way several things fixed it for me for a short time . Installing XE8 fixed XE7 . Cleaning up my project by removing non-version controlled files . However the one thing that has given me the biggest fix fine for a few months until today was making a new user account on my PC . Now I am sitting here raging at the time I m wasting I will never ever use Builder again by choice because of this bug . .. . Answer : Just running XE8 as administrator fixed it for me .", "Question : Suddenly out of the blue I get the LME288 linker-error . I have no AV installed and the project has been running fine for over a year . I have tried : .. . .. . Incremental linker disabled enabled no difference.. . .. . Manually removing all files in debug still no change.. . .. . Full Build no difference.. . .. . Reboot computer no changes.. . This has been asked before here http : stackoverflow.com questions 23107535 c-builder-xe5-error-detected-lme288 but no real explanation or solution was presented . What else can I do to fix this EDIT .. . I tried to rebuild a couple of other projects that has been running fine for years and now I get the LME288 error on all my projects . Comment : This has been reported to QualityCentral several times over the years : 102099 http : qc.embarcadero.com wc qcmain.aspx d 102099 106085 http : qc.embarcadero.com wc qcmain.aspx d 106085 and 109265 http : qc.embarcadero.com wc qcmain.aspx d 109265 Comment : All three reports are closed without any solution or workaround . I doubt this problem is project related . One guy had even reinstalled Builder and still had the problem . It must be some cached files being corrupted . I m cleaning up all my temp folders to see if it helps . Comment : I cleaned the disk from all temporary files emptied the trashbin and now it works again . Comment : @MaxKielland a similar fix is suggested in the last comment to QC 102099 http : qc.embarcadero.com wc qcmain.aspx d 102099 . Would be nice if this was enough of a clue for QC to try and fix the problem Comment : This bug in builder makes me seethe . I have had a huge exchange with Embarcadero support trying to get to the bottom of it . All my problems started with XE7 on Windows 10 along the way several things fixed it for me for a short time . Installing XE8 fixed XE7 . Cleaning up my project by removing non-version controlled files . However the one thing that has given me the biggest fix fine for a few months until today was making a new user account on my PC . Now I am sitting here raging at the time I m wasting I will never ever use Builder again by choice because of this bug . .. . Answer : Rebooting W10 solved this issue on XE5 but I am desactivating incremental-build", "Question : Suddenly out of the blue I get the LME288 linker-error . I have no AV installed and the project has been running fine for over a year . I have tried : .. . .. . Incremental linker disabled enabled no difference.. . .. . Manually removing all files in debug still no change.. . .. . Full Build no difference.. . .. . Reboot computer no changes.. . This has been asked before here http : stackoverflow.com questions 23107535 c-builder-xe5-error-detected-lme288 but no real explanation or solution was presented . What else can I do to fix this EDIT .. . I tried to rebuild a couple of other projects that has been running fine for years and now I get the LME288 error on all my projects . Comment : This has been reported to QualityCentral several times over the years : 102099 http : qc.embarcadero.com wc qcmain.aspx d 102099 106085 http : qc.embarcadero.com wc qcmain.aspx d 106085 and 109265 http : qc.embarcadero.com wc qcmain.aspx d 109265 Comment : All three reports are closed without any solution or workaround . I doubt this problem is project related . One guy had even reinstalled Builder and still had the problem . It must be some cached files being corrupted . I m cleaning up all my temp folders to see if it helps . Comment : I cleaned the disk from all temporary files emptied the trashbin and now it works again . Comment : @MaxKielland a similar fix is suggested in the last comment to QC 102099 http : qc.embarcadero.com wc qcmain.aspx d 102099 . Would be nice if this was enough of a clue for QC to try and fix the problem Comment : This bug in builder makes me seethe . I have had a huge exchange with Embarcadero support trying to get to the bottom of it . All my problems started with XE7 on Windows 10 along the way several things fixed it for me for a short time . Installing XE8 fixed XE7 . Cleaning up my project by removing non-version controlled files . However the one thing that has given me the biggest fix fine for a few months until today was making a new user account on my PC . Now I am sitting here raging at the time I m wasting I will never ever use Builder again by choice because of this bug . .. . Answer : I have a different solution that hopefully will help someone struggling with this . I tried everything and none of the solutions suggested earlier worked for me . Disk cleanup didn t help . This is clearly a bug in C++Builder that existed for many years and is still not fixed even in XE8 as of 2015 . Luckily I had another computer with working environment where the same project did compile . I copied all files .exe .obj etc from the output directory Win32 Debug from that computer to the one where I had the problem and that magically set C++ Builder straight all builds afterward started to work .", "Question : I have been googling high and low and can t find a solution that will remove the warning even when I use the using directive . I want to hide the original virtual int fastcall ShowModal void and expose a new one taking an Exception parameter . But it still complaints on hides virtual function : .. . .. . I have also tried using TForm : : ShowModal but with the same result . Any ideas of how to solve this warning .. . .. . EDIT .. . I found out that it works perfectly well if I override the show method instead : .. . .. . So why isn t it working with ShowModal .. . Answer : You must declare overloaded version as virtual too : .. . .. . Does not know if C++Builder supports C++11 but if it does try also to delete overload which you want to hide : .. . .. . instead of placing it into private section . Comment : virtual doesn t help but I found out that if I declare the ShowModal body in the class definition it works but not If I place it in the .cpp file . Bcc32 in XE7 doesn t have the full C++11 implemented so delete didn t work . Comment : C++Builder s 64-bit compiler for Windows introduced in XE2 supports C++11 . C++Builder just recently gained a new 32-bit C++11 compiler for Windows http : docwiki.embarcadero.com RADStudio Seattle en What 27s New New Clang-enhanced C.2B.2B Compiler for 32-bit Windows in C++Builder 10 Seattle the 32-bit OSX compiler does not support C++11 yet AFAIK .", "Question : I need to connect to a server with SSL in C++Builder XE7 . I can find stuff for HTTPS and SMTP but nothing for custom connections . In BCB5 it was a lot easier I would do it with custom code but now with Android and iOS things need to be done a little differently as we now need to support these products too . I ve looked at TIdSocketSSL but with the very few examples I could find it seems to need an owner which ultimate comes from SMTP or HTTPS . .. . Answer : C++Builder ships with Indy which has a TIdTCPClient component that you can use for implementing custom protocols . There are plenty of examples on Embarcadero s forum Indy s forum StackOverflow and various blogs demonstrating how to send receive custom data with Indy . For SSL TLS simply assign a TIdSSLIOHandlerSocketOpenSSL component to the TIdTCPClient : : IOHandler property before calling Connect and configure its properties as needed certificates SSL TLS version s etc . When you want to perform the SSL handshake set the TIdSSLIOHandlerOpenSSL : : PassThrough property to false . You can set it before calling Connect so the handshake is immediate before any data is exchanged aka implicit SSL TLS or you can set it after exchanging unencrypted data first aka explicit SSL TLS depending on your protocol needs .", "Question : I am trying to use the code below to open an .xlsx file from C++Builder in RAD Studio XE7 : .. . .. . But the last line causes exception with message : .. . .. . Project2.exe raised exception class EOleException with message .xlsx . Translation from russian : .. . .. . Project2.exe raised exception class EOleException with message Unfortunately we were unable to find the file TRUE.xlsx . It may have been moved renamed or deleted . Screen with place where the source breaks http : i.stack.imgur.com JRJ7Q.png .. . .. . The code in Delphi seems to work fine : .. . .. . Does anyone know the solution Update1 : The following code in VB also works fine : .. . .. . Update2 : Sending a raw string literal causes the same exception http : i.stack.imgur.com m0Fb0.png . Books.OleProcedure Open uR D : 1.xlsx .. . .. . It also doesn t seem to be an environment problem . I tested the example at several computers with no effect . Comment : Please don t change the question . Feel free to add more info in an edit . But don t remove the original question . Comment : Sorry added them but also no changes . Seems like something with static-cast conversion on the screen doesn t it Comment : The cast is working fine I think . Comment : What happens when you change the filename to something other that 1 Comment : Error remains the same when I change the path to D : file.xlsx .. . Answer : The problem seems very specifically related to the use of C++ and thus the way that C++ compilers deal with literal strings or at least this particular C++ compiler . Quite what the problem is in this case I cannot say - it could even be a bug in the compiler since seemingly correct escaping doesn t address the problem . You could employ various strategies to eliminate the possibility that it is handling of the literal string in this case . But since this does involve a literal string and since you are using XE7 I believe you should be able to bypass this more explicitly by expressing the literal as a raw string as per C++11 which is should be supported by C++ Builder XE7 : .. . .. . Note that with raw string-literals you specifically do not escape chars . Comment : I have tried it with no success Comment : @Deltics It is a stretch to imagine that there exists a compiler that cannot escape backslashes in literals . Comment : Possibly but if the problem was in the OLE objects the file system or the OLE automation server then you would see the same result no matter what language was involved . It s too much of a coincidence that the problem only arises when one particular language is being used . And this is an Embarcadero compiler we re talking about... . a vendor not known for the quality of their work . Certainly not lately . Try the same C C++ code in Visual Studio and see what happens First eliminate the impossible.. . Comment : @Deltics Escapes in literals work in all compilers . It s the COM dispatch that is unique to Emba . I can t imagine how they stuffed it up . Comment : Ah yes didn t spot the OleProcedure intermediate . As I said.. . Not a vendor known for the quality of their work.. .", "Question : I have RAD Studio XE7 installed on my computer and i have everything like VCL Forms for Delphi C++.etc but how do i manage to get FireMonkey HD and 3D application frameworks for Delphi and C++ Builder both in RAD Studio XE7.Do I have to download it or it is already in RAD Studio XE7 and I have to follow some steps to get FireMonkey . .. . Answer : FireMonkey is pre-installed as part of the IDE . You do not need to do anything extra to get it . In earlier versions there were separate FireMonkey Desktop Application which had HD and 3D options and FireMonkey Mobile Application projects . They no longer exist as separate projects in XE7 . They have been merged together into a single Multi-Device Application project . When you create a new Multi-Device Application project the dialog that appears is the same as the old FireMonkey Mobile Application project where one of the options is 3D Application . Comment : I used 3D Application but i can t add anything to it not even 3D shapes and when I run it it gives me error something like access of violation.Do you know how I can ignore it Comment : What actually happens when you try to add anything to it What are you adding exactly BTW an Access Violation means invalid memory is being accessed . You don t really want to ignore that . Is it happening in the IDE itself or when you run your app Comment : So what could I add-in the 3D application.I have tried to add 3D shapes but it was useless Comment : But why is it useless What is actually happening when you try", "Question : Suddenly out of the blue I get the LME288 linker-error . I have no AV installed and the project has been running fine for over a year . I have tried : .. . .. . Incremental linker disabled enabled no difference.. . .. . Manually removing all files in debug still no change.. . .. . Full Build no difference.. . .. . Reboot computer no changes.. . This has been asked before here http : stackoverflow.com questions 23107535 c-builder-xe5-error-detected-lme288 but no real explanation or solution was presented . What else can I do to fix this EDIT .. . I tried to rebuild a couple of other projects that has been running fine for years and now I get the LME288 error on all my projects . Comment : This has been reported to QualityCentral several times over the years : 102099 http : qc.embarcadero.com wc qcmain.aspx d 102099 106085 http : qc.embarcadero.com wc qcmain.aspx d 106085 and 109265 http : qc.embarcadero.com wc qcmain.aspx d 109265 Comment : All three reports are closed without any solution or workaround . I doubt this problem is project related . One guy had even reinstalled Builder and still had the problem . It must be some cached files being corrupted . I m cleaning up all my temp folders to see if it helps . Comment : I cleaned the disk from all temporary files emptied the trashbin and now it works again . Comment : @MaxKielland a similar fix is suggested in the last comment to QC 102099 http : qc.embarcadero.com wc qcmain.aspx d 102099 . Would be nice if this was enough of a clue for QC to try and fix the problem Comment : This bug in builder makes me seethe . I have had a huge exchange with Embarcadero support trying to get to the bottom of it . All my problems started with XE7 on Windows 10 along the way several things fixed it for me for a short time . Installing XE8 fixed XE7 . Cleaning up my project by removing non-version controlled files . However the one thing that has given me the biggest fix fine for a few months until today was making a new user account on my PC . Now I am sitting here raging at the time I m wasting I will never ever use Builder again by choice because of this bug . .. . Answer : I have been having this problem as well with RAD Studio XE8 installed on Windows 10 . When installed on Windows 7 x86 RAD Studio XE8 worked properly . After upgrading to Windows 10 x86 I ran into the dreaded unknown heap LME288 errors . At first it didn t appear on Windows 10 but if I installed something it would pop-up . If I restored the computer to Windows 7 it would disappear . After a little research on the net I found the solution . There is a memory problem with ilink32.exe and you need to enable the 3GB memory space at bootup on the computer . Here is what I do now if this error is ever displayed again : .. . .. . 1 . Run command-prompt as Administrator . 2 . Type without quotes bcdedit set IncreaseUserVa 3072 .. . 3 . Reboot computer . After doing that ilink32 works properly . I found that after installing a newer version of Acronis True Image 2016 the LME288 error came back . But running the bcdedit solution here it fixed the RAD Studio XE8 linker Comment : this solution works Comment : ilink32.exe is not compiled with LARGEADDRESSAWARE flag . So I dont understand how this solution could work . Comment : For me this solutions doesnt work . Comment : works for me thanks Comment : Worked for me as well" ] }
[ "yes-answer-long", "yes-answer-short" ]
android
UNK_RELATION
log4cxx@apache@74
log4cxx -- apache log4cxx is a logging framework for c++ patterned after @placeholder log4j .
{ "confidence": [ 61.01017761230469, 59.36381530761719, 58.42869567871094, 55.459815979003906, 53.243125915527344, 50.736488342285156, 48.93336868286133, 48.2670783996582, 47.98350524902344, 46.641929626464844, 45.81938171386719, 45.279685974121094, 44.18072509765625, 43.593997955322266, 43.56523132324219, 42.80148696899414, 42.65739440917969, 42.65739440917969, 42.65739440917969, 42.6338996887207, 42.6338996887207, 42.6338996887207, 42.6338996887207, 42.6338996887207, 41.94763946533203, 41.65970993041992, 41.649288177490234, 41.54169464111328, 41.54169464111328, 41.54169464111328, 41.376914978027344, 40.89768600463867, 40.890811920166016, 40.890811920166016, 40.669281005859375, 40.339900970458984, 40.196189880371094, 39.85292434692383, 39.85292434692383, 39.82182312011719, 39.69160842895508, 39.48640441894531, 39.48640441894531, 39.48640441894531, 39.48640441894531, 38.575260162353516, 38.549827575683594, 38.549827575683594, 38.549827575683594, 38.549827575683594, 38.549827575683594, 38.547611236572266, 38.48957061767578, 38.282936096191406, 37.75106430053711, 37.45762634277344, 37.45762634277344, 37.2662239074707, 37.02519989013672, 37.02519989013672, 37.02519989013672, 37.02519989013672, 37.02519989013672, 37.019012451171875, 36.90662384033203, 36.53429412841797, 36.53429412841797, 36.53429412841797, 35.92681121826172, 35.37883758544922, 35.37883758544922, 35.37883758544922, 35.37883758544922, 35.37883758544922, 35.37883758544922, 35.37883758544922, 35.37883758544922, 35.37883758544922, 35.37883758544922, 35.37883758544922, 35.37883758544922, 35.37883758544922, 35.37883758544922, 35.37883758544922, 35.21509552001953, 35.21509552001953, 34.699920654296875, 34.650543212890625, 34.650543212890625, 34.28663635253906, 33.701499938964844, 33.701499938964844, 33.701499938964844, 33.701499938964844, 33.39984893798828, 33.35318374633789, 33.228450775146484, 33.22121047973633, 33.22121047973633, 33.22121047973633 ], "content": [ "I can find solution for log4j but not for log4cxx .", "Apparently the log4j is the correct prefix to use even for log4cxx .", "See also my answer : Using Log4j CompositeTriggeringPolicy feature with log4CXX http : stackoverflow.com questions 7178588 using-log4j-compositetriggeringpolicy-feature-with-log4cxx 7366935 7366935", "In fact there is no such combined policy implemented in log4j either so it was not transferred to log4cxx .", "References .. . .. . log4cxx Conversion Pattern Wiki http : wiki.apache.org logging-log4cxx PatternLayout ConversionPattern .. . .. . Short introduction to Apache log4cxx http : logging.apache.org log4cxx .. . .. . log4cxx Tutorial http : www.yolinux.com TUTORIALS Log4cxx.html .. . .. . MDC log4cxx Class Reference http : logging.apache.org log4cxx apidocs classlog4cxx 1 1 m d c.html", "We use log4cxx for logging in all of these modules and plugins .", "Run apache-log4cxx-0.10.0 configure.bat .", "I need to use log4cxx https : logging.apache.org log4cxx usage.html for a C++ project .", "How to avoid this with log4j log4cxx in traditional way without inventing too much bicycles", "It calls pieces of externally built code that does logging internally using log4cxx .", "My problem concerns logging of library classes classes that are used inside libraries We are currently using log4cxx but the log4j library implements the same concepts .", "I ve installed log4cxx with its dependencies in home USER log4cxx build apache-log4cxx-0.10.0 .", "I have a largish application that currently uses log4cxx as its logging system .", "I d like to use Apache log4cxx and am running into a problem .", "I m trying to add and use the Apache log4cxx library .", "1 . download later version of log4cxx which is apache log4cxx 0.10 from here http : logging.apache.org log4cxx download.html .. . .. . 2 . download dependencies from https : archive.apache.org dist apr .. . .. . 3 .", "Tested on Linux Ubuntu 12.01 with log4cxx 0.9.7 .", "I need to write a custom appender in log4cxx .", "Question : does log4cxx have a similar capability", "Apply patches to files in log4cxx .", ".. . .. . Below is the patch required for log4cxx .", "is log4cxx a dead project", "Set log4cxx as startup project .", "enjoy your log4cxx", "Load apache-log4cxx-0.10.0 projects log4cxx.dsw into Visual Studio 2013 .", "I have done all the fixes as specified in building log4cxx in vs 2010 c++ http : stackoverflow.com questions 8461123 building-log4cxx-in-vs-2010-c .", "I would really like to use log4cxx since I m working with log4j logback at work but I haven t been able to get any of the libraries based on log4j to build .", "Log4cxx definitely works on Win7 .", "log4cxx use apr sockets .", "I tries to modify log4cxx .", "Currently I m having a pretty simplistic setup where I m using logging framework from Python code and log4cxx library from C C++ .", "0 0x0000003c5fa0e6fd in write from lib64 libpthread.so.0 .. . .. . 1 0x00007ffff79eade7 in apr socket send from usr lib64 libapr-1.so.0 .. . .. . 2 0x00007ffff7d52bb1 in log4cxx : : helpers : : Socket : : write log4cxx : : helpers : : ByteBuffer from usr lib64 liblog4cxx.so.10 .. . .. . 3 0x00007ffff7d595ed in log4cxx : : helpers : : SocketOutputStream : : flush log4cxx : : helpers : : Pool from usr lib64 liblog4cxx.so.10 .. . .. . 4 0x00007ffff7d5468c in log4cxx : : net : : SocketAppender : : append log4cxx : : helpers : : ObjectPtrT const log4cxx : : helpers : : Pool from usr lib64 liblog4cxx.so.10 .. . .. . 5 0x00007ffff7cd7d9d in log4cxx : : AppenderSkeleton : : doAppend log4cxx : : helpers : : ObjectPtrT const log4cxx : : helpers : : Pool from usr lib64 liblog4cxx.so.10 .. . .. . 6 0x00007ffff7cd50f4 in log4cxx : : helpers : : AppenderAttachableImpl : : appendLoopOnAppenders log4cxx : : helpers : : ObjectPtrT const log4cxx : : helpers : : Pool from usr lib64 liblog4cxx.so.10 .. . .. . 7 0x00007ffff7d1adfd in log4cxx : : Logger : : callAppenders log4cxx : : helpers : : ObjectPtrT const log4cxx : : helpers : : Pool const from usr lib64 liblog4cxx.so.10 .. . .. . 8 0x00007ffff7d1c4ac in log4cxx : : Logger : : forcedLog log4cxx : : helpers : : ObjectPtrT const std : : basic string std : : allocator const log4cxx : : spi : : LocationInfo const const from usr lib64 liblog4cxx.so.10 .. . .. . My question is it possible to make log4cxx write logs to a local file in case the server stops", "The problem with log4cxx is the lack of proper documentation .", "http : logging.apache.org log4cxx apidocs classlog4cxx 1 1helpers 1 1 properties.html", "I am using log4cxx and recently started working with SocketAppender from here 1 http : stackoverflow.com questions 11759196 log4j-how-to-use-socketappender .", "I read this topic http : stackoverflow.com questions 8486077 how-to-compile-link-boost-with-clang-libc and try to rebuild log4cxx like this : brew uninstall log4cxx brew install log4cxx --c++11 .", "My goal is to preclude all log4cxx output at runtime .", "It appears to me that the log4cxx : : Level : : getError and log4cxx : : Level : : getFatal leak 18 bytes of memory .", "Download the latest log4cxx package from here http : logging.apache.org log4cxx download.html .. . 2 .", "-DCMAKE INCLUDE PATH home USER log4cxx build apache-log4cxx-0.10.0 include -DCMAKE LIBRARY PATH home USER log4cxx build apache-log4cxx-0.10.0 lib .. . .. . Also it will be better to install all dependencies to the single directory", "So I download it with this command : yum install log4cxx.x86 64 .. . .. . After that I type this command : rpm -ql log4cxx and get this message : .. . .. . usr lib64 liblog4cxx.so.10 .. . usr lib64 liblog4cxx.so.10.0.0 .. . usr share doc log4cxx-0.10.0 .. . usr share doc log4cxx-0.10.0 KEYS .. . usr share doc log4cxx-0.10.0 LICENSE .. . usr share doc log4cxx-0.10.0 NOTICE .. . .. . Now I dont know how to use the log4cxx in my project .", "So is there a way to use a environment variable in the log4cxx config file", "As of log4cxx 0.10 and probably earlier the properties format does not support filters .", "We have a large volume of runtime debug log using log4cxx .", "I know log4cxx can send log to local files directly .", "And this variant brew install log4cxx --with-c++11 didn t help .", "I started using Qt with log4cxx to create a trace .", "I have a properties-based log4cxx called Log4cxxConfig.cfg .", "I am using log4cxx for writing to the log .", "Change into the log4cxx directory and execute configure.bat .. . 6 .", "Change to log4cxx projects directory and open log4cxx.dsw with VS2010 .", "And I see that log4cxx exists in usr local lib after installing with brew .", "Is there a way to tell log4cxx to override that location", "I am using log4cxx my project and i can able to log current thread id using t marker how to log process id in it or log4j .", "Also see my question and the answer here : https : mail-archives.apache.org mod mbox logging-log4cxx-user 201403.mbox 3C1378908733.20140324173531 40am-soft.de 3E", "I ve tried Log4cxx Log4cpp log4cplus and boost.log .", "I am doing performance-testing on log4cxx .", "Hello using a 3rd party C++ API and it s using log4cxx .", "I have an application that uses log4cxx internally with dozens of loggers .", "I ve seen Log4cxx a bit and am confused as to what it s purpose actually is .", "not sure if that helps but you could have a look at brew and install log4cxx from there .", "If anyone can drop this message to log4cxx list it would be pleasant .", "can I do this in Log4cxx if so reply your thoughts. .", "I use the log4cxx logging library in a project and Valgrind Memory Analyzer in Qt Creator to check for memory-leaks .", "Our current log4cxx pattern https : svn.apache.org repos asf logging site trunk docs log4cxx apidocs classlog4cxx 1 1 pattern layout.html is rather simple : .. . .. . However I failed to find a solution to support filename and line number printing .", "It just logs and ignores https : android.googlesource.com platform external apache-log4cxx + bf7b5ebcf7ce58764c86ab8c6f00ea1791d64026 src main cpp domconfigurator.cpp 715 errors .", "I noticed that I have no home USER log4cxx build apache-log4cxx-0.10.0 lib folder .", "The only library I can find is home USER log4cxx build apache-log4cxx-0.10.0 src main cpp .libs", "I can see it via netstat .. . .. . I use log4cxx logging and telnet appender .", "What I m most interested in is the Logger Hierarchy concept for log4cxx .", "But how do I tie Pantheios into different log4cxx loggers", "Loggerptr is a Log4CXX object pointer whose DLL I have used for referencing .", "At my server module sometimes log4cxx library made it crash .", "it is just returning some constant value.I have read that LOG4CXX is thread safe .", "Create x64 project contexts for log4cxx both release and debug .", "Try with : .. . .. . you will get : .. . .. . Just do yum install log4cxx-devel too", "But when I search log4cxx I can only get log4cxx.i686 and log4cxx.x86 64 .", "So I cant download the log4cxx-devel because it cant be found .", "There are also the following alternatives : 1 Apache s log4cxx which is still active .", "The leak needs further investigation for example in the development branch of log4cxx .", "How can I print exception stack-trace using log4cxx", "Maybe it will work using the getProperty method from log4cxx : : helpers : : Properties .", "I d prefer doing this without having to rebuild log4cxx e.g .", "Extract log4cxx apr und apr-util to the same directory .. . 4 .", "As a side question is there a way to turn on debugging of the log4cxx configuration when using a property file", "This answer http : stackoverflow.com questions 874661 log4cxx-custom-appender describes how to do it .", "People have successfully converted log4cxx in 2 steps : .. . .. . original VS 6 to VS 2008 .. . VS 2008 to VS 2010 .. . .. . Thankfully someone has made log4cxx 0.10 available as a Visual Studio 2008 project at http : www.dreamcubes.com webdrive log4cxx win32 log4cxx-0.10.0-vc2008-June2008.rar .", "I am trying to use log4cxx in my c++ project under the system Red Hat 7 .", "This is driving me crazy I m trying to building the log4cxx library in order to use in a c++ project I ve been using .", ".. . .. . If you try compiling the log4cxx project it will most likely fail with hundreds of errors .", "I have been trying to build log4cxx with unixodbc I can connect to the database using console but when trying to build log4cxx --with-ODBC the . configure always results in configure : error : unixODBC not found", "When you set your file in the RollingfileAppender http : logging.apache.org log4cxx apidocs classlog4cxx 1 1 rolling file appender.html with setfile http : logging.apache.org log4cxx apidocs classlog4cxx 1 1 file appender.html aa4a716f4661cf85cdfde59b447654358 you can tell whether you want buffered IO or not .", "Also the fix suggested in Building log4cxx with VS 2012 on Windows 7 http : qedatwork.blogspot.co.uk 2012 12 building-log4cxx-with-vs-2012-on.html does not make any different", "http : svn.apache.org viewvc incubator log4cxx trunk src test cpp vectorappender.h view markup http : svn.apache.org viewvc incubator log4cxx trunk src test cpp vectorappender.cpp view markup", "FWIW - after having multiple issues converting the log4cxx into a framework it s a .dylib with a JAM makefile in the current distribution I ve scrapped the approach and went straight to Boost.Log . .", "In Java in log4j it is possible for a custom appender to devise custom parameters .", "Depending on the order of apr apr-util and log4cxx the error varies however this is what I believe is some of the most relevant link errors if I build with this order unix : macx : LIBS+ -L LOG4CXX PATH lib -lapr-1 -laprutil-1 -llog4cxx : .. . .. . objectptr.cpp : .text+0x124 : undefined-reference to apr atomic xchg32 . . . . . . External Linux static log4cxx lib liblog4cxx.a stringhelper.o : In function log4cxx : : helpers : : StringHelper : : toInt64 std : : string const : stringhelper.cpp : .text+0x5d0 : undefined-reference to apr atoi64 . . . . . . External Linux static log4cxx lib liblog4cxx.a pool.o : In function log4cxx : : helpers : : Pool : : Pool : pool.cpp : .text+0x3a : undefined-reference to apr pool create ex . . . . . . External Linux static log4cxx lib liblog4cxx.a pool.o : In function log4cxx : : helpers : : Pool : : Pool : pool.cpp : .text+0xfc : undefined-reference to apr pool destroy", "Download apache-log4cxx-0.10.0.zip apr-x.y.z-win32.src.zip and apr-util-1.5.4-win32.src.zip where x y and z are the latest versions .", "If I m doing it like that I get a lot of error like WARNING : Target transport requests linking to directory home USER log4cxx build apache-log4cxx-0.10.0 .", "Rename the apr VERSION and apr-util VERSION folder to apr and apr-util resulting in a directory with three folder : apache-log4cxx-0.10.0 apr and apr-util .. . 5 ." ] }
{ "confidence": [ 76.44939422607422, 69.81918334960938, 68.84065246582031, 66.33030700683594, 65.86770629882812, 62.69007110595703, 60.847408294677734, 60.37404251098633, 59.74324417114258, 59.30949020385742, 58.383583068847656, 58.134742736816406, 58.03438186645508, 57.15907669067383, 56.44739532470703, 55.81513214111328, 55.764278411865234, 54.08070755004883, 54.043643951416016, 54.00997543334961 ], "content": [ "Question : I would like to combine both rolling time and rolling size in an appender it seems there is no composite rolling in log4cxx am I right .. . Answer : No there isn t . In fact there is no such combined policy implemented in log4j either so it was not transferred to log4cxx . I once had a task of writing such mixed-policy rolling file appender in log4j though . I did this by overriding FileAppender esp . the method .. . .. . to continue logging to the appropriate log chunk after process restart and .. . .. . to test after every log entry whether the condition for rolling over is true . A truly powerful feature of implementing your own appender in log4j cxx is that you can define its properties in log4j.properties and have them set by the library . In Java you get it for free thanks to reflection in log4cxx you only need to write your .. . .. . method where you iterate through option strings and perform necessary initialization actions . Hope that helps and comes in the right time .", "Question : I need to write a custom appender in log4cxx . This answer http : stackoverflow.com questions 874661 log4cxx-custom-appender describes how to do it . In Java in log4j it is possible for a custom appender to devise custom parameters . I add a property and a getter and setter : .. . .. . Then I can use myParameter in configuration file and the framework somehow knows how to configure my appender with it . Question : does log4cxx have a similar capability For me it is enough if I get a map map string string with properties . .. . Answer : Ok figured out the answer myself . You need to override member function setOption . It will get called a number of times : once per each read option . You then override function activateOptions and its get called after all options have been processed . It can be used as a trigger to initialize the appender with the read parameters . Not as convenient as mapping to getters setters but it gets the job done :", "Question : null .. . Answer : I am using log4cxx and recently started working with SocketAppender from here 1 http : stackoverflow.com questions 11759196 log4j-how-to-use-socketappender . I use the following : .. . .. . java org.apache.log4j.net.SimpleSocketServer 4712 log4j-server.properties .. . .. . and am able to write logs on the server . I do also have a local SizeRollover policy setup . This all works fine until I stop running the SimpleSockerServer . At which point my C++ application crashes I think after the ReconnectionDelayTime specified in the properties file . 0 0x0000003c5fa0e6fd in write from lib64 libpthread.so.0 .. . .. . 1 0x00007ffff79eade7 in apr socket send from usr lib64 libapr-1.so.0 .. . .. . 2 0x00007ffff7d52bb1 in log4cxx : : helpers : : Socket : : write log4cxx : : helpers : : ByteBuffer from usr lib64 liblog4cxx.so.10 .. . .. . 3 0x00007ffff7d595ed in log4cxx : : helpers : : SocketOutputStream : : flush log4cxx : : helpers : : Pool from usr lib64 liblog4cxx.so.10 .. . .. . 4 0x00007ffff7d5468c in log4cxx : : net : : SocketAppender : : append log4cxx : : helpers : : ObjectPtrT const log4cxx : : helpers : : Pool from usr lib64 liblog4cxx.so.10 .. . .. . 5 0x00007ffff7cd7d9d in log4cxx : : AppenderSkeleton : : doAppend log4cxx : : helpers : : ObjectPtrT const log4cxx : : helpers : : Pool from usr lib64 liblog4cxx.so.10 .. . .. . 6 0x00007ffff7cd50f4 in log4cxx : : helpers : : AppenderAttachableImpl : : appendLoopOnAppenders log4cxx : : helpers : : ObjectPtrT const log4cxx : : helpers : : Pool from usr lib64 liblog4cxx.so.10 .. . .. . 7 0x00007ffff7d1adfd in log4cxx : : Logger : : callAppenders log4cxx : : helpers : : ObjectPtrT const log4cxx : : helpers : : Pool const from usr lib64 liblog4cxx.so.10 .. . .. . 8 0x00007ffff7d1c4ac in log4cxx : : Logger : : forcedLog log4cxx : : helpers : : ObjectPtrT const std : : basic string std : : allocator const log4cxx : : spi : : LocationInfo const const from usr lib64 liblog4cxx.so.10 .. . .. . My question is it possible to make log4cxx write logs to a local file in case the server stops If I start the server again before the application crashes SocketAppender does not receive the logs again . How can I get around this problem Any other suggestions to send logs over the network Comment : The best way to get around this problem is to find out why the crash happens and try to fix that . You might have found a bug in the framework in which case you should report it . Comment : I think the reason it crashes is that it is trying to send the logs over to an earlier socket connection which now doesn t exist .", "Question : I am using log4cxx my project and i can able to log current thread id using t marker how to log process id in it or log4j . I am using ConversionPattern xml based configuration file . Thanks .. . Answer : I ve grepped through log4j s and log4cxx s documentation and nowhere did I find anything about logging process id . So to be short : no you can t log process id at least not directly . Since you re using C++ you can get your program s PID . Here http : ubuntuforums.org showthread.php t 665362 is how to do it in Linux Ubuntu in this link . Here http : stackoverflow.com questions 298257 ms-c-get-pid-of-current-process is how do do it in Windows . Get that PID at your program start use an MDC http : logging.apache.org log4cxx apidocs classlog4cxx 1 1 m d c.html and put your PID in it . I don t think there s a better way . Doing this in log4j would be even trickier since I know of no way for a running program to get it s PID using standard Java classes .", "Question : log4cxx s config is read from follow-by xml via : .. . .. . But want to have filename set at runtime and this creates a problem of either having multiple .xmls for reading or creating one on the fly in memory at disk -- no matter where . Is there any way to pass configurator some values to substitute into param file file value value or to access the property after configuring and change it P.S . The reason for doing this : multiple copies of the same program are writing to same log making it look ..strange . How to avoid this with log4j log4cxx in traditional way without inventing too much bicycles Comment : If anyone can drop this message to log4cxx list it would be pleasant . .. . Answer : This problem hit me about 2 years ago I don t have access to source code anymore but here s what I did more or less : .. . .. . 1 . Extended the FileAppender and used it in the config file . 2 . Inside the setFile method I appended process name and id to the file name you can do it in the setOption method if you don t use a rolling file . We already had a mechanism for uniquely identifying our processes and their instances by our internal id you could use a PID for example or add a global variable and set it in every application using log4cxx to your unique value then using it in the setOption method of your appender . See also my answer : Using Log4j CompositeTriggeringPolicy feature with log4CXX http : stackoverflow.com questions 7178588 using-log4j-compositetriggeringpolicy-feature-with-log4cxx 7366935 7366935", "Question : I can find solution for log4j but not for log4cxx . Comment : Good question I was just wondering the same . .. . Answer : I got a simple solution . Comment : I d suggest you accept your own answer .", "Question : I ve been trying for about 2 weeks now to get a logging library to work with . I ve tried Log4cxx Log4cpp log4cplus and boost.log . The problem isn t that none of these work for me it s that I can t figure out how to get them to work at all . I would really like to use log4cxx since I m working with log4j logback at work but I haven t been able to get any of the libraries based on log4j to build . I ve been able to build and use the boost library but boost.log gives me all kinds of linker errors no matter what I try . If anyone could direct me to a step-by-step guide to get one of these libraries working I would greatly appreciate it . Also I m using eclipse as my IDE if that matters . Comment : What operating-system are you using Also be sure to first compile the libraries and then take the header-files to include into your project the implementation will be compiled into the libraries one time so you don t have to recompile the huge library multiple times Comment : I m using Windows 7 . I m not sure what you mean about compiling and then taking the header-files . Sorry I m kind of new to using third party libraries . For boost at least I just add the boost root directory as an include path and then use an include directive for each file that I need . .. . Answer : Did you ever get this working Log4cxx definitely works on Win7 . Maybe you could post some of your build errors . Just guessing perhaps you didn t configure your eclipse project to link with a log4cxx static lib .", "Question : I ve been trying for about 2 weeks now to get a logging library to work with . I ve tried Log4cxx Log4cpp log4cplus and boost.log . The problem isn t that none of these work for me it s that I can t figure out how to get them to work at all . I would really like to use log4cxx since I m working with log4j logback at work but I haven t been able to get any of the libraries based on log4j to build . I ve been able to build and use the boost library but boost.log gives me all kinds of linker errors no matter what I try . If anyone could direct me to a step-by-step guide to get one of these libraries working I would greatly appreciate it . Also I m using eclipse as my IDE if that matters . Comment : What operating-system are you using Also be sure to first compile the libraries and then take the header-files to include into your project the implementation will be compiled into the libraries one time so you don t have to recompile the huge library multiple times Comment : I m using Windows 7 . I m not sure what you mean about compiling and then taking the header-files . Sorry I m kind of new to using third party libraries . For boost at least I just add the boost root directory as an include path and then use an include directive for each file that I need . .. . Answer : I managed to get log4cxx to work this was done in Visual Studios 2013 running on Windows 7 OS . This following is what I did step by step : .. . .. . Download the log4cxx ZIP package extract its contents http : logging.apache.org log4cxx download.html .. . .. . Download apr and apr-util ZIP packages http : apr.apache.org download.cgi .. . .. . Then .. . .. . 1 . manually extract this zip apr-1.2.11-win32-src.zip the extracted folder should be named apr if it is not manually rename it .. . 2 . manually extract this zip apr-util-1.2.10-win32-src.zip the extracted folder should be named apr-util if it is not manually rename it .. . 3 . open a command-prompt and run the following : cd apache-log4cxx-0.10.0 configure this will execute configure.bat .. . .. . We will need to disable to use of the APR ICONV and LDAP support . In order to do so we will append the following files manually : .. . .. . 1 . Open apr-util include apu.hw . Find the line starting with define APU HAVE APR ICONV . Change the value to 0 and save . 2 . Open apr-util include apr ldap.hw . Find the line starting with define APR HAS LDAP Change the value to 0 and save . .. . We need to build the log4cxx.dll to do so convert .dsw to .cxproj . .. . 1 . Launch Visual Studio 2013 and open log4cxx.dsw . 2 . VS will ask if you like to convert everything . Simply click Yes . There may be some warnings in the migration report but nothing that should prevent the solution from opening . .. . The projects xml apr and apr-util should build successfully . .. . .. . If you try compiling the log4cxx project it will most likely fail with hundreds of errors . This is due to a bug in VC++ which can be worked around . .. . 1 . Move all macros outside above the class they are in . LOG4CXX LIST DEF macro is used to define classes . All macros reported in error C2252 will need to move out of any classes . This may also include moving definitions which are used in the macro . 2 . Next change all LoggingEvent : : KeySet to KeySet this is no longer nested in a parent class .. . .. . Following this the log4cxx project should now compile successfully on your machine .", "Question : I am using log4cxx my project and i can able to log current thread id using t marker how to log process id in it or log4j . I am using ConversionPattern xml based configuration file . Thanks .. . Answer : There is no feature in Log4J to achieve this however you could pass the process id in and use that . This blog post shows one way to go about it : http : blackbeanbag.net wp 2009 01 14 log-file-management-in-coherence-using-log4j .. . .. . Basically pass in the process id as a system property and then use that in the Log4j pattern . Apparently this is due to the JVM not providing an easy method to access the process id . From JDK1.5+ this may work : http : www.theresearchkitchen.com archives 100", "Question : In log4net i can easily set process id to to log file name from config easily .. . .. . Can i do the same for the log4cxx from config file If yes how .. . Answer : According to the log4cxx documentation in order to currently do this you need to declare at least one MappedDiagnostic context . An untested partial snippet of doing so is shown below .. . .. . After further inspection of the log4cxx source I realised that file doesn t take a ConversionPattern but FileNamePattern does . I believe you can only use FileNamePattern when you have use a TimeBasedRollingPolicy or FixedWindowRollingPolicy . Now you can add the processid to the log by adding the following parameter in your appender tags in the XML configuration file . or you can include it in the pattern layout by specifying the following layout tags also inside your appender tags in the XML configuration file . There is no simple way from the configuration file only to have each process append its own process to its own log like you are familiar with in log4net . There were several log4cxx mailing list threads that mention dynamic log renaming but all of them involved numerous changes in the C++ code and they don t do what you request . The method they used involves having param name file value logfilename where logfilename is an environment variable that gets set by .. . .. . calling something like the above snippet in the C++ code each time you want the log name to change . Other methods would involve patches to log4cxx as it currently doesn t have the functionality you need . References .. . .. . log4cxx Conversion Pattern Wiki http : wiki.apache.org logging-log4cxx PatternLayout ConversionPattern .. . .. . Short introduction to Apache log4cxx http : logging.apache.org log4cxx .. . .. . log4cxx Tutorial http : www.yolinux.com TUTORIALS Log4cxx.html .. . .. . MDC log4cxx Class Reference http : logging.apache.org log4cxx apidocs classlog4cxx 1 1 m d c.html Comment : param name file value MyApp- X pid .log does not work...It create file MyApp- X pid .log Log4cxx think as it like literal string Comment : But second xml tag works . It writes process id before each log message Comment : Updated my answer to reflect your comment . Comment : Well I need to change file name.So each process writes a file file name + its process id . How to do it writing log message process id is not my real inetrest Comment : The rolling policy stuff above may not work as you request in your comment as the process id will be updated based on either the fixed window or time based rolling policy and not on a per thread basis .", "Question : I am using log4cxx my project and i can able to log current thread id using t marker how to log process id in it or log4j . I am using ConversionPattern xml based configuration file . Thanks .. . Answer : Based on the above answers I m going to do this in log4j as follows : .. . .. . Then in my log4j.properties : .. . .. . This will actually yield a PID that consists of the ID number and the hostname at least on my implementation of Java and from what I read that could be implementation specific . You could go further and split out just the PID . Comment : Thanks worked a champ . Comment : @rogerdpack I m glad my answer was helpful to you Comment : Bummer that this doesn t work out of the box without writing code for log4j", "Question : I use log4cxx for my c++ project and I use properties for log config here is my situation I wanna log my project with daily log file such as .. . .. . Is there any way to reach that .. . Answer : You can use daily rolling file appender . Check this url . I hope it would be helpful for you . http : tunatore.wordpress.com 2011 06 12 how-to-define-dailyrollingfileappender-in-log4j-properties-file", "Question : As the subject says I ve trouble installing spectrum2 on a non root server . The main problem is that I ve to build a lot of dependencies from source and link them correct . I ve installed log4cxx with its dependencies in home USER log4cxx build apache-log4cxx-0.10.0 . When trying to cd libtransport and make I get the following result : .. . .. . It seems like log4cxx isn t found during the installation . Any help is appreciated . Thanks in advance : - .. . Answer : After you installed log4cxx in the user directory you need to re-run cmake and add hints where to search headers and libraries it can be done for example as : .. . .. . cmake . -DCMAKE INCLUDE PATH home USER log4cxx build apache-log4cxx-0.10.0 include -DCMAKE LIBRARY PATH home USER log4cxx build apache-log4cxx-0.10.0 lib .. . .. . Also it will be better to install all dependencies to the single directory Comment : Thanks four your answer . If I m doing it like that I get a lot of error like WARNING : Target transport requests linking to directory home USER log4cxx build apache-log4cxx-0.10.0 . Targets may link only to libraries . CMake is dropping the item . Do you know whats the reason of that I noticed that I have no home USER log4cxx build apache-log4cxx-0.10.0 lib folder . The only library I can find is home USER log4cxx build apache-log4cxx-0.10.0 src main cpp .libs", "Question : I m writing in C++ under XCode 4.6 on Mountain Lion . I m trying to add and use the Apache log4cxx library . I installed the library this morning via Brew . I m linking against liblog4cxx.dylib . I m getting a link error that just one symbol can t be found : .. . .. . Undefined symbols for architecture x86-64 : .. . log4cxx : : Logger : : forcedLog log4cxx : : helpers : : ObjectPtrT const std : : 1 : : basic string std : : 1 : : allocator const log4cxx : : spi : : LocationInfo const const referenced from : .. . .. . I know it s finding the library file because if I remove it I get lots more undefined symbol errors relating to log4cxx . relevant code is basically : .. . .. . Creating the logger object inside the function either as static or not doesn t change the behavior . Also linking with the static library with or without defining LOG4CXX STATIC in my project does not change the behavior . Looking at the macro I m calling I see that this symbol is the actual method that performs the log operation . If take out the logging call but leave in the code that defines the logger object the code links fine as you might expect . What do I need to do to have this last symbol resolve TIA Comment : First try nm -g liblog4cxx.dylib and see if the symbol is exported . If not then something might be wrong with the distribution of logger . Try to build the liblog4cxx.dylib yourself . Comment : I m having the same issue . I see the undefined symbol listed as : log4cxx : : Logger : : forcedLog log4cxx : : helpers : : ObjectPtrT log4cxx : : Level const std : : 1 : : basic string char std : : 1 : : char-traits char std : : 1 : : allocator char const log4cxx : : spi : : LocationInfo const const I will note that I am working in a 32-bit environment but I built the universal dylib . Anyway if I do nm -g I see : ZNK7log4cxx6Logger11forcedLogLSERKNS 7helpers10ObjectPtrTINS 5LevelEEERKSsRKNS 3spi12LocationInfoE Which leads me to believe it s there . Any suggestions .. . Answer : I traced my issue down to compiling the library in a non C++11 compiler but then my target project was a C++11 compiler . I was able to compile log4cxx in a C+11 compiler by viewing the changes to log4cxx in the development git-repo which mainly consisted of inserting static casts as in this update : .. . .. . http : apache-logging.6191.n7.nabble.com C-11-does-not-allow-char-literals-with-highest-bit-set-unless-cast-td34908.html .. . .. . I suppose the few incompatible routines came up undefined which is why we were getting confused with only a few seemingly random undefines . Or I was anyway", "Question : In certain applications there are important messages you always want to log such as the application starting up and shutting down regardless of the current log level setting . The only way to ensure an important message is logged using frameworks such as log4j and log4net is to set the log level of the message raised as FATAL . Is there a better way to do this as FATAL seems a misleading category when the application starts up fine with no errors .. . Answer : For log4j and similarly for log4cxx you could do something like this : .. . .. . and then configure the logAlways logger to log everything above INFO : .. . .. . This could also be configured through the API to avoid that someone un intentionally changes the configuration file : .. . .. . Use it then like", "Question : I have different logs locations in development and in production they also may be different platforms so I want to configure the logs just one time using a environment variable . Possible locations : C : logs T : logs var logs .. . .. . In this question http : stackoverflow.com questions 13066042 how-to-give-environmental-variable-path-for-file-appender-in-configuration-file they need just that but it is applied to Java and is using the Java system-properties obviously not available in C++ . So is there a way to use a environment variable in the log4cxx config file .. . Answer : It works just the same way as in Java . For example in an XML configuration read with log4cxx : : xml : : DOMConfigurator : : configure containing param name file value LOG DIR traces.log the environment variable LOG DIR will be correctly substituted . Tested on Linux Ubuntu 12.01 with log4cxx 0.9.7 . Also see my question and the answer here : https : mail-archives.apache.org mod mbox logging-log4cxx-user 201403.mbox 3C1378908733.20140324173531 40am-soft.de 3E Comment : Thx . Actually I did try using env : LOG DIR as described in the Java version with no luck . Just not prefixing env : works . This solution works tested on a Windows with a properties file configuration .", "Question : I ve been trying for about 2 weeks now to get a logging library to work with . I ve tried Log4cxx Log4cpp log4cplus and boost.log . The problem isn t that none of these work for me it s that I can t figure out how to get them to work at all . I would really like to use log4cxx since I m working with log4j logback at work but I haven t been able to get any of the libraries based on log4j to build . I ve been able to build and use the boost library but boost.log gives me all kinds of linker errors no matter what I try . If anyone could direct me to a step-by-step guide to get one of these libraries working I would greatly appreciate it . Also I m using eclipse as my IDE if that matters . Comment : What operating-system are you using Also be sure to first compile the libraries and then take the header-files to include into your project the implementation will be compiled into the libraries one time so you don t have to recompile the huge library multiple times Comment : I m using Windows 7 . I m not sure what you mean about compiling and then taking the header-files . Sorry I m kind of new to using third party libraries . For boost at least I just add the boost root directory as an include path and then use an include directive for each file that I need . .. . Answer : Boost.Log works for me quite well Linux and Windows . It is not a header-only library there is a compiled part that you need to link against . See instructions here http : boost-log.sourceforge.net libs log doc html log installation.html . It also depends on other non-header Boost libraries : .. . .. . The logging library uses several other Boost libraries that need building too . These are Boost.Filesystem Boost.System Boost.DateTime Boost.Thread and Boost.Regex . Refer to their documentation for detailed instructions on the building procedure . Depending on your platform there may be pre-built versions of the Boost libraries . Otherwise building it yourself is straightforward if you follow the instructions . If you get stuck update your question with where exactly you got stuck and what you re seeing .", "Question : I ve been trying for about 2 weeks now to get a logging library to work with . I ve tried Log4cxx Log4cpp log4cplus and boost.log . The problem isn t that none of these work for me it s that I can t figure out how to get them to work at all . I would really like to use log4cxx since I m working with log4j logback at work but I haven t been able to get any of the libraries based on log4j to build . I ve been able to build and use the boost library but boost.log gives me all kinds of linker errors no matter what I try . If anyone could direct me to a step-by-step guide to get one of these libraries working I would greatly appreciate it . Also I m using eclipse as my IDE if that matters . Comment : What operating-system are you using Also be sure to first compile the libraries and then take the header-files to include into your project the implementation will be compiled into the libraries one time so you don t have to recompile the huge library multiple times Comment : I m using Windows 7 . I m not sure what you mean about compiling and then taking the header-files . Sorry I m kind of new to using third party libraries . For boost at least I just add the boost root directory as an include path and then use an include directive for each file that I need . .. . Answer : I d recommend Pantheios http : www.pantheios.org . It takes some time to build everything when you first download - type make build test and go have lunch - and you have to select the output streams Pantheios calls them back ends at link time but for coding it is really simple e.g . It s designed from the ground up for speed - the age won t be converted into a string unless the DEBUG level is switched on - and robustness - which is why you can t pass fundamental types directly and use inserters e.g . pantheios : : integer . See this recent blog post http : www.drdobbs.com blog archives 2011 01 conversion cons.html by Pantheios author for more information .", "Question : I have an application that uses log4cxx internally with dozens of loggers . What is a minimal logger.properties that I can setup to turn off all logging output In particular I m getting a warning like no properties file present : .. . .. . FileSource is a class that uses log4cxx . My goal is to preclude all log4cxx output at runtime . .. . Answer : This should do it : .. . .. . A simple logger.properties that logs to standard out could look like below :", "Question : I ve seen Log4cxx a bit and am confused as to what it s purpose actually is . Originally when I saw Logger I assumed it was a key to access a system that without it you couldn t get the information that you needed . Though looking more at it it seems to be more of a tracking system But a tracking system for what and what would one use as a logger then I m sorry if this question is vague but hence my not understanding it : p .. . .. . I have found this : http : www.yolinux.com TUTORIALS Log4cxx.html but no one seems to give a why you use it and how it s beneficial . Can anyone give me an example I think that s the biggest piece I m missing . Comment : It s an application logging library . You know how you would do things like print statements about what your application is doing at any given time for debugging or informational purposes That s what log4cxx can do and can help you consolidate that and print to a file and to stdout at the same time among other things . If that s still too abstract for you read this page about log4j http : logging.apache.org log4j 2.x manual logsep.html which talks about some real use cases for a similar library that s written for Java . Comment : @birryree ah I see thanks and thanks for the link : Fvu not sure why you would want to delete the question I was only asking for clarification . Comment : It does not provide a good example however imo . And since when has an enthusiast been classified as an expert I ve been programming for a little less than two years and have never come across it before . Also there are plenty of questions similar to mine on this site asking for clarification or examples of a certain topic that text book type answers do not provide better . If the mods want to close it than they can but far bid for you to make people feel like they can t ask questions for better understanding of things they should know . If you don t like a question don t answer it . Comment : @fvu I d rather see a request for migration to programmers http : programmers.stackexchange.com than the stigmatizing remarks . Comment : @fvu the moderators haven t dumped the low quality question so I m not sure why they d dump the corresponding remarks . It s enough to criticize the nature of the question but not the OP s inexperience . That s all . Regards . .. . Answer : A logger is not an authentification system . It logs collects and saves information potentially in a logfile . See wikipedia for logging . http : en.wikipedia.org wiki Logfile" ] }
[ "yes-answer-long", "yes-answer-short" ]
apache
UNK_RELATION
domparser@dom@81
domparser -- a domparser can parse xml or html source stored in a string into a @placeholder document .
{ "confidence": [ 50.204917907714844, 45.796875, 43.97264099121094, 40.87199401855469, 38.26811218261719, 37.42564392089844, 34.59287643432617, 31.8670711517334, 31.8670711517334, 30.921680450439453, 30.79062271118164, 29.028175354003906, 28.300308227539062, 27.966493606567383, 27.90627098083496, 27.22772789001465, 26.119050979614258, 26.043350219726562, 26.043350219726562, 25.106201171875, 25.106201171875, 24.493465423583984, 23.950042724609375, 23.71038818359375, 23.686695098876953, 23.320871353149414, 22.526010513305664, 21.259113311767578, 21.2014102935791, 20.441974639892578, 20.441974639892578, 20.07052993774414, 19.858856201171875, 19.220455169677734, 19.166501998901367, 19.153650283813477, 19.12256622314453, 18.76978302001953, 18.700672149658203, 18.097875595092773, 18.097875595092773, 18.097875595092773, 17.945667266845703, 17.928085327148438, 17.86551284790039, 17.737926483154297, 17.466644287109375, 17.160114288330078, 17.12594985961914, 17.12594985961914, 17.119873046875, 17.092777252197266, 17.08634376525879, 16.98370933532715, 16.79267120361328, 16.73999786376953, 16.54976463317871, 16.462345123291016, 16.459880828857422, 16.387603759765625, 16.387603759765625, 16.387603759765625, 16.31989860534668, 16.2333984375, 15.867818832397461, 15.867818832397461, 15.793447494506836, 15.70036506652832, 15.591428756713867, 15.555619239807129, 15.555619239807129, 15.493989944458008, 15.493989944458008, 15.203226089477539, 15.12272834777832, 15.11401653289795, 14.824089050292969, 14.787424087524414, 14.787424087524414, 14.76528263092041, 14.76528263092041, 14.534411430358887, 14.534411430358887, 14.367842674255371, 14.352289199829102, 14.352289199829102, 14.352289199829102, 14.213065147399902, 14.213065147399902, 14.213065147399902, 14.13611125946045, 14.13611125946045, 14.043085098266602, 14.005339622497559, 13.929638862609863, 13.929638862609863, 13.78371810913086, 13.78371810913086, 13.78371810913086, 13.78371810913086 ], "content": [ "We are using DOMParser to parse the file .", "I have been using a DOMParser object to parse a text string to an XML tree .", "First I used DOMParser but I get this error : .. . .. . ReferenceError : DOMParser is not defined .", "I also tried DOMParser without any luck .", "DOMParser constructor isn t defined in the context of SDK modules .", "on responseXML can you do xmlDoc.document.body.innerHTML like you could with DOMParser", "In both or other cases you could try to call the class constructor by passing the full package name as in var parser new oracle.xml.parser.v2.DOMParser be aware that this is just an example both DOMParser classes don t have parseFromString methods .", "I guess thats why DOMParser is not availlable but I don t really understand why that decision was made .", "DOMParseris not found A sentence of error var parser new DOMParser .. . .. . Please tell me the correct code in ssjs .", "Assuming doc is a DOMDocument representing your HTML document :", "Assuming your HTML is a valid XML document has a single root node etc you can use SimpleXML like this : .. . .. . This uses xpath to search through the document for all a tags that have an href attribute .", "Use some library for XML document parsing .", "And never make the mistake of referring to such an object as an XML document - if it were XML you wouldn t have the problem .", "The XML document I m trying to parse is basically a flat list of properties and I need to find elements that have certain strings in their names .", "You have to actually query a DOMXPath attached to the document not the document itself .", "In accordance with the above-mentioned principle I d like my program built upon the browser s DOMParser object to do better than just throw its hands up in the face of inputs like these .", "If you use XMLHttpRequest available via the xhr module https : addons.mozilla.org en-US developers docs sdk latest packages api-utils xhr.html you can easily avoid the use of DOMParser .", "I m not sure what kind of object DOMParser is supposed to be two options : .. . .. . a you wish to us a java class maybe Oracle s version or the one from Apache s Xerces-J API .", "b more probably you re trying to use a client-side javascript DOMParser object to my knowledge this object is not available in Domino s SSJS implementation at least I can t find any trace of it .", "I realize the XML document is probably in need of a restructuring if I need this but that s just not goign to happen .", "Set the tagName as an explicit attribute : .. . .. . I needed this myself for an XML Document with Nested Tags ending in Sequence .", "fetching and processing an XML document in a WebWorker does not seems unreasonnable .. . .. . but you can import other tools available : a Cross Platform XML Parsing in JavaScript http : xmljs.sourceforge.net index.html", "I m trying to parse a XML using Apache Commons JXPath .", "I debugged the document object it doesn t seemed to have the child node for .", "In my experience when you have to deal with very complex XML document its probably easier to : .. . .. . 1 .", "I have some HTML with custom-attributes and trying to parse it with component PHPHtmlParser .", "In fact I do not want to touch the document object at all .", "I have to parse the following xml file .", "The XML file won t contain HTML elements or anything of the sort .", "@Tom Anderson - in defence of the OP my reading of the linked document is that the services approach ought to work .", "I m hoping one day there will be a platform standard public API for a Document implementation and for all of its factories and such .", "view this : stackoverflow.com questions 3220552 http : stackoverflow.com questions 3220552 how-should-parse-with-php-simple-html-dom-parser-background-images-and-other-i", "Why can IDE modify the values in XML while console cannot", "I am trying to determine the best way to parse the XML response I get from a webservice call into a Java object .", "However I must admit that the way the document is phrased leaves some room for doubt and I couldn t find OAS specific documentation .", "this does not have any support to parse CSS", "For an XML string such as : .. . .. . I m using the following code obtained from SO itself .. . .. . If I remove the dn : from getElementsByTagName it starts to work in Chrome but not in Firefox and IE .", "At this point I like to share my parser : https : github.com tobiasnickel tXml .. . .. . with its tXml method you can parse a string into an object and it takes only 0.5kb minified + gzipped", "Also people say you should not parse html with regex which is needed for some replacements .", "Fix the process that generated this non-XML file .", "I am newbie in XML files operation .", "Here is my XML operations code block :", "Example string to find : the a href site.com company a has been growing for the past 5 months .. . .. . The parent is a full HTML page for example and the immediate predecessor of that string can be a div or p for example. .", "Apparently some browsers like Firefox have to use the main thread in the XML parser source : w3-org.9356.n7.nabble.com http : w3-org.9356.n7.nabble.com Limited-DOM-in-Web-Workers-td44284.html", "HTML of any class id of the component .", "according to the spec http : dev.w3.org html5 workers apis-available-to-workers .. . .. . The DOM APIs Node objects Document objects etc are not available to workers in this version of this specification .", "Thanks .. . .. . P.S : I get the relevant images and contents from a blog post url because I parse the html using static-class names .", "Why use a 3rd party library to parse the DOM when PHP has built-in support for this", "Is there any HTML CSS DOM parser for PHP that I can feed direct live URL and it gives me following two things .", "Use Simple HTML DOM Parser http : simplehtmldom.sourceforge.net .. . .. . You can do something like this Rough Code you will have to tune the code to get it to work .", "While deployment it needs to parse .ddm file to read properties .", "How do you find and replace a string in html page using the native PHP DOM Parser", "like html contain .. . .. . I know how to select the dom like html- find div class tb 1 but how to concatenate new div after it", "Every time when I debug it in NetBeans IDE everything is okay but when I try execute it in console with Java -jar blablabla.jar the XML files are not changing and I still see old values in XML files .", "There may be some libraries that will put additional attributes into a Hashmap at least I know Jackson can do that for JSON not sure about XML .. . .. . The only alternative would be to parse it yourself manually in a way that you can guarantee the capture of all elements such as depth first traversal of the nodes", "I see that in the first example there are html-entities like lt and gt .", "But I can t find a way to parse my RESPONSE .", "I have two different Strings for example : .. . .. . 1 .. . .. . 2 .. . .. . I need to parse these strings and fetch the entire XML element from root node without any headers .", "I m trying to parse images from RSS doing this .. . .. . it is working here .. . .. . working img is in description : .. . .. . But not here img is in content : encoded : .. . .. . .. . .. . EDIT : Just found a solution .", "Presently I m consuming what superficially appear to be XML documents that actually have this problem .", "My program should do that when it is executed it must generate random numbers and write to a XML file .", "But for some reason its not able to identify the child nodes after the xml is being parsed .", "While adding the cloned xml block back I am selecting the tag within the cloned xml block using the namespace used in the main xml file .", "this is the source code of the feeds the first is android police and the 2nd is il fatto quotidiano .. . from the first i can get the images using the code i posted above from the 2nd not and I don t why.. .", "try to use html dom parser http : simplehtmldom.sourceforge.net .. . .. . which will give you all html finding support", "If you want valid html you should use data- attributes : data-otop 20 data-oleft 20", "I need to remove the namespace attribute within this cloned xml block before adding it back to the main xml content .", "I need to parse data from other e-shop s .", "Have you tried looping through your image array or logging it to console to see if anything is stored in it", "img does not have inner HTML you have to access its attributes .", "As @QBernard says the image element does not have any inner html .", "The simplest way to work with a XML is to serialize it to an object .", "Remove the header - everything before .. . .. . xml .. . .. . or .. . .. . soap : .. . .. . 2 .", "I suppose I could write a simple XML parser in JavaScript I m just wondering if I m missing a quicker option .", "Only the exact string i.e .", "xmlfile.getAbsolutePath was just to demonstrate that the paths won t be the same.You may create your file with an absolute path e.g File xmlfile new File C : temp + file +name+ .xml", "Yesterday I ve tried to see the output of getdescription .. . the one for android police contains the articles images the 2nd one not.. . it seems like in the 2nd one the images are in content : encoded and not in description and I don t know how to parse images from content : encoded :", "Please inspect carefully the source code the web page.. .", "Source http : sourceforge.net p simplehtmldom bugs 137", "So this namespace is added locally in the cloned xml tag block also .", "Main XML file .. . .. . Tcl Code .. . .. . Expected Output .. . .. . Actual Output", "This can be useful for lazy guys like me .", "I ll appreciate if someone can provide pointers to this isuse .", "I simply want to provide a text string like the following : .. . .. . ...and get back a suitable tree structure and a way to traverse it .", "There is nothing to identify the string or its immediate predecessor .", "Which string do you want to replace with what", "Use a string-search replace for that or a regexp search replace", "You can create a jQuery element without appending it to the DOM .", "Can you better explain what is the problem in the second case", "It would be good if you can add both the sources of the rss .", "Below is the code of line 18 and is for finding table from HTML Web Page .", "First changed the max file size limit in html DOM as tald by @Koen Hoeijmakers .", "You can evaluate separately any of the following XPath expressions one by one and stop this process whenever a timer expires or other criterion is satisfied : .. . .. . This can probably be speeded-up by chunking :", "I can walk through the XML ok with SAX parser and get the data I require but I would like to do it the proper way as I may not be the one to be maintaining this code .", "I know about XML for SCRIPT http : xmljs.sourceforge.net index.html which many may find useful hence I m linking to it here however its licensing is not really suitable for me .", "I m not sure if jQuery includes an XML parser I m fairly new to this stuff but even if it does and it is usable inside a Worker I would not include an extra 50K lines-of-code just for this function .", "I am cloning a inner node of a table and deleting the existing nodes in a xml dom .", "Later I am adding the cloned xml dom block based on the input values given .", "My xml is as below .. . .. . My question is do I have to define the Java object that this will be converted into", "What I am afraid of if this is the case is what happens if data is added or removed from the XML response as it exists at the moment ." ] }
{ "confidence": [ 62.53072738647461, 51.304317474365234, 49.3372802734375, 46.72298812866211, 45.17821502685547, 42.35871124267578, 41.20537567138672, 32.33772659301758, 31.84142303466797, 30.578350067138672, 29.945960998535156, 29.563940048217773, 29.405364990234375, 29.1995849609375, 28.790855407714844, 25.57376480102539, 25.057842254638672, 22.33112144470215, 21.72673225402832, 21.289241790771484 ], "content": [ "Question : I have been using a DOMParser object to parse a text string to an XML tree . However it is not available in the context of a Web Worker and neither is of course document.ELEMENT NODE or the various other constants that would be needed . Is there any other way to do that Please note that I do not want to manipulate the DOM of the current page . The XML file won t contain HTML elements or anything of the sort . In fact I do not want to touch the document object at all . I simply want to provide a text string like the following : .. . .. . ...and get back a suitable tree structure and a way to traverse it . I also do not care about schema validation or anything fancy . I know about XML for SCRIPT http : xmljs.sourceforge.net index.html which many may find useful hence I m linking to it here however its licensing is not really suitable for me . I m not sure if jQuery includes an XML parser I m fairly new to this stuff but even if it does and it is usable inside a Worker I would not include an extra 50K lines-of-code just for this function . I suppose I could write a simple XML parser in JavaScript I m just wondering if I m missing a quicker option . .. . Answer : according to the spec http : dev.w3.org html5 workers apis-available-to-workers .. . .. . The DOM APIs Node objects Document objects etc are not available to workers in this version of this specification . I guess thats why DOMParser is not availlable but I don t really understand why that decision was made . fetching and processing an XML document in a WebWorker does not seems unreasonnable .. . .. . but you can import other tools available : a Cross Platform XML Parsing in JavaScript http : xmljs.sourceforge.net index.html Comment : Apparently some browsers like Firefox have to use the main thread in the XML parser source : w3-org.9356.n7.nabble.com http : w3-org.9356.n7.nabble.com Limited-DOM-in-Web-Workers-td44284.html", "Question : I am trying to create a FF AddOn that brings some XML data from a website . But I can t find a way to parse my RESPONSE . First I used DOMParser but I get this error : .. . .. . ReferenceError : DOMParser is not defined . Someone suggested to use XMLHttpRequest because the parsing is done automatically but then I get this other error : .. . .. . Error : An exception occurred . Traceback most recent call last : .. . File resource : jid0-a23vmnhgidl8wlymvolsst4ca98-at-jetpack api-utils lib cuddlefish.js line 208 in require let module manifest this.manifest base requirer this.modules base TypeError : this.manifest is undefined .. . .. . I really don t know what else to do . I must note that I am using the AddOn Builder to achieve this . Below the code that doesn t seem to work . Option 1 : .. . .. . Option 2 : .. . Answer : If you use XMLHttpRequest available via the xhr module https : addons.mozilla.org en-US developers docs sdk latest packages api-utils xhr.html you can easily avoid the use of DOMParser . Bellow I provide an example supposing request is an XMLHttpRequest object which request is successfully completed : .. . .. . Instead of : .. . .. . Use : .. . .. . An then you can : .. . .. . Or whatever . Comment : on responseXML can you do xmlDoc.document.body.innerHTML like you could with DOMParser", "Question : I have been using a DOMParser object to parse a text string to an XML tree . However it is not available in the context of a Web Worker and neither is of course document.ELEMENT NODE or the various other constants that would be needed . Is there any other way to do that Please note that I do not want to manipulate the DOM of the current page . The XML file won t contain HTML elements or anything of the sort . In fact I do not want to touch the document object at all . I simply want to provide a text string like the following : .. . .. . ...and get back a suitable tree structure and a way to traverse it . I also do not care about schema validation or anything fancy . I know about XML for SCRIPT http : xmljs.sourceforge.net index.html which many may find useful hence I m linking to it here however its licensing is not really suitable for me . I m not sure if jQuery includes an XML parser I m fairly new to this stuff but even if it does and it is usable inside a Worker I would not include an extra 50K lines-of-code just for this function . I suppose I could write a simple XML parser in JavaScript I m just wondering if I m missing a quicker option . .. . Answer : At this point I like to share my parser : https : github.com tobiasnickel tXml .. . .. . with its tXml method you can parse a string into an object and it takes only 0.5kb minified + gzipped", "Question : I wish to change this code from Lotus Script to SSJS . .. . .. . I created this ssjs code by myself.but an error occurred . .. . .. . The error is described below . .. . .. . DOMParseris not found A sentence of error var parser new DOMParser .. . .. . Please tell me the correct code in ssjs . Comment : may be this can help you www-10.lotus.com ldd ddwiki.nsf dx https : www-10.lotus.com ldd ddwiki.nsf dx Using XML as an XPage Data Source .. . Answer : I m not sure what kind of object DOMParser is supposed to be two options : .. . .. . a you wish to us a java class maybe Oracle s version or the one from Apache s Xerces-J API . In both or other cases you could try to call the class constructor by passing the full package name as in var parser new oracle.xml.parser.v2.DOMParser be aware that this is just an example both DOMParser classes don t have parseFromString methods . b more probably you re trying to use a client-side javascript DOMParser object to my knowledge this object is not available in Domino s SSJS implementation at least I can t find any trace of it . The bottom line : you ll have to look for a different way most probably using appropriate java classes may Paul Calhoun s example linked in Frank van der Linden s comment can be of help .", "Question : Be liberal in what you accept and conservative in what you send . - Jon Postel http : en.wikipedia.org wiki Jon Postel .. . .. . Right now I m using the chrome browser but I ve experienced the same in the past with Firefox . JS code like.. . .. . .. . returns a pukey parsererror page instead of anything useful . Presently I m consuming what superficially appear to be XML documents that actually have this problem . That is some elements have the same attribute twice . In accordance with the above-mentioned principle I d like my program built upon the browser s DOMParser object to do better than just throw its hands up in the face of inputs like these . I don t really care if the first last or otherwise value for the attribute is taken . Question : Is there a way to have the parser be less strict .. . Answer : XML s philosophy has always been the opposite of Postel s law : If you re liberal in what you accept this will encourage content creators to be negligent in what they create . If you re strict in what you accept content creators will be forced to be strict in what they produce otherwise what they produce will be useless . Fix the process that generated this non-XML file . And never make the mistake of referring to such an object as an XML document - if it were XML you wouldn t have the problem . Comment : Thanks for this insight . I ve improved the question based on what you ve said here .", "Question : I m trying to parse a XML using Apache Commons JXPath . But for some reason its not able to identify the child nodes after the xml is being parsed . Here s the sample code : .. . .. . I ve used JXPath earlier and never had any issues . I debugged the document object it doesn t seemed to have the child node for . All I m able to see is the root element . I also tried DOMParser without any luck . I ll appreciate if someone can provide pointers to this isuse . Comment : One thing I found is if I remove the attributes from feed xmlns w3.org 2005 Atom http : www.w3.org 2005 Atom xmlns : media search.yahoo.com mrss http : search.yahoo.com mrss xmlns : openSearch a9.com - spec opensearchrss 1.0 http : a9.com - spec opensearchrss 1.0 xmlns : gd schemas.google.com g 2005 http : schemas.google.com g 2005 xmlns : yt gdata.youtube.com schemas 2007 http : gdata.youtube.com schemas 2007 and simply make it feed then the JXPath is able to resolve the nodelist . Unfortunately this is a feed which I can t change any reason or workaround to handle this .. . Answer : This issue has to do with how JXPath handles default namespaces which closely follows the XPath 1.0 http : www.w3.org TR xpath namespace-nodes specification . This also explains why it worked after you removed the default namespace http : www.w3.org 2005 Atom . In order to get it to work with the default namespace you can do the following : .. . .. . For more information on the issue see the following links . http : markmail.org message 7iqw4bjrkwerbh46 .. . .. . Make jxpath namespace aware http : www.waltercedric.com index.php option com content view article id 1315 catid 130 Itemid 332 Comment : Thanks a ton worked like a charm.Thanks for the pointers to the docs got a better understanding on the namespace issue .", "Question : I am trying to create a FF AddOn that brings some XML data from a website . But I can t find a way to parse my RESPONSE . First I used DOMParser but I get this error : .. . .. . ReferenceError : DOMParser is not defined . Someone suggested to use XMLHttpRequest because the parsing is done automatically but then I get this other error : .. . .. . Error : An exception occurred . Traceback most recent call last : .. . File resource : jid0-a23vmnhgidl8wlymvolsst4ca98-at-jetpack api-utils lib cuddlefish.js line 208 in require let module manifest this.manifest base requirer this.modules base TypeError : this.manifest is undefined .. . .. . I really don t know what else to do . I must note that I am using the AddOn Builder to achieve this . Below the code that doesn t seem to work . Option 1 : .. . .. . Option 2 : .. . Answer : DOMParser constructor isn t defined in the context of SDK modules . You can still get it using chrome authority https : addons.mozilla.org en-US developers docs sdk 1.14 dev-guide tutorials chrome.html however : .. . .. . nsIDOMParser documentation https : developer.mozilla.org en nsIDOMParser . That said your approach with XMLHttpRequest should work as well . You used the new-operator incorrectly however the way you wrote it a new require object is being created . This way it should work however : .. . .. . Please consider using an asynchronous XMLHttpRequest object however use request.onreadystatechange to attach your listener the xhr module currently doesn t support other types of listeners or addEventListener . Comment : +1 for the sake of your users please avoid synchronous network access of any kind Comment : @canuckistani : Now if only xhr implemented proper onload and onevent properties Web developers might be used to onreadystatechange but I consider it an ugly solution . Comment : @Wladimir Palant . The DOMParse solution worked great . However the XMLHttpRequest solution threw at me the same error message . I ended up doing something similar to what you recommended me with DOMParse : var Cc Ci require chrome var request Cc @mozilla.org xmlextras xmlhttprequest 1 .createInstance Ci.nsIXMLHttpReques t and it worked . Thank you Comment : @user1042066 : Please don t do this . xhr module makes sure that the request is automatically aborted if your extension is uninstalled disabled - the regular XMLHttpRequest won t do anything like this . Comment : @cprcrack : You are right I fixed the code . I think that this changed since the answer was written it s an internal API so it can change at any time .", "Question : Is there a way to do a wildcard element name match using querySelector or querySelectorAll I see support for wildcards in attribute queries but not for the elements themselfs . The XML document I m trying to parse is basically a flat list of properties and I need to find elements that have certain strings in their names . I realize the XML document is probably in need of a restructuring if I need this but that s just not goign to happen . Any solution except going back to using apparently deprecated XPath support IE9 dropped it . Comment : By name you mean the tag name Comment : Unfortunately yes .. . Answer : Set the tagName as an explicit attribute : .. . .. . I needed this myself for an XML Document with Nested Tags ending in Sequence . See JaredMcAteer answer for more details . I didn t say it would be pretty : PS : I would recommend to use tag name over tagName so you do not run into interferences when reading computer generated implicit DOM attributes .", "Question : Is there a way to do a wildcard element name match using querySelector or querySelectorAll I see support for wildcards in attribute queries but not for the elements themselfs . The XML document I m trying to parse is basically a flat list of properties and I need to find elements that have certain strings in their names . I realize the XML document is probably in need of a restructuring if I need this but that s just not goign to happen . Any solution except going back to using apparently deprecated XPath support IE9 dropped it . Comment : By name you mean the tag name Comment : Unfortunately yes .. . Answer : I just wrote this short script seems to work .", "Question : Is there a way to do a wildcard element name match using querySelector or querySelectorAll I see support for wildcards in attribute queries but not for the elements themselfs . The XML document I m trying to parse is basically a flat list of properties and I need to find elements that have certain strings in their names . I realize the XML document is probably in need of a restructuring if I need this but that s just not goign to happen . Any solution except going back to using apparently deprecated XPath support IE9 dropped it . Comment : By name you mean the tag name Comment : Unfortunately yes .. . Answer : This works for me : .. . .. . Show all names ending whith 057 . Comment : What programming language is that This is a JavaScript question Comment : This is Objective C not JavaScript", "Question : I have two different Strings for example : .. . .. . 1 .. . .. . 2 .. . .. . I need to parse these strings and fetch the entire XML element from root node without any headers . How do I achieve this Comment : Hello I ve formatted your code blocks so they are easier to read . I suggest you show us some of the code you ve already written and better specify what exactly is your problem - are those String objects as your post suggests They look like HttpResponses . .. . Answer : 1 . Remove the header - everything before .. . .. . xml .. . .. . or .. . .. . soap : .. . .. . 2 . Use some library for XML document parsing . For example JAXP https : docs.oracle.com javase tutorial jaxp", "Question : I need to find all anchor tags which have an img tag as child element . Consider the following cases .. . .. . My requirement is to generate a list of href attributes along with src and alt ie .. . .. . How can I match the above cases in PHP Using Dom Xpath or any other dom parser .. . .. . Thanks in Advance .. . Answer : Assuming your HTML is a valid XML document has a single root node etc you can use SimpleXML like this : .. . .. . This uses xpath to search through the document for all a tags that have an href attribute . Then it searches under each a tag found to find any img tags that have both src and alt tags . It then just grabs the needed attributes and adds them to the array .", "Question : I am using websphere 7 . to deploy my application . While deployment it needs to parse .ddm file to read properties . We are using DOMParser to parse the file . following is the code . same this is working fine is Tomcat . getting following exception . .. . Answer : Issue is being resolved by creating shared reference library in WAS . Create a shared library for Content Management .. . .. . 1 . Start the WebSphere integrated solutions console . For more information about the console see the WebSphere documentation . 2 . Expand Applications- Application Types and click WebSphere enterprise applications . 3 . On the Enterprise Applications window select the Content Management application name . 4 . On the Configuration page click Shared library references . 5 . On the Shared library references pane select the Content Management application and click Reference shared-libraries . 6 Click New . 1 . On the Configuration page change the name in the Name box to jars .. . .. . 2 . On the Classpath box add these three lines changing the paths to the location where you extracted the WAR file . Note : Each of these files must be entered on separate lines . D : Temp org.eclipse.osgi 3.3.2.R33x v20080105.jar D : Temp org.apache.xml.resolver 1.1.jar D : Temp resource .. . .. . 1 . Select the Class Loading check box . 2 . Click Apply . 3 . Click the Save link-to update the master configuration . 4 . In the Shared library references page select the deployed application and click Reference shared-libraries . 5 . In the Shared Library Mapping page the shared library you created appears in the Available list . Use the arrow button to move it to Selected list and click OK . .. . .. . 6 . In the Shared library references page select the DocCenterServer module and click Reference shared-libraries . 7 . In the Shared Library Mapping page the shared library you created appears in the Available list . Use the arrow button to move it to the Selected list and click OK . .. . .. . 8 . Click the Save link-to update the master configuration . 9 . Restart the deployed application to apply the change : .. . .. . 10 . In the Enterprise Application window select the WAR file and click Start . 11 . When the application is started a green arrow appears in the Application Status column . Comment : AWesome prasad truly very descriptive 100 helpful .", "Question : Is there a way to do a wildcard element name match using querySelector or querySelectorAll I see support for wildcards in attribute queries but not for the elements themselfs . The XML document I m trying to parse is basically a flat list of properties and I need to find elements that have certain strings in their names . I realize the XML document is probably in need of a restructuring if I need this but that s just not goign to happen . Any solution except going back to using apparently deprecated XPath support IE9 dropped it . Comment : By name you mean the tag name Comment : Unfortunately yes .. . Answer : I was messing musing on one-liners involving querySelector ended up here have a possible answer to the OP question using tag names querySelector with credits to @JaredMcAteer for answering MY question aka have RegEx-like matches with querySelector in vanilla Javascript .. . .. . Hoping the following will be useful fit the OP s needs or everyone else s : .. . .. . Then we can for example get the src stuff etc .. . .. . .. . +", "Question : Is there a way to do a wildcard element name match using querySelector or querySelectorAll I see support for wildcards in attribute queries but not for the elements themselfs . The XML document I m trying to parse is basically a flat list of properties and I need to find elements that have certain strings in their names . I realize the XML document is probably in need of a restructuring if I need this but that s just not goign to happen . Any solution except going back to using apparently deprecated XPath support IE9 dropped it . Comment : By name you mean the tag name Comment : Unfortunately yes .. . Answer : id someId will match all ids starting with someId . id someId will match all ids ending with someId . id someId will match all ids containing someId . If you re looking for the name attribute just substitute id with name . If you re talking about the tag name of the element I don t believe there is a way using querySelector Comment : Thanks I meant the tag name . Comment : is this ie8+ Comment : hmm I can t do document.querySelectorAll div . id foo Comment : The period in there is probably messing it up document.querySelectorAll div id foo IE8 only has partial QSA support I think they only support CSS2.1 selectors so these selectors won t work in IE8 but IE9+ will work .", "Question : I need to find all anchor tags which have an img tag as child element . Consider the following cases .. . .. . My requirement is to generate a list of href attributes along with src and alt ie .. . .. . How can I match the above cases in PHP Using Dom Xpath or any other dom parser .. . .. . Thanks in Advance .. . Answer : Assuming doc is a DOMDocument representing your HTML document : Comment : Thanks Exactly what I was looking for . Comment : @NikhilMohan : Sorry changed a bit . You have to actually query a DOMXPath attached to the document not the document itself . Comment : It s OK . I have fixed it with your first post : One more thing how to find anchor tags which have no img tag as child element Instead of src and alt I need anchor text Comment : First guess : query a not img to get non-image links and query text from there to get each text node within those links . You should probably collect their nodeValue s into an array and implode them to get the whole text value . Comment : Thank you very much for your help. . I will try this. .", "Question : I am trying to determine the best way to parse the XML response I get from a webservice call into a Java object . Using JAXB seems to be the easiest way but every example I get for this requires that you have a template Java class which will be the Java type the XML is converted into . My xml is as below .. . .. . My question is do I have to define the Java object that this will be converted into What I am afraid of if this is the case is what happens if data is added or removed from the XML response as it exists at the moment . I have also tried loading the XML into a DOM and walking thropugh it that way but againi I am wondered what will happen if an element is added or removed I only want certain child nodes if their parent node is a certain value so any pointers as to the easiest way to do it would be welcome . Comment : Can you be more specific as what you want to accomplish as a result so I can probly submit more curated answer Comment : @vtd-xml-author I want to extract all data in the hw tags i.e . hw XXX hw if its sibling fl node contains a certain value . I can walk through the XML ok with SAX parser and get the data I require but I would like to do it the proper way as I may not be the one to be maintaining this code . .. . Answer : In my experience when you have to deal with very complex XML document its probably easier to : .. . .. . 1 . Transform it into more simple-form .. . 2 . Marshal it into object that you can work with .. . .. . I.e . lets say you ve got a very complex XML : .. . .. . Step number 1 : simplify it using XSLT .. . .. . Step 2 . Marshal your own SimpleForm XML into java object .. . .. . That way you loose coupling between external schema and your internal logic .", "Question : Is there any HTML CSS DOM parser for PHP that I can feed direct live URL and it gives me following two things . 1 . HTML of any class id of the component . 2 . Custom CSS that is applied to any class id . I know num : 1 is possible with so many DOM parser that are available but I also want the CSS properties that are associated with them . .. . Answer : try to use html dom parser http : simplehtmldom.sourceforge.net .. . .. . which will give you all html finding support Comment : this does not have any support to parse CSS Comment : view this : stackoverflow.com questions 3220552 http : stackoverflow.com questions 3220552 how-should-parse-with-php-simple-html-dom-parser-background-images-and-other-i", "Question : I have some HTML with custom-attributes and trying to parse it with component PHPHtmlParser . Whole project created via this component . Here is the problem example given . Output is : Name : info Top : Left : .. . .. . getAttribute cannot get custom-attributes . Comment : If you want valid html you should use data- attributes : data-otop 20 data-oleft 20 .. . Answer : Why use a 3rd party library to parse the DOM when PHP has built-in support for this I suggest learning the native functions http : php.net manual en class.domdocument.php instead :", "Question : I need to change the default implementation within my project for org.w3c.dom.Document .. . .. . I followed this link : http : www.huihoo.org jboss online manual 3.0 ch13s135.html to change the default implementation for : .. . .. . I ve created 3 files with the above names with in META-INF services and put in each the following lines : .. . .. . in file : javax.xml.parsers.DocumentBuilderFactory .. . .. . I put : com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl .. . .. . in file : javax.xml.parsers.SAXParserFactory .. . .. . I put : com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl .. . .. . in file : javax.xml.transform.TransformerFactory : .. . .. . I put : org.apache.xalan.processor.TransformerFactoryImpl .. . .. . But when I deployed over Oracle Application Server I got that the implementation class of org.w3c.dom.Document is : oracle.xml.parser.v2.XMLDocument instead of com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl that is being printed when development on Jetty . FY : I am developing on Jetty and deploy on Oracle application server . Need help .. . Answer : It sounds like you are doing the right thing . But it might be simpler to use the system-properties method .. . at least until you can figure out what is going wrong with the services method . Comment : The services mechanism is about components which provide a service announcing that they do so . It s about providing a choice . It is not about specifying which choice to make and relying on classpath ordering to use it to do that seems like a kludge to me . The system-properties method is a way of making an explicit choice and so it is the right way to do this here . Comment : @Tom Anderson - in defence of the OP my reading of the linked document is that the services approach ought to work . And I found other search hits that suggest this is true for OAS as well . However I must admit that the way the document is phrased leaves some room for doubt and I couldn t find OAS specific documentation . Comment : yes you re quite right . The services approach really ought to work everywhere since it s part of the JRE . I merely think it s better to be explicit ." ] }
[ "yes-answer-long", "yes-answer-short" ]
dom
UNK_RELATION