uid
stringlengths
6
55
question
stringlengths
34
465
context_short
sequence
context_long
sequence
tags
sequence
answer
stringlengths
1
25
relation
stringclasses
1 value
oracle-xdk@oracle@99
oracle-xdk -- oracle xml developer s kit xdk is a collection of utilities for manipulating xml in @placeholder databases .
{ "confidence": [ 48.996925354003906, 43.801727294921875, 41.99120330810547, 38.10091018676758, 37.568702697753906, 32.75564956665039, 30.74456024169922, 30.214262008666992, 29.98015594482422, 29.249961853027344, 27.658283233642578, 26.821643829345703, 26.57427215576172, 23.427196502685547, 23.427196502685547, 23.427196502685547, 21.941015243530273, 21.941015243530273, 20.27643585205078, 20.015220642089844, 16.600299835205078, 15.282690048217773, 15.282690048217773, 15.282690048217773, 15.282690048217773, 15.282690048217773, 15.282690048217773, 15.282690048217773, 15.282690048217773, 15.282690048217773, 15.282690048217773, 15.282690048217773, 15.282690048217773, 15.282690048217773, 15.282690048217773, 15.282690048217773, 15.282690048217773, 11.888243675231934, 11.888243675231934, 11.888243675231934, 11.888243675231934, 11.888243675231934, 11.888243675231934, 11.888243675231934, 11.888243675231934, 11.888243675231934, 11.888243675231934, 11.888243675231934, 11.888243675231934, 11.888243675231934, 11.888243675231934, 11.888243675231934, 11.888243675231934, 11.888243675231934, 11.888243675231934, 11.888243675231934, 11.888243675231934, 11.888243675231934, 11.888243675231934, 11.888243675231934, 11.888243675231934, 11.888243675231934, 11.888243675231934, 11.888243675231934, 11.888243675231934, 11.888243675231934, 11.888243675231934, 11.888243675231934, 11.888243675231934, 11.888243675231934, 11.888243675231934, 11.888243675231934, 11.888243675231934, 11.888243675231934, 11.888243675231934, 11.888243675231934, 11.888243675231934, 11.888243675231934, 11.888243675231934, 11.888243675231934, 11.888243675231934, 11.888243675231934, 11.888243675231934 ], "content": [ "For some reason we need the xdb.jar from the Oracle XDK .", "How to create xml in oracle using sql query .", "it seems like it should be as generally XSLT variables parameters can contain nodesets .. . .. . 2 . is it possible specifically with the oracle XDK or xalan which is also in the classpath", "Edit : Found the Oracle XDK home page http : www.oracle.com technetwork developer-tools xmldevkit index.html which looks promising for getting xmlparser but there are no downloads available in an obvious place .", "I believe the code is using the oracle XDK for transformations it s using JDK 1.4.2 and Spring and I m new to the codebase so I m not sure what is getting loaded in the end .", "http : docs.oracle.com cd E11882 01 appdev.112 e10769 oracle xml parser v2 XMLParser.html setErrorHandler org xml sax ErrorHandler", "The application was running on Oracle 10g version 10.2.0.4 and uses Oracle Advanced Queues .", "1st - 11g - c : xe app oracle product 11.2.0 server 2nd - 11g - c : app oracle product dbhome 1 3rd - 12c- not important for this issue .", "The implementations from oracle .", "The answer is that this is possible however it is non-intuitive at least for the Oracle XSL processor .", "The JAR files are included with the Oracle full database client .", "On Windows Server 2012 R2 I have 3 Oracle Installations don t ask why etc .", "I m trying to pass an XML document to an XSLT stylesheet as a parameter .", "I m trying to update a legacy Java application to be compatible with Oracle 11g version 11.2.0.3 .", "I don t think the client is available publicly for download for 11.2.0.3 yet except perhaps as part of Oracle XE .", "If you have the Oracle EE install the standalone full client is available from disk 4 .", "http : www.oracle.com technetwork database enterprise-edition jdbc-112010-090769.html .. . .. . Oracle Database 11g Release 2 JDBC Drivers .. . .. . xdb6 and the drivers are here", "Datebase Version : Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production .. . .. . Function to call the above utility from PL SQL .. . .. . Thanks .", "I ve looked around in various places such as my Oracle home-directory JDeveloper installation and online and found a bewildering variety of jar files of various names and versions that are candidates but not quite what I need .", "I am trying to validate xml against xsd using SAX DOM parser both the files are stored as CLOB column in the database .", "Edit : When trying to run with the mish-mash of versions I ve managed to find I get the following error when trying to run the apps unit tests : .. . .. . Edit : Managed to solve the problem that was causing the error in my unit tests by downloading orai18n.jar and xdb6.jar from Oracle s Oracle Database 11g Release 2 JDBC Drivers page http : www.oracle.com technetwork database enterprise-edition jdbc-112010-090769.html .", "In my first attempt I just created a document object and set this as the parameter on the transformer but attempts to copy the variable into the tree give no result .", "Questions that come to mind are : .. . .. . 1 . is this even possible in the general case of XSLT transformers", "3 .", "If so how do I make it work", "I tried the following non-working invocations names changed to protect the innocent : .. . .. . and .. . .. . this second on the basis that maybe DOMSource would work because it was the java.xml.transform interface to the DOM .", "The invocation that worked for me in the end was to take the insight that XSL uses XPath and the valid types for the variable are essentially strings or nodesets and XPath returns nodesets .", "The following works for me : .. . .. . Which basically uses XPath to get a nodeset containing only the root document of the passed in DOM object .", "However this seems like a bit of a hack and may not work with other XSL processors so YMMV.. .", "You ll probably get more responses and they ll probably be better if you provide more context around your question .", "I hope this helps : http : download.oracle.com docs cd B19306 01 appdev.102 b14259 xdb13gen.htm i1027254", "In 1st installation I m trying to import sample database via impdp.exe and I get error which says missing kualter.xml .", "As you can see on picture http : i65.tinypic.com 5aeut4.jpg in right window there are folders which are missing in left window .", "I need folder XLS because there is this file kualter.xml .", "How can I manually install this feature option", "OR can I copy this missing folders from 2nd installation", "Versions are the same but one is server and other is dbhome 1 .", "This jar depends on the xmlparserv2.jar .", "The actual problem is that the xmlparserv2.jar comes with some provider-configuration files META-INF services .", "The jar has Services Providers for javax.xml.transform.TransformerFactory javax.xml.parsers.SAXParserFactory and javax.xml.parsers.DocumentBuilderFactory .", "don t work together with some other parts of our software they need the standard factories .", "You could use separate classloaders to isolate the jars from the rest of the application .", "This question http : stackoverflow.com questions 6368483 running-class-in-separate-context about covers it .", "You could just remove these classes from the xmlparserv2.jar", "Sorry but that s not possible .", "The license of xmlparserv2.jar doesn t allow that .", "And the xmlparserv2.jar needs these classes .", "See here http : bugs.sun.com view bug.do bug id 6561417 - JNLP classpath precedence 1.5 vs 1.6", "Thanks but it doesn t solve my problem .", "The xmlparserv2.jar is overwriting classes which are in the jre .", "I can t load the xmlparserv2.jar before the jre .", "Can I", "that s what the issue discusses - how and under what versions .", "Okay then I don t really understand the workaround .", "The xmlparserv2.jar includes following packages : org.xml.sax .", "org.w3c.dom .", "oracle.xml .", "javax.xml .", "The problem proberbly came from the javax.xml .", "package.. .", "But how can I tell the runtime not to use this part of the jar", "I solved the problem by removing the services META-INF services .", "We ran our unit tests and everything worked .", "Even the parts of our software which are depending on xmlparserv2.jar xdb.jar .", "It has Maven dependencies declared for : .. . .. . aq 10.2.0.4.0 .. . xdb 10.2.0.4.0 .. . xmlparser 10.2.0.4.0 .. . i18n 10.2.0.4.0 .. . .. . I m struggling to find the same files for 11g specifically for 11.2.0.3 .", "Can anyone let me know where to find the right jar files", "It seems that there are now some aq classes in the JDBC driver but the package name has changed from oracle.aq to oracle.jdbc.aq .", "Whilst I m happy to do some refactoring I d like some confidence that this is the right thing to do before going ahead .", "Any advice here would be valuable .", "However I m still short of aq and xmlparser .", "What the question", "Sorry - thought this was obvious from the title : - Can anyone let me know where to find the right jar files", "If you have some candidate jar files you could look inside their META-INF MANIFEST files which usually contains a version number entry .", "Thanks .", "I know what versions I ve managed to get already - aq-11.1.0.7.0 i18n-11.2.0.3.0 correct one for me xdb-11.1.0 and xmlparser-11.1.0.7.0 .", "This mish-mash of versions is giving me the error above .", "You ll find the correct JAR files in the client in ORACLE HOME jdbc lib ORACLE HOME lib ORACLE HOME rdbms jlib and ORACLE HOME jlib .", "Remember to include orai18n-collation.jar when including orai18n.jar for XQJ support and ONLY use the same version of ojdbcX.jar as the JARs from the client i.e don t use ojdbc5.jar or ojdbc14.jar - use ojdbc6.jar .", "I have the requirement to report all the validation errors and based on some helpful advice code from the earlier posts in this forum I have used the following code to validate and report the errors .", "The code works fine but for large-files it never goes beyond a certain number of errors i.e .", "getNumMessages XMLParseException never returns value greater than 100 and thus limits the output of the validation errors .", "Any pointers to suggest change in code or an alternative will be extremely helpful .", "Have you considered using SAXParser.setErrorHandler to register callback code that can accumulate the errors as they are encountered" ] }
{ "confidence": [ 62.369842529296875, 49.77397155761719, 49.77397155761719, 49.77397155761719, 43.52347183227539, 43.49737548828125, 40.721221923828125, 38.04248046875, 33.8485107421875, 30.49527931213379 ], "content": [ "Question : I m trying to pass an XML document to an XSLT stylesheet as a parameter . I believe the code is using the oracle XDK for transformations it s using JDK 1.4.2 and Spring and I m new to the codebase so I m not sure what is getting loaded in the end . In my first attempt I just created a document object and set this as the parameter on the transformer but attempts to copy the variable into the tree give no result . Questions that come to mind are : .. . .. . 1 . is this even possible in the general case of XSLT transformers it seems like it should be as generally XSLT variables parameters can contain nodesets .. . .. . 2 . is it possible specifically with the oracle XDK or xalan which is also in the classpath 3 . If so how do I make it work .. . Answer : The answer is that this is possible however it is non-intuitive at least for the Oracle XSL processor . I tried the following non-working invocations names changed to protect the innocent : .. . .. . and .. . .. . this second on the basis that maybe DOMSource would work because it was the java.xml.transform interface to the DOM . The invocation that worked for me in the end was to take the insight that XSL uses XPath and the valid types for the variable are essentially strings or nodesets and XPath returns nodesets . The following works for me : .. . .. . Which basically uses XPath to get a nodeset containing only the root document of the passed in DOM object . However this seems like a bit of a hack and may not work with other XSL processors so YMMV.. .", "Question : For some reason we need the xdb.jar from the Oracle XDK . This jar depends on the xmlparserv2.jar . The actual problem is that the xmlparserv2.jar comes with some provider-configuration files META-INF services . The jar has Services Providers for javax.xml.transform.TransformerFactory javax.xml.parsers.SAXParserFactory and javax.xml.parsers.DocumentBuilderFactory . The implementations from oracle . don t work together with some other parts of our software they need the standard factories . .. . Answer : You could use separate classloaders to isolate the jars from the rest of the application . This question http : stackoverflow.com questions 6368483 running-class-in-separate-context about covers it .", "Question : For some reason we need the xdb.jar from the Oracle XDK . This jar depends on the xmlparserv2.jar . The actual problem is that the xmlparserv2.jar comes with some provider-configuration files META-INF services . The jar has Services Providers for javax.xml.transform.TransformerFactory javax.xml.parsers.SAXParserFactory and javax.xml.parsers.DocumentBuilderFactory . The implementations from oracle . don t work together with some other parts of our software they need the standard factories . .. . Answer : You could just remove these classes from the xmlparserv2.jar Comment : Sorry but that s not possible . The license of xmlparserv2.jar doesn t allow that . And the xmlparserv2.jar needs these classes .", "Question : For some reason we need the xdb.jar from the Oracle XDK . This jar depends on the xmlparserv2.jar . The actual problem is that the xmlparserv2.jar comes with some provider-configuration files META-INF services . The jar has Services Providers for javax.xml.transform.TransformerFactory javax.xml.parsers.SAXParserFactory and javax.xml.parsers.DocumentBuilderFactory . The implementations from oracle . don t work together with some other parts of our software they need the standard factories . .. . Answer : I solved the problem by removing the services META-INF services . We ran our unit tests and everything worked . Even the parts of our software which are depending on xmlparserv2.jar xdb.jar .", "Question : I m trying to update a legacy Java application to be compatible with Oracle 11g version 11.2.0.3 . The application was running on Oracle 10g version 10.2.0.4 and uses Oracle Advanced Queues . It has Maven dependencies declared for : .. . .. . aq 10.2.0.4.0 .. . xdb 10.2.0.4.0 .. . xmlparser 10.2.0.4.0 .. . i18n 10.2.0.4.0 .. . .. . I m struggling to find the same files for 11g specifically for 11.2.0.3 . I ve looked around in various places such as my Oracle home-directory JDeveloper installation and online and found a bewildering variety of jar files of various names and versions that are candidates but not quite what I need . Can anyone let me know where to find the right jar files It seems that there are now some aq classes in the JDBC driver but the package name has changed from oracle.aq to oracle.jdbc.aq . Whilst I m happy to do some refactoring I d like some confidence that this is the right thing to do before going ahead . Any advice here would be valuable . Edit : When trying to run with the mish-mash of versions I ve managed to find I get the following error when trying to run the apps unit tests : .. . .. . Edit : Managed to solve the problem that was causing the error in my unit tests by downloading orai18n.jar and xdb6.jar from Oracle s Oracle Database 11g Release 2 JDBC Drivers page http : www.oracle.com technetwork database enterprise-edition jdbc-112010-090769.html . However I m still short of aq and xmlparser . Edit : Found the Oracle XDK home page http : www.oracle.com technetwork developer-tools xmldevkit index.html which looks promising for getting xmlparser but there are no downloads available in an obvious place . Comment : What the question Comment : Sorry - thought this was obvious from the title : - Can anyone let me know where to find the right jar files Comment : If you have some candidate jar files you could look inside their META-INF MANIFEST files which usually contains a version number entry . Comment : Thanks . I know what versions I ve managed to get already - aq-11.1.0.7.0 i18n-11.2.0.3.0 correct one for me xdb-11.1.0 and xmlparser-11.1.0.7.0 . This mish-mash of versions is giving me the error above . .. . Answer : http : www.oracle.com technetwork database enterprise-edition jdbc-112010-090769.html .. . .. . Oracle Database 11g Release 2 JDBC Drivers .. . .. . xdb6 and the drivers are here", "Question : For some reason we need the xdb.jar from the Oracle XDK . This jar depends on the xmlparserv2.jar . The actual problem is that the xmlparserv2.jar comes with some provider-configuration files META-INF services . The jar has Services Providers for javax.xml.transform.TransformerFactory javax.xml.parsers.SAXParserFactory and javax.xml.parsers.DocumentBuilderFactory . The implementations from oracle . don t work together with some other parts of our software they need the standard factories . .. . Answer : See here http : bugs.sun.com view bug.do bug id 6561417 - JNLP classpath precedence 1.5 vs 1.6 Comment : Thanks but it doesn t solve my problem . The xmlparserv2.jar is overwriting classes which are in the jre . I can t load the xmlparserv2.jar before the jre . Can I Comment : that s what the issue discusses - how and under what versions . Comment : Okay then I don t really understand the workaround . The xmlparserv2.jar includes following packages : org.xml.sax . org.w3c.dom . oracle.xml . javax.xml . The problem proberbly came from the javax.xml . package.. . But how can I tell the runtime not to use this part of the jar", "Question : I m trying to update a legacy Java application to be compatible with Oracle 11g version 11.2.0.3 . The application was running on Oracle 10g version 10.2.0.4 and uses Oracle Advanced Queues . It has Maven dependencies declared for : .. . .. . aq 10.2.0.4.0 .. . xdb 10.2.0.4.0 .. . xmlparser 10.2.0.4.0 .. . i18n 10.2.0.4.0 .. . .. . I m struggling to find the same files for 11g specifically for 11.2.0.3 . I ve looked around in various places such as my Oracle home-directory JDeveloper installation and online and found a bewildering variety of jar files of various names and versions that are candidates but not quite what I need . Can anyone let me know where to find the right jar files It seems that there are now some aq classes in the JDBC driver but the package name has changed from oracle.aq to oracle.jdbc.aq . Whilst I m happy to do some refactoring I d like some confidence that this is the right thing to do before going ahead . Any advice here would be valuable . Edit : When trying to run with the mish-mash of versions I ve managed to find I get the following error when trying to run the apps unit tests : .. . .. . Edit : Managed to solve the problem that was causing the error in my unit tests by downloading orai18n.jar and xdb6.jar from Oracle s Oracle Database 11g Release 2 JDBC Drivers page http : www.oracle.com technetwork database enterprise-edition jdbc-112010-090769.html . However I m still short of aq and xmlparser . Edit : Found the Oracle XDK home page http : www.oracle.com technetwork developer-tools xmldevkit index.html which looks promising for getting xmlparser but there are no downloads available in an obvious place . Comment : What the question Comment : Sorry - thought this was obvious from the title : - Can anyone let me know where to find the right jar files Comment : If you have some candidate jar files you could look inside their META-INF MANIFEST files which usually contains a version number entry . Comment : Thanks . I know what versions I ve managed to get already - aq-11.1.0.7.0 i18n-11.2.0.3.0 correct one for me xdb-11.1.0 and xmlparser-11.1.0.7.0 . This mish-mash of versions is giving me the error above . .. . Answer : The JAR files are included with the Oracle full database client . I don t think the client is available publicly for download for 11.2.0.3 yet except perhaps as part of Oracle XE . If you have the Oracle EE install the standalone full client is available from disk 4 . You ll find the correct JAR files in the client in ORACLE HOME jdbc lib ORACLE HOME lib ORACLE HOME rdbms jlib and ORACLE HOME jlib . Remember to include orai18n-collation.jar when including orai18n.jar for XQJ support and ONLY use the same version of ojdbcX.jar as the JARs from the client i.e don t use ojdbc5.jar or ojdbc14.jar - use ojdbc6.jar .", "Question : How to create xml in oracle using sql query . Comment : You ll probably get more responses and they ll probably be better if you provide more context around your question . .. . Answer : I hope this helps : http : download.oracle.com docs cd B19306 01 appdev.102 b14259 xdb13gen.htm i1027254", "Question : I am trying to validate xml against xsd using SAX DOM parser both the files are stored as CLOB column in the database . I have the requirement to report all the validation errors and based on some helpful advice code from the earlier posts in this forum I have used the following code to validate and report the errors . The code works fine but for large-files it never goes beyond a certain number of errors i.e . getNumMessages XMLParseException never returns value greater than 100 and thus limits the output of the validation errors . Any pointers to suggest change in code or an alternative will be extremely helpful . Datebase Version : Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production .. . .. . Function to call the above utility from PL SQL .. . .. . Thanks . .. . Answer : Have you considered using SAXParser.setErrorHandler to register callback code that can accumulate the errors as they are encountered http : docs.oracle.com cd E11882 01 appdev.112 e10769 oracle xml parser v2 XMLParser.html setErrorHandler org xml sax ErrorHandler", "Question : null .. . Answer : On Windows Server 2012 R2 I have 3 Oracle Installations don t ask why etc . 1st - 11g - c : xe app oracle product 11.2.0 server 2nd - 11g - c : app oracle product dbhome 1 3rd - 12c- not important for this issue . In 1st installation I m trying to import sample database via impdp.exe and I get error which says missing kualter.xml . As you can see on picture http : i65.tinypic.com 5aeut4.jpg in right window there are folders which are missing in left window . I need folder XLS because there is this file kualter.xml . How can I manually install this feature option OR can I copy this missing folders from 2nd installation Versions are the same but one is server and other is dbhome 1 ." ] }
[ "yes-answer-long", "yes-answer-short" ]
oracle
UNK_RELATION
series-40@s@79
series-40 -- series-40 is an embedded software platform that is used on nokia @placeholder mid-tier smartphones .
{ "confidence": [ 69.19053649902344, 60.473785400390625, 58.912925720214844, 57.922019958496094, 57.119239807128906, 57.119239807128906, 56.41375732421875, 55.571346282958984, 55.31365203857422, 54.26838684082031, 54.26838684082031, 52.266868591308594, 51.34136962890625, 51.34136962890625, 51.34136962890625, 49.86799621582031, 49.86799621582031, 49.830474853515625, 49.3542594909668, 49.188720703125, 47.880455017089844, 47.35274124145508, 45.2475471496582, 43.858177185058594, 42.50479507446289, 42.50479507446289, 40.75458908081055, 35.06285858154297, 34.865089416503906, 34.3467903137207, 32.312110900878906, 31.93982696533203, 30.37458038330078, 29.989986419677734, 29.989986419677734, 29.989986419677734, 29.883081436157227, 28.725021362304688, 28.220415115356445, 27.988468170166016, 27.988468170166016, 27.254182815551758, 27.137401580810547, 27.059185028076172, 26.60045623779297, 26.33835792541504, 26.292299270629883, 26.218896865844727, 26.218896865844727, 26.218896865844727, 25.92438507080078, 25.880760192871094, 25.58959197998047, 25.58959197998047, 25.58959197998047, 25.482688903808594, 25.482688903808594, 25.135883331298828, 24.894683837890625, 24.089319229125977, 23.820022583007812, 23.306285858154297, 22.967491149902344, 22.828758239746094, 22.828758239746094, 22.828758239746094, 22.775602340698242, 22.775602340698242, 22.775602340698242, 22.737009048461914, 22.737009048461914, 21.52399253845215, 20.2070255279541, 20.2070255279541, 19.811721801757812, 19.811721801757812, 19.811721801757812, 19.811721801757812, 19.811721801757812, 19.811721801757812, 19.811721801757812, 19.811721801757812, 19.811721801757812, 19.811721801757812, 19.811721801757812, 19.811721801757812, 19.811721801757812, 19.811721801757812, 19.811721801757812, 19.811721801757812, 19.811721801757812, 19.811721801757812, 19.811721801757812, 19.811721801757812, 19.811721801757812, 19.811721801757812, 19.811721801757812 ], "content": [ "Series 40 is not a Symbian platform .", "There are no such things as Symbian Series 40 or Series 60 .", "It is said that the developer platform is Series 40 Developer Platform 1.0 but from the Series 40 Platform SDKs page no SDK Series 40 for Platform 1.0 is available I can just see Series 40 Developer Platform 2.0 and so on .", "Note that S40 is a software platform used on a series of Nokia devices .", "What is required to start developing for Nokia Series 40 with Java", "I am new to creating Nokia application for the series-40 mobiles .", "A bug in Eclipse or Series 40 emulator", "Which SDK is used to develop applications in Symbian Series 40 60", "Can I develop an application that will run on Nokia 3120 using the Series 40 Developer Platform 2.0 or 3.0", "Nokia Series 40 http : www.forum.nokia.com Technology Topics Device Platforms Series 40 is based on Nokia s proprietary operating-system .", "Is there a way other then being Nokia to write an application for global hotkeys hooks on Series 40 6th edition", "Check Java - code examples http : www.forum.nokia.com Develop Java Code examples for Nokia Series 40 .", "I am new about Symbian Series 40 60 .", "-1 Series 40 devices are not Symbian they only have a Java API .", "has said Series 40 devices are not based on Symbian OS .", "Is it possible for a Series 40 application to use the Nokia VGA camera with Java or Flash lite", "I m building a J2ME app for Nokia Series 40 devices that has the feature of sending SMSs to predefined shrotcodes .", "I m trying to use SignalR but I want to know whether it s supported on series-40 specifically whether it s supported on Nokia Asha phones .", "Which API can be used for sending and receiving SMSes in Series 40 http : en.wikipedia.org wiki Series 40", "Can I use the Funambol http : en.wikipedia.org wiki Funambol Funambol project API for Symbian Series 40 http : en.wikipedia.org wiki Series 40 development using C++ as the Series 40 SDK is not available for C++", "But the problem is that when I port it to a nokia series-40 phone or an emulator the .jad or .jar file opens directly but in other series 60 phones like e72 or e63 it installs .", "I used Eclipse Helios and Nokia s Series 40 5th Edition SDK Feature Pack 1 for both projects .", "What are some tips-and-tricks when developing web-applications using the Series 40 Ovi http : en.wikipedia.org wiki Ovi 28Nokia 29 browser platform", "There s a folder in the Series 40 SDK directory that apparently caches the MIDlets it runs and keeps older versions of the same MIDlet there too .", "Can we use a web Service from our application or call a web service from a Symbian Series 40 60 application", "In addition to what you can use on Series 40 for third-party application development there are the options of using C C++ Python for S60 Perl Ruby etc .", "I believe on Nokia S40 series phones live video-streaming is not possible .", "You can program your MIDlets http : www.google.com url sa t source web cd 1 ved 0CBgQFjAA url http : en.wikipedia.org wiki MIDlet ei hDH0Tee-NcvCtAbyxK28Bg usg AFQjCNEx8uY54yZacrYb2kzWqmonBJ1F0Q with later versions of the Series 40 SDK just remember not to use any APIs that are not available on the Nokia 3120 .", "All that s needed to develop for Nokia with Java ME is : .. . .. . Java Development Kit 6 http : www.oracle.com technetwork java javase downloads index.html - required to develop Java applications .. . Eclipse Java Helios http : www.eclipse.org downloads packages eclipse-ide-java-developers heliosr - need this to code compile debug and others .. . Nokia Series 40 SDK v.6 http : www.forum.nokia.com info sw.nokia.com id cc48f9a1-f5cf-447b-bdba-c4d41b3d05ce Series 40 Platform SDKs.html login-required - used to emulate the Nokia platform .. . Mobile Tools for Java http : www.eclipse.org dsdp mtj - Eclipse extension for mobile development integrates with the Nokia SDK .. . .. . I think the order of the items is the right order .", "I am looking to have a Symbian Series 40 http : en.wikipedia.org wiki Series 40 application to take a photo using the onboard camera every 5 minutes and then upload the image to a server via GPRS .", "I m using Nokia Web Tools to develop an web app but I need to access device api such as the model name for exampl Nokia Asha 301 or E72 etc .", "S40 Series doesn t have Symbian Operating system so they are directly opening .JAR files even you can view .JAD file in S40 Series phones .", "Reading around Nokia forums it seems that accessing the Cell ID and related information from Nokia S40 series phones is virtually impossible unless your MIDlet http : en.wikipedia.org wiki MIDlet is signed and even this would work only for S40 3rd Edition FP1 and above .", "Nokia S60 http : www.forum.nokia.com Technology Topics Device Platforms s60 is based on Symbian OS .", "For physical testing I have an unbranded Nokia C3-00 .", "The answer is yes I successfully get it working using Nokia Web Tools .", "The current S60 5th Edition is likely to be the last S60 release from Nokia the next platform release will be Symbian 2 from Symbian Foundation corresponding to S60 5th Edition FP1 in the old S60 versioning scheme .", "On the other hand in S60 Series phones they have Symbian Operating system and they allow to execute Java ME application only after the installation .", "For both you can find the tools and SDKs from Forum Nokia http : www.forum.nokia.com alongside other developer resources .", "The directory to clean is : .. . Nokia Devices S40 5th Edition SDK Feature Pack 1 bin Storage 6500500 C DirectLoaded", "The only way to install on phone is to send it to OVI NOKIA store and install from there", "In the future S60 will be merged to Symbian Foundation platform releases .", "I have also checked supported JRSs for nokia c3 which is a s40 v6 device which shows that it supports jsr 234 .", "But due to low quality antennas used for internet in the S40 series Obviously entry level phones internet speed will be less and it seems like video buffering or video-streaming is not possible .", "My specific goal is to fix the issue with several Nokia feature phones that don t include dedicate volume keys but do include a pair of extra application shortcut keys which are only used on the home screen - remap these keys to control the volume from any application if possible .", "I am installing QT Creator of Nokia SDKs of Nokia .", "error is coming when it executes this line player.prefetch .. . .. . I am testing this app on Nokia 5200 and Nokia 5130 .. . .. . what could be problem", "Please see this link http : wiki.forum.nokia.com index.php KIJ000394 - PushRegistry confirmation on Series 40 MIDlets from Forum Nokia .", "I also read the Nokia gesture API notes but I didn t understand clearly .", "thanks for reply but then how people install from OVI NOKIA whatever they call it store", "The same application shortcut keys defaulted to applications like contacts mail media-player and GPS appear on a number of 2010 vintage Nokia feature phones running S40 6th edition both QWERTY and flip .", "Is there some API in s40 platform to achieve this", "I want to develop an application for Nokia 3120 http : www.forum.nokia.com devices 3120 .", "And even if it is S40 3rd Edition FP1 or above and signed - it has to be signed by Nokia", "Seems like this device Nokia x2-01 won t support this size .", "I tried the following on a Nokia S40 Dev Platform 2 phone using Java ME http : en.wikipedia.org wiki Java Platform Micro Edition : .. . .. . However the value returned was null .", "I m developing an application to work on S40 platform for Nokia devices using Netbeans IDE I m working on a visual MIDLET MIDP 2.1 and I am trying to set a background-image for the forms in my application .", "Nokia Developer have http : library.developer.nokia.com topic Java Developers Library GUID-A317C9AE-ABD0-4887-B2C0-77A2FB5A66E2.html a good starting place with links to more resources", "The APIs section of the document you linked to lists only the basic MIDP CLDC Nokia UI APIs : .. . .. . JSR 30 Connected Limited Device Configuration CLDC 1.0 .. . .. . JSR 37 MIDP 1.0 .. . .. . Nokia UI API", "I am trying to install development enviroments of Nokia .", "I have an RMS file generated on an S40 Nokia phone - is there any way of reading this on a PC", "I have used the following simple code to do this : .. . .. . I have also searched a lot but didn t found anything about it .", "It s tricky without seeing code but if I remember correctly some nokia devices were choosy about whether you used a hyphen or not in the encoding name .", "Is it possible", "If not is it possible to get the device name through pure regular javascript API", "The answer is not except location but again location api is in HTML 5 so not really", "I have downloaded most of QT Creator from Nokia .", "What else do I need for Nokia application development .", "I m using nokia c2-01 phone s40 device is for testing .", "Your mobile Nokia x2-01 specs http : www.developer.nokia.com Devices Device specifications X2-01 is limited to 2Mb of heap space for the whole app .", ".. . .. . I tested on supported devices using the Nokia deploy method but it is still not working so please can anyone help me solve the problem", "I want to create a game with landscape orientation for Nokia Asha 303 are there any way to rotate the game canvas 90 degrees so the orientation become landscape orientation", "Here s a slightly corrected version of the code linked by Mihir it had an obvious bug and another bug which is probably an interoperability issue which works on my Nokia 3110 classic : Java ME Image Capture Example http : pastebin.com LAdDEwb6", "Is it possible to record voice and stream in J2ME like I record and use commit to get the byte array but the commit takes at least 250ms even the record length is 10 ms and it irrationally takes 280ms if the record length is 10s etc the device I tested is Nokia 6300 s40 device .", "Can we integrate third-party applications with this application", "For third-party application development you can use Java ME and MIDP Flash Lite or widgets i.e .", "XHTML+CSS+JavaScript .", "though the last two do not yet have significant community traction .", "Web services sending data over HTTP parsing results should be usable as such on all of these platforms and technologies although I don t have experince with all of the combinations .", "And last thing : could you clarify what you mean by third-party application integration", ".. . .. . Edit after OP s comment : Yes in general third party integration is possible on all technologies to some extent .", "For more specific answers you should frame more specific questions :", "Third party application integration means can we integrate third party product in our application which is develop in Symbian OS", "Hmm looks like there s a bug in text formatting : meta.stackexchange.com questions 3821 http : meta.stackexchange.com questions 3821 bug-greedy-hyperlink-texts", "I ve edited tags accordingly .", "@laalto : Didn t know that .", "Learnt something new :", "is it true that we can not program in c++ for s40 devices", "As a third party developer you can t .", "As far as I can tell - not with C C++ as the SDK is Java ME based and apparently does not include JNI http : en.wikipedia.org wiki Java Native Interface .", "But I believe Funambol also supports Java ME - so you may not need to use C C++ .", "As J.N .", "For sending and receiving SMS you ll need to use the Wireless Messaging API http : wiki.forum.nokia.com index.php Wireless Messaging API and the PushRegistry http : wiki.forum.nokia.com index.php CS001422 - Using PushRegistry in Java ME .", "The only way to add user code appears to be Java and the Java sandbox does not seem to allow multitasking with other phone applications .", "Which phones are you working with", "You can reconfigure the shortcuts from the settings and assign it to be the volume app .", "For Series40 Background MIDlets are enabled for operator and manufacturer domains only ." ] }
{ "confidence": [ 72.56417846679688, 69.97979736328125, 69.58175659179688, 66.07688903808594, 59.165157318115234, 58.07208251953125, 58.07050704956055, 55.175323486328125, 54.86769485473633, 54.776981353759766, 54.066856384277344, 53.150543212890625, 52.6374626159668, 47.449554443359375, 42.264488220214844, 42.264488220214844, 40.97052001953125, 38.3195915222168, 35.10645294189453, 31.84389877319336 ], "content": [ "Question : I want to develop an application for Nokia 3120 http : www.forum.nokia.com devices 3120 . It is said that the developer platform is Series 40 Developer Platform 1.0 but from the Series 40 Platform SDKs page no SDK Series 40 for Platform 1.0 is available I can just see Series 40 Developer Platform 2.0 and so on . Can I develop an application that will run on Nokia 3120 using the Series 40 Developer Platform 2.0 or 3.0 .. . Answer : Basically your best if not only option is Java ME MIDP . You can program your MIDlets http : www.google.com url sa t source web cd 1 ved 0CBgQFjAA url http : en.wikipedia.org wiki MIDlet ei hDH0Tee-NcvCtAbyxK28Bg usg AFQjCNEx8uY54yZacrYb2kzWqmonBJ1F0Q with later versions of the Series 40 SDK just remember not to use any APIs that are not available on the Nokia 3120 . The APIs section of the document you linked to lists only the basic MIDP CLDC Nokia UI APIs : .. . .. . JSR 30 Connected Limited Device Configuration CLDC 1.0 .. . .. . JSR 37 MIDP 1.0 .. . .. . Nokia UI API", "Question : Is it possible for a Series 40 application to use the Nokia VGA camera with Java or Flash lite I need the application to take a photo every 5 minutes and then upload the JPEG file to a server . .. . Answer : It should be possible with JaveME . Use JSR-135 API to take the picture and then upload it using HTTP . JSR-135 should be supported in all modern S40 devices . Note that S40 is a software platform used on a series of Nokia devices . S40 is not Symbian based there is no such thing as Symbian S40 .", "Question : I am new about Symbian Series 40 60 . Which SDK is used to develop applications in Symbian Series 40 60 Can we use a web Service from our application or call a web service from a Symbian Series 40 60 application Can we integrate third-party applications with this application .. . Answer : There are no such things as Symbian Series 40 or Series 60 . Nokia Series 40 http : www.forum.nokia.com Technology Topics Device Platforms Series 40 is based on Nokia s proprietary operating-system . For third-party application development you can use Java ME and MIDP Flash Lite or widgets i.e . XHTML+CSS+JavaScript . Nokia S60 http : www.forum.nokia.com Technology Topics Device Platforms s60 is based on Symbian OS . In addition to what you can use on Series 40 for third-party application development there are the options of using C C++ Python for S60 Perl Ruby etc . though the last two do not yet have significant community traction . In the future S60 will be merged to Symbian Foundation platform releases . The current S60 5th Edition is likely to be the last S60 release from Nokia the next platform release will be Symbian 2 from Symbian Foundation corresponding to S60 5th Edition FP1 in the old S60 versioning scheme . For both you can find the tools and SDKs from Forum Nokia http : www.forum.nokia.com alongside other developer resources . Web services sending data over HTTP parsing results should be usable as such on all of these platforms and technologies although I don t have experince with all of the combinations . And last thing : could you clarify what you mean by third-party application integration .. . .. . Edit after OP s comment : Yes in general third party integration is possible on all technologies to some extent . For more specific answers you should frame more specific questions : Comment : Third party application integration means can we integrate third party product in our application which is develop in Symbian OS Is it possible Comment : Hmm looks like there s a bug in text formatting : meta.stackexchange.com questions 3821 http : meta.stackexchange.com questions 3821 bug-greedy-hyperlink-texts", "Question : What is required to start developing for Nokia Series 40 with Java .. . Answer : All that s needed to develop for Nokia with Java ME is : .. . .. . Java Development Kit 6 http : www.oracle.com technetwork java javase downloads index.html - required to develop Java applications .. . Eclipse Java Helios http : www.eclipse.org downloads packages eclipse-ide-java-developers heliosr - need this to code compile debug and others .. . Nokia Series 40 SDK v.6 http : www.forum.nokia.com info sw.nokia.com id cc48f9a1-f5cf-447b-bdba-c4d41b3d05ce Series 40 Platform SDKs.html login-required - used to emulate the Nokia platform .. . Mobile Tools for Java http : www.eclipse.org dsdp mtj - Eclipse extension for mobile development integrates with the Nokia SDK .. . .. . I think the order of the items is the right order .", "Question : I m trying to use SignalR but I want to know whether it s supported on series-40 specifically whether it s supported on Nokia Asha phones . Anyone knows Thanks . .. . Answer : The answer is yes I successfully get it working using Nokia Web Tools . Please refer to This blog post http : agilefromthegroundup.blogspot.com 2012 09 getting-signalr-and-phonegap-working.html for things that you need to do to make it work .", "Question : Can I use the Funambol http : en.wikipedia.org wiki Funambol Funambol project API for Symbian Series 40 http : en.wikipedia.org wiki Series 40 development using C++ as the Series 40 SDK is not available for C++ Comment : Series 40 is not a Symbian platform . I ve edited tags accordingly . Comment : @laalto : Didn t know that . Learnt something new : Comment : is it true that we can not program in c++ for s40 devices Comment : As a third party developer you can t . .. . Answer : As far as I can tell - not with C C++ as the SDK is Java ME based and apparently does not include JNI http : en.wikipedia.org wiki Java Native Interface . But I believe Funambol also supports Java ME - so you may not need to use C C++ .", "Question : Which API can be used for sending and receiving SMSes in Series 40 http : en.wikipedia.org wiki Series 40 Comment : -1 Series 40 devices are not Symbian they only have a Java API . .. . Answer : As J.N . has said Series 40 devices are not based on Symbian OS . For sending and receiving SMS you ll need to use the Wireless Messaging API http : wiki.forum.nokia.com index.php Wireless Messaging API and the PushRegistry http : wiki.forum.nokia.com index.php CS001422 - Using PushRegistry in Java ME .", "Question : I was developing a Java application using NetBeans and Java s40 SDK . Here I need to use the gesture API for my application . What would some example or sample programs other than racer program be So it will be helpful for me to design the application . I also read the Nokia gesture API notes but I didn t understand clearly . If possible what is the link which shows an example with code and notes .. . Answer : Check Java - code examples http : www.forum.nokia.com Develop Java Code examples for Nokia Series 40 . The Paint example is a simple one . Comment : Thx will check them out", "Question : I am new to creating Nokia application for the series-40 mobiles . I am trying use YouTube channel videos for my application but I am getting an error on the simulator : .. . .. . The RTSP streaming feature is currently not supported in the Web Apps Simulator . Please test the streaming feature on one of the supported devices . .. . .. . I tested on supported devices using the Nokia deploy method but it is still not working so please can anyone help me solve the problem .. . Answer : I believe on Nokia S40 series phones live video-streaming is not possible . May be due to some technical limitations or say design limitations . But when you open a web link which streams videos Some times and some devices it gets opened in your media-player and gets started to stream . But due to low quality antennas used for internet in the S40 series Obviously entry level phones internet speed will be less and it seems like video buffering or video-streaming is not possible . May be the device s simulator which you are using does not supports live video-streaming . If you are internet-connection is proper and speedy as well then this is the root cause .", "Question : Is there a way other then being Nokia to write an application for global hotkeys hooks on Series 40 6th edition The only way to add user code appears to be Java and the Java sandbox does not seem to allow multitasking with other phone applications . My specific goal is to fix the issue with several Nokia feature phones that don t include dedicate volume keys but do include a pair of extra application shortcut keys which are only used on the home screen - remap these keys to control the volume from any application if possible . Comment : Which phones are you working with Comment : For physical testing I have an unbranded Nokia C3-00 . The same application shortcut keys defaulted to applications like contacts mail media-player and GPS appear on a number of 2010 vintage Nokia feature phones running S40 6th edition both QWERTY and flip . Comment : You can reconfigure the shortcuts from the settings and assign it to be the volume app . .. . Answer : For Series40 Background MIDlets are enabled for operator and manufacturer domains only . Even if you would have a background midlet you would need the help of Series40 internal APIs to catch the keys before the application that has the current key focus", "Question : I had a MIDlet project called Numbers that I decided to rename to Digits . Instead of simply renaming it I decided to create a brand new project from scratch so that I can have new directory package name .jad .jar names etc . Everything went fine I copied the .java files to src and resource files to res and recompiled successfully . I used Eclipse Helios and Nokia s Series 40 5th Edition SDK Feature Pack 1 for both projects . Now for some weird reason when the MIDlet starts in the emulator it throws a NullPointerException but not immediately on startup but after a splash-screen it s a game . I haven t touched the code at all so I rule out the possibility of an exception in the code since it worked just fine when the project was called Numbers . After an hour of trial and error I found a weird thing : if I open up the Application Descriptor and change the MIDlet name property from Digits to Numbers old project name everything runs perfectly and no exception is thrown . I did a text search in all project files and the word Numbers only appears in the Application Descriptor and the .jad file and only after I change the MIDlet name property otherwise that string is nowhere to be found no class names no variables no other properties neither in the code nor in the project have a string Numbers . Where is that reference coming from A bug in Eclipse or Series 40 emulator What gives .. . Answer : Found after another half an hour of investigation . There s a folder in the Series 40 SDK directory that apparently caches the MIDlets it runs and keeps older versions of the same MIDlet there too . I cleaned the entire directory and now the project starts just fine with new values in MIDlet Name and MIDlet Vendor . The directory to clean is : .. . Nokia Devices S40 5th Edition SDK Feature Pack 1 bin Storage 6500500 C DirectLoaded", "Question : I am trying to create a java-me application . The code is hello xxxx its simple . But the problem is that when I port it to a nokia series-40 phone or an emulator the .jad or .jar file opens directly but in other series 60 phones like e72 or e63 it installs . But I want to install it in phone and emulator . How can I install it PS : The problem is in code I think . Normally all apps get installed in emulator or phone . This is not phone problem but some error is in my java file..I think . .. . Answer : Its depend on the phone s environment operating-system whether to direct run Java ME application or run it after the installation . S40 Series doesn t have Symbian Operating system so they are directly opening .JAR files even you can view .JAD file in S40 Series phones . On the other hand in S60 Series phones they have Symbian Operating system and they allow to execute Java ME application only after the installation . Comment : thanks for reply but then how people install from OVI NOKIA whatever they call it store The only way to install on phone is to send it to OVI NOKIA store and install from there Comment : for which device Comment : I was talking about all such s40 devices....How apps from OVI store get installed...they are jar files too.The problem with jar file not installing is that all those icons are not displayed.So if I make a jar file then how do I install it Should some additional steps be taken like signing app or like that Comment : you mean you want to display icon for your Jar file its easy . Comment : No what I am saying is that icon is not displayed until you install the jar...And also jar apps from OVI store get installed then why my jar app is not installing", "Question : I am looking to have a Symbian Series 40 http : en.wikipedia.org wiki Series 40 application to take a photo using the onboard camera every 5 minutes and then upload the image to a server via GPRS . Is this possible I need to know whether this is possible before going deeper into it . Would S60 http : en.wikipedia.org wiki S60 28software platform 29 be better Comment : S40 is not Symbian based so you cannot use Symbian applications . Comment : It should be possible with JaveME . Use JSR-135 API to take the picture and then upload it using HTTP . JSR-135 should be supported in all modern S40 devices . Note that S40 is a software platform used on a series of Nokia devices . S40 is not Symbian based there is no such thing as Symbian S40 . --------------- thanks for you comment . One question though how do i get the S40 app into my mobile phone Comment : Bluetooth Download from webpage USB cable Email S40 apps are j2me midlets . There is plenty of documentation on how to develop package and deploy j2me midlets on the web . Try forum.nokia.com for instance . Comment : Great question except S40 are not Symbian as Ola pointed out . .. . Answer : Here s a slightly corrected version of the code linked by Mihir it had an obvious bug and another bug which is probably an interoperability issue which works on my Nokia 3110 classic : Java ME Image Capture Example http : pastebin.com LAdDEwb6", "Question : I m building a J2ME app for Nokia Series 40 devices that has the feature of sending SMSs to predefined shrotcodes . On some networks : 1 User uses the app activates the send to SMS to shortcode feature the SMS is sent and the service replies with a Welcome service messages . On other networks Same phone different SIM : 1 User uses the app activates the send to SMS to shortcode feature the SMS is sent and the service DOES NOT reply with a Welcome service messages . 2 When sending the same SMS by-hand from the Messaging application the service DOES reply with a Welcome service messages .. . .. . Why does this happen Thanks . .. . Answer : try using different textboxes for each mine did that but using unique interfaces for each and storing the shortcode adresses in arrays then traversing them worked . Regards Sam", "Question : What are some tips-and-tricks when developing web-applications using the Series 40 Ovi http : en.wikipedia.org wiki Ovi 28Nokia 29 browser platform Comment : can anyone mark this question as community wiki Comment : Or vote to close as it s not a programming question Comment : It s not but it s related to programming . Comment : @silent - what is the question Community wiki is a destination not a starting point . Comment : Hello and welcome to Stack Overflow Note that we have a nice FAQ http : stackoverflow.com faq . To quote : What kind of questions should I not ask here You should only ask practical answerable questions based on actual problems that you face . Chatty open-ended questions diminish the usefulness of our site and push other questions off the front page . Tips and tricks about X is not an answerable question . .. . Answer : For every code that is run on function the Ovi browser will forward it to server to interpret it . So make sure you do a minimal function-call . If you have to do it try to use mwl.timer to add a nice loading effect . For example : .. . .. . In index.html : .. . .. . In code.js : .. . .. . You can optimize it to : .. . .. . In index.html : .. . .. . In code.js :", "Question : What are some tips-and-tricks when developing web-applications using the Series 40 Ovi http : en.wikipedia.org wiki Ovi 28Nokia 29 browser platform Comment : can anyone mark this question as community wiki Comment : Or vote to close as it s not a programming question Comment : It s not but it s related to programming . Comment : @silent - what is the question Community wiki is a destination not a starting point . Comment : Hello and welcome to Stack Overflow Note that we have a nice FAQ http : stackoverflow.com faq . To quote : What kind of questions should I not ask here You should only ask practical answerable questions based on actual problems that you face . Chatty open-ended questions diminish the usefulness of our site and push other questions off the front page . Tips and tricks about X is not an answerable question . .. . Answer : When adding inline JavaScript code you should wrap your code in double-quote . It runs on the emulator but will fail on the device . For example :", "Question : Reading around Nokia forums it seems that accessing the Cell ID and related information from Nokia S40 series phones is virtually impossible unless your MIDlet http : en.wikipedia.org wiki MIDlet is signed and even this would work only for S40 3rd Edition FP1 and above . I tried the following on a Nokia S40 Dev Platform 2 phone using Java ME http : en.wikipedia.org wiki Java Platform Micro Edition : .. . .. . However the value returned was null . Is there any workaround to this can the cell ID be read by other methods like Modem AT I guess this will only work with a phone connected to the PC SIM Application Toolkit http : en.wikipedia.org wiki SIM Application Toolkit or other Comment : I have the same problem if you have found the solution can you please provide a hint how can we do that .. . Answer : I m using LocationProvider class from the SDK . Here s my function : .. . .. . it s possible that you use GPS as well if the device has it by changing the methods with other options . Just make sure that in the device specs it has JSR 179 .", "Question : Reading around Nokia forums it seems that accessing the Cell ID and related information from Nokia S40 series phones is virtually impossible unless your MIDlet http : en.wikipedia.org wiki MIDlet is signed and even this would work only for S40 3rd Edition FP1 and above . I tried the following on a Nokia S40 Dev Platform 2 phone using Java ME http : en.wikipedia.org wiki Java Platform Micro Edition : .. . .. . However the value returned was null . Is there any workaround to this can the cell ID be read by other methods like Modem AT I guess this will only work with a phone connected to the PC SIM Application Toolkit http : en.wikipedia.org wiki SIM Application Toolkit or other Comment : I have the same problem if you have found the solution can you please provide a hint how can we do that .. . Answer : And even if it is S40 3rd Edition FP1 or above and signed - it has to be signed by Nokia really . I don t know about other workarounds but I have also tried JSR-179 and failed to do this . Comment : Around the forums they have mentioned that through the WMA api you can use CBS to get a string that contained information about the Cell-ID . Any ideas Comment : On certain networks you can listen on certain CBS ports to get cell information . E.g . vodafone UK transmits the current cell s STD code on port 50 every minute or so . However this is only done on 2G not 3G . And other networks do not do this . In other words not to be relied upon", "Question : I m using Nokia Web Tools to develop an web app but I need to access device api such as the model name for exampl Nokia Asha 301 or E72 etc . Is it possible If not is it possible to get the device name through pure regular javascript API .. . Answer : The answer is not except location but again location api is in HTML 5 so not really", "Question : null .. . Answer : I am trying to access the ondevice fm radio through jsr 234 in c3-00 . Everything seems to work fine but the radio can not be accessed . I have also checked supported JRSs for nokia c3 which is a s40 v6 device which shows that it supports jsr 234 . I have used the following simple code to do this : .. . .. . I have also searched a lot but didn t found anything about it ." ] }
[ "yes-answer-long", "yes-answer-short" ]
s
UNK_RELATION
java-attach-api@jrockit@91
java-attach-api -- java-attach-api is a proprietary oracle api implemented by hotspot and @placeholder that allows to attach jvmti agents to jvms at runtime .
{ "confidence": [ 84.0599365234375, 56.587425231933594, 55.41020202636719, 45.204837799072266, 44.74925994873047, 44.74925994873047, 44.74925994873047, 40.95789337158203, 27.885080337524414, 24.367782592773438, 22.163311004638672, 16.366891860961914, 16.366891860961914, 16.366891860961914, 16.366891860961914, 16.366891860961914, 16.366891860961914, 16.366891860961914, 16.366891860961914, 16.366891860961914, 16.366891860961914, 16.366891860961914, 16.366891860961914, 16.366891860961914, 16.366891860961914, 16.366891860961914, 16.366891860961914, 16.366891860961914, 16.366891860961914, 16.366891860961914, 16.366891860961914, 16.366891860961914, 16.366891860961914, 16.366891860961914, 16.366891860961914, 16.366891860961914, 16.366891860961914, 14.162419319152832, 14.162419319152832, 14.162419319152832, 14.162419319152832, 14.162419319152832 ], "content": [ "I have a native JVMTI agent that I attach with the Java Attach API .", "For this reason I am using the attach API .", "So how does the interprocess communication for the Java Attach API work on each of the mainstream operating systems", "My current problem is that the attach API cannot load a DLL I have in a separate folder .", "I am trying to find out the interprocess communication mechanism used by the Java Attach API on the main operating systems but I can t seem to find much reference to the underlying mechanism .", "Most of the articles describe the Java Attach API and how shared-libraries DLLs are loaded but stop short of stating how communication between say jvisualvm and a local JVM process actually works .", "Here http : www.oracle.com technetwork java javase jrereadme-182762.html there is a mention that tools.jar and libattach.so on Unix systems or attach.dll on Windows are responsible to support the Attach API but I couldn t find much details of how they work internally .", "The only mention I found was here http : docs.oracle.com javase 8 docs jdk api attach spec com sun tools attach spi AttachProvider.html where it refers to the DOORS interprocess communication mechanism developed some time ago by Sun .", "Seems this is implemented on top of the Java Platform Debugger Architecture JPDA http : docs.oracle.com javase 8 docs technotes guides jpda as Elliott Frisch indicated .", "Instead you can use the VMInit event : .. . .. . This provides you access to the JNI and thus lets you execute java code .", "I am doing bytecode-manipulation in java but it is being done on an external running JAR file .", "But I doubt this is used on Windows or Mac .", "That is Windows Mac OSX and Linux .", "I believe you re looking for JPDA http : docs.oracle.com javase 7 docs technotes guides jpda .", "Well I want to know the actual underlying OS-level mechanism .", "For instance on linux does it used Unix Sockets", "Does it use some other kernel mechanism", "What about windows", "@ElliottFrisch thanks for the nudge in the right direction I believe I found my answer docs.oracle.com javase 8 docs technotes guides jpda http : docs.oracle.com javase 8 docs technotes guides jpda conninv.html", "On Windows OS a Shared Memory transport is used .", "On Linux based systems a Socket transport is used .", "More details can be found here http : docs.oracle.com javase 8 docs technotes guides jpda conninv.html .", "The agent basically just runs Agent OnAttach and then exists .", "I would like to pass information from the agent to the VM that attached the agent .", "Even just writing to stdout of the VM that attached the agent would be fine .", "I m aware that I could use out of band means like sockets or named-pipes but I m looking for something built-in .", "Do you really want to communicate with the JVM or with the application running inside", "If you want to talk to your application Agent Onload would be to early because your app has not yet been loaded .", "You could use this for example to set a system property that can later be read by your classes .", "If you want to communicate with any particular class this event might still be to early and you might wait for the respective ClassPrepare event and check when your class becomes available : .. . .. . If you want to write to stdout you can of course use the JNI to call System.println.. .", "I want to communicate with the agent .", "The agent collects a bunch of data iterates over several objects looking for specific ones .", "The attaching VM not the one where the agent runs needs this information .", "To my best knowledge you cannot directly communicate with the agent from your VM especially if it s a different process .", "I think the easiest thing would be just to create a network socket in your agent and connect to this from your other VM .", "Then you are free to exchange whatever information you like", "That s what I assumed thanks .", "I have proviously had problems with file location but I fixed those and so I know it can see the file it just can t load it .", "My stack-trace is as follows : .. . .. . And here is my source code :", "You could examine the DLL s dependencies with Dependeny Walker : dependencywalker.com depends22 x64.zip http : www.dependencywalker.com depends22 x64.zip", "It turns out my problem was that I didn t add my DLL to the java.library.path .", "Problem solved ." ] }
{ "confidence": [ 64.77774047851562, 54.625450134277344, 53.22293472290039 ], "content": [ "Question : I am trying to find out the interprocess communication mechanism used by the Java Attach API on the main operating systems but I can t seem to find much reference to the underlying mechanism . The only mention I found was here http : docs.oracle.com javase 8 docs jdk api attach spec com sun tools attach spi AttachProvider.html where it refers to the DOORS interprocess communication mechanism developed some time ago by Sun . But I doubt this is used on Windows or Mac . Most of the articles describe the Java Attach API and how shared-libraries DLLs are loaded but stop short of stating how communication between say jvisualvm and a local JVM process actually works . Here http : www.oracle.com technetwork java javase jrereadme-182762.html there is a mention that tools.jar and libattach.so on Unix systems or attach.dll on Windows are responsible to support the Attach API but I couldn t find much details of how they work internally . So how does the interprocess communication for the Java Attach API work on each of the mainstream operating systems That is Windows Mac OSX and Linux . Comment : I believe you re looking for JPDA http : docs.oracle.com javase 7 docs technotes guides jpda . Comment : Well I want to know the actual underlying OS-level mechanism . For instance on linux does it used Unix Sockets Does it use some other kernel mechanism What about windows Comment : @ElliottFrisch thanks for the nudge in the right direction I believe I found my answer docs.oracle.com javase 8 docs technotes guides jpda http : docs.oracle.com javase 8 docs technotes guides jpda conninv.html .. . Answer : Seems this is implemented on top of the Java Platform Debugger Architecture JPDA http : docs.oracle.com javase 8 docs technotes guides jpda as Elliott Frisch indicated . On Windows OS a Shared Memory transport is used . On Linux based systems a Socket transport is used . More details can be found here http : docs.oracle.com javase 8 docs technotes guides jpda conninv.html .", "Question : I have a native JVMTI agent that I attach with the Java Attach API . The agent basically just runs Agent OnAttach and then exists . I would like to pass information from the agent to the VM that attached the agent . Even just writing to stdout of the VM that attached the agent would be fine . I m aware that I could use out of band means like sockets or named-pipes but I m looking for something built-in . .. . Answer : Do you really want to communicate with the JVM or with the application running inside If you want to talk to your application Agent Onload would be to early because your app has not yet been loaded . Instead you can use the VMInit event : .. . .. . This provides you access to the JNI and thus lets you execute java code . You could use this for example to set a system property that can later be read by your classes . If you want to communicate with any particular class this event might still be to early and you might wait for the respective ClassPrepare event and check when your class becomes available : .. . .. . If you want to write to stdout you can of course use the JNI to call System.println.. . Comment : I want to communicate with the agent . The agent collects a bunch of data iterates over several objects looking for specific ones . The attaching VM not the one where the agent runs needs this information . Comment : To my best knowledge you cannot directly communicate with the agent from your VM especially if it s a different process . I think the easiest thing would be just to create a network socket in your agent and connect to this from your other VM . Then you are free to exchange whatever information you like Comment : That s what I assumed thanks .", "Question : I am doing bytecode-manipulation in java but it is being done on an external running JAR file . For this reason I am using the attach API . My current problem is that the attach API cannot load a DLL I have in a separate folder . I have proviously had problems with file location but I fixed those and so I know it can see the file it just can t load it . My stack-trace is as follows : .. . .. . And here is my source code : Comment : You could examine the DLL s dependencies with Dependeny Walker : dependencywalker.com depends22 x64.zip http : www.dependencywalker.com depends22 x64.zip .. . Answer : It turns out my problem was that I didn t add my DLL to the java.library.path . Problem solved ." ] }
[ "yes-answer-long", "yes-answer-short" ]
jrockit
UNK_RELATION
adsense-anchor-ads@adsense@72
adsense-anchor-ads -- adsense-anchor-ads are representing a feature of @placeholder .
{ "confidence": [ 91.30254364013672, 71.78494262695312, 62.21880340576172, 62.05322265625, 44.704986572265625, 42.7552375793457, 41.618736267089844, 41.618736267089844, 32.02659225463867, 17.138395309448242, 17.138395309448242, 17.138395309448242, 17.138395309448242, 17.138395309448242, 17.138395309448242, 17.138395309448242, 17.138395309448242, 17.138395309448242 ], "content": [ "I intend to include AdSense anchor ads for a client .", "The traditional adsense ads show up without problems .", "He gave me a script which looks like this : .. . .. . These ads should be anchor ads which show up in mobile browsers .", ".. . the anchor ad appears only on the iPhone you need a mobile optimized site or a working responsive-design to have anchor ads .", "I have tested this with iPhone as well but the ads did not show up either .", "Educated guesses .. . .. . From analysing my ad income stats in AdSense and Analytics I have some assumptions about the new mobile ad format .", "However when I included this script into the source-code the ads did not show up .", "The script appears in the HTML structure no Javascript errors occur but the ads themselves do not show up .", "He told me that he is allowed to use this feature which is as far as I know in beta-test phase .", "There are some websites where no matter where I click background random words existing links anything an ad pops up .", "For example : first time I click Contact I get the Spam but if I click Contact again I will actually go to contact section .", "I wonder how is this possible and how it is made .", "Show an example of such a website", "I ve never seen one .", "Like this : .. . .. . .. . script src https : ajax.googleapis.com ajax libs jquery 2.1.1 jquery.min.js script .. . script .. . i 0 .. . .. . document .on click body function event .. . .. . if i 0 .. . event.preventDefault .. . insert code to display ad here .. . alert spam here .. . i++ .. . .. . .. . script .. . .. . .. . body .. . div blah blah blah div .. . a href stackoverflow.com link here a .. . body .. . .. . After the first click i is no longer 0 therefore the default action of body elements is restored .", "Well I am not sure if this is what you want but you can do something like this on a webpage .. . .. . You can load your ad where the alert is inserted", "This will cause the function to be called each time the visitor clicks somewhere in the page .", "The OP s request was the function to be called only on the first click of the visitor ." ] }
{ "confidence": [ 101.58064270019531, 16.46821403503418, 16.46821403503418 ], "content": [ "Question : null .. . Answer : I intend to include AdSense anchor ads for a client . He told me that he is allowed to use this feature which is as far as I know in beta-test phase . He gave me a script which looks like this : .. . .. . These ads should be anchor ads which show up in mobile browsers . However when I included this script into the source-code the ads did not show up . The script appears in the HTML structure no Javascript errors occur but the ads themselves do not show up . Educated guesses .. . .. . From analysing my ad income stats in AdSense and Analytics I have some assumptions about the new mobile ad format . .. . the anchor ad appears only on the iPhone you need a mobile optimized site or a working responsive-design to have anchor ads . I have tested this with iPhone as well but the ads did not show up either . The traditional adsense ads show up without problems .", "Question : There are some websites where no matter where I click background random words existing links anything an ad pops up . For example : first time I click Contact I get the Spam but if I click Contact again I will actually go to contact section . I wonder how is this possible and how it is made . Comment : Show an example of such a website I ve never seen one . .. . Answer : Like this : .. . .. . .. . script src https : ajax.googleapis.com ajax libs jquery 2.1.1 jquery.min.js script .. . script .. . i 0 .. . .. . document .on click body function event .. . .. . if i 0 .. . event.preventDefault .. . insert code to display ad here .. . alert spam here .. . i++ .. . .. . .. . script .. . .. . .. . body .. . div blah blah blah div .. . a href stackoverflow.com link here a .. . body .. . .. . After the first click i is no longer 0 therefore the default action of body elements is restored .", "Question : There are some websites where no matter where I click background random words existing links anything an ad pops up . For example : first time I click Contact I get the Spam but if I click Contact again I will actually go to contact section . I wonder how is this possible and how it is made . Comment : Show an example of such a website I ve never seen one . .. . Answer : Well I am not sure if this is what you want but you can do something like this on a webpage .. . .. . You can load your ad where the alert is inserted Comment : This will cause the function to be called each time the visitor clicks somewhere in the page . The OP s request was the function to be called only on the first click of the visitor ." ] }
[ "yes-answer-long", "yes-answer-short" ]
adsense
UNK_RELATION
google-fusion-tables@web@101
google-fusion-tables -- fusion tables is google s product for managing and combining datasets via a @placeholder service and google drive and visualizing them in charts and other ways .
{ "confidence": [ 77.68860626220703, 75.10880279541016, 75.10880279541016, 73.77977752685547, 71.8229751586914, 70.6061019897461, 70.6061019897461, 70.6061019897461, 67.57290649414062, 66.83211517333984, 66.79206848144531, 63.67778778076172, 63.19988250732422, 62.053802490234375, 61.95343017578125, 60.39623260498047, 60.39623260498047, 60.39623260498047, 60.39623260498047, 60.39623260498047, 60.39623260498047, 59.8597412109375, 58.348182678222656, 58.348182678222656, 58.269309997558594, 58.21517562866211, 57.86003875732422, 56.56440734863281, 56.56440734863281, 56.358360290527344, 56.32054901123047, 56.22112274169922, 55.893531799316406, 55.893531799316406, 55.893531799316406, 55.893531799316406, 55.893531799316406, 55.893531799316406, 55.893531799316406, 55.812896728515625, 55.58229064941406, 54.17753601074219, 54.173065185546875, 53.77733612060547, 53.76660919189453, 53.451637268066406, 53.11368179321289, 53.01411819458008, 53.01411819458008, 53.01411819458008, 52.709922790527344, 52.700439453125, 52.41564178466797, 52.41564178466797, 52.41564178466797, 52.41564178466797, 52.41564178466797, 52.38226318359375, 52.245113372802734, 52.06170654296875, 52.06170654296875, 51.718421936035156, 51.62871551513672, 50.72570037841797, 50.72570037841797, 50.72570037841797, 50.72570037841797, 50.41639709472656, 50.37675476074219, 50.37675476074219, 50.367591857910156, 50.132110595703125, 50.132110595703125, 49.97114562988281, 49.97114562988281, 49.87689208984375, 49.77128601074219, 49.77128601074219, 49.44023132324219, 49.44023132324219, 49.44023132324219, 49.274635314941406, 49.182289123535156, 48.83900451660156, 48.83900451660156, 48.48484802246094, 48.38483428955078, 47.923091888427734, 47.846282958984375, 47.846282958984375, 47.526947021484375, 47.2526969909668, 46.970909118652344, 46.82727813720703, 46.82727813720703, 46.82727813720703, 46.82727813720703, 46.21469497680664, 46.146026611328125 ], "content": [ "I fill google-fusion-tables .", "This appears to be a bug with Google Fusion Tables API v1.0 .", "There are table size limits to Google Fusion tables .", "Google fusion tables use special storage space in Google drive and the limit is 1GB as per a google developer https : productforums.google.com forum utm medium email utm source footer msg google-fusion-tables XXxVkTHDFQk iCNSkjAAAQAJ .", "Since I m creating the fusion tables from the backend how can I make my application use a specific google drive for fusion tables creation", "I ve synched Google Spreadsheets to Fusion tables with no problem .", "Has anyone tried that with Google Fusion Tables", "I found the solution with google-fusion-tables layer .", "Note : there is a similar question left unanswered on the Fusion Table forum https : productforums.google.com forum topic google-fusion-tables dCyZbt1DqzI context-place topicsearchin google-fusion-tables Folder .", "I get correct results when querying Google Fusion Tables via the ChartTools API but not via the Ajax API .", "I m pretty much a rookie to using Google Fusion Tables maps .", "But from the details of the fusion table in my google drive they are free as of this writing .", "By the way I was concerned with the space that the fusion tables would occupy on the google drive and was the reason behind my question on creating it in a specific drive .", "I m using Fusion Tables to store a URL to my Google Drive Photos stored in the column Link .", "I m relatively new to the Fusion Tables Api and I am trying to create a simple web app using Fusion Tables and Google Maps Api .", "I am planning to use checkboxes to filter search results from my Google Fusion Tables Map .", "I am trying to create a sidebar to go along with the google map visualization I ve created with fusion tables .", "It uses Bootstrap for CSS you plug in your API key Google Fusion Tables ID and the location column .", "we ve a 10 million rows table that we want to upload to google-fusion-tables it s possible that", "This post http : danialgoodwin.com blog dev dev-java-how-to-upload-csv-to-google-fusion-tables helped solve the issue .", "Now if you want to send data to Fusion Tables you have to use a webserver in between because Google does not yet", "is it a default in fusion tables", "I wanna do this thing from the Google Fusion Tables API but doesn t seems to be anything in the documentation to be changed .", "I have a web app I m developing which utilizes Google Fusion Tables .", "Here s a good reference on the limits of Fusion Tables : .. . .. . What are the technical limitations when using Fusion Tables", "I ended up abandoning Google Fusion Tables for this project unfortunately .", "To me this is one of the shortcomings of dealing with Fusion Tables via the Maps API .", "I read that somewhere over the fusion tables groups .", "I never used java for Fusion Tables .", "I m trying to create a Google Fusion table heatmap .", "code.google.com p fusion-tables issues detail id 709 https : code.google.com p fusion-tables issues detail id 709 - code.google.com p fusion-tables issues detail id 49 https : code.google.com p fusion-tables issues detail id 49", "The Google Fusion Table API v1.0 seems to work fine now .", "I have checked and confirmed the Fusion Tables API is already enabled for my project at Google Developers Console .", "I am using Fusion Tables to add a FusionTablesLayer to my Google Map that shows some markers .", "What I really want is to be able to create a Google Fusion Tables Layer Object with the results of the query .", "I currently have a number of fully developed fusion tables along with the proper styling in my google-docs account .", "I ve been having trouble querying the Google Fusion Tables using an HTTP request .", "I m currently building a mobile web application that uses Google Fusion Tables as it s database .", "I m trying to find KML or polygon data for every city and then combine population data with it to create a heatmap in Google Fusion Tables .", "I am trying to use a Google Fusion table as a layer in Google maps via API .", "I have an application which uses the Google Maps API and fusion tables which stopped working as of today the code and Fusion tables databases weren t changed and were working yesterday .", "I thought Fusion Tables development had stopped because the Fusion Tables API Users Group https : groups.google.com forum forum fusion-tables-users-group is no longer monitored and because the issue with reloading Google Spreadsheets https : code.google.com p fusion-tables issues detail id 675 q import 20fails colspec ID 20Type 20Status 20Summary 20Stars 20Component seems old enough and important enough that it would have been fixed if Fusion Tables were still being developed .", "I am a little lost regarding publishing a Google Fusion Table .", "I would like to use Fusion Tables so that locations and their attributes are stored in a Fusion Table .", "Have you checked out the Fusion Tables Layer samples on the Fusion Tables sample code page", "I could not find any info on https : developers.google.com I asked a Google representative and he told me that Fusion Tables is still an experimental beta product and I shall check out at stackoverflow .", "Here s an updated version https : gist.github.com 3013360 of a script that John McGrath https : github.com jomcgrath2 Update-Fusion via the Google Fusion Tables group authored to create a manual sync between a Google spreadsheet and a Google Fusion Table .", "I was just playing with Google Fusion Tables and I was wondering how I could load a csv from the client-side .", "I am trying to create a map with data exported from my Google Fusion Tables .", "While my Google Fusion Tables returns its data through the code above .", "I have been getting intermittent 500 errors while batch-uploading simple row data to Google Fusion Tables via the v2 API using the importRows method .", "You must POST to the Fusion Tables API to update a column but currently you can t do this directly from JavaScript as Google does not set the CORS headers http : code.google.com p fusion-tables issues detail id 1035 to allow cross-domain posting to their API .", "The query sent to the Fusion Tables Layer is added to the URL of each tile image .", "You can use IN instead of OR because OR is not supported by fusion tables .", "My impression is that Fusion Tables are not really supposed to be updated with such a high frequence .", "But there is a work-around through the undocumented JSONP API to Fusion Tables .", "http : www.reddmetrics.com 2011 08 10 fusion-tables-javascript-query-maps.html .", "Fusion Table and Google Service Accounts http : stackoverflow.com questions 10338497 fusion-table-and-google-service-accounts .. . .. . So far I ve got .. . .. . Does anyone have an example of connecting to Fusion Tables on AppEngine using Service Accounts they might be able to share", "Luckily Fusion Tables supports JSONP .", "Recently I am exploring the Fusion Tables .", "Ah it appears it s a helper class for Fusion Tables .", "I m trying to insert data into my Google Fusion table using JavaScript .", "Thus I try to create a Fusion Table using Google drive and importing this file .", "As Taifun mentioned OR is not supported in Fusion Tables but an alternative suggested by Google https : developers.google.com fusiontables docs v2 sql-reference Select is to use IN .", "It seems the easiest way to do this is by providing the above query as a parameter during initialization of the Google Fusion Tables Layer Object as shown in the JavaScript FusionTablesLayer API .", "You likely being prevented from accessing Google fusion tables due to the Same Origin Policy http : en.wikipedia.org wiki Same origin policy .", "I already registered my application at Google and I m able to write data to my fusion tables when I m logged in with my user account .", "Just using the Fusion Tables through Google Drive and every time I merge some tables some of the data gets duplicated so I am just wondering how can I remove duplicate rows from my table", "Can someone share an example or point to a right direction on how to do that with versions of Google Analytics API v4 and Google Fusion Tables V2 using PHP on a web application", "Hi I am using google-fusion-tables and google-maps the thing is that my markers show up correctly but I want to insert some images into the inforwindow .", "I ve about 2mio entries which should be added to the fusion tables .", "NB the jsonpAPI http : googleresearch.blogspot.com 2012 06 introducing-new-fusion-tables-api.html for Fusion Tables has just been announced .", "Here s a helpful PHP class that does the trick : Fusion Tables Client PHP http : code.google.com p fusion-tables-client-php", "I am trying to insert a row to my google fusion table using AT httpsnd command .", "As anyone any idea on how to update a table in google fusion using Zend framework", "I am trying to use Google Service Accounts to access Fusion table from my AppENgine Java App .", "My goal is to make the simplest query on Google Fusion Tables on behalf of my web app users .", "Once oauth2 is working see the Google Fusion Tables API https : developers.google.com fusiontables docs sample code", "Based on the limitations stated on this Google Fusion Tables help page and the Maps Developer API it s not possible to put 10 million features locations on a single map all at once - only the first 100 000 will load .", "I am using Google .NET libraries for inserting the KMl data in fusion tables it works when the data is like 2000 characters but when the data is more then that the application throws URI is too long exception .", "I have written a Google Fusion Tables script I m happy with below but it s loading only 500 rows of points in my table which has over 20 000 rows .", "Now my primary objective for all of this is to be able to write fusion table styles to new fusion tables .", "Unfortunately there is no way to do this using the Fusion Tables API .", "It is also not meant to be that http : googleresearch.blogspot.co.at 2009 06 google-fusion-tables.html .", "I am thinking of passing information of the map to a Google Fusion Table .", "Note that I have tried including every scope available under Drive API v2 and Fusion Tables API v1 .", "Is it possible to use the Fusion Tables Rest API to define a formula http : stackoverflow.com questions 9489765 can-i-get-a-column-formula-for-a-fusion-table-from-the-api in the latlong column or is there some other work around this limitation", "I was just curious if anyone knew how to implement a Mouseover option to a Google Fusion table", "Query your table either the Google Fusion Tables API v1.0 or if you have less than 500 rows you can use a GViz Query .", "Thanks for providing these tips @Mogsdad I edited my question by adding the code I use for sync between Google Spreadsheet and Fusion Tables .", "But that involves using the Fusion Tables API V2 via a programming language like Java Python or Google s own Apps Script you d basically be setting up custom filter conditions using code you can t do this from the Fusion Tables GUI .", "To achieve the styles you specified : .. . .. . Set the styles you desire on the Map Visualizatioon in the Fusion Tables Interface .. . Retrieve the stored styleId from Fusion Tables .", "By default it would be the drive of the user who created the fusion table - in this case it is the service account .", "http : stackoverflow.com questions 11952166 what-are-the-technical-limitations-when-using-fusion-tables", "Update : I now believe this issue is unique to the new Fusion Tables SQL question slightly edited .", "If I replace OR with AND the query returns success : .. . .. . Anyone else ran into this with Fusion Tables and have a solution workaround", "Please note some new limits https : groups.google.com forum topic fusion-tables-announce 4oB11Lpd4z8 were announced in December .", "Why does some fusion tables have a integer ID like the following : .. . .. . and other have a string ID like the following : .. . .. . What s the difference between both", "How do I either a call the customized Info Window that is saved in the Google Fusion Table or b customize the Info Window as part of my API call" ] }
{ "confidence": [ 88.25406646728516, 83.59578704833984, 79.01895904541016, 78.5735092163086, 78.29373168945312, 78.04393768310547, 76.83447265625, 76.36073303222656, 74.2055892944336, 74.04725646972656, 73.75413513183594, 72.13278198242188, 72.0810546875, 71.81839752197266, 71.35975646972656, 70.89644622802734, 70.80847930908203, 70.37713623046875, 70.37669372558594, 70.34213256835938 ], "content": [ "Question : I m trying to create a fusion table from my server running django with the following code but it keeps failing with a 500 server error . And the error I get is this : .. . .. . I m also wondering on how does it know which google drive to use . Since I m creating the fusion tables from the backend how can I make my application use a specific google drive for fusion tables creation .. . Answer : This post http : danialgoodwin.com blog dev dev-java-how-to-upload-csv-to-google-fusion-tables helped solve the issue . isExportable attribute must be set to true explicitly when trying to create a fusion table using service account . The post also explained my concern on which drive would be used . By default it would be the drive of the user who created the fusion table - in this case it is the service account . It clearly explained how to give permission to other users but the post is in Java . I tried implementing the same in python and here is my updated code for anyone facing the same issue . See this https : developers.google.com resources api-libraries documentation drive v3 python latest drive v3.permissions.html create link for drive service argument details . Note that the drive api I used here is v3 and if you want to change the visibility of the created fusion table you have to set allowFileDiscovery to False and the type to domain or anyone . By default it would be private but accessible to the users you have shared with . Comment : By the way I was concerned with the space that the fusion tables would occupy on the google drive and was the reason behind my question on creating it in a specific drive . But from the details of the fusion table in my google drive they are free as of this writing .", "Question : I have written a Google Fusion Tables script I m happy with below but it s loading only 500 rows of points in my table which has over 20 000 rows . This is my first time in this neighborhood and I was really surprised to find the limit . Is there some way to load all the rows Comment : There are table size limits to Google Fusion tables . Welcome to the cloud . .. . Answer : The fusiontables gvizdata URL is intended for Gviz charts and so is limited to 500 points . There are other ways to query that don t have that limitation . See https : developers.google.com fusiontables docs sample code for examples .", "Question : I have been trying to use the Google Drive API to make a Fusiontable publicly readable and have not been able to get it to work . I am able to use the OAuth 2.0 Playground to insert public share permissions for other Google Drive documents but for Fusiontables I get an HTTP 500 error Internal Error . Note that I have tried including every scope available under Drive API v2 and Fusion Tables API v1 . I m aware that Google is no longer developing and supporting Fusiontables but I m wondering if anyone has found a workaround that allows them to get around this problem I haven t tried legacy deprecated versions of the API either . Here s are the actual API request format and responses from OAuth Playground for a Fusiontable permissions insert HTTP 500 then a Doc permissions insert HTTP 200 . The only difference between requests is the fusiontable id or document id in the Request URI : .. . .. . Request : .. . .. . Fusiontable Response : .. . .. . Doc response : Comment : To clarify : Google is no longer developing and supporting Fusiontables is not the case and I d be interesting in hearing where that idea came from : - If you send this question to googletables-feedback@google.com with the actual Fusion Tables doc ID we can take a look at our logs to figure out what the problem might be . Comment : Thanks Rod I will follow up as you suggested . I thought Fusion Tables development had stopped because the Fusion Tables API Users Group https : groups.google.com forum forum fusion-tables-users-group is no longer monitored and because the issue with reloading Google Spreadsheets https : code.google.com p fusion-tables issues detail id 675 q import 20fails colspec ID 20Type 20Status 20Summary 20Stars 20Component seems old enough and important enough that it would have been fixed if Fusion Tables were still being developed . Comment : I should probably reword the not being monitored verbiage there to clarify that FT is active just not on that list . As for the spreadsheet import thing there was a general problem with all Drive apps during that period that would have the same symptoms but not the same cause . Spreadsheet imports are stable nowadays . Comment : Count me very relieved we have a high-traffic app that was built around Fusion Tables and would have a significant problem if it went the way of Google Reader . .. . Answer : I have a good news I ve received an email from googletables-feedback . They says that it should be working now . My code on Google Client JS API works fine Comment : I m not using Google Client JS API but I confirmed that I can now automate making a FusionTable public . Thanks", "Question : I have been trying to use the Google Drive API to make a Fusiontable publicly readable and have not been able to get it to work . I am able to use the OAuth 2.0 Playground to insert public share permissions for other Google Drive documents but for Fusiontables I get an HTTP 500 error Internal Error . Note that I have tried including every scope available under Drive API v2 and Fusion Tables API v1 . I m aware that Google is no longer developing and supporting Fusiontables but I m wondering if anyone has found a workaround that allows them to get around this problem I haven t tried legacy deprecated versions of the API either . Here s are the actual API request format and responses from OAuth Playground for a Fusiontable permissions insert HTTP 500 then a Doc permissions insert HTTP 200 . The only difference between requests is the fusiontable id or document id in the Request URI : .. . .. . Request : .. . .. . Fusiontable Response : .. . .. . Doc response : Comment : To clarify : Google is no longer developing and supporting Fusiontables is not the case and I d be interesting in hearing where that idea came from : - If you send this question to googletables-feedback@google.com with the actual Fusion Tables doc ID we can take a look at our logs to figure out what the problem might be . Comment : Thanks Rod I will follow up as you suggested . I thought Fusion Tables development had stopped because the Fusion Tables API Users Group https : groups.google.com forum forum fusion-tables-users-group is no longer monitored and because the issue with reloading Google Spreadsheets https : code.google.com p fusion-tables issues detail id 675 q import 20fails colspec ID 20Type 20Status 20Summary 20Stars 20Component seems old enough and important enough that it would have been fixed if Fusion Tables were still being developed . Comment : I should probably reword the not being monitored verbiage there to clarify that FT is active just not on that list . As for the spreadsheet import thing there was a general problem with all Drive apps during that period that would have the same symptoms but not the same cause . Spreadsheet imports are stable nowadays . Comment : Count me very relieved we have a high-traffic app that was built around Fusion Tables and would have a significant problem if it went the way of Google Reader . .. . Answer : This appears to be due to a bug in the Drive API . I ve located the internal error and have raised the issue with the engineering team . At this time there are no known workarounds . Comment : After a few months looks like the internal error is still there And now that the XML-based GData API has been turned off there indeed seems to be no workaround.. .", "Question : I am looking for information regarding the technical limitations when using Fusion Tables : - - how many rows can be stored in a Fusion Table - how many queries read-write can be run simultaneously against a Fusion Table . I could not find any info on https : developers.google.com I asked a Google representative and he told me that Fusion Tables is still an experimental beta product and I shall check out at stackoverflow . I plan to develop an application where users will update attributes of specific locations . I would like to use Fusion Tables so that locations and their attributes are stored in a Fusion Table . The application will involve a lot of read updates of the table up to 500 000 read update queries in one minute with up to 3 000 000 locations registered in the Fusion Table so I wonder if I will be limited by the technology technically or regarding the terms of service . My impression is that Fusion Tables are not really supposed to be updated with such a high frequence . Thanks in advance for your help Regards .. . .. . Pierre .. . Answer : Please note some new limits https : groups.google.com forum topic fusion-tables-announce 4oB11Lpd4z8 were announced in December .", "Question : I have been trying to use the Google Drive API to make a Fusiontable publicly readable and have not been able to get it to work . I am able to use the OAuth 2.0 Playground to insert public share permissions for other Google Drive documents but for Fusiontables I get an HTTP 500 error Internal Error . Note that I have tried including every scope available under Drive API v2 and Fusion Tables API v1 . I m aware that Google is no longer developing and supporting Fusiontables but I m wondering if anyone has found a workaround that allows them to get around this problem I haven t tried legacy deprecated versions of the API either . Here s are the actual API request format and responses from OAuth Playground for a Fusiontable permissions insert HTTP 500 then a Doc permissions insert HTTP 200 . The only difference between requests is the fusiontable id or document id in the Request URI : .. . .. . Request : .. . .. . Fusiontable Response : .. . .. . Doc response : Comment : To clarify : Google is no longer developing and supporting Fusiontables is not the case and I d be interesting in hearing where that idea came from : - If you send this question to googletables-feedback@google.com with the actual Fusion Tables doc ID we can take a look at our logs to figure out what the problem might be . Comment : Thanks Rod I will follow up as you suggested . I thought Fusion Tables development had stopped because the Fusion Tables API Users Group https : groups.google.com forum forum fusion-tables-users-group is no longer monitored and because the issue with reloading Google Spreadsheets https : code.google.com p fusion-tables issues detail id 675 q import 20fails colspec ID 20Type 20Status 20Summary 20Stars 20Component seems old enough and important enough that it would have been fixed if Fusion Tables were still being developed . Comment : I should probably reword the not being monitored verbiage there to clarify that FT is active just not on that list . As for the spreadsheet import thing there was a general problem with all Drive apps during that period that would have the same symptoms but not the same cause . Spreadsheet imports are stable nowadays . Comment : Count me very relieved we have a high-traffic app that was built around Fusion Tables and would have a significant problem if it went the way of Google Reader . .. . Answer : If you d be OK with a temporary workaround inserting Fusion Table public share permission still works with older XML-based GData API . You can check it out here https : developers.google.com google-apps documents-list updating sharing permissions though beware of the red banner at the top of the page saying The deprecation period for Version 3 of the Google Documents List API is nearly at an end . On April 20 2015 we will discontinue service for this API . So if you need to workaround the problem now that would keep you going till April and then let s hope the Drive API bug gets fixed before that.. . Comment : Okay I ll give this a try thanks Comment : I added the workaround to one of my GitHub projects so you could look at the code there : goo.gl NDxHIr http : goo.gl NDxHIr The method at line 165 it s Objective-C though most of it is just shaping up a POST request which should be easily readable .", "Question : To overcome the limitation with the MultiGeometry element I am considering splitting my data into several rows as hinted at in the Fusion Table Help https : support.google.com fusiontables answer 174680 and here http : stackoverflow.com questions 14638346 fusion-table-in-google-maps-will-not-display-entire-geometry-layer . This will yield a large amount of rows and I would like to group them into Folders in Google Earth when viewing the Network Link . Is that possible at all Note : there is a similar question left unanswered on the Fusion Table forum https : productforums.google.com forum topic google-fusion-tables dCyZbt1DqzI context-place topicsearchin google-fusion-tables Folder . .. . Answer : At the time of writing this is not possible . There is already a related feature request https : code.google.com p fusion-tables issues detail id 1506 asking for Folder capability as well as Sub-Folder incidentally . Wait and see hopefully Google will address this in the near future .", "Question : I have been successfully using Google API via HTTP REST as well as using the .NET client library with a Google Service Account to access the files in Google Drive . Recently I am exploring the Fusion Tables . I am able to use the API with user authorization via a web application . However when I try to access it using Google Service Account under the same project it failed with the below error whenever I have https : www.googleapis.com auth fusiontables in the scope : .. . .. . https : www.googleapis.com oauth2 v3 token .. . .. . HTTP 401 .. . .. . error : unauthorized client error description : Unauthorized client or scope in request . .. . .. . The error goes away when I remove https : www.googleapis.com auth fusiontables and the same code block works fine with https : www.googleapis.com auth drive and other scopes . I have checked and confirmed the Fusion Tables API is already enabled for my project at Google Developers Console . Otherwise my user authorization via a web application would not be working at the first place . Is there anything which I could have missed out Any help would be greatly appreciated . .. . Answer : I just come across this : Google drive service account and Unauthorized client or scope in request http : stackoverflow.com questions 27297710 google-drive-service-account-and-unauthorized-client-or-scope-in-request 32137852 32137852 .. . .. . Even though it does not seems to be related at the first glance it is indeed the same issue . Problem resolved after removing User svcAcct from the below code block . Hence here is the general advise : .. . .. . DO NOT call ServiceAccountCredential.Initializer with User svcAcct unnecessarily . .. . Only do this when you are trying to impersonating a difference user with the condition that the appropriate setup has been correctly done in Google Apps Admin Console . .. . Even though it may not produce any error under certain cases there are some unexpected behaviors when including an email-address of the service account itself in the JWT claim set as the value of the sub field .", "Question : Just using the Fusion Tables through Google Drive and every time I merge some tables some of the data gets duplicated so I am just wondering how can I remove duplicate rows from my table I have been unable to find anything on that for fusion tables and I can t do it outside and then re-import because then I will exceed my Geocoding limit . .. . Answer : Unfortunately you can t update or delete rows from View or Merged tables . Depending on what you re trying to achieve you may be able to use Fusion Tables SQL commands to create a View table that generates the results you need without duplicates . But that involves using the Fusion Tables API V2 via a programming language like Java Python or Google s own Apps Script you d basically be setting up custom filter conditions using code you can t do this from the Fusion Tables GUI . Comment : Would you be able to give an example of setting up a SQL Command to create a view table Comment : I would need to know what your data looks like to write a proper SQL command to filter out duplicates . I can walk you thru it but the comment section isn t a good place to discuss it as its a fairly involved process . Plus there are a number of things to setup configure before even writing a line of code . StackOverflow has a new chat service https : chat.stackoverflow.com we could use . Send me an invite and we can go from there . Comment : Ok thanks When I get a chance I will send you a chat invite might not be for a few days though .", "Question : I fill google-fusion-tables . I ve about 2mio entries which should be added to the fusion tables . I use Google.Apis.Fusiontables.v2 1.10.0.50 https : www.nuget.org packages Google.Apis.Fusiontables.v2 .. . .. . This worked for some monthes . but now I get a quota exceeded exception . Google.Apis.Requests.RequestError Quota Exceeded 403 Errors Message Quota Exceeded Location - Reason quotaExceeded Domain usageLimits .. . .. . As there are more data this isn t that surprising . But when I look at the quota on https : console.developers.google.com apis api fusiontables quotas I can t see any limitations were hit . Also in the global quota dashboard I can t see any limits I hit . I thought that I may hit the 250MB per table . but when I download the datasource the csv only has 40 MB But I think this are only read quotas not write enter image description here http : i.stack.imgur.com 9tEYK.png .. . .. . Any advice how I can find out the specific limit and any recommandations on improvements in the code Comment : Google fusion tables use special storage space in Google drive and the limit is 1GB as per a google developer https : productforums.google.com forum utm medium email utm source footer msg google-fusion-tables XXxVkTHDFQk iCNSkjAAAQAJ . If you have multiple fusion tables already check if the combined size is exceeding 1GB . .. . Answer : I emailed the support . They told me they will have look . I didn t hear anything new but the day after that it worked without any change . Now I have about 20 more data and it still workds . so it looks like it was a google bug", "Question : I m currently building a mobile web application that uses Google Fusion Tables as it s database . There is a good OAuth 2.0 guide for Fusion Tables https : developers.google.com fusiontables docs articles oauthfusiontables but the described process includes a user that wants to give my application the permission to access his Fusion Tables . In my case I own the Fusion Table it is connected to my account and all I want is to give users the permission to all CRUD operations on this table . To read from the public table is no problem at all as it does not require authentication but all write operations INSERT UPDATE DELETE need authenctication . So if someone access my mobile web application they should get an access-token for my fusion table allowing them to write to the table . I already registered my application at Google and I m able to write data to my fusion tables when I m logged in with my user account . How does this work for everybody else My questions : .. . .. . Is this possible with a browser-only solution From what I ve learned I need to put my client secret in a JavaScript file . Is this really that bad I mean what s the worst thing that could happen I found a blog article about How-to : Secure OAuth in JavaScript http : derek.io blog 2010 how-to-secure-oauth-in-javascript is this the better approach Has anyone tried that with Google Fusion Tables If it s not that easy to build a browser-only solution how would you do it with a server-side script I thought of a PHP script where a client could just get a valid access-token . Am I on the right track How would you solve this use-case .. . Answer : You ll probably want to use a OAuth 2.0 Service Account for your application to access Fusion Tables : .. . .. . https : developers.google.com accounts docs OAuth2ServiceAccount .. . .. . The Google PHP client library supports this type of account : .. . .. . http : code.google.com p google-api-php-client wiki OAuth2", "Question : Late to the game on migrating to the v1 Fusion Table API but no holding off any longer . I m using Python on AppEngine and trying to connect to Google Fusion Tables with Google Service Accounts the more complicated cousin of OAuth2 for server-side apps that uses JSON Web Tokens .. . .. . I found another question that pointed me to some documentation for using Service Accounts with Google Prediction API . Fusion Table and Google Service Accounts http : stackoverflow.com questions 10338497 fusion-table-and-google-service-accounts .. . .. . So far I ve got .. . .. . Does anyone have an example of connecting to Fusion Tables on AppEngine using Service Accounts they might be able to share Or something nice online Thanks .. . Answer : Since Fusion Tables tables are owned by individual Gmail accounts rather than the service account associated with an API console project the AppAssertionCredentials probably won t work . It would make for an interesting feature request though : .. . .. . http : code.google.com p fusion-tables issues list Comment : Thanks Kathryn . Would you recommend OAuth2 with refresh token to allow a webapp to have userless access after the initial log in Hoping to allow a cron job to update the table . Comment : You can at least grant access to service-accounts for individual tables . Not sure about the service.table .list though .", "Question : null .. . Answer : I am planning to use checkboxes to filter search results from my Google Fusion Tables Map . I want an OR operator to be implemented in my query . I tried to look for solutions and I found this page https : developers.google.com fusiontables docs v1 sql-reference . It only lists these operators : and LIKE MATCHES equivalent to LIKE STARTS WITH ENDS WITH CONTAINS CONTAINS IGNORING CASE DOES NOT CONTAIN NOT EQUAL TO IN . I need an OR operator . I need to retrieve rows that contain a series of characters . First it will look for columns that have a Rating equivalent to 1 2 3 4 or 5 . And then look for columns that have Price equivalent to . Any alternative ways to do this Comment : code.google.com p fusion-tables issues detail id 709 https : code.google.com p fusion-tables issues detail id 709 - code.google.com p fusion-tables issues detail id 49 https : code.google.com p fusion-tables issues detail id 49 Comment : I ve already seen these pages . Are you telling me to vote and request for the OR feature I cannot see a solution there . Comment : 1 . there is no OR . 2 . if you look at those enhancement requests they are marked either WontFix or Available . 3 . IN is the implemented solution .", "Question : I am looking for information regarding the technical limitations when using Fusion Tables : - - how many rows can be stored in a Fusion Table - how many queries read-write can be run simultaneously against a Fusion Table . I could not find any info on https : developers.google.com I asked a Google representative and he told me that Fusion Tables is still an experimental beta product and I shall check out at stackoverflow . I plan to develop an application where users will update attributes of specific locations . I would like to use Fusion Tables so that locations and their attributes are stored in a Fusion Table . The application will involve a lot of read updates of the table up to 500 000 read update queries in one minute with up to 3 000 000 locations registered in the Fusion Table so I wonder if I will be limited by the technology technically or regarding the terms of service . My impression is that Fusion Tables are not really supposed to be updated with such a high frequence . Thanks in advance for your help Regards .. . .. . Pierre .. . Answer : There are a number of limitations to consider : .. . .. . 25 000 requests day .. . 250MB space per table .. . A cell of data in Fusion Tables supports a maximum of 1 million characters .. . Insert Limits https : developers.google.com fusiontables docs v1 using insertRow .. . Maximum data size for a single HTTP request is 1MB .. . Total number of table cells being added cannot exceed 10 000 cells not rows A single request may contain up to a maximum of 500 INSERT statements .. . Only the first 100 000 records are mapped or included in spatial-query results .. . When viewed on a map map tiles may exceed the 500 feature-per-tile limit and features will be dropped from the map .. . .. . Please note that the last two limits above are described in a deprecated section of the documentation https : developers.google.com fusiontables docs developers guide Geo I couldn t find newer documentation about it . Maybe the limit does no longer exist or it just has not yet been documented . But the limits certainly apply if you are using FusionTablesLayer https : developers.google.com maps documentation javascript layers FusionTables to to display data on Google Maps . FusionTablesLayer limits https : developers.google.com maps documentation javascript layers FusionTablesLimits : .. . .. . Max . 5 layers per map .. . Only to one of those layers styles can be applied .. . Max . 5 styles may be applied on this layer .. . Only the first 100 000 rows of data in a table are mapped or included in query results .. . Map tiles may exceed the 500 feature-per-tile limit and features will be dropped from the map .. . .. . If you are a Google Maps Premier http : www.google.com enterprise earthmaps maps.html customer some of the limits can be modified . Comment : What happens after number of request increases the limit Also if I create an application using an API key does the number of hits per user of the application or total number of hits by the application count Comment : Also do you have an idea of about what are the charges if one wishes to to increase the limits Comment : I m not entirely sure but I think the 25 000 request day are refering to requests done with your API key . But you can request more requests in the API console if you need more . I don t know about the charges for increase the limits . It s probably best to ask Google directly http : www.google.com enterprise earthmaps maps.html .", "Question : I have been getting intermittent 500 errors while batch-uploading simple row data to Google Fusion Tables via the v2 API using the importRows method . We have tried throttling and backing off but the patterns seem to indicate that we are going over quota even with small numbers of requests and fairly slow rates . I can see in the API console it s limited to 200 requests 100s as confirmed in other posts it s a 0.5 s rate limit . We are about to sadly abandon the Fusion Tables API and rebuild the entire project using something else due to the unpredictable nature of the 500 errors . Sometimes insert happens but sometimes not after an error is returned which makes retrying run the risk of duplicate inserts . It occurred to me that as we are uploading 1 000 rows per request does this count as 1 000 requests .. . Answer : Are you uploading media files when you make an importRows request It could be that you re exceeding table storage limits 250MB per table . You may want to check your code and data payloads against this and other Fusion Table limitations . Here s a good reference on the limits of Fusion Tables : .. . .. . What are the technical limitations when using Fusion Tables http : stackoverflow.com questions 11952166 what-are-the-technical-limitations-when-using-fusion-tables Comment : No it s just a small amount of data per row . It s an intermittent problem so continuing later usually works hence it can t be over a permanent limit per table . Also the error says try again which seems counter-intuitive for a 500 error to me . Comment : That makes sense . Maybe you can try reducing the number of rows uploaded per request try stress-testing with row counts under 200 . Also when the server responds with a 500 error did you get any details describing the error That might help with diagnosing the problem .", "Question : I have written a Google Fusion Tables script I m happy with below but it s loading only 500 rows of points in my table which has over 20 000 rows . This is my first time in this neighborhood and I was really surprised to find the limit . Is there some way to load all the rows Comment : There are table size limits to Google Fusion tables . Welcome to the cloud . .. . Answer : The Gviz API does have a 500 row limit for a given query . Any table is limited to 100 000 mappable rows but that s well outside your reported 20 000 rows . The new Javascript API currently accepting Trusted Testers offers JSON format support for any number of rows returned for a query . You can apply for the TT program by requesting membership in this group : https : groups.google.com group fusion-tables-api-trusted-testers .. . .. . -Rebecca", "Question : Learning Google FusionTables so possibly making a very beginner mistake . I get correct results when querying Google Fusion Tables via the ChartTools API but not via the Ajax API . Strangely it gives correct results for part of the query just not all of it . Am I making a mistake Chart Tools API works : Querying Google FusionTable via the Chart Tools API seems to work fine albeit with a 500 row limit . For instance this query : SELECT ETHUN COUNT FROM 1Nynh5pPrj1q8JqbalppAm-qzAsgKvL0ZRala7VI GROUP BY ETHUN .. . .. . Using the Google Chart Tools API the URL is http : www.google.com fusiontables gvizdata tq SELECT 20ETHUN 2C 20COUNT 20 20FROM 201Nynh5pPrj1q8JqbalppAm-qzAsgKvL0ZRala7VI 20GROUP 20BY 20ETHUN tqx reqId 3A0 http : www.google.com fusiontables gvizdata tq SELECT 20ETHUN 20COUNT 28 29 20 20FROM 201Nynh5pPrj1q8JqbalppAm-qzAsgKvL0ZRala7VI 20GROUP 20BY 20ETHUN tqx reqId : 0 which returns a JSON function : .. . .. . In particular note the values 1 2 -9 as the values for ETHUN . New FusionTables API doesnt work : On the other hand making the same query via the Ajax API returns correct frequencies but NaN for the values themselves that the frequencies describe : https : www.googleapis.com fusiontables v1 query sql SELECT 20ETHUN 2C 20COUNT 20 20FROM 201Nynh5pPrj1q8JqbalppAm-qzAsgKvL0ZRala7VI 20GROUP 20BY 20ETHUN key AIzaSyBT ZCriV-Tm78KsJiQp6KKhjDwMhP0tYM https : www.googleapis.com fusiontables v1 query sql SELECT 20ETHUN 20COUNT 28 29 20 20FROM 201Nynh5pPrj1q8JqbalppAm-qzAsgKvL0ZRala7VI 20GROUP 20BY 20ETHUN key AIzaSyBT ZCriV-Tm78KsJiQp6KKhjDwMhP0tYM .. . .. . Which returns this JSON : .. . .. . Why might it be giving me NaN s instead of 1 2 -9 Update : I now believe this issue is unique to the new Fusion Tables SQL question slightly edited . Here s the link-to the example Fusion Table https : www.google.com fusiontables DataSource docid 1Nynh5pPrj1q8JqbalppAm-qzAsgKvL0ZRala7VI .. . .. . Fusion Tables SQL API now deprecated also works .. . .. . Strangely this link also works fine https : www.google.com fusiontables api query sql SELECT 20ETHUN 20COUNT 28 29 20FROM 204579147 20GROUP 20BY 20ETHUN alt json-in-script jsonCallback onResponse https : www.google.com fusiontables api query sql SELECT 20ETHUN 20COUNT 28 29 20FROM 204579147 20GROUP 20BY 20ETHUN alt json-in-script jsonCallback onResponse and returns the following JSONP response with yet another format : .. . Answer : This appears to be a bug with Google Fusion Tables API v1.0 . This error is specific to numeric fields . Ajax is able to correctly query String fields just fine . Just this dataset has mostly numeric fields . NaN : SELECT SEX COUNT FROM . . GROUP BY SEX https : www.googleapis.com fusiontables v1 query sql SELECT 20DIAG1 20COUNT 28 29 20 20FROM 201Nynh5pPrj1q8JqbalppAm-qzAsgKvL0ZRala7VI 20GROUP 20BY 20DIAG1 key AIzaSyBT ZCriV-Tm78KsJiQp6KKhjDwMhP0tYM integer field .. . NaN : SELECT AGE COUNT FROM . . GROUP BY AGE https : www.googleapis.com fusiontables v1 query sql SELECT 20AGE 20COUNT 28 29 20 20FROM 201Nynh5pPrj1q8JqbalppAm-qzAsgKvL0ZRala7VI 20GROUP 20BY 20AGE key AIzaSyBT ZCriV-Tm78KsJiQp6KKhjDwMhP0tYM integer field .. . Ok : SELECT RFV1 COUNT FROM . . GROUP BY RFV1 https : www.googleapis.com fusiontables v1 query sql SELECT 20RFV1 20COUNT 28 29 20 20FROM 201Nynh5pPrj1q8JqbalppAm-qzAsgKvL0ZRala7VI 20GROUP 20BY 20RFV1 key AIzaSyBT ZCriV-Tm78KsJiQp6KKhjDwMhP0tYM string field .. . Ok : SELECT DIAG1 COUNT FROM . . GROUP BY DIAG1 https : www.googleapis.com fusiontables v1 query sql SELECT 20PATWT 20COUNT 28 29 20 20FROM 201Nynh5pPrj1q8JqbalppAm-qzAsgKvL0ZRala7VI 20GROUP 20BY 20PATWT key AIzaSyBT ZCriV-Tm78KsJiQp6KKhjDwMhP0tYM string field Comment : The Google Fusion Table API v1.0 seems to work fine now . Great work Google team for working this far down the list of obscure issues", "Question : Is it possible to change permissions for a fusion table using google s python api I can successfully create the table using a service account but the table is created as private under the client-email xxxx@gce-play.iam.gserviceaccount.com rather than my personal gmail account . If not Should I not be using ServiceAccounts for authorization The job needs to run without human interaction ie no pasting oauth2 links into a browser . For completeness I have created tables in two ways .. . .. . Fusion Table Python Client Library https : developers.google.com resources api-libraries documentation fusiontables v2 python latest index.html .. . .. . Fusion Table API https : developers.google.com fusiontables docs v2 reference table .. . .. . .. . .. . ANSWER DETAILS thanks to @RodMcChesney below .. . .. . As suggested in the accepted answer below I used the Drive API https : developers.google.com drive v2 reference permissions . In particular I used the drive client library https : developers.google.com resources api-libraries documentation drive v2 python latest . NOTE : before creating the table or service account make sure you have enabled drive api in you google console .. . Answer : You can use the Drive Permissions API https : developers.google.com drive v2 reference permissions to change your table s permissions once you ve created it . Comment : Thanks I m updating my question with explicit details of how to use the Drive Permissions API for this case .", "Question : null .. . Answer : I have a web app I m developing which utilizes Google Fusion Tables . It calls for the fusion table data to create a map and I want to allow users to make submissions which will record the submitted data to the Fusion Table . I am having trouble deciphering Fusion Tables authentication policy and it seems as though it requires users to authenticate with their own accounts to submit data . Is this correct and is there a way I can simply let them submit the data anonymously Handing the data to the server and then letting the server submit the data is an option if that s the method I have to pursue node.js backend .", "Question : Late to the game on migrating to the v1 Fusion Table API but no holding off any longer . I m using Python on AppEngine and trying to connect to Google Fusion Tables with Google Service Accounts the more complicated cousin of OAuth2 for server-side apps that uses JSON Web Tokens .. . .. . I found another question that pointed me to some documentation for using Service Accounts with Google Prediction API . Fusion Table and Google Service Accounts http : stackoverflow.com questions 10338497 fusion-table-and-google-service-accounts .. . .. . So far I ve got .. . .. . Does anyone have an example of connecting to Fusion Tables on AppEngine using Service Accounts they might be able to share Or something nice online Thanks .. . Answer : The best online resource I have found for help connecting Python AppEngine to Fusion Tables API with Oauth2 is Google APIs Client Library for Python https : developers.google.com api-client-library python guide aaa oauth .. . .. . The slide presentation is helpful to understanding the online samples why decorators are used . Also useful for understanding whether to use the app s Service Acount or User Accounts to authenticate is : Using OAuth 2.0 to Access Google APIs https : developers.google.com accounts docs OAuth2 .. . .. . Consider installing the Google APIs Client Library for Python https : developers.google.com api-client-library python start installation appengine .. . .. . Apart from the scope the Oauth2 is more or less common to all Google APIs not just fusion tables . Once oauth2 is working see the Google Fusion Tables API https : developers.google.com fusiontables docs sample code" ] }
[ "yes-answer-long", "yes-answer-short" ]
web
UNK_RELATION
eventlet@scalability@86
eventlet -- a concurrent networking library for python that provides performance and @placeholder of non-blocking io while writing simple blocking code no callbacks using green-threads .
{ "confidence": [ 50.91333770751953, 48.418670654296875, 45.54193878173828, 44.06262969970703, 40.0056037902832, 39.961082458496094, 39.34022903442383, 38.360538482666016, 36.78923797607422, 35.77238464355469, 35.333011627197266, 35.1485481262207, 35.12779998779297, 34.12348937988281, 33.5906982421875, 33.590579986572266, 32.78279113769531, 32.693939208984375, 32.589683532714844, 32.420875549316406, 32.249786376953125, 32.24092102050781, 32.12489318847656, 31.801584243774414, 31.791412353515625, 31.5932559967041, 31.29120635986328, 31.289756774902344, 31.135860443115234, 30.914371490478516, 29.958782196044922, 29.37793731689453, 29.014320373535156, 28.833740234375, 28.825733184814453, 28.401748657226562, 28.401748657226562, 28.164783477783203, 28.163833618164062, 28.163833618164062, 28.131481170654297, 27.599834442138672, 27.401100158691406, 27.230724334716797, 27.11618423461914, 27.114952087402344, 27.114952087402344, 27.04847526550293, 26.67009925842285, 26.50554847717285, 26.451522827148438, 26.451522827148438, 26.451522827148438, 26.451522827148438, 26.451522827148438, 26.315107345581055, 26.229501724243164, 26.077754974365234, 26.074583053588867, 26.073368072509766, 26.028959274291992, 25.84377670288086, 25.776247024536133, 25.722089767456055, 25.683048248291016, 25.64486312866211, 25.60997772216797, 25.591453552246094, 25.591453552246094, 25.42949104309082, 25.4044132232666, 25.31656265258789, 25.31656265258789, 25.21590805053711, 25.13622283935547, 25.13622283935547, 24.914413452148438, 24.864728927612305, 24.851404190063477, 24.78000831604004, 24.757781982421875, 24.549606323242188, 24.50545883178711, 24.436370849609375, 24.436370849609375, 24.436370849609375, 24.436370849609375, 24.42097282409668, 24.173755645751953, 24.101383209228516, 24.063936233520508, 24.063936233520508, 23.996232986450195, 23.95603370666504, 23.91683578491211, 23.501705169677734, 23.395450592041016, 23.35037612915039, 23.35037612915039 ], "content": [ "Eventlet is a concurrent networking library.. .", "Eventlet provides monkey patch to make as much stuff as possible non-blocking .", "The idea is that if all the networking calls are non blocking this should be faster than python threads in some cases .", "Use eventlet monkey patching 1 to make any pure python library non-blocking .", "Eventlet Green threads : .. . .. . From above we know that cpython has a performance limitation with threads .", "I have installed eventlet library in python using : pip install eventlet .", "TL DR .. . .. . Why .. . .. . Here s what happens : .. . .. . There is no point where Python interpreter could enter Eventlet hub and switch to green-threads to do network IO .", "Does celery do any magic to make Django queries non-blocking when using an eventlet pool", "Eventlet provides cooperative multithreading .", "For networking operations the socket libraries are patched in run time monkey patching so that all calls are non-blocking .", "There is no point in separating concurrent requests from blocking .", "A list on bitbucket https : bitbucket.org which linden eventlet src e2a73a7f7e45 eventlet green .", "In theory Eventlet could distribute green-threads across several Python threads and consequently OS threads but that is a lot of work for very little benefit since Python code does not execute in parallel on CPython 1 .", "I could use one of these three library or even create create something for myself by using python threads or concurrent library .", "No threads so eventlet is pointless here .", "One of the challenges of writing a library like Eventlet is that the built-in networking libraries don t natively support the sort of cooperative yielding that we need .", "This code works for me with eventlet master 0.18 Python 3.4 OSX .", "I d say that there are a couple of things to note here : .. . .. . raw input isn t patched by eventlet so its calls are blocking .. . threading is patched by eventlet so threads are acting as coroutines .. . .. . One way to workaround this would be to avoid patching threading so that threads are real threads .", "So if i need to patch threads thread threading and Queue making non-blocking raw input is not possible", "Is something like eventlet with a green threading model suitable for this", "Since requests are blocking process each concurrent connection is waiting on one request .", "Actually eventlet.GreenPile s spawn creates green-threads anyway so it s probably duplicative to use threads or processes on top of eventlet .", "If a Python thread performs a blocking operation another thread will get the CPU and continue to run while the first thread is blocked waiting .", "To yield control : .. . .. . either use green versions of IO and sleep .. . or execute eventlet.monkey patch now you can use regular time socket etc modules replaced by green versions cooperating with Eventlet .", "Eventlets tries to solve the problem by using a single thread running on a single core and using non blocking i o for everything .", "Incidentally the same restriction applies to regular Python threads that s why Eventlet or other green thread libraries mostly just work as drop-in replacement and mostly do not cause any new unusual bugs .", "Can you reproduce the issue without Eventlet using threads", "I try to set up a minimal Flask application that uses eventlet http : eventlet.net to respond to concurrent requests instantly instead of blocking and responding to one request after the other as the standard Flask debugging webserver does .", "We are using Python 3.4 eventlet 18.3 and Cassandra driver 3.0.0 .", ".. . Therefore the application using Eventlet must explicitly green the world for itself using one or both of the convenient methods provided .", "So even when you create a pool of eventlet green-threads you are actually creating only one OS level thread .", "Green threads are not real OS level threads .", "github.com eventlet eventlet issues 147 https : github.com eventlet eventlet issues 147", "There is nothing special in this package with respect to green-threads .", "This seems to be caused by the cassandra-drivers eventlet code using select.select on a ssl socket .", "This one run a server blocking the main thread .", "When the blocking event completes the blocked thread will resume .", "There is a server handling client request using green-threads .", "I am stuck getting ssl to work with the Python Cassandra driver and eventlet .", "Has anybody got the combination of ssl cassandra and eventlet to work with Python", "I take as a standard nmap scanning time : .. . .. . And my question is now : how threads implemented in Eventlet as I can understand this is not threads but something special for Eventlet and why they dont speed up tasks", "No eventlet no ssl .", "Read more on page http : eventlet.net doc patching.html .. . .. . There some green module can working with eventlet all of them are in the eventlet.green .", "The kernel is ignorant to green-threads .", "No it s the reverse issue - even in your original code when you weren t using multiprocessing the eventlet module was already giving you concurrent I O so using another concurrency pattern whether they are processes or threads isn t helping .", "Relevant Github issue : https : github.com eventlet eventlet issues 195", "Eventlet without ssl and ssl without eventlet both work .", "I registered your issue here github.com eventlet eventlet issues 197 https : github.com eventlet eventlet issues 197 would you share your isolation code for tests", "So this is a good reason to implement multithreading in a Python script though it isn t the only way to achieve this type of concurrency non-blocking I O can achieve similar results .", "I can t reproduce this behavior using CPython 2.7.6 and 3.4.3 eventlet 0.17.4 in either IPython or pure python console .", "It has-many eventlet coroutine .", "It works : .. . .. . Next eventlet .", "But it works : .. . .. . Next ssl no eventlet .", "There is event-loop in Eventlet .", "This is a known issue with Eventlet + multiprocessing .", "TL DR : Eventlet API does not require sleep 0 to start a green thread .", "patch everything import eventlet eventlet.monkey patch must execute as early as possible .. . import requests amqp memcache paramiko redis everything is non-blocking now .. . .. . 1 http : eventlet.net doc patching.html .. . .. . Update : there is known issue 2 with monkey patching requests library .", "Now if your python code is spending most of its time inside networking operations send connect etc : in this case there will be less threads fighting for GIL to interpret code .", "Eventlet Gevent and more similar libraries provide excellent toolset for IO-bound tasks waiting for read-write on file network .", "It s true Eventlet does not patch requests no need to .", "Temporary workaround also posted in https : github.com eventlet eventlet issues 313 :", "The question is how to get eventlet coroutine stack using gdb .", "Please provide versions for OS Python eventlet werkzeug flask-socketio .", "If unsure how to measure CPU usage you may use GNU time usually installed as usr bin time or cpu-usage function from eventlet tests github.com eventlet eventlet blob master tests init .py L189 https : github.com eventlet eventlet blob master tests init .py L189", "I m using the code from the eventlet example which uses imap for body in pool.imap fetch urls : ... . lightly modified .", "If the threads need access to some other subsystem or hardware that can t handle concurrent requests a serial-port for example then multithreading won t help you improve performance .", "There is no simple way as with regular threads .", "But it comes to eventlet coroutine it became difficult .", "This also works : .. . .. . Finally ssl and eventlet .", "Here is my below code : - .. . .. . server.py .. . .. . client.py .. . .. . I use a python eventlet to call the socket client 10 times but its not returning the correct result. .", "We have an existing project using Eventlet module .", "Most importantly N green-threads will map to 1 OS thread .", "Green threads cooperatively yield to each other instead of preemptively being scheduled .", "But will setfsid calls work with green-threads like they do with the native threads", "I also know how to get all eventlet coroutine stack in a python program by iterating all object .", "This question is not specific to Eventlet it s just about managing multiple versions of Python on OSX .", "I have a simply code : .. . .. . import eventlet .. . .. . This code should throw TimeoutException because code in try block executing more than 3 seconds .", "I ve taken sample code from Unterstanding eventlet.wsgi.server http : stackoverflow.com questions 8509209 unterstanding-eventlet-wsgi-server .", "Proper way .. . .. . Remove while True loop Eventlet already has a hidden one for you .", "I meant the gain in performance of being able to keep using eventlet but it seems like falling back to the async-mode threading works best for me .", "I m making a lot of asynchronous http requests using eventlet and urllib2 .", "Your pip command installed eventlet into Library Frameworks Python.framework Versions 3.5 lib python3.5 see version .", "Eventlet and monkey patching is a must for me .", "First I use eventlet and requests to implement it .", "OS and eventlet make reasonable use of these resources .", "Or Can i run scrapy crawler with celery eventlet", "this workload might be more efficient under eventlet .", "Green threads do not rely on any native OS capabilities and they are managed in user space instead of kernel space", "For now several speculations : .. . .. . maybe you have from time import sleep then it s a duplicate of Eventlet timeout not exiting http : stackoverflow.com questions 30795353 eventlet-timeout-not-exiting and the problem is that you don t give Eventlet a chance to run and realize there was a timeout solutions : eventlet.sleep everywhere or eventlet.monkey patch once .", "In Python 3.2+ threads also work very good .", "What about Eventlet or gevent", "Does grequests work with eventlet", "If your queries are still blocking try monkey patch psycopg True .", "import utils So I have changed it to requests eventlet.import patched requests . init as per github.com eventlet eventlet issues 7 https : github.com eventlet eventlet issues 7 thanks again", "In pure python programs there s no performance benefit in terms of amount of computation you can get done but it s sometimes the easiest way to write code which does a lot of IO e.g .", "Caused by known bug in Eventlet triggered by PUT-Except-100 sequence in HTTPS connection : https : github.com eventlet eventlet issues 315 .. . .. . Sorry proper fix is not ready yet .", "Each green thread is tied to exactly one Python thread which is tied to exactly one OS thread .", "I try to work celery with gevent eventlet on python3 .", "It does not matter that you have loaded eventlet ." ] }
{ "confidence": [ 73.29232025146484, 61.92879104614258, 56.48854064941406, 56.276710510253906, 52.53433609008789, 51.755374908447266, 50.76222229003906, 50.100555419921875, 48.642704010009766, 47.79924774169922, 47.365867614746094, 46.2406120300293, 45.599891662597656, 45.55927658081055, 44.65100860595703, 44.46266174316406, 44.380958557128906, 43.61264419555664, 43.523277282714844, 43.5219612121582 ], "content": [ "Question : When I hear about multithreaded programming I think about the opportunity to accelerate my program but it is not and results : .. . .. . And my question is if I run this code is not on my laptop but on the server and set more value of workers it will run faster than the CPython s version What are the advantages of threads ADD : And so I rewrite app with use original cpython s threads .. . .. . and result is .. . .. . And I think this is a very good result . I take as a standard nmap scanning time : .. . .. . And my question is now : how threads implemented in Eventlet as I can understand this is not threads but something special for Eventlet and why they dont speed up tasks Eventlet is used by many of the major projects like OpenStack and etc . But why Just do the heavy queries to a DB in asynchronous manner or something else Comment : as per my answer below try running this with 100 threads instead of 5 and modify to scan each socket 5 times . this workload might be more efficient under eventlet . you are not seeing the benefit with 5 threads . .. . Answer : Cpython threads : .. . .. . Each cpython thread maps to an OS level thread lightweight process pthread in user space .. . .. . If there are many cpython threads executing python code concurrently : due to the global interpreter lock only one cpython thread can interpret python at one time . The remaining threads will be blocked on the GIL when they need to interpret python instructions . When there are many python threads this slows things down a lot . Now if your python code is spending most of its time inside networking operations send connect etc : in this case there will be less threads fighting for GIL to interpret code . So the effect of GIL is not so bad . Eventlet Green threads : .. . .. . From above we know that cpython has a performance limitation with threads . Eventlets tries to solve the problem by using a single thread running on a single core and using non blocking i o for everything . Green threads are not real OS level threads . They are a user space abstraction for concurrency . Most importantly N green-threads will map to 1 OS thread . This avoids the GIL problem . Green threads cooperatively yield to each other instead of preemptively being scheduled . For networking operations the socket libraries are patched in run time monkey patching so that all calls are non-blocking . So even when you create a pool of eventlet green-threads you are actually creating only one OS level thread . This single OS level thread will execute all the eventlets . The idea is that if all the networking calls are non blocking this should be faster than python threads in some cases . Summary .. . .. . For your program above true concurrency happens to be faster cpython version 5 threads running on multiple processors than the eventlet model single thread running on 1 processor . . There are some cpython workloads that will perform badly on many threads cores e.g . if you have 100 clients connecting to a server and one thread per client . Eventlet is an elegant programming model for such workloads so its used in several places .", "Question : Does celery do any magic to make Django queries non-blocking when using an eventlet pool If not is there a known good way to make it so .. . Answer : Eventlet provides monkey patch to make as much stuff as possible non-blocking . Including sockets covers any pure Python database library and special cases for mysqldb and psycopg and Celery worker type eventlet calls that patcher as far as I know . If your queries are still blocking try monkey patch psycopg True .", "Question : I am using Python requests in celery workers to make large number of 10 sec API calls includes GET POST PUT DELETE . Each request takes around 5-10s to complete . I tried running celery workers in eventlet pool with 1000 concurrency . Since requests are blocking process each concurrent connection is waiting on one request . How do I make requests asynchronous .. . Answer : Use eventlet monkey patching 1 to make any pure python library non-blocking . patch single library import requests instead do this : import eventlet requests eventlet.import patched requests packages erequests and grequests could be stripped down to these two lines . patch everything import eventlet eventlet.monkey patch must execute as early as possible .. . import requests amqp memcache paramiko redis everything is non-blocking now .. . .. . 1 http : eventlet.net doc patching.html .. . .. . Update : there is known issue 2 with monkey patching requests library . If you get ImportError : cannot import name utils then modify import line to requests eventlet.import patched requests . init 2 https : github.com eventlet eventlet issues 7 Comment : Perfect Only problem was I was unable to do requests eventlet.import patched requests it was giving cannot import utils from . import utils So I have changed it to requests eventlet.import patched requests . init as per github.com eventlet eventlet issues 7 https : github.com eventlet eventlet issues 7 thanks again", "Question : I met a strange question : .. . eventlet.green.urllib2.urlopen raise HTTP Error 408 : Request Timeout . but successfully if open the eventlet.green.time.sleep 0.1 .. . do anybody know why thanks a lot test.py : .. . .. . result : .. . Answer : TL DR .. . .. . Why .. . .. . Here s what happens : .. . .. . There is no point where Python interpreter could enter Eventlet hub and switch to green-threads to do network IO . Eventlet provides cooperative multithreading . Which means you need to yield control to give coroutines chance to run . To yield control use eventlet.sleep GreenPool.waitall or wait for any IO like urlopen conn.read . Proper way .. . .. . Remove while True loop Eventlet already has a hidden one for you . Remove status .", "Question : When I hear about multithreaded programming I think about the opportunity to accelerate my program but it is not and results : .. . .. . And my question is if I run this code is not on my laptop but on the server and set more value of workers it will run faster than the CPython s version What are the advantages of threads ADD : And so I rewrite app with use original cpython s threads .. . .. . and result is .. . .. . And I think this is a very good result . I take as a standard nmap scanning time : .. . .. . And my question is now : how threads implemented in Eventlet as I can understand this is not threads but something special for Eventlet and why they dont speed up tasks Eventlet is used by many of the major projects like OpenStack and etc . But why Just do the heavy queries to a DB in asynchronous manner or something else Comment : as per my answer below try running this with 100 threads instead of 5 and modify to scan each socket 5 times . this workload might be more efficient under eventlet . you are not seeing the benefit with 5 threads . .. . Answer : The main advantages of multithreaded programming regardless of programming language are : .. . .. . 1 . If you have a system with multiple CPUs or cores then you can have all CPUs executing application code all at the same time . So for example if you have a system with four CPUs a process could potentially run up to 4 times faster with multithreading though it is highly unlikely it will be that fast in most cases since typical applications require threads to synchronize their access to shared resources creation contention . 2 . If the process needs to block for some reason disk I O user input network I O then while a thread or threads are blocked waiting for I O completion other thread s can be doing other work . Note that for this type of concurrency you do not need multiple CPUs or cores a process running on a single CPU can also benefit greatly from threading . Whether these benefits can be applied to your process or not will largely depend on what your process does . In some cases you will get a considerable performance improvements in other cases you won t and the threaded version might be slower . Note that writing good and efficient multithreaded apps is hard . Now since you are asking about Python in particular let s discuss how these benefits apply to Python . 1 . Due to the Global Interpreter Lock that is present in Python running code in parallel in multiple CPUs is not possible . The GIL ensures that only one thread is interpreting Python code at a time so there isn t really a way to take full advantage of multiple CPUs . 2 . If a Python thread performs a blocking operation another thread will get the CPU and continue to run while the first thread is blocked waiting . When the blocking event completes the blocked thread will resume . So this is a good reason to implement multithreading in a Python script though it isn t the only way to achieve this type of concurrency non-blocking I O can achieve similar results . Here are some examples that benefit from using multiple threads : .. . .. . a GUI program that is doing a lengthy operation can have a thread that continues to keep the application window refreshed and responsive maybe even showing a progress report on the long operation and a cancel-button . a process that needs to repeatedly read records from disk then do some processing on them and finally write them back to disk can benefit from threading because while a thread is blocked waiting to get a record from disk another thread can be doing processing another record that was already read and yet another thread can be writing another record back to disk . Without threads when the process is reading or writing to disk nothing else can happen . For a language that does not have a GIL say C++ the benefit is even greater as you can also have multiple threads each running on a different core all doing processing of different records . I hope this helps", "Question : I have a Django + Celery project . One of the Celery tasks does a lot of small HTTP requests using the requests library while others do lots of talking to the database via the Django ORM . The HTTP-heavy task is already running in its own celery worker using its own Celery queue . I d like to make the HTTP-heavy worker use eventlet while leaving the rest of the tasks to use the prefork execution pool . How do I do this The Celery docs http : celery.readthedocs.org en latest userguide concurrency eventlet.html seem to suggest that I gain magical concurrency powers by just running celery .. . -P eventlet . However this SO answer http : stackoverflow.com a 28332804 294463 says that I need to use a patched version of the requests library . Which is correct Additionally if I have to explicitly patch requests do I have to put this task in a separate module from the rest of the regular tasks so that these other tasks can continue using the regular version of requests .. . Answer : TL DR : use patched version of requests library . No need to start separate module . celery -P eventlet gives you celery jobs concurrency . They may or may not call eventlet.monkey patch to make all code compatible . They may also change it in future . Explicitly using patched version removes ambiguity while also providing useful documentation . There is no point in separating concurrent requests from blocking . Your prefork pool can also use concurrent version . Eventlet doesn t poison things with something bad . Comment : Thank you . So it looks like if you use the patched requests outside of the eventlet loop it works just fine and IO blocks the way it does with vanilla requests .", "Question : I ve taken sample code from Unterstanding eventlet.wsgi.server http : stackoverflow.com questions 8509209 unterstanding-eventlet-wsgi-server . When I access the web server via different client ip addresses I can see they are processed in parallel . And with the print in hello world I can also that they are processed in two different greenthreads but in same OS thread . I m new to Python . I m curious that if each greenthread ties to an underlying OS thread Comment : Green threads do not rely on any native OS capabilities and they are managed in user space instead of kernel space .. . Answer : Each green thread is tied to exactly one Python thread which is tied to exactly one OS thread . In theory Eventlet could distribute green-threads across several Python threads and consequently OS threads but that is a lot of work for very little benefit since Python code does not execute in parallel on CPython 1 . Rule of thumb : if you want to use multiple cores del choose other language del with Python your best bet is to run several processes . Quick way is multiprocessing 2 in stdlib since 2.6 robust way is os.fork 3 4 manually . Just a little clarification on terminology : For most popular operating systems the only way to execute code in parallel is to have multiple OS threads . Strictly speaking your requests are processed not in parallel but concurrently precisely because there is only one OS thread . At any given moment in time there is only one green thread executing some code . Incidentally the same restriction applies to regular Python threads that s why Eventlet or other green thread libraries mostly just work as drop-in replacement and mostly do not cause any new unusual bugs . You may find this answer useful : http : stackoverflow.com posts 14227272 revisions .. . .. . 1 http : wiki.python.org moin GlobalInterpreterLock .. . 2 http : docs.python.org 2 library multiprocessing.html .. . 3 http : docs.python.org 2 library os.html os.fork .. . 4 https : github.com jonashaag bjoern blob master tests fork.py", "Question : I m trying to create a GUI framework that will have an event-loop . some threads to handle the UI and some for event-handling . I ve searched a little bit and found these three libraries and I m wondering which one is better to use what are the pros and cons I could use one of these three library or even create create something for myself by using python threads or concurrent library . I would appreciate sharing any kind of experience benchmark and comparison . Comment : reading this blog post very carefully might help blog.gevent.org 2010 02 27 why-gevent https : blog.gevent.org 2010 02 27 why-gevent .. . Answer : You definitely don t want greenlet for this purpose because it s a low-level library on top of which you can create light thread libraries like Eventlet and Gevent . Eventlet Gevent and more similar libraries provide excellent toolset for IO-bound tasks waiting for read-write on file network . Likely most of your GUI code will wait for other threads at this point green light OS thread is irrelevant to finish which is a perfect target for above mentioned libraries . All green thread libraries are mostly the same . Try all and decide which one suits your project best . But also it s possible that you ll need to extract some things into a separate OS thread due to requirements of OS level GUI layer . Considering that and better implementation of thread lock in Python3 you may want to just stick with native threading module if your application doesn t need hundreds or more threads .", "Question : I have an app to send a bunch of HTTP requests . First I use eventlet and requests to implement it . But the performance is too low . Hence I expected to speed it up using multi-process . A thing need to know is that the server will takes about 200ms to handle a single request no including network transfer . However the multi-process is slower than the original version . I feel so amazed about this result Why The code as following shown I used timeit to measure time . Comment : I ve not fully reasoned through the code but you re using multiprocessing which has an expensive upfront cost for process creation but allows multiple cores to perform computation in parallel on a problem that is I O bound . Threads may be a better solution as long as the bottleneck is purely I O . Comment : @zehnpaard I also have tried multi-thread and the result is the same as multi-process . any idea about such result Comment : Actually eventlet.GreenPile s spawn creates green-threads anyway so it s probably duplicative to use threads or processes on top of eventlet . I O requests to the server are already being handled in parallel . Comment : @zehnpaard does it mean that even multi-process will share a single IO loop provided by kernel Comment : No it s the reverse issue - even in your original code when you weren t using multiprocessing the eventlet module was already giving you concurrent I O so using another concurrency pattern whether they are processes or threads isn t helping . .. . Answer : TL DR : not enough information . By pure speculation the server is the limiting factor which may be caused by intentional artificial limits or resource starvation so by adding more concurrent requests you are making each slower on average . Here s one way to reason about this : you have limited amount of resources on both client and server : CPU cycles per time memory accesses per time memory size network bandwidth . OS and eventlet make reasonable use of these resources . Such that you can do estimates on how much resources it takes to make a single request and software will scale it out in a reasonable pattern that is close to linear . To benefit from multiprocessing would require your client process makes single CPU unit 100 busy . And specifically requests library is known to be good at wasting hardware resources it incurs the most CPU overhead of all I tried httplib httplib2 urllib . But you have to make really lots thousands of concurrent requests or have really bad busy CPU to make it bottleneck . Exact answer requires information : .. . .. . Whether HTTP client and server concur for any resources I.e . do they run on same physical hardware What is the maximum request frequency count per second you were able to generate in single process mode Adjust GreenPile size to vary number of concurrent requests . What is the maximum frequency of requests you were able to generate using multiple processes Adjust both GreenPile size and number of processes . Try running several independent Python interpreters without multiprocessing . Was server the bottleneck Check by adding another client on separate hardware . If request frequency is higher then the server is not bottleneck . If request frequency drops with more clients then the server was already running at limit and multiprocessing could only help to make things worse . What is the request time distribution What percentage of requests was completed in 220 300 400 500 1000 more ms What is network latency bandwidth What is request response size Do you saturate network then Answering these questions will provide you with excellent intuition on what s going on inside and between your client-server . Relevant Github issue : https : github.com eventlet eventlet issues 195 Comment : thanks for your reply . I answered the questions one by one 1 . the server and the client are in different location . 2 . the time used to send a fixed number of requests is almost the same no matter the GreenPile size is 10 20 or 200 . 3 . the server could accept more requests in one second . I have used apache ab test it the ab could run 10 times faster than the eventlet version . 4 . not sure 5 . the request response size is less than 256 bytes . A thing to say is that it is HTTPS protocol . Comment : @Jacky please do the following test with different pool sizes : run 100-1000 requests and measure CPU usage of client process from start to stop . If unsure how to measure CPU usage you may use GNU time usually installed as usr bin time or cpu-usage function from eventlet tests github.com eventlet eventlet blob master tests init .py L189 https : github.com eventlet eventlet blob master tests init .py L189", "Question : Why does eventlet allow it to finish the 6 seconds when it should exit the indentation after 5 seconds Comment : I m pretty sure you re supposed to use eventlet.sleep if you want an eventlet greenthread to sleep . Comment : @user2357112 is this something particular to sleep or if i use other calls it also won t exit them halfway through .. . Answer : Eventlet provides cooperative multithreading . Which means you need to yield control to give hub or coroutines in this case hub implements timeouts chance to run . To yield control : .. . .. . either use green versions of IO and sleep .. . or execute eventlet.monkey patch now you can use regular time socket etc modules replaced by green versions cooperating with Eventlet . Any CPU tight code without green calls for example for in xrange 1000000000 is impossible to interrupt at all . If you find yourself in similar situation place eventlet.sleep 0 somewhere in loop that would enter Eventlet hub and allow timeouts to work .", "Question : When I hear about multithreaded programming I think about the opportunity to accelerate my program but it is not and results : .. . .. . And my question is if I run this code is not on my laptop but on the server and set more value of workers it will run faster than the CPython s version What are the advantages of threads ADD : And so I rewrite app with use original cpython s threads .. . .. . and result is .. . .. . And I think this is a very good result . I take as a standard nmap scanning time : .. . .. . And my question is now : how threads implemented in Eventlet as I can understand this is not threads but something special for Eventlet and why they dont speed up tasks Eventlet is used by many of the major projects like OpenStack and etc . But why Just do the heavy queries to a DB in asynchronous manner or something else Comment : as per my answer below try running this with 100 threads instead of 5 and modify to scan each socket 5 times . this workload might be more efficient under eventlet . you are not seeing the benefit with 5 threads . .. . Answer : Python has a Global Interpreter Lock http : en.wikipedia.org wiki Global Interpreter Lock which prevents two threads from ever executing at the same time . If you re using something like cython the C portions can execute concurrently which is why you see the speedup . In pure python programs there s no performance benefit in terms of amount of computation you can get done but it s sometimes the easiest way to write code which does a lot of IO e.g . leave a thread waiting for a socket read to finish while you do something else .", "Question : I wrote this minimum code to explain my case : .. . .. . Even i have 2 threads both of them are blocked when i call raw input . When i comment out eventlet.monkey patch only one thread is blocked and another keep printing printing . Why and what should i do .. . Answer : I d say that there are a couple of things to note here : .. . .. . raw input isn t patched by eventlet so its calls are blocking .. . threading is patched by eventlet so threads are acting as coroutines .. . .. . One way to workaround this would be to avoid patching threading so that threads are real threads . To do that you just need to replace : .. . .. . with : .. . .. . Note that when thread is True the following modules are patched : thread threading Queue . Edit : If you want to patch threading and have an asynchronous raw input then I suggest the following implementation : .. . .. . This will poll sys.stdin to check if it s ready for reading . If that s not the case it will yield control to eventlet to let other coroutine execute . Comment : So if i need to patch threads thread threading and Queue making non-blocking raw input is not possible Comment : @SuitUp I think it would be easier to have one separate thread to handler user iput . However if you want to use only coroutines I ve added an example implementation that will work on unix systems . Comment : So i should just import thread before monkey patching everyting Make this separate thread handle user input and let other things be coroutines right Thank you for help . Comment : @SuitUp Any code after monkey patch will use the patched module regardless of when the import happened . For further granularity you can use threading and eventlet.green.threading instead of monkey patching . Comment : @SuitUp Alternatively I ve seen that monkey patch patches select.select which makes the custom raw input easier to implement since there s no longer need to poll in a loop .", "Question : When I hear about multithreaded programming I think about the opportunity to accelerate my program but it is not and results : .. . .. . And my question is if I run this code is not on my laptop but on the server and set more value of workers it will run faster than the CPython s version What are the advantages of threads ADD : And so I rewrite app with use original cpython s threads .. . .. . and result is .. . .. . And I think this is a very good result . I take as a standard nmap scanning time : .. . .. . And my question is now : how threads implemented in Eventlet as I can understand this is not threads but something special for Eventlet and why they dont speed up tasks Eventlet is used by many of the major projects like OpenStack and etc . But why Just do the heavy queries to a DB in asynchronous manner or something else Comment : as per my answer below try running this with 100 threads instead of 5 and modify to scan each socket 5 times . this workload might be more efficient under eventlet . you are not seeing the benefit with 5 threads . .. . Answer : Adding threads won t necessarily make a process faster as there is an overhead associated with the management of the threads which may outweigh any performance gain you get from the threads . If you are running this on a machine with few CPU s as opposed to one with many you may well find that it runs slower as it swaps each thread in and out of execution . There may be other factors at play as well . If the threads need access to some other subsystem or hardware that can t handle concurrent requests a serial-port for example then multithreading won t help you improve performance . Comment : I rewrite app with cpython s threading module and get real increase of speed . Comment : This a python-specific question .", "Question : null .. . Answer : I m using Django Celery Eventlet and dnspython to asynchronous parse about 500 rss feeds . Using dnspython causes lookup timed out error when I try to parse more than 20 feeds at the same time . When I uninstall dnspython all works great but I lose some time because dns lookups are blocking celery pool . Do you have any ideas how can it be fixed this is my celery-task code : .. . .. . I m using Ubuntu 12.04 LTS Comment : Can you reproduce the issue without Eventlet using threads Comment : Damn you Patrykw answer his question", "Question : I am looping over a list and performing some action on each member of the list . If a member takes too much time 1 sec in this case I intend to pass it . However the block inside the try statement is always being processed and is never timing out . I don t understand why . .. . Answer : Eventlet is a concurrent networking library.. . It s not clear what expr2bdd and satisfy all functions do but most likely they only do some CPU calculations and no disk network IO . In this case there is no point where Eventlet gets a chance to run and fire timeout exception . If you have control over expr2bdd and satisfy all functions and there are any kind of loops place eventlet.sleep 0 at each iteration . That s Eventlet idiom for yield control to other coroutines that s where timeout will be fired . If you don t have control over said functions second best option is to run them in a separate process which you can forcefully kill . On POSIX compatible OS e.g . Linux BSD OSX you can use os.fork to run a piece of code in separate process . For maximum portability use subprocess.Popen sys.executable .. . or multiprocessing.Process . The latter gives higher level API mainly around easier data exchange serialization at the cost of performance overhead which may be negligible in your case . In any case basic pattern is this : in a thread or eventlet coroutine you start a second process and then .communicate join on it . Use eventlet.Timeout or Thread.join with timeout . If timeout fires use p.terminate or p.kill to stop current calculations . Comment : They certainly don t do any disk network IO . expr2bdd is a function from a library called pyeda http : pyeda.readthedocs.org en latest used for boolean-algebra processing satisfy all is my wrapper around the satisfy all satisfy one function from the same library . I can look into the code for expr2bdd but want to avoid it . Can you suggest something else so that I can bypass the expr2bdd function whenever it s taking long time to process . Thanks for the reply . Comment : @Shivendra I ve updated the answer with second option if you can t change those functions . Good luck", "Question : We re using Twisted extensively for apps requiring a great deal of asynchronous io . There are some cases where stuff is cpu bound instead and for that we spawn a pool of processes to do the work and have a system for managing these across multiple servers as well - all done in Twisted . Works great . The problem is that it s hard to bring new team members up to speed . Writing asynchronous code in Twisted requires a near vertical learning curve . It s as-if humans just don t think that way naturally . We re considering a mixed approach perhaps . Maybe keep the xmlrpc server part and process-management in Twisted and implement the other stuff in code that at least looks synchronous to some extent while not being as such . Then again I like explicit over implicit so I have to think about this a bit more . Anyway onto greenlets - how well does that stuff work So there s Stackless and as you can see from my Gallentean avatar I m well aware of the tremendous success in it s use for CCP s flagship EVE Online game first hand . What about Eventlet or gevent Well for now only Eventlet works with Twisted . However gevent claims to be faster as it s not a pure python implementation but rather relies upon libevent instead . It also claims to have fewer idiosyncrasies and defects . gevent http : www.gevent.org It s maintained by 1 guy as far as I can tell . This makes me somewhat leery but all great projects start this way so.. . Then there s PyPy http : codespeak.net pypy dist pypy doc - I haven t even finished reading about that one yet - just saw it in this thread : Drawbacks of Stackless http : stackoverflow.com questions 588958 what-are-the-drawbacks-of-stackless-python . So confusing - I m wondering what the heck to do - sounds like Eventlet is probably the best bet but is it really stable enough Anyone out there have any experience with it Should we go with Stackless instead as it s been around and is proven technology - just like Twisted is as well - and they do work together nicely . But still I hate having to have a separate version of Python to do this . what to do... . This somewhat obnoxious blog entry hit the nail on the head for me though : Asynchronous IO for Grownups http : teddziuba.com 2010 02 eventlet-asynchronous-io-for-g.html I don t get the Twisted is being like Java remark as to me Java is typically where you are in the threading mindset but whatever . Nevertheless if that monkey patch thing really works just like that then wow . Just wow Comment : Can you comment further on what you mean by MySQL not being good for OLTP Comment : I took that out as it wasn t relevant to the rest of the article . But what makes it poor is abysmal support for views slow triggers and stored-procedures a rather primitive query optimizer and difficult to decipher not enough info for query plans no plans available for updates deletes inserts either . Requires indexes on all foreign key columns often resulting in so many useless indexes that you end up having to simply not implement foreign-keys at all to avoid severe performance degradation . I could go on and on.. . Comment : Twisted is one of the best known Python libraries . How would switching to way more obscure projects help anyone get up to speed faster Comment : Why are callbacks an issue with Twisted Doesn t @inlineCallbacks solve the problem of callbacks convoluting the code Comment : +1 to @inlineCallbacks . That is the answer for human issues . But make sure your kids understand generators first otherwise they ll never get it . .. . Answer : Gevent isn t pure Python and it strictly depends on CPython . From web frameworks you mentioned Eventlet http : eventlet.net OpenStack and Tornado http : tornadoweb.org FriendsFeed Quora has the biggest deploy .", "Question : I try to set up a minimal Flask application that uses eventlet http : eventlet.net to respond to concurrent requests instantly instead of blocking and responding to one request after the other as the standard Flask debugging webserver does . Prerequisites : .. . .. . From my understanding by what I found so far on the internet it should work like this : .. . .. . When running this file then opening http : localhost : 5000 longTask in a webbrowser tab and while it is still processing opening another tab with http : localhost : 5000 shortTask I would expect the second tab to return immediately while the first tab is still loading . However similar to when running this on the standard Werkzeug server the second tab only returns just after the first one is finished after 30s . What is wrong here By the way would this be what is commonly referred to as a production ready webserver for Flask given that there are only few concurrent users to be expected 5 at most By the way when I use the Flask-socketio library http : flask-socketio.readthedocs.org en latest to run the webserver which according to the documentation automatically chooses eventlet if it is installed then it works as expected . Complete example with Flask-socketio : .. . Answer : When you run app.run debug True you are explicitly telling Flask to run your application on the development web server which is based on Werkzeug . It does not matter that you have loaded eventlet . If you want to run your application on the eventlet web server you have to start an eventlet web server which according to the documentation http : eventlet.net doc modules wsgi.html highlight wsgi is started as follows : .. . .. . This is more or less what socketio.run does in my Flask-SocketIO extension with a little bit more complexity to optionally handle SSL . The lines-of-code that do this are : https : github.com miguelgrinberg Flask-SocketIO blob 539cd158f49ce085151911cb63edbacd0fa37173 flask-socketio init .py L391-L408 https : github.com miguelgrinberg Flask-SocketIO blob 539cd158f49ce085151911cb63edbacd0fa37173 flask-socketio init .py L391-L408 . If you look around those lines you will see that there are three different start up chunks of code one for werkzeug one for eventlet and one for gevent . They are all different . Comment : Excellent Having to pass the Flask app object to the wsgi.server command was not clear to me from the example in the eventlet docs so this Flask-based example was very helpful .", "Question : I am using Python requests in celery workers to make large number of 10 sec API calls includes GET POST PUT DELETE . Each request takes around 5-10s to complete . I tried running celery workers in eventlet pool with 1000 concurrency . Since requests are blocking process each concurrent connection is waiting on one request . How do I make requests asynchronous .. . Answer : from the docs http : docs.python-requests.org en latest user advanced asynchronous-requests : .. . .. . there are lots of projects out there that combine Requests with one of Python s asynchronicity frameworks . Two excellent examples are grequests https : github.com kennethreitz grequests and requests-futures . https : github.com ross requests-futures .. . .. . for eventlet specifically you can use erequests http : github.com saghul erequests . Comment : Does grequests work with eventlet Comment : there s this too - github.com saghul erequests https : github.com saghul erequests Comment : Please Edit the answer to include this link so that I can accept it Comment : @Maddy - edited .", "Question : When I hear about multithreaded programming I think about the opportunity to accelerate my program but it is not and results : .. . .. . And my question is if I run this code is not on my laptop but on the server and set more value of workers it will run faster than the CPython s version What are the advantages of threads ADD : And so I rewrite app with use original cpython s threads .. . .. . and result is .. . .. . And I think this is a very good result . I take as a standard nmap scanning time : .. . .. . And my question is now : how threads implemented in Eventlet as I can understand this is not threads but something special for Eventlet and why they dont speed up tasks Eventlet is used by many of the major projects like OpenStack and etc . But why Just do the heavy queries to a DB in asynchronous manner or something else Comment : as per my answer below try running this with 100 threads instead of 5 and modify to scan each socket 5 times . this workload might be more efficient under eventlet . you are not seeing the benefit with 5 threads . .. . Answer : Using the threading or multiprocessing modules enables you to use the multiple cores that are prevalent in modern CPUs . This comes with a price added complexity in your program needed to regulate access to shared data especially writing If one thread was iterating over a list while another thread was updating it the result would be undetermined . This also applies to the internal data of the python interpreter . Therefore the standard cpython has an important limitation http : wiki.python.org moin GlobalInterpreterLock with regard to using threads : only one thread at a time can be executing python bytecode . If you want to paralellize a job that doesn t require a lot of communication between instances multiprocessing and especially multiprocessing.Pool is often a better choice than threads because those jobs run in different processes that do not influence each other . Comment : This is a python-specific question . The Global Interpreter Lock means this isn t true .", "Question : We have an existing project using Eventlet module . There is a server handling client request using green-threads . All the requests are handled by a single user User A .. . .. . I now need to change this to do a setfsuid setfsgid on the threads so that the underlying files are all created with the ownership of the requesting user only . I understand that I need setid Linux capability to make the setfsid calls . But will setfsid calls work with green-threads like they do with the native threads By reading through various texts over the net regarding green-threads I couldn t gather much : .. . Answer : All green-threads are executed from one OS thread . To kernel it looks like your whole Python program only has one thread . If you need separate filesystem ids for each request start a separate OS thread call setfsuid in it and execute required filesystem calls in it . Comment : Which also would mean only one user can be served at any given time . Comment : @mittal because you have only one OS thread but with several users at a time there are several green-threads using the same UID set for that single OS thread . Comment : @mittal If you end up starting an OS thread for each green thread then green-threads don t work for your purpose . Comment : @mittal the patcher.original is used to reliably get original threading module even if you used eventlet monkey patching to replace standard-library modules with greened versions . You can still handle network in green-threads but access filesystem from OS threads . Indeed this means that green-threads don t work for your purpose . Comment : It s possible but then you have OS threads as bottleneck so the only reason to have green-threads in first place is if you have other requests that don t require setfsuid . If all requests require setfsuid then having green-threads and OS threads only adds cognitive load at no profit ." ] }
[ "yes-answer-long", "yes-answer-short" ]
scalability
UNK_RELATION
libgdx@java@38
libgdx -- libgdx is a cross-platform @placeholder game development framework based on opengl-es that works on windows linux mac os x android ios and your webgl enabled browser .
{ "confidence": [ 51.60655975341797, 48.88538360595703, 47.29892349243164, 46.467185974121094, 46.130855560302734, 45.862030029296875, 45.15824508666992, 44.948486328125, 44.22252655029297, 43.52244567871094, 43.438140869140625, 43.438140869140625, 43.366004943847656, 42.509456634521484, 42.25147247314453, 42.089805603027344, 42.006526947021484, 41.83706283569336, 41.48754119873047, 41.07655334472656, 41.06358337402344, 40.872337341308594, 40.872337341308594, 40.7938346862793, 40.697723388671875, 40.654693603515625, 40.447418212890625, 40.39117431640625, 40.39117431640625, 40.358924865722656, 40.28486633300781, 40.22539520263672, 40.05474853515625, 40.05474853515625, 39.94221496582031, 39.87030792236328, 39.76720428466797, 39.731956481933594, 39.690738677978516, 39.640350341796875, 39.52635955810547, 39.4510612487793, 39.405364990234375, 39.355377197265625, 39.30865478515625, 39.206478118896484, 39.105072021484375, 38.85596466064453, 38.741973876953125, 38.570987701416016, 38.498313903808594, 38.41851043701172, 38.383399963378906, 38.33024978637695, 38.33024978637695, 38.29566955566406, 38.29566955566406, 38.29566955566406, 38.29566955566406, 38.29566955566406, 38.29566955566406, 38.29566955566406, 38.26413345336914, 38.113651275634766, 38.113651275634766, 38.113651275634766, 38.113651275634766, 38.113651275634766, 38.113651275634766, 38.113651275634766, 38.113651275634766, 38.086265563964844, 38.043701171875, 37.94750213623047, 37.694671630859375, 37.68086624145508, 37.67536926269531, 37.652854919433594, 37.54487609863281, 37.51128005981445, 37.51128005981445, 37.51128005981445, 37.51128005981445, 37.390716552734375, 37.329261779785156, 37.329261779785156, 37.239280700683594, 37.23151779174805, 37.23143768310547, 37.23143768310547, 37.223411560058594, 37.16993713378906, 37.04140853881836, 37.02949523925781, 37.00019073486328, 36.945655822753906, 36.78487014770508, 36.694007873535156, 36.62584686279297 ], "content": [ "I am making a platform game in Libgdx framework .", "The shaders in Libgdx are just OpenGL ES shaders so any collection of OpenGL ES or OpenGL generally shaders should be adaptable to Libgdx https : github.com libgdx libgdx wiki Shaders .", "Error says Libgdx requires OpenGL ES 2.0 .", "Note that libgdx is NOT a game-engine rather a game framework .", "I am developing a game using libgdx framework .", "I developed a nice game with libgdx + java for android as target-platform .", "I have a cross-platform application built with libgdx .", "I have developed this game using Libgdx framework .", "I m developing a strategy game for Android using libGDX .", "How am I supposed to achieve this in libgdx using OpenGL ES", "Am currently making a game in LibGDX for Android .", "I m building a little Android game using libgdx .", "I ve created a isometric tile based game in Libgdx .", "I am working on an android app which is based on libgdx framework .", "Using Box2D in Libgdx Game http : rotatingcanvas.com using-box2d-in-libgdx-game-part-i this tutorial showes you how to create a game with box2D and libgdx .", "In Libgdx the Gdx.gl10 object is the wrapper for the OpenGL 1.x API .", "And second game was created on libgdx .", "there is no android buildToolsversion this is libgdx", "becuase its libgdx framework .", "I have been using both and my conclusion is : .. . .. . libgdx is more organized and easy to understand framework than andEngine as regards object oriented concept .. . libgdx is more efficient .. . there are lots of goods tutorial about libgdx .. . libgdx is cross-platform .. . and the most important libgdx is much faster", "Hiero instructions here : github.com libgdx libgdx wiki Hiero https : github.com libgdx libgdx wiki Hiero", "I am developing a game in libgdx .", "I made a game using libGDX .", "Now the problem libgdx is cross-platform which is good for testing .", "Recently I decided to make a new game and give that chance to libgdx framework .", "This answer is for vanilla Android not Libgdx .", "I am trying to port libgdx code to iOS platform .", "I ve been searching online for hours and I m new to LibGDX game development .", "I suggest you to read Learning libGDX Game Development .", "github.com libgdx libgdx wiki https : github.com libgdx libgdx wiki Managing-your-assets creating-an-assetmanager", "The wiki entry may help : github.com libgdx libgdx wiki Managing-your-assets https : github.com libgdx libgdx wiki Managing-your-assets .", "I am new in LibGDX development .", "I am trying to make a game on android using libgdx .", "Hi I am developing LibGDX kind of rhythm game on android .", "github.com libgdx libgdx commit https : github.com libgdx libgdx commit 94559d6b1d382028ad8599271a1fa91c04599651", "Is there a better way on Android or LibGDX", ": github.com libgdx libgdx wiki Scene2d.ui label https : github.com libgdx libgdx wiki Scene2d.ui label github.com libgdx libgdx wiki Bitmap-fonts https : github.com libgdx libgdx wiki Bitmap-fonts", "This is a recent LibGDX bug https : github.com libgdx libgdx issues 4183 .", "LibGDX works with OpenGL ES for graphics and also supports importing models which are created with a plugin for Blender 3D .", "I have a problem with Libgdx framework .", "I m really new to Android App development LibGDX but very familiar with Java .", "And if so might it be included in some way in game development libraries like libgdx", "This will allow libgdx to run as software openGL mode .", "I am trying to port my game from Android to iOS using LibGDX + RoboVM .", "I have android game using libgdx framework .. . .. . on Google Play store there are report : .. . .. . what I can do", "I am using the TextureAtlas in my LibGdx based game .", "As libgdx creates multiple-projects core android ios etc .", "I am using the Libgdx framework", "I m new to Libgdx Box2d and generally to Android development so the help is appreciated .", "I am about to develop a Game with network capabilities using libGDX and Kryonet for both Android and iOS .", "Libgdx works well .", "I have working on libGDX and use Box2D https : github.com libgdx libgdx wiki Box2d for simple 2D physic interactions inside my game .", "I have no real experience ith scene2d but these 2 reads have your answer : github.com libgdx libgdx wiki Scene2d.ui wiki-Button https : github.com libgdx libgdx wiki Scene2d.ui wiki-Button github.com libgdx libgdx wiki Skin https : github.com libgdx libgdx wiki Skin", "I m an android developer building my first game using LibGDX .", "I am a newbie to both android game develop and libGdx .", "In my libgdx game I have multiple screens .", "I am making a racing game using Libgdx .", "I m making a game with Java and Libgdx scene2d .", "My problem is with the Game rendering and the FitViewport on libgdx .", "I am creating game with Libgdx and Overlap2d .", "I just started creating a game using libgdx .", "I am using LibGDX to create a game .", "I m developing for plain Android but I think about using the LibGDX framework .", "github.com libgdx libgdx wiki Universal-Tween-Engine https : github.com libgdx libgdx wiki Universal-Tween-Engine", "It s all explained here : github.com libgdx libgdx wiki Scene2d https : github.com libgdx libgdx wiki Scene2d", "Check this : github.com libgdx libgdx wiki Texture-packer https : github.com libgdx libgdx wiki Texture-packer", "See github.com libgdx libgdx pull 3347 https : github.com libgdx libgdx pull 3347", "See also github.com libgdx libgdx wiki Material-and-environment https : github.com libgdx libgdx wiki Material-and-environment", "More info on scene2d here : github.com libgdx libgdx wiki Scene2d https : github.com libgdx libgdx wiki Scene2d", "github.com libgdx libgdx wiki https : github.com libgdx libgdx wiki -- check the Input Handling sections .", "As for dispose have a look at : github.com libgdx libgdx wiki Memory-management https : github.com libgdx libgdx wiki Memory-management", "Check the gdx-invaders example https : github.com libgdx libgdx-demo-invaders to see how it uses Mesh OpenGL and SpriteBatch .", "As far as I know Libgdx will switch to Multi-OS engine as the default iOS backend for newly created libGDX projects in the next couple of weeks .", "I saw this thread comment on 2D engines at stackoverflow : 2D Cross-Platform Game Development Engines http : stackoverflow.com questions 17584717 2d-cross-platform-game-development-engines .. . .. . I am interested in LibGdx Java and Citrus Engine Action Script .", "I trying to learn libgdx I install all the software listed here https : github.com libgdx libgdx wiki Setting-up-your-Development-Environment- 28Eclipse 2C-Intellij-IDEA 2C-NetBeans 29 with a new Eclipse 4.3 on a fresh formated mac osx Maverick .", "@noone You re right about OpenGL and Libgdx .", "https : github.com libgdx libgdx wiki Managing-your-assets", "I ve been following the Libgdx tutorial here http : obviam.net index.php getting-started-in-android-game-development-with-libgdx-create-a-working-prototype-in-a-day-tutorial-part-1 and I m running into a strange problem .", "Additionally since WebGL http : en.wikipedia.org wiki WebGL is also based on OpenGL ES WebGL shaders should be applicable .", "I am working on a game project using LibGDX .", "I am developing a little game using libgdx .", "I m writing a game with LibGDX and Box2DLights for lighting .", "I d like to create a btConvexHullShape for my game with libgdx .", "I try to draw simple text in my android game on libgdx but it s look sharp .", "github.com libgdx libgdx issues 4117 https : github.com libgdx libgdx issues 4117", "github.com libgdx libgdx wiki Gdx-freetype https : github.com libgdx libgdx wiki Gdx-freetype", "The example in the libgdx documentation Integrating libgdx and the device camera https : github.com libgdx libgdx wiki Integrating-libgdx-and-the-device-camera uses an Android surface view that is below everything to draw the image on with GLES 1.1 .", "I directly downloaded the garuda.tff font from the libGDX directory https : github.com libgdx libgdx tree master tests gdx-tests-android assets data .", "https : github.com libgdx libgdx wiki File-handling", "https : github.com libgdx libgdx wiki Take-a-Screenshot", "I started porting my LIBGDX appliction to IOS .", "packtpub.com learning-libgdx-game-development book http : www.packtpub.com learning-libgdx-game-development book Pm I have done games in just java for desktop and also a few andengine books .", "Based on this https : github.com libgdx libgdx issues 2393 the problem is because natives aren t loaded before creating shape .", "See this libgdx wiki link https : github.com libgdx libgdx wiki Managing-your-assets for more information .", "I m working on moving vehicle based on Box 2d physics for my Android game Java + LibGDX .", "Is there a built-in in libGDX for this", "I am trying to run this http : appwarp.shephertz.com game-development-center java-multiplayer-libgdx-tutorial demo which is a simple libgdx game implementing the AppWarp multi player API but it doesn t work .", "I followed the official documentation https : github.com libgdx libgdx wiki Google-Play-Game-Services-in-LibGDX but it was very confusing as a newbie .", "@user824294 just edit the answer just need to be acceptada by the author or some moderator but you can look at this github.com libgdx libgdx wiki Gdx-freetype https : github.com libgdx libgdx wiki Gdx-freetype" ] }
{ "confidence": [ 70.43761444091797, 65.95223999023438, 63.293235778808594, 59.28026580810547, 57.88252258300781, 57.808837890625, 55.237876892089844, 54.82858657836914, 54.472469329833984, 54.33973693847656, 54.23567199707031, 54.15950012207031, 54.046424865722656, 53.98374557495117, 53.91619873046875, 53.55990982055664, 53.20742416381836, 53.10931396484375, 52.81095504760742, 52.608306884765625 ], "content": [ "Question : I am coming from an XNA background and it was really cool to re-use shaders that other people made . There was a really cool bloom shader that was available and easy to reuse . Is there an official or are there any unofficial collections of reusable shaders for water normal mapping or other cool effects Comment : Not That i know of . But you can add shader yourself . Take a look at github.com libgdx libgdx wiki Shaders https : github.com libgdx libgdx wiki Shaders .. . Answer : The shaders in Libgdx are just OpenGL ES shaders so any collection of OpenGL ES or OpenGL generally shaders should be adaptable to Libgdx https : github.com libgdx libgdx wiki Shaders . Additionally since WebGL http : en.wikipedia.org wiki WebGL is also based on OpenGL ES WebGL shaders should be applicable . See https : www.shadertoy.com or http : glsl.heroku.com for some lightly organized examples . In practice I ve found that the inputs to the shaders need to be adapted to my specific structures but the core of the shader can be developed in WebGL and ported to Libgdx easily . Comment : Thanks perfect answer it seems like I will have the ability to pull off whatever effect I can handle with libgdx then", "Question : I saw this thread comment on 2D engines at stackoverflow : 2D Cross-Platform Game Development Engines http : stackoverflow.com questions 17584717 2d-cross-platform-game-development-engines .. . .. . I am interested in LibGdx Java and Citrus Engine Action Script . What would you choose Comment : I am only asking for a recommendation and there exists guys that are judging you and can up and down your points... . thank for the one who answer me because i won a contest and I am travelling to USA .. . Answer : I can only talk for LibGDX but I can honestly say that it is the best game-engine I ve used so far . Let it be features ease of use or active community LibGDX has it all . It supports a lot of platforms like Desktop iOS Android and others . It s really fast and supports both 2D and 3D as well as sound and physics engines which are included Box2D and bullet physics . There are tools like a particle editor loaders for several map editors and UI skins . Join the official channel libgdx on freenode IRC http : libgdx.badlogicgames.com community.html if you have any questions and have a look at this trend http : www.google.com trends explore q libgdx .", "Question : I ve been trying to get the Hello-World project to run as part of learning LibGDX . Using the Nightly Build libgdx-nightly-20140322 . However I have become quite frustrated because the hello-world-desktop project will work when run as a Java Application the hello-world-html project will Run As a Web Application . But hello-world-android simple produces a not very descriptive error : .. . .. . image of LibGDX failure in Android emulator http : i.stack.imgur.com ZosOS.png .. . .. . I have checked on here looking for similar problems and found Android Emulator does not launch LibGDX project http : stackoverflow.com questions 10972035 android-emulator-does-not-launch-libgdx-project but the solution given does not work with what I have . There was also libgdx my first triangle tutorial not working http : stackoverflow.com questions 10970039 libgdx-my-first-triangle-tutorial-not-working which pointed me to new tutorials to try but no avail . The first time I attempted to follow the tutorial on GITHUB https : github.com libgdx libgdx wiki Project-setup -running- -debugging and the second time Games from Scratch s LibGDX Tutorial 1 : Creating an initial project http : www.gamefromscratch.com post 2013 09 19 LibGDX-Tutorial-1-Creating-an-initial-project.aspx . I have tried different API Levels 8 13 16 19 . Here is the dump of the logfile : Comment : Are you running your app in emulator or real device If emulator then please run it on device . Comment : Why doesn t the emulator work Comment : Error says Libgdx requires OpenGL ES 2.0 . Your emulator does not support OpenGL ES 2.0 Comment : possible duplicate of Android Emulator does not launch LibGDX project http : stackoverflow.com questions 10972035 android-emulator-does-not-launch-libgdx-project .. . Answer : As @Sid notes in the comments the error says LibGDX requires OpenGL ES 2.0 support . The emulator s software renderer does not support OpenGL ES 2.0 . You may be able to get your emulator to support by enabling graphics acceleration in the emulator . See http : developer.android.com tools devices emulator.html accel-graphics and Android OpenGL ES 2.0 emulator http : stackoverflow.com questions 8941016 android-opengl-es-2-0-emulator .. . .. . Here is the Android Virtual Device Manager dialog with the setting highlighted . Enabling this definitely solves the problem on a Macbook Air and likely many other computers . Click Use Host GPU http : i.stack.imgur.com aVvOp.jpg Comment : also fixes problem in linux", "Question : I am creating a game using Libgdx and would like to integrate player Leaderboard high score on both iOS and Android devices . Ideally I would use Google Play Game Services but I could be convinced to use other technologies like Parse . There are tutorials to use Google Play services for Android devices : http : theinvader360.blogspot.co.uk 2013 10 google-play-game-services-tutorial-example.html . But as far as I understand this will not work for iOS devices according to this : https : developers.google.com games services integration .. . .. . There are also tutorials to do so on iOS devices using RoboVM : http : www.badlogicgames.com forum viewtopic.php f 11 t 11424 http : www.badlogicgames.com forum viewtopic.php f 11 t 11424 but as far as I understand this will only work for iOS devices . Since one of libgdx benefit is to write once but to run cross platforms my Question is the following : How do I integrate with Google Play Game Services and run on iOS and Android . It seems to me that the answer is to use the REST API https : developers.google.com games services web-api since this is technologically agnostic but that means that I then need to implement quite a few things login notifications.. . .. . .. . I cannot imagine I am the first one to be facing this but it seems there are no examples available on the subject . .. . Answer : You don t have to use the REST API for this even though that would certainly be an option . The easier way is the use of platform specific code via interfacing https : github.com libgdx libgdx wiki Interfacing-with-platform-specific-code . Everything that is not directly integrated into libGDX won t work via write once run everywhere . This also applies to achievements leaderboards and other things that Google Play Game Services offer . However you are lucky that GPGS unites these features within one framework for at least Android iOS and Web . So what you would do is adding the platform specific library dependencies to the platform specific projects you have generated . Then implement a generic interface e . g . AchievementHandler with methods like unlockAchievement String achievementId . Then you would implement this interface via AndroidAchievementHandler that makes use of GPGS . The same will work with an IOSAchievementHandler . In your core code you will only use AchievementHandler and each platform will use its own implementation of this .", "Question : I want to implement Unity ads into Android game which is created with Libgdx engine . I searched for solutions on net but i didn t find anything useful so every help is welcome : Code samples links with explanations.. . .. . Answer : Unity provides instructions on integrating Unity ads into any Android application built-in the Eclipse IDE here http : unityads.unity3d.com help monetization integration-guide-android . Unity ads are not specific to a specific graphics application framework so they should work with the provided instructions for any Android app . You might have to wrap your LibGDX in a bit of native Android UI using the second answer here http : gamedev.stackexchange.com questions 57702 libgdx-with-android-ui . Comment : I already saw this links . Unity s Integration guide is for native Android and not for cross-platform engine . I also find some instructions for adding Admob ads in Libgdx and i know that i need to do something like that for Unity ads so i would like to find some instructions for that .", "Question : As a student in a software development class I have been assigned to be part of a group project . Naturally our 4 man group decided to make a game . I suggested LibGDX and got a team member to try it however when he tried to import the LibGDX project I created in Windows into eclipse on his linux computer it gave him the could not find sdk message . The build was trying to use the SDK path that I had specified in my own windows computer . Is it possible to have multiple members on different platforms develop with LibGDX . Please let me know if this is not possible I have already invested multiple days learning how to develop with LibGDX and hope that there is some way to develop with windows and linux . .. . Answer : Our team work with libgx projects on MAC Linux and Windows without any problems . Of course you must properly install Android SDK and JDK in every environment all other dependencies gradle will download for you . I recommend you to use git http : en.wikipedia.org wiki Git software for effective team work . You can create remote repositories for free on github https : github.com or bitcucket http : bitbucket.org . About IDE I personally prefer to work with Eclipse but I know lots of people who works with libgdx in IntelliJ . You should just choose what is more comfortable for you . P.S In order to fix error with SDK your friend got in Linux look at this answer : Importing gradle project android error http : stackoverflow.com questions 23983221 importing-gradle-project-android-error 23983607 23983607 Comment : I found out that the local properties had the location of my sdk directory however it is not the same location in linux and windows . We are using svn for our version-control . I would prefer using git but our professor wants us to use his svn repo so he can grade and oversee the groups projects easier.. . :", "Question : I ve been trying to get the Hello-World project to run as part of learning LibGDX . Using the Nightly Build libgdx-nightly-20140322 . However I have become quite frustrated because the hello-world-desktop project will work when run as a Java Application the hello-world-html project will Run As a Web Application . But hello-world-android simple produces a not very descriptive error : .. . .. . image of LibGDX failure in Android emulator http : i.stack.imgur.com ZosOS.png .. . .. . I have checked on here looking for similar problems and found Android Emulator does not launch LibGDX project http : stackoverflow.com questions 10972035 android-emulator-does-not-launch-libgdx-project but the solution given does not work with what I have . There was also libgdx my first triangle tutorial not working http : stackoverflow.com questions 10970039 libgdx-my-first-triangle-tutorial-not-working which pointed me to new tutorials to try but no avail . The first time I attempted to follow the tutorial on GITHUB https : github.com libgdx libgdx wiki Project-setup -running- -debugging and the second time Games from Scratch s LibGDX Tutorial 1 : Creating an initial project http : www.gamefromscratch.com post 2013 09 19 LibGDX-Tutorial-1-Creating-an-initial-project.aspx . I have tried different API Levels 8 13 16 19 . Here is the dump of the logfile : Comment : Are you running your app in emulator or real device If emulator then please run it on device . Comment : Why doesn t the emulator work Comment : Error says Libgdx requires OpenGL ES 2.0 . Your emulator does not support OpenGL ES 2.0 Comment : possible duplicate of Android Emulator does not launch LibGDX project http : stackoverflow.com questions 10972035 android-emulator-does-not-launch-libgdx-project .. . Answer : Thanks . I have a Samsung Galaxy S-III G4 so I ve just installed Kies from Samsung http : downloadcenter.samsung.com content SW 201402 20140221104324625 KiesSetup.exe and that s appears to have covered the drivers . I followed the HowTo Run an android application in a mobile device https : www.youtube.com watch v TXojre lOag and the LibGDX Hello-World app works on my device .", "Question : I am currently developing a small multiplatform game with libGDX . The game works great on Windows Android and OSX but I can t make it compile for iOS . The libGDX guide for iOS http : code.google.com p libgdx wiki IOSWIP states a couple of caveats but I m pretty sure I have taken everything into account . I have Eclipse Xamarin.iOS JDK Ant and PATH IKVM HOME is set as they should . The gamename.dll which is the Mono compiled dll that contains all my game logic and is automatically generated from the Java code has been created and everything looks to be in order . When compiling however I get the following error message : .. . .. . Paths abbreviated a little bit for brevity . These arguments are automatically generated by libGDX when creating the iOS project and looks like this in Xamarin s project settings : .. . .. . The build output contains this : .. . .. . libObjectAL is one of the referenced dlls that was added automatically by libGDX when creating the project . I assume this means that there is something wrong with my settings but I can t find anything that looks like it is related . Any ideas EDIT : After adding the framework suggested by poupou I now get a slightly different error message : EDIT1b : No it s actually the same . The only difference are the arguments . .. . Answer : One of your native libraries libObjectAL from your logs requires the AVFoundation framework to be linked with your application . Note : you can somewhat guess this from the AV prefix of the types that were not found . Solution : Add -framework AVFoundation to your -gcc flags and rebuild your application . Comment : Thanks that s probably a step the right direction but I now get i686-apple-darwin11-llvm-g++-4.2 : AVFoundation : No such file or directory instead . I assume this means that I need to include AVFoundation in the Xamarin solution somewhere but I can t figure out where it is nor how to add it . Comment : It must be inside your -gcc flags since it s a directive you re giving to the native Apple linker . OTOH I made a typo fixed it should have been -framework AVFoundation not --framework AVFoundation only one - . Comment : Thanks but it seems to make no difference see my edit in the original post . The error message seems to be identical but I can see that -framework AVFoundation is now added at the end of the first line . Note however that it looks like this framework is already included if you scroll horizontally to a little bit before the center -framework AVFoundation is there already together with a lot of other frameworks . Comment : Can you pastebin and add a link-to your complete build log Comment : Yep here it is : pastebin.com xVwQ3cWX http : pastebin.com xVwQ3cWX The first part is a libGDX script that builds the Mono-dll . Up to the last Writting method I believe .", "Question : Has any one got recommendations technical functional or otherwise for one of these game engines over the other I ve worked through a couple of tutorials for each of them and they both seem pretty functional but at this point I don t know enough about either of them to make a decision either way . I think either of them will require a fairly large number of hours invested in learning the engine so I m keen to try and pick one I ll be wanting to stick with . So far it seems that AndEngine is slightly more popular but libgdx has the ability to run games on the desktop which seems a pretty big advantage.. . I guess also I m fairly new to android development and am finding it a bit of a struggle - is one of these significantly easier than the other Comment : Here more information about libgdx vs andengine thegreystudios.com blog p 30 http : thegreystudios.com blog p 30 Comment : AndEngine is really cool but the lack of proper documentation makes it a bit hard to use at times . .. . Answer : Simply I can tell you that libgdx is much better than andEngine . I have been using both and my conclusion is : .. . .. . libgdx is more organized and easy to understand framework than andEngine as regards object oriented concept .. . libgdx is more efficient .. . there are lots of goods tutorial about libgdx .. . libgdx is cross-platform .. . and the most important libgdx is much faster You dont need anymore emulator to test your games Hope this can help people to decide .", "Question : I am trying to port my game from Android to iOS using LibGDX + RoboVM . RoboVM is set up successfully and I can test in an iPhone simulator . I tried to follow the instructions on this website : Khela Interactive http : webcache.googleusercontent.com search q cache : ybefSRltnwMJ : www.khelainteractive.com porting-libgdx-game-iphone-via-robovm-part-2 20 cd 4 hl en ct clnk gl nl . However I cannot find the libs iOS folder and robovm.xml . How do I set up FreeType for iOS development .. . Answer : I found it . In Project Gradle under iOS - dependencies add :", "Question : I ve been testing with AndEngine for months but still haven t produced any game prototypes . There are few reasons why I want to switch to libgdx : .. . .. . - AndEngine is using libgdx s INI wrapper for Box2d but updates reach Andengine slowly - I m primarily targeting Android but having option for easy porting to other platforms could come handy - Documentation AndEngine has absolutely no documentation except for examples . - I would like to get as high performance as possible and that seems easier on libgdx . Few things I am concerned about libgdx is that I will need to write lower level code and that development for full game will take longer But then again sometimes I lost few days to understand how some parts of AndEngine work so is it possible that I ll even write code faster with libgdx since it s fully documented What should I be aware about libgdx before switching What is main difference when coding game and designing code .. . Answer : You should be aware of the following things : .. . .. . 1 . It is more performant thats a fact and widely known . Libgdx uses native-code for the more difficult tasks . 2 . Development on it is very fast I dont get why some people say it takes a lot of lines to do simple tasks thats simply not true . The library is very high level with the possibility of programming as low-level as you would need . Especially the ability to test on desktop immediately instead of waiting for the app to deploy to an android device or worse.. . the emulator . That makes the development time way faster . 3 . The library gives a lot of freedom you can make the things as you want it . For example I made a template that I use for every new game that makes things even faster for me . 4 . You dont have to know opengl androidsdk or lwjgl actually you just need to know the abstractions of the library . But you can make platform specific code if needed . And thats well documented . 5 . complementing P.T . point libgdx has a wrapper for box2d physics and bullet 3d physics which are pretty easy to use except bullet : S nah kidding . And I would say the new 3d api is almost complete not much will-change for the next stable release I even read on irc that it is pretty much done . I use it and can tell you its very easy to use . In conclusion Libgdx is a very fast library to develop on . Its very performant and complete . Has a good and helping community plus great documentation . I would recommend you to change :", "Question : In the past few days I ve been porting my game Apopalypse http : lostsourcestudios.com games.php to the Android Mobile platform . I ve did a quick search on Google of sprite touch detection but didn t find anything helpful . Each balloon will pop once touched and I just need to detect if it s touched . Here s my balloon spawning code : .. . .. . Rendering x y width and height are randomized : .. . .. . Spawning in main game class : Comment : What have you tried Have you read the wiki github.com libgdx libgdx wiki https : github.com libgdx libgdx wiki -- check the Input Handling sections . .. . Answer : You could add a tiny 1x1 pixel rectangle to your mouse and check if it intersects or contains other boxes . You do need to use boxes for all your objects you want to make clickable this way .", "Question : In the past few days I ve been porting my game Apopalypse http : lostsourcestudios.com games.php to the Android Mobile platform . I ve did a quick search on Google of sprite touch detection but didn t find anything helpful . Each balloon will pop once touched and I just need to detect if it s touched . Here s my balloon spawning code : .. . .. . Rendering x y width and height are randomized : .. . .. . Spawning in main game class : Comment : What have you tried Have you read the wiki github.com libgdx libgdx wiki https : github.com libgdx libgdx wiki -- check the Input Handling sections . .. . Answer : You have Gdx.input.getX and Gdx.input.getY . The X and Y coordinates of the last touch . Just compare them with balloon frame .", "Question : I ve been testing with AndEngine for months but still haven t produced any game prototypes . There are few reasons why I want to switch to libgdx : .. . .. . - AndEngine is using libgdx s INI wrapper for Box2d but updates reach Andengine slowly - I m primarily targeting Android but having option for easy porting to other platforms could come handy - Documentation AndEngine has absolutely no documentation except for examples . - I would like to get as high performance as possible and that seems easier on libgdx . Few things I am concerned about libgdx is that I will need to write lower level code and that development for full game will take longer But then again sometimes I lost few days to understand how some parts of AndEngine work so is it possible that I ll even write code faster with libgdx since it s fully documented What should I be aware about libgdx before switching What is main difference when coding game and designing code .. . Answer : Both P.T . and Lestat make very good points in their answers . But for me I think there is just one thing that you need to know about libgdx which is simply that libgdx is a toolkit not an engine or framework . This one fact means that you are not locked in to a particular way of doing things . If you want a micro-framework write one with libgdx . If you want to write Unity 2D write it with libgdx . If you want to put everything in one file throwing object oriented principles to the wind you can do that with libgdx . It helps that it is well documented . It helps that it is fast . It helps that it has a strong knowledgeable community . It helps that the source code is available and is well-written . It helps that it comes with examples . It helps that it is a platform abstraction-layer so the same code will run on multiple platforms . It helps that it is actively developed . But fundamentally it is a toolkit albeit an excellent one . What you choose to do with that toolkit is up to you .", "Question : In the past few days I ve been porting my game Apopalypse http : lostsourcestudios.com games.php to the Android Mobile platform . I ve did a quick search on Google of sprite touch detection but didn t find anything helpful . Each balloon will pop once touched and I just need to detect if it s touched . Here s my balloon spawning code : .. . .. . Rendering x y width and height are randomized : .. . .. . Spawning in main game class : Comment : What have you tried Have you read the wiki github.com libgdx libgdx wiki https : github.com libgdx libgdx wiki -- check the Input Handling sections . .. . Answer : in your class having the render method use can do following code", "Question : I just want to know that in the long run using which of these engines will be better . Although I feel that using Cocos2D will be a better option as it can also be used for iphone developement there s just 1 tutorial http : dan.clarke.name 2011 04 how-to-make-a-simple-android-game-with-cocos2d which I ve found so far . libgdx on the other hand has a complete book . Any suggestions Comment : I recommend you AndEgine . It is easy to learn and good documented engine . For example market.android.com https : market.android.com details id com.bestcoolfungamesfreegameappcreation.bunnyshooter and market.android.com details id org.anddev.farmtower.eco https : market.android.com details id org.anddev.farmtower.eco are done with AndEgine . Check andengine.org http : www.andengine.org for more details and code.google.com p andengineexamples source browse http : code.google.com p andengineexamples source browse hg 2Fsrc 2Forg 2Fanddev 2Fandengine 2Fexamples for examples . Comment : Thanks Greg but I was thinking that since using Cocos2d will make i phone game development easier should I go for Cocos2d Comment : @RockyTriton you click on reopen .. . Answer : Consider using AndEngine http : www.andengine.org . From a short look at libgdx they seem similiar Although AndEngine is 2D only . However AndEngine has everything you need for a 2D game . The only thing it lacks is documentation but it is open-source - if you don t get something take a look at the code http : code.google.com p andengine . There is an active forum here http : www.andengine.org forums and there is also a SO tag http : stackoverflow.com tags andengine info for AndEngine so you can ask questions here too . It also has-many extensions for useful add-ons like the physics-engine Box2D http : box2d.org which is a 2D cross-platform physics-engine used for many well known games For example Angry Birds uses it . It also supports TMX tiled maps with a pretty easy interface Actually that s the game I m developing now it s really easy to use the AndEngine TMX utillities . So. . before you pick one of cocos2d or libgdx take a look at AndEngine : .. . .. . @Greg That s not true.. . .. . .. . It is easy to learn and good documented engine .. . .. . There is almost no javadoc at all . But the forums are full with tutorials and so is the web . EDIT : From your comment at Greg s answer if you are looking for easy developing AndEngine is a good choice . From taking a look at that s cocos2d tutorial code it seems much more complicated and less intuitive than AndEngine s code . Comment : Thanks Jong . But Box2D and tmx utilities are also included in Cocos2D and looking at the popularity it has got over iphone dont you think Cocos2D will ultimately become the most popular game-engine on android Comment : I m not sure about it . as Ludeivik said cocos2d has it s weird coordinate system . And looking at its code it is more like C or C++ than Java all of these prefixes for classes and so on.. . That s weird . AndEngine also encapsulates both native Android calls requirements For example you don t implement any activity life cycle methods AndEngine does and encapsulates OpenGL calls too . In fact you don t even have to know it runs on OpenGL.. . The regular case won t require you to override any AndEngine OpenGL implementation . Comment : Just for the record : the box2d wrapper of Andengine is actually from libgdx . Libgdx also supports TMX . Comment : Don t use AndEngine . Use LigGDX . Comment : why is this the marked answer libgdx really is the obvious choice here.. .", "Question : In a nutchell my question is : .. . .. . How can I show a soft-keyboard when accessing a LibGDX HTML GWT app via a mobile phone .. . .. . Details .. . .. . In LibGDX to bring up the soft-keyboard we can call this method : .. . .. . However according to the documentation https : github.com libgdx libgdx wiki On-screen-keyboard : .. . .. . On-screen keyboard functionality is only available the Android and iOS platforms .. . .. . i.e . : not for HTML GWT .. . .. . Problem : If you access your HTML GWT application through a mobile or tablet you have no way to show the soft-keyboard and therefore no way of typing anything in your texfield . Given that most people are now accessing web sites using mobiles and or tablets I assume many would haved face the same issue . .. . Answer : I m pretty sure that it is not about LibGDX but about mobile-browser itself - think about it like about handling input from some device like keyboard which actually should work both on PC and mobile-devices - the keyboard is just not visible . Then you should rather look for a solution of showing keyboard in mobile-browser no matter if it is LibGDX application or not . Here are some examples : .. . .. . Show android keyboard from javascript http : stackoverflow.com questions 21054795 show-android-keyboard-from-javascript .. . Can I trigger Android soft-keyboard to open via javascript without phonegap http : stackoverflow.com questions 15457783 can-i-trigger-android-soft-keyboard-to-open-via-javascript-without-phonegap .. . jQuery Mobile Show Keyboard on Input Focus http : stackoverflow.com questions 14362066 jquery-mobile-show-keyboard-on-input-focus .. . Show virtual keyboard on mobile-phones in javascript http : stackoverflow.com questions 6837543 show-virtual-keyboard-on-mobile-phones-in-javascript .. . .. . The general thing and what also my small tests showed is that you generally not allowed to open keyboard from script context . Maybe there is a hack for this but I m pretty sure that at least it won t be working on every browser . Since that I would rather recommend to use some input or to just implement your own input layer - user-interface by using some kind of buttons . Comment : Thanks it bugs me that when using the LibGDX API I call setOnscreenKeyboardVisible on Android and on iOS it shows the soft-keyboard . If I do the same thing on the same device . using the same method using the same code but compiling for the HTML target it does not . I would have thought the point of having the unified backends was to offer the same behaviour regardless of the target right Comment : Your platform now is GWT HTML not Android or IOS - it does not matter that you are running the website on Android device - the project is being treated as it is GWT s one . If you want the application to behave like Android you need to compile it to .apk Comment : Sorry just to understand : your advice would be to call platform specific code in which I would make javascript calls to trigger the soft-keyboard or to recreate a keyboard using buttons . right I cannot imagine that I am the first LibGDX user to ask users to key something in a TextField or TextArea in a GWT based app . As it stands you cannot do it if you access the page with a tablet or a phone . Comment : By the way : it looks like someone else raised this question as an issue on the LibGDX trunk . github.com libgdx libgdx issues 4117 https : github.com libgdx libgdx issues 4117", "Question : In the past few days I ve been porting my game Apopalypse http : lostsourcestudios.com games.php to the Android Mobile platform . I ve did a quick search on Google of sprite touch detection but didn t find anything helpful . Each balloon will pop once touched and I just need to detect if it s touched . Here s my balloon spawning code : .. . .. . Rendering x y width and height are randomized : .. . .. . Spawning in main game class : Comment : What have you tried Have you read the wiki github.com libgdx libgdx wiki https : github.com libgdx libgdx wiki -- check the Input Handling sections . .. . Answer : i made a little class that i use for my games to detect is Sprite is touched .. . .. . here how i use it .. . .. . with the same logic you can detect sprite releasing and also you can customize it for effect size when the sprite is touched and more.. . .. . .. . hope this was helpfull", "Question : I have been trying to learn more about Android Game Development this past month . I read the only book I could find about libGDX and it definitely helped me get started but there are literally no other tutorials that I have found . My question is how do you learn to create games using libGDX if there are no good tutorials out there I hear a lot of people talk about documentation of libGDX and have no clue what that means . I guess to generalize it in the most simple way possible where do I go from here Suppose the developer just dropped the framework on the Internet today and you were to begin trying to learn how to use it without any help . What route would you take I m afraid I ve come to a dead end after being so excited finishing the book . Comment : I would guess that by documentation they mean product s javadoc http : libgdx.badlogicgames.com nightlies docs api . I assume that you are familiar with their web-site http : libgdx.badlogicgames.com documentation.html gettingstarted it does list some tutorials . Comment : Yes there s a few tutorials such as rendering an image touch input etc . But suppose I wanted to create a tower defense game or even a simple pong game . The book I read has some collision-detection but not a lot . I m more just trying to find out how to learn this framework more instead of relying on tutorials to hold my hand . Comment : what kind of book From my experience I learned a lot from books and it was the good start to try and develop a lot projects with java technologies by myself . But it was not about libGDX . Just wondering that you have read a book and it was not help you. . Comment : I have no specific knowledge of this framework . Since you stated I hear a lot of people talk about documentation of libGDX and have no clue what that means . I provided my understanding . Have you programmed games before possibly in a different environment Comment : Salvador don t get me wrong the book helped tremendously to get me started . It s just after that it s a dead end . Nothing else really exists in terms of different kinds of game creation . packtpub.com learning-libgdx-game-development book http : www.packtpub.com learning-libgdx-game-development book Pm I have done games in just java for desktop and also a few andengine books . Its a sharp learning curve and I m trying to find the best way to go about this . .. . Answer : There is a lot of documentation about libgdx : .. . .. . Wiki https : github.com libgdx libgdx wiki .. . a game tutorial right there : Bucket Game https : github.com libgdx libgdx wiki A-simple-game .. . Javadocs http : libgdx.badlogicgames.com nightlies docs api .. . Another tuto : Frogger http : www.rengelbert.com tutorial.php id 175 .. . Tuto for a Game Prototype http : obviam.net index.php getting-started-in-android-game-development-with-libgdx-create-a-working-prototype-in-a-day-tutorial-part-1 .. . Tutorial Series http : blog.gemserk.com tag libgdx .. . Another Tutorial Series http : www.reddit.com r gamedev comments 1pkgq8 libgdx tutorial series .. . Video Tutorial Series https : www.youtube.com user doctoriley videos .. . Another Video Tutorial Series http : www.youtube.com user dermetfan videos - everyone talk about how good these are .. . More tuto s https : github.com mattdesl lwjgl-basics wiki libgdx-tutorials .. . Swap Race Game tutorial http : theinvader360.blogspot.co.uk 2013 05 street-race-swipe-libgdx-scene2d.html .. . A ridiculous ammount of test examples https : github.com libgdx libgdx tree master tests gdx-tests src com badlogic gdx tests .. . Some Open Source Games https : github.com libgdx libgdx tree master demos -just some of the many out there .. . This page in the libgdx site conveniently called documentation http : libgdx.badlogicgames.com documentation.html .. . .. . And the master of them all : Top Secret Site https : www.google.com.mx q libgdx+tutorial .. . .. . And I have never read that book but I heard it s somewhat outdated even if the release date is not far the author started writing the book a long time ago and didn t bother to update it prior release . And if you were left clueless desperetaly trying to get your hands in a tutorial after reading the book : .. . .. . I m afraid I ve come to a dead end after being so excited finishing the book . Then I will dare to say its not a good book . Comment : The book was OK to get into the feel of developing but didn t accomplish what I thought it would . A book more like learn java in 21 days definitely did it s job well when I was learning java exclusively . Thank you so much for all the help . I ll have my work cut out for me these next few months . I really want to specialize ingame development and feel libGDX opens a lot of doors .", "Question : I make a game with Java and LibGdx .. . .. . It s a game of skill with a time limit and the problem is the player can push home button to pause app and go to task manager and can see preview of app to seek what he has to find without counting time .. . .. . task manager http : i.stack.imgur.com 4ncKZ.jpg .. . .. . So I would like to hide the preview of the app when the player push home button to pause .. . .. . What I tried to do .. . .. . I override pause and resume handler .. . .. . and main part of my public void render float function .. . .. . log tell me that pause and resume are indeed invoked .. . .. . but in task manager I still see the game and not the black rectangle .. . .. . Update 1 .. . .. . to Ridcully answer : .. . .. . I tried what you suggested .. . .. . But same thing I still see the screenshot .. . .. . I m with Android Studio 2.1 My smartphone : Oneplus One and Android 6.0.1 .. . .. . Do you have an idea thanks .. . Answer : There is a flag for that . You can use this little method e.g . in onCreate to prevent Android from creating a screenshot for the recent activities list . You can activate deactivate as you want e.g . only activate it when the actual game board is visible etc . EDIT I just found this http : stackoverflow.com questions 33941381 flag-secure-not-working-on-libgdxs-androidapplication SO answer regarding Libgdx applications : Seems you have to set the flag AFTER invoking the initialize method . Comment : thanks for your answer I edited my message Comment : Don t put it into the Application class but in the Activities you don t want to show. . Comment : I think i ve just single Activity it s my AndroidLauncher Android applications can have multiple activities . Libgdx games should usually only consist of a single activity . Different screens of the game are implemented within libgdx not as separate activities . The reason for this is that creating a new Activity also implies creating a new OpenGL context which is time consuming and also means that all graphical resources have to be reloaded . from github.com libgdx libgdx wiki https : github.com libgdx libgdx wiki Starter-classes- -configuration android . Other class in my project are just Screen and Game class Comment : Ah I have no experience with Libgdx but it seems the AndroidApplication class which your AndroidLauncher extends is in fact inheriting from Activity I alread wondered that Application class has access to Window . Maybe the Libgdx surroundings manipulate the window flags too . You can try to put a breakpoint in onPause method and check if the SECURE flag is still set then -- or just try and set the flag in onPause . Comment : Yep I was right -- please see my EDIT in my answer ." ] }
[ "yes-answer-long", "yes-answer-short" ]
java
UNK_RELATION
mencoder@decoding@51
mencoder -- mencoder is a free command-line video @placeholder encoding and filtering tool released under the gnu general public license .
{ "confidence": [ 52.64717483520508, 48.3072509765625, 48.305137634277344, 46.605228424072266, 45.9023551940918, 45.234825134277344, 44.253482818603516, 44.253482818603516, 43.534915924072266, 43.534915924072266, 43.461647033691406, 43.461647033691406, 42.55357360839844, 42.55357360839844, 42.407188415527344, 41.76173782348633, 41.76173782348633, 41.46207809448242, 41.22917938232422, 41.08025360107422, 40.634010314941406, 40.634010314941406, 40.395782470703125, 39.762168884277344, 39.380340576171875, 39.380340576171875, 39.380340576171875, 39.380340576171875, 39.37385559082031, 39.28239440917969, 38.79593276977539, 38.79593276977539, 38.79593276977539, 38.79593276977539, 38.25261306762695, 38.25261306762695, 38.226593017578125, 37.85451889038086, 37.85451889038086, 37.85451889038086, 37.85451889038086, 37.69096374511719, 37.642635345458984, 37.23078918457031, 37.09602355957031, 37.09602355957031, 37.09602355957031, 36.9402961730957, 36.752323150634766, 36.15460968017578, 36.15460968017578, 36.15460968017578, 36.15460968017578, 36.15460968017578, 36.15460968017578, 36.15460968017578, 36.15460968017578, 36.05073547363281, 35.46397399902344, 35.45579147338867, 35.31549072265625, 35.026878356933594, 34.81499481201172, 34.616676330566406, 33.833831787109375, 33.67526626586914, 33.67526626586914, 33.65877914428711, 33.50947570800781, 33.50947570800781, 33.50947570800781, 33.50947570800781, 33.50947570800781, 33.50947570800781, 33.50947570800781, 33.50947570800781, 33.50947570800781, 33.50947570800781, 33.50947570800781, 33.320587158203125, 33.03116989135742, 32.089759826660156, 31.809566497802734, 31.809566497802734, 31.809566497802734, 31.809566497802734, 31.809566497802734, 31.809566497802734, 31.809566497802734, 31.809566497802734, 31.809566497802734, 31.809566497802734, 31.083450317382812, 31.006193161010742, 30.876331329345703, 30.876331329345703, 30.850215911865234, 30.850215911865234, 30.825220108032227, 30.68183708190918 ], "content": [ "Try mencoder -ovc help and mencoder -oac help to see which video and audio codecs are supported by your mencoder binary .", "For encoding this video I have several options : mencoder ffmpeg gstreamer .", "Python - mencoder doesn t produce video in a different folder .", "I m trying to use mencoder to record a video .", "Mencoder will do it .", "So I recommend mencoder .", "I am cutting and joining a video file using mencoder .", "But if the location is different mencoder simply gives me an empty video .", "The problem with mencoder is still open .", "Is it even possible to do this with mencoder", "But this does answer the question in regards to mencoder .", "You are right mencoder uses ffmpeg .", "I m using mencoder to create a video out of some .png files .", "Once mencoder has finished his run delete the original video .", "Now the problem is mencoder .", "Go there and directly install mencoder from there .", "But i cannot find equivalent of that in mencoder .", "Concerning your side question you are declaring which codec will be used by mencoder through the ovc and oac command-line switches .", "For each video in that folder run a mencoder command to transcode them to something playable on my phone .. . 3 .", "This does not provide the answer for mencoder but for ffmpeg as allowed in the comments .", "MEncoder can skip damaged frames .", "Can I do it with mencoder or ffmpeg", "I generate png figures using python and then use mencoder to make a movie .", "Either way i have try to modify the command-line and even downloaded the latest available version for mencoder .", "I am trying to install MEncoder on Ubuntu 13.04 .", "What am I doing wrong with mencoder", "This is just in case mencoder does not have the option", "I am completely clueless as to how to use Mencoder.. .", "How can i make mencoder to generate video of only duration where video stream exists .", "i m using mencoder version 4.4.6", "Finally i fixed this problem by joining the files in their own format using MENCODER and converting the joined video into flv using FFMPEG .", "I m using Python to call mencoder to take a bunch of images and convert them into a video .", "It takes all the pictures in the folder makes video and exits just like my mencoder example above .", "I am using MEncoder to combine a huge amount of jpg pictures into a time-lapse video .", "Both mencoder and vlc seem to have this codec built-in .", "Mencoder can parse the file fps correctly", "There is a wealth of info here http : en.gentoo-wiki.com wiki Mencoder about using Mencoder .", "Can you show the code for how you are using mencoder currently", "Do you need to use mencoder or can you use ffmpeg", "it should be mencoder .. . -o output.avi input1.avi input2.avi .", "Side question : From googling it seems that mencoder uses ffmpeg .", "Is there any way how to make the video continuously - how to pass each picture to the mencoder right after it is taken - and stop making the video every day at midnight", "My question is how can I extract audio from movie files with mencoder command", "I can do it with ffmpeg command : .. . .. . Unfortunately my Ubuntu 14.04 does not have ffmpeg command and have mencoder command instead .", "So I have some images from which I create a video with mencoder .", "I am trying use some images and audio to create video using mencoder .", "so the conversion works fine and the only problem is that the mencoder will crash in the end as the video file somehow exceeds 100 to 102 .", "What helped me is the link : http : www.ubuntuupdates.org package medibuntu non free raring non-free base mencoder .", "I think you want this in the middle.. . mencoder mf : input ... . in any case you need to tell mencoder that it should take its input from input", "So is it correct to assume that the sundtek driver himself is streaming the audio to the speakers and not mencoder", "I have a video.avi which I have generated with mencoder before .", "@LordNeckbeard yes you are right changed tags form FFMpeg to MEncoder .", "I am trying to get FAAC support in mencoder on Ubuntu 14.04 server .", "Looking at it with FFPROBE it looks exactly the same as the one created by Mencoder .", "The reason I want to use FFMPEG over Mencoder is that it s much faster .", "What takes FFMPEG 15 minutes takes Mencoder 40 .", "If mencoder needs to run in the work directory add os.chdir input", "I have not tested this but I suspect that mencoder is sorting your frames by their filename as strings .", "A user named bibi suggested i should use mencoder and gave me the following code : mencoder mf : frame 09d.png -mf fps 30 -ovc lavc -o my video.avi .. . .. . I want to call on mencoder from Fortran or gnuplot is this possible", "You may take a look here http : en.gentoo-wiki.com wiki Mencoder to find out more about the video audio codecs .", "If it works with ffmpeg but not mencoder then why not just use ffmpeg", "So far I ve tried ffmpeg mencoder cvlc vlc and MP4Box .", "I am using the following Mencoder command as part of a perl script that burns subtitles for different MP4 videos .", "I have a series of jpg files that I would like to encode into video with mencoder .", "When I converted an mp4 video video codec mp4v audio codec aac2 to h264 using the lastest mencoder I got this error Assertion lastInChrBuf + 1 - chrSrcSliceY 0 failed at libswscale swscale.c : 526 .", "Preferably using mencoder or avconv because I am on a linux PC .", "I tried HandbrakeCLI ffmpeg and mencoder but still could not find a way to do it .", "I also used ffmpeg command as follows : .. . .. . This ffmpeg command helps to convert to flv which is failed by mencoder .", "Can you show us your PHP code that you are using to execute mencoder", "I m using mencoder to split files and I d like to turn this into an Object Oriented approach if possible using Java or similar for example .", "you could use avconv instead a now distant fork of FFmpeg or mencoder -vn or something like that .", "I usually use ffmpeg directly because mencoder was designed with some AVI-like assumptions .", "I ve bounced back and forth a few times between mencoder http : www.mplayerhq.hu and ffmpeg http : www.ffmpeg.org .", "Mencoder is actually a universal interface to a number of different codecs or codec libraries like ffmpeg .", "So beyond ffmpeg mencoder can be compiled with support to x264 xvid lame mp3 and various others that I haven t used .", "Beyond these I have also used x264 with mencoder which is very useful and I recommend getting a binary with support for that codec .", "How do you pass ffmpeg specific option from mencoder to underlying ffmpeg", "I see mencoder has its own set of options which doesn t cover all options supported by ffmpeg .", "Mencoder can pass options to the libraries of ffmpeg for instance you may pass options to libavcodec using -lavcopts .", "I am currently using Mencoder and Linux bash code mencoder mf : .jpg -mf w 1366 : h 768 : fps 6 60 : type jpg -ovc copy -oac copy -o images.mp4 .", "Quesion : How to detect using mencoder or ffmpeg whether audio and video exist in the converted file .", "I m trying to use MEncoder to dump an RTSP stream I get .", "I tried - sudo apt-get install mencoder but the following error is coming : .. . .. . Reading package lists.. .", "Done E : Unable to locate package mencoder .. . .. . I tried to find static builds but could not find .", "Yesterday i downloaded mencoder in my ubuntu 14.04 for combining 4 flv files and was struggling as you are .", "I have solved this problem with using mencoder like this .. . .. . -sub test.srt -subcp enca : tr : iso-8859-9 .. . .. . I hope this helps .", "Normally I would use FFMPEG or mencoder but the situation is that the file to be cut is going to be a different size every time it s cut .", "Why did you use the ffmpeg http : stackoverflow.com questions tagged ffmpeg tag when it appears you are using mencoder", "The version of mencoder you re using 1.0rc1 is INCREDIBLY old it was an early development release from around 2006 .", "The short and long answer is if you want FAAC support in mencoder on Ubuntu then you need to build it from source .", "Can anybody help me with codes to compress a 1 MB vedeo.mp4 file using MENCODER . .", "i m getting this weird unhandled-exception problem from mencoder whenever i try to convert this one opendivx file .", "1 day - 1 video .. . .. . I use mencoder to do that at the end of the day like this : mencoder mf : .jpg -mf fps 25 : type jpg -ovc lavc -lavcopts vcodec mpeg4 : mbd 2 : trell : vbitrate 7000 -vf scale 1024 : 768 -oac copy -o movie.avi It works fine BUT : .. . .. . The problem is that i need to do it on Raspberry Pi 700MHz ARM and it takes him about an hour to make the video from 1500 photos taken during the day it works at about 0.5 fps .", "But if output have less frames then input audio not correspondend with video.. . Video is delayed.. . How can I ask MEncoder for correctly set FPS if it skip any frame during converting", "But like I said I want to make it so that a program reads in from an excel file and calls this mencoder command multiple times over 100 for each of the start times and end times .", "Plus I d like to be able to see the output of mencoder because it prints out a nice percentage so you know about how much longer a single command will take .", "I have two main folders with about 10 subfolders each and in order to automate the process i am running : .. . .. . where jpg2avi is the settings for MEncoder .", "Also you don t lose any of the functionality of ffmpeg using mencoder since you may pass every option you want to the corresponding ffmpeg codec .", "The command-line to do this is : .. . .. . mencoder filename.mjpeg -oac copy -ovc copy -o outputfile.avi -speed 0.3 .. . .. . where 0.3 is the ratio of the desired play framerate to the default 25 fps .", "Mencoder has a lovely option for converting a mjpeg file into an avi file with an MJPG codec that plays in VLC ." ] }
{ "confidence": [ 65.96205139160156, 58.60071563720703, 58.39409637451172, 55.91516876220703, 54.7017707824707, 54.58289337158203, 54.262088775634766, 53.98292922973633, 53.56037521362305, 53.346778869628906, 53.14582061767578, 53.031166076660156, 52.846126556396484, 52.67735290527344, 52.56182861328125, 52.31642150878906, 51.855804443359375, 51.662410736083984, 51.13947677612305, 50.86913299560547 ], "content": [ "Question : I m doing a bunch of video-encoding for a variety of devices and platforms . I ve bounced back and forth a few times between mencoder http : www.mplayerhq.hu and ffmpeg http : www.ffmpeg.org . Which do you recommend and why Side question : From googling it seems that mencoder uses ffmpeg . Does it do this all the time or only when it deems necessary .. . Answer : You are right mencoder uses ffmpeg . Mencoder is actually a universal interface to a number of different codecs or codec libraries like ffmpeg . So beyond ffmpeg mencoder can be compiled with support to x264 xvid lame mp3 and various others that I haven t used . The point is that if you have the correct mplayer mencoder binary you will get support for many more codecs than the ones ffmpeg supports especially those with restrictive licenses . Also you don t lose any of the functionality of ffmpeg using mencoder since you may pass every option you want to the corresponding ffmpeg codec . So I recommend mencoder . Concerning your side question you are declaring which codec will be used by mencoder through the ovc and oac command-line switches . Try mencoder -ovc help and mencoder -oac help to see which video and audio codecs are supported by your mencoder binary . You may take a look here http : en.gentoo-wiki.com wiki Mencoder to find out more about the video audio codecs . It explains lavc libavcodec library of ffmpeg xvid and mp3lame . Beyond these I have also used x264 with mencoder which is very useful and I recommend getting a binary with support for that codec . Comment : How do you pass ffmpeg specific option from mencoder to underlying ffmpeg I see mencoder has its own set of options which doesn t cover all options supported by ffmpeg . Comment : Mencoder can pass options to the libraries of ffmpeg for instance you may pass options to libavcodec using -lavcopts . Take a look at this mplayerhq.hu DOCS HTML en menc-feat-enc-libavcodec.html http : www.mplayerhq.hu DOCS HTML en menc-feat-enc-libavcodec.html for some examples .", "Question : I m doing a bunch of video-encoding for a variety of devices and platforms . I ve bounced back and forth a few times between mencoder http : www.mplayerhq.hu and ffmpeg http : www.ffmpeg.org . Which do you recommend and why Side question : From googling it seems that mencoder uses ffmpeg . Does it do this all the time or only when it deems necessary .. . Answer : To append an astray detail after Serafein s excellent answer : .. . .. . On Ubuntu 11 if you install pre-packaged ffmpeg it lacks libass then mencoder can be good in many cases to avoid to install libass by hand or compile ffmpeg from source . It s good .", "Question : I m trying to create a Python script that would : .. . .. . 1 . Look into the folder input .. . 2 . For each video in that folder run a mencoder command to transcode them to something playable on my phone .. . 3 . Once mencoder has finished his run delete the original video . That doesn t seem too hard but I suck at python : .. . .. . Any ideas on what the script should look like Bonus question : Should I use .. . .. . os.system .. . .. . or .. . .. . subprocess.call .. . .. . Subprocess.call seems to allow for a more readable script since I can write the command like this : .. . .. . cmdLine mencoder sourceVideo -ovc copy -oac copy -ss 00 : 02 : 54 -endpos 00 : 00 : 54 -o destinationVideo .. . .. . EDIT : Ok that works : .. . .. . I ve removed the mencoder command for clarity and because I m still working on it . Thanks to everyone for your input . Comment : Grr I m still having the same problem I had in my previous question windows cannot find the file specified . Python and or windows is not a fan of spaces in file and folder names . : Comment : You ll need double quotes around the file path if there are spaces in it . .. . Answer : AVI to MPG pick your extensions : Comment : In line 5 I think you meant sourceVideo : -4 Comment : sourceVideo contains only basename of a path . Comment : If mencoder needs to run in the work directory add os.chdir input", "Question : null .. . Answer : I have a series of jpg files that I would like to encode into video with mencoder . Currently I m using the mpeg codec like so : .. . .. . ...but I ve been having some problems with mp4 and PowerPoint . Can someone offer a recommendation for an encoding format that plays nicely with PowerPoint and provide an example asf maybe I am a newbie when it comes to video-encoding . i m using mencoder version 4.4.6", "Question : I m trying to create a Python script that would : .. . .. . 1 . Look into the folder input .. . 2 . For each video in that folder run a mencoder command to transcode them to something playable on my phone .. . 3 . Once mencoder has finished his run delete the original video . That doesn t seem too hard but I suck at python : .. . .. . Any ideas on what the script should look like Bonus question : Should I use .. . .. . os.system .. . .. . or .. . .. . subprocess.call .. . .. . Subprocess.call seems to allow for a more readable script since I can write the command like this : .. . .. . cmdLine mencoder sourceVideo -ovc copy -oac copy -ss 00 : 02 : 54 -endpos 00 : 00 : 54 -o destinationVideo .. . .. . EDIT : Ok that works : .. . .. . I ve removed the mencoder command for clarity and because I m still working on it . Thanks to everyone for your input . Comment : Grr I m still having the same problem I had in my previous question windows cannot find the file specified . Python and or windows is not a fan of spaces in file and folder names . : Comment : You ll need double quotes around the file path if there are spaces in it . .. . Answer : Or you could use the os.path.walk function which does more work for you than just os.walk : .. . .. . A stupid example : Comment : os.path.walk is deprecated in favour of os.walk now .", "Question : null .. . Answer : I m using mencoder to create a video out of some .png files . The problem is that the frame-rate doesn t change regardless of the -fps flag . The output video has different time lengths in their properties but the video s size and speed are always the same regardless of the FPS chosen . I just want to create a shorted video by using higher FPS rates . In short a time-lapse of my original set of images . What am I doing wrong with mencoder I m using the following command : Comment : Why did you add the ffmpeg http : stackoverflow.com questions tagged ffmpeg tag Are you open to a solution using ffmpeg instead Comment : @LordNeckbeard : I was open to a solution using ffmpeg but I ve managed it quickly . The problem with mencoder is still open .", "Question : null .. . Answer : I am trying use some images and audio to create video using mencoder . But my audio file could be much longer . This produces a video that is : .. . 20 seconds long as long as audio file length . The image slide show ends at 5 seconds after that there is only audio playing from 6th to 20th second . How can i make mencoder to generate video of only duration where video stream exists . In this case end the video at 5 seconds . ffmpeg has a -shortest option for exactly this kind of use-case . But i cannot find equivalent of that in mencoder . Comment : Why not parse out the duration of streams and then provide the shortest as number of seconds to encode This is just in case mencoder does not have the option", "Question : I am trying to install MEncoder on Ubuntu 13.04 . I tried - sudo apt-get install mencoder but the following error is coming : .. . .. . Reading package lists.. . Done Building dependency tree .. . Reading state information.. . Done E : Unable to locate package mencoder .. . .. . I tried to find static builds but could not find . Anyone knows the solution .. . Answer : Yesterday i downloaded mencoder in my ubuntu 14.04 for combining 4 flv files and was struggling as you are . What helped me is the link : http : www.ubuntuupdates.org package medibuntu non free raring non-free base mencoder . Go there and directly install mencoder from there . Check if this helps .", "Question : This question already has an answer here : .. . .. . execute ffmpeg command in a loop questions 21634088 execute-ffmpeg-command-in-a-loop 2 answers .. . .. . My intention would be to get at the same time picture1.jpg picture2.jpg picture3.jpg to video format such as picture1.mp4 picture2.mp4 picture3.mp4 . I am currently using Mencoder and Linux bash code mencoder mf : .jpg -mf w 1366 : h 768 : fps 6 60 : type jpg -ovc copy -oac copy -o images.mp4 . But this command makes all the images into one video file images.mp4 . Can I do it with mencoder or ffmpeg My linux bash coding skills are basic . .. . .. . I found a solution that works for me as I want . Thank you to all who helped me . bin bash for input in .jpg do mencoder -ovc copy -mf w 1366 : h 768 : fps 1 11 : type jpg -ofps 30000 1001 mf : input -o echo input sed -e s .jpg .mp4 done Comment : If I understand you want to create multiple one frame videos Comment : I have an automatic m3u playlist with .jpg images . Images input should be able to convert with the same name but .mp4 output file . This is part of Digital Signage software where images and video are in the same playlist . DS software does not know how to properly display images which is why I need to convert images to video file . .. . Answer : I am not entirely sure on what kind of videos you want but the basic pattern for doing a conversion for a bunch of files is Comment : I tried to Daniel Landau s advice and my results were pretty close to what I m looking for . I got the files modified to the same names . But all the pictures however were all inside the video . Video did not contain a single image just all listed images . This script below gives the result 1.image.mp4 2.image.mp4 . . bin bash for input in .jpg do mencoder mf : .jpg -mf w 1366 : h 768 : fps 6 60 : type jpg -ovc copy -oac copy -o echo input sed -e s .jpg .mp4 whatever command including input and output done Comment : I think you want this in the middle.. . mencoder mf : input ... . in any case you need to tell mencoder that it should take its input from input Comment : Thank you Mark Setchell your advice . I got it to work the way I want . Now the problem is mencoder . I ll try to get one image to 10 seconds long video . Now I get only the first 10 seconds of black screen and the the next 10 seconds with image total 20 sec . The strange thing yet to be resolved . bin bash for input in .jpg do mencoder -ovc copy -mf w 1366 : h 768 : fps 1 10 : type jpg mf : input -o echo sed -e s .jpg .mp4 done", "Question : Python - mencoder doesn t produce video in a different folder . I m using Python to call mencoder to take a bunch of images and convert them into a video . The code I have do to this is : .. . .. . Where location is the folder that contains all the images I want to string together into a video . Now the thing is if my python script is in the folder that also has the images in it this works just fine and I get a video . But if the location is different mencoder simply gives me an empty video . I don t understand why that would be . The code works if my python script is in that folder but doesn t if its a different folder . I ve turned on the verbose for mencoder and this is what I get when it succeeds : .. . .. . But when I change the folder I get this : .. . .. . This was a test run using just 50 png images . For the successful run my python script was in the folder with the images and told it to put the video there . the temp folder .. . .. . The failed run was a folder that contained the images but not my python script . the marshmarshmarshmarsh folder . It appears that its finding the images just fine but somehow fails to produce a video from it . I m not seeing why it works only in one folder but fails to work when its told to put the video in some other folder . .. . Answer : Late answer : I had the same problem and despite the ton of searches the only workaround that I found was to change to the target directory make the video then switch back to the original directory if you need to do some further processing in it : Comment : My solution ended up being switching to ffmpeg . But this does answer the question in regards to mencoder .", "Question : I m trying to create a Python script that would : .. . .. . 1 . Look into the folder input .. . 2 . For each video in that folder run a mencoder command to transcode them to something playable on my phone .. . 3 . Once mencoder has finished his run delete the original video . That doesn t seem too hard but I suck at python : .. . .. . Any ideas on what the script should look like Bonus question : Should I use .. . .. . os.system .. . .. . or .. . .. . subprocess.call .. . .. . Subprocess.call seems to allow for a more readable script since I can write the command like this : .. . .. . cmdLine mencoder sourceVideo -ovc copy -oac copy -ss 00 : 02 : 54 -endpos 00 : 00 : 54 -o destinationVideo .. . .. . EDIT : Ok that works : .. . .. . I ve removed the mencoder command for clarity and because I m still working on it . Thanks to everyone for your input . Comment : Grr I m still having the same problem I had in my previous question windows cannot find the file specified . Python and or windows is not a fan of spaces in file and folder names . : Comment : You ll need double quotes around the file path if there are spaces in it . .. . Answer : Use os.walk http : docs.python.org library os.html os.walk to iterate recursively over directory content : .. . .. . No real difference between os.system and subprocess.call here - unless you have to deal with strangely named files filenames including spaces quotation marks and so on . If this is the case subprocess.call is definitely better because you don t need to do any shell-quoting on file names . os.system is better when you need to accept any valid shell command e.g . received from user in the configuration file . Comment : think you might have gotten the order wrong..... . for root dir files in ... . Comment : You re right I just corrected the code . Thanks . Comment : This was just what I was looking for . Basically a python version of find . -type f on the linux command-line .", "Question : During the day I take pictures from the camera every minute . I would like to make a video from the images . 1 day - 1 video .. . .. . I use mencoder to do that at the end of the day like this : mencoder mf : .jpg -mf fps 25 : type jpg -ovc lavc -lavcopts vcodec mpeg4 : mbd 2 : trell : vbitrate 7000 -vf scale 1024 : 768 -oac copy -o movie.avi It works fine BUT : .. . .. . The problem is that i need to do it on Raspberry Pi 700MHz ARM and it takes him about an hour to make the video from 1500 photos taken during the day it works at about 0.5 fps . Is there any way how to make the video continuously - how to pass each picture to the mencoder right after it is taken - and stop making the video every day at midnight It would then just take a picture process it for a 2-3 seconds and wait for another minute to do it again . Thanks . Comment : Do you need to use mencoder or can you use ffmpeg I have a fully tested ffmpeg solution Comment : I could use ffmpeg no problem . How can i do it using ffmpeg Thank you . Comment : Perfect . THen I was able to answer your question . For ffmpeg . Maybe you can edit your post and update the title so that other users interested with this topic can find it . .. . Answer : Why don t you just make a video from pictures every hour or so and merge it with your existing video Merge videos with : .. . .. . You do this every hour or so and then at the end of the day your daily.avi will be a merge of all the images . Comment : it should be mencoder .. . -o output.avi input1.avi input2.avi .", "Question : I have a few damaged DVDs . MEncoder can skip damaged frames . But if output have less frames then input audio not correspondend with video.. . Video is delayed.. . How can I ask MEncoder for correctly set FPS if it skip any frame during converting OS UnixWare I try it : .. . .. . mencoder -fps 20000 1001 -ofps 20000 1001 -oac lavc -ovc lavc . VTS 04 1.VOB -o dh4.avi .. . .. . It works only for beginning of the video - after a while the video will start delaying.. . I must use + - keys in Mplayer.. . .. . .. . Or what other converter can skip damaged frames and correctly set the FPS Thank you . .. . Answer : Try adding -vf harddup to skip duplicate frames and remove -fps 20000 1001 -ofps 20000 1001 . Mencoder can parse the file fps correctly", "Question : I am cutting and joining a video file using mencoder . But the output file is not playing in flv player in my website . But it playing in VLC media-player without any error . What will be the problem .. . Answer : Finally i fixed this problem by joining the files in their own format using MENCODER and converting the joined video into flv using FFMPEG . Now it is playing well in my flv player present in my website .", "Question : null .. . Answer : I am trying to get video-encoding final time by encoding 1 second video .. . .. . example 1 second video-encoding time 0.069 how much 152 second encoding time i need to set this time in my php script Comment : Can you show the code for how you are using mencoder currently Comment : i use sites.google.com site linuxencoding x264-encoding-guide https : sites.google.com site linuxencoding x264-encoding-guide just add -endpos 1 output get result BENCHMARKs : VC : 0.036s VO : 0.032s A : 0.000s Sys : 0.001s 0.069s Comment : Can you show us your PHP code that you are using to execute mencoder Are you just using exec one of the proc methods Comment : mplayer video.mov -ao null -vo null -frames 1 -identify 2 dev-null grep ID LENGTH cut -d -f2 awk printf d int 0 + 0.5 output get 152 152 is total video second i need how much time need for encode if time is 152 by 1 second encoding time 0.069 Comment : Also encoding one second of video is not sufficient to determine the time to encode the whole thing . Different parts of video require more processing time than others . This is particularly true of that first second where the video is likely solid black frames .", "Question : null .. . Answer : I have a mp4 file and I want to extract the audio . preferably in flac format . I can do it with ffmpeg command : .. . .. . Unfortunately my Ubuntu 14.04 does not have ffmpeg command and have mencoder command instead . My question is how can I extract audio from movie files with mencoder command Comment : Why not just get a static build of ffmpeg http : johnvansickle.com ffmpeg Comment : you could use avconv instead a now distant fork of FFmpeg or mencoder -vn or something like that . askubuntu.com questions 432542 http : askubuntu.com questions 432542 is-ffmpeg-missing-from-the-official-repositories-in-14-04", "Question : I m using mencoder to split files and I d like to turn this into an Object Oriented approach if possible using Java or similar for example . But I m not sure the best way so I leave it in the open . Here is what I need : .. . .. . I have an excel file with start times and end times and I need to extract out the appropriate clips from a video file . In the terminal I m on Mac OS X I ve had success using for example : .. . .. . Which creates the video Output.avi by clipping the first 10 seconds of the video MyVideo.avi . But like I said I want to make it so that a program reads in from an excel file and calls this mencoder command multiple times over 100 for each of the start times and end times . I know how to read in the excel file in Java but I m not sure it is best to call this command from Java . Plus I d like to be able to see the output of mencoder because it prints out a nice percentage so you know about how much longer a single command will take . Is this type of thing feasible to do in a shell script I would really like to use Java if possible since I have many years of experience in Java and no experience in shell scripting . .. . .. . UPDATE .. . .. . Here is what I ve tried in Java but it freezes at in.readLine Comment : oh but is Process not enough for this task Comment : I haven t had success in Java doing this . Comment : Hey @CodeGuy why are you using input stream and not output stream I mean you want to see the output and the input stream will wait for input so I think thats why your loop never ends Comment : Then how do you suppose I do it .. . Answer : I m not quite sure about mencoders multicore-capabilities but I think with Java you can use Multiple Threads to get the maximal power of all cpu-cores . You shouldn t use Runtime like your using it . When using Runtime you should not run bash and send commands via inputstream like when you are typing commands on a terminal . Runtime.getRuntime .exec mencoder -ss + start + -endpos + end + + video + -oac copy -ovc copy -o + output .. . .. . To get the Output you can use the inputStream .. . .. . http : docs.oracle.com javase 1.4.2 docs api java lang Runtime.html exec 28java.lang.String 20java.lang.String 20java.io.File 29 http : docs.oracle.com javase 1.4.2 docs api java lang Runtime.html exec 28java.lang.String 20java.lang.String 5B 5D 20java.io.File 29 .. . .. . With this command you can also set the Workingdirectory where your command is executed . I also prefer the version with the String as parameters . It s much more readable than the a concatenated String .", "Question : I m trying to create a Python script that would : .. . .. . 1 . Look into the folder input .. . 2 . For each video in that folder run a mencoder command to transcode them to something playable on my phone .. . 3 . Once mencoder has finished his run delete the original video . That doesn t seem too hard but I suck at python : .. . .. . Any ideas on what the script should look like Bonus question : Should I use .. . .. . os.system .. . .. . or .. . .. . subprocess.call .. . .. . Subprocess.call seems to allow for a more readable script since I can write the command like this : .. . .. . cmdLine mencoder sourceVideo -ovc copy -oac copy -ss 00 : 02 : 54 -endpos 00 : 00 : 54 -o destinationVideo .. . .. . EDIT : Ok that works : .. . .. . I ve removed the mencoder command for clarity and because I m still working on it . Thanks to everyone for your input . Comment : Grr I m still having the same problem I had in my previous question windows cannot find the file specified . Python and or windows is not a fan of spaces in file and folder names . : Comment : You ll need double quotes around the file path if there are spaces in it . .. . Answer : I had a similar problem with a lot of help from the web and this post I made a small application my target is VCD and SVCD and I don t delete the source but I reckon it will be fairly easy to adapt to your own needs . It can convert 1 video and cut it or can convert all videos in a folder rename them and put them in a subfolder VCD .. . .. . I also add a small interface hope someone else find it useful I put the code and file in here btw : http : tequilaphp.wordpress.com 2010 08 27 learning-python-making-a-svcd-gui Comment : There is a lot of code in that blog that doesn t pertain to the question . It might be helpful if you pull out the relevant code and paste it in the answer . Also if the blog ever changes or goes down then this answer would become of no value while if the code was in the answer it would always remain a valid answer .", "Question : null .. . Answer : I have been searching testing and coming up with nothing for over a week . I want to use FFMPEG to convert mp4 s and mkv s to AVI files that will play on my DLink DSM-520 . Mencoder will do it . The files that FFMPEG generates cause the player to lock up less than a minute into the video . First here s what I use to encode the file using Mencoder scraped from the test.bat file that PocketDIVXEncoder generates : .. . .. . The output file plays perfectly on the DSM-520 . Looking at the file using FFPROBE I see this : .. . .. . So now I try the same thing with FFMPEG . This file does not play on the media-player . It plays choppy with only clicking for sound for about 15-30 seconds then it freezes . Looking at it with FFPROBE it looks exactly the same as the one created by Mencoder . So now I encode the video using Xvid4PSP . It plays perfectly fine and FFPROBE shows this : .. . .. . It s using Advanced Simple Profile so I look this up and change my FFMPEG options : .. . .. . But though the output file looks the same using FFPROBE as the one made by Xvid4PSP it still doesn t play on the DSM-520 . So now i m at a loss . Is FFMPEG incapable of generating a file that the DSM-520 can play The reason I want to use FFMPEG over Mencoder is that it s much faster . What takes FFMPEG 15 minutes takes Mencoder 40 . I should note that all the files created by FFMPEG play fine on the PC and on my Visio television . The DSM-520 is hooked up to a bedroom tv that isn t a smart-tv . Edit : I also tried libxvid in-place of mpeg4 with the same results . Comment : Your ffmpeg command uses the native encoder mpeg4 . You could try using libxvid instead . Of course you ll need to install the library https : www.xvid.com download and to recompile ffmpeg with --enable-libxvid Comment : I neglected to mention that I had used the libxvid codec as well with the same results . Comment : Another idea is to use mediainfo in full output mode rather than ffprobe and do a diff .", "Question : During the day I take pictures from the camera every minute . I would like to make a video from the images . 1 day - 1 video .. . .. . I use mencoder to do that at the end of the day like this : mencoder mf : .jpg -mf fps 25 : type jpg -ovc lavc -lavcopts vcodec mpeg4 : mbd 2 : trell : vbitrate 7000 -vf scale 1024 : 768 -oac copy -o movie.avi It works fine BUT : .. . .. . The problem is that i need to do it on Raspberry Pi 700MHz ARM and it takes him about an hour to make the video from 1500 photos taken during the day it works at about 0.5 fps . Is there any way how to make the video continuously - how to pass each picture to the mencoder right after it is taken - and stop making the video every day at midnight It would then just take a picture process it for a 2-3 seconds and wait for another minute to do it again . Thanks . Comment : Do you need to use mencoder or can you use ffmpeg I have a fully tested ffmpeg solution Comment : I could use ffmpeg no problem . How can i do it using ffmpeg Thank you . Comment : Perfect . THen I was able to answer your question . For ffmpeg . Maybe you can edit your post and update the title so that other users interested with this topic can find it . .. . Answer : This does not provide the answer for mencoder but for ffmpeg as allowed in the comments . Requirements : .. . .. . All pictures must be consecutively numbered i.e . picName1.png picName2.png etc . All pictures must be in the same folder . You must have the latest version of ffmpeg since the options recently changed .. . .. . To create your video use : .. . .. . Replace fps by the desired frame-rate 10 25 30 etc fps . Replace path to your picName by the actual path but leave the d which tells ffmpeg to put a number there . Replace path to your new video.avi by your selected destination . The video created this way will be of the highest quality . You can adapt the quality to match your video size requirements using the -q option . .. . .. . See the man page for ffmpeg http : linux.die.net man 1 ffmpeg for more explanations . Unfortunately to my knowledge there is no way to pass one picture every few minutes or so . I would suggest one of the solutions below : .. . .. . Compile the video once a day at midnight . You get it at 1 am . Compile the video several time a day if you need to look at it . That s a lot of wasted processing since you process the whole lot each time . Compile the video by chunks every 2 hours for instance and merge all videos at the end of the day . If you don t need to look at the video during the day then the first solution is the easiest . .. . .. . Below is a quote from the man page : .. . .. . For creating a video from many images : .. . .. . ffmpeg -f image2 -i foo- 03d.jpeg -r 12 -s WxH foo.avi The syntax foo- 03d.jpeg specifies to use a decimal number composed of three digits padded with zeroes to express the sequence number . It is the same syntax supported by the C printf function but only formats accepting a normal integer are suitable . Comment : Well I tried this . It takes all the pictures in the folder makes video and exits just like my mencoder example above . But is there a way how to add images very slowly - for example one image in 2 minutes - like I wrote above last paragraph of my question Comment : @user2193024 No you can t . But why don t you make the video once a day at midnight It would take one hour . You start it at midnight and get the video at 1 am . You can even generate previews during the day ." ] }
[]
decoding
UNK_RELATION
interstitial@ios@60
interstitial -- full screen advertisements for android and @placeholder applications .
{ "confidence": [ 33.29517364501953, 31.805768966674805, 28.225927352905273, 25.84357452392578, 25.720779418945312, 25.713016510009766, 25.569671630859375, 25.524206161499023, 25.443374633789062, 25.236675262451172, 24.950050354003906, 24.950050354003906, 24.950050354003906, 24.950050354003906, 24.849273681640625, 24.8359375, 24.768352508544922, 24.63420867919922, 24.53601837158203, 24.477943420410156, 24.477943420410156, 24.477943420410156, 24.471534729003906, 24.146772384643555, 24.146772384643555, 24.146772384643555, 23.9749755859375, 23.9749755859375, 23.9749755859375, 23.9749755859375, 23.910995483398438, 23.668479919433594, 23.668479919433594, 23.668479919433594, 23.438888549804688, 23.438888549804688, 23.438888549804688, 23.438888549804688, 23.386272430419922, 23.209300994873047, 23.10771942138672, 23.10771942138672, 23.10771942138672, 23.10771942138672, 23.067964553833008, 23.067964553833008, 23.067964553833008, 23.067964553833008, 23.067964553833008, 23.067964553833008, 23.067964553833008, 23.067964553833008, 23.067964553833008, 23.067964553833008, 23.043338775634766, 22.93592071533203, 22.93592071533203, 22.93592071533203, 22.766937255859375, 22.715959548950195, 22.629425048828125, 22.388309478759766, 22.21173858642578, 22.21173858642578, 22.21173858642578, 22.170246124267578, 22.028911590576172, 22.028911590576172, 22.028911590576172, 22.028911590576172, 22.028911590576172, 22.028911590576172, 22.028911590576172, 22.028911590576172, 22.028911590576172, 21.974262237548828, 21.862382888793945, 21.862382888793945, 21.69058609008789, 21.610870361328125, 21.606658935546875, 21.606658935546875, 21.606658935546875, 21.606658935546875, 21.606658935546875, 21.606658935546875, 21.606658935546875, 21.606658935546875, 21.606658935546875, 21.606658935546875, 21.606658935546875, 21.606658935546875, 21.606658935546875, 21.606658935546875, 21.606658935546875, 21.606658935546875, 21.606658935546875, 21.606658935546875, 21.384090423583984 ], "content": [ "After implementing a full screen interstitial ad with the test unit id the interstitial shows perfectly .", "Ad : AdMob Interstitial OS : iOS Android .. . .. . I want to show an AdMob Interstitial Ad on transition to a new screen details .", "I am trying to have an interstitial ad full screen in the transition from this VC to another VC .", "I want to make sure that Interstitial ads on android using the android admob sdk can be closed", "I am referring this google tutorial to place interstitial ads in my app https : developers.google.com admob android interstitial .", "Why interstitial looks with black background", "Interstitial ads that are triggered after a user closes another interstitial ad .", "the screen layout is getting messed after I come out of the Interstitial ad to the screen having banner ad .", "It is not full screen .", "What I would suggest you to do would be : Create a home screen that mimics your splash-screen From there call your interstitial Listen to interstitial closed callback to perform segue to the next screen .", "I need the interstitial on the app", "This interstitial ad is not in the main activity .", "Use interstitial presentInView : self.view instead", "But interstitial are working on simulator", "I have a source code with interstitial admob I ve changed Interstitial MobFox the game runs but does not show interstitial .. . .. . I put the code used to generate the interstitial to help me", "As i have created new Interstitial Ad unit ID for that app but ad is showing black with close button but if i use my old applications Ad unit ID ads will show up .", "I have implemented a method on my view controller via a protocol which my game-engine calls to present Interstitial advertisements .", "I use interstitial leadbolt ad in my app .", "I m using SpriteKit for my iOS app and need some full-screen or sometimes called interstitial iAds to pop-up every so often .", "For some reason when the interstitial is dismissed it creates an admob banner at the bottom of the screen which I can not ever hide .", "The problem is when an interstitial ad is dismissed it seems to make its own banner ad and place it at the bottom of the screen .", "For some reason when I dismiss an interstitial ad it is making a banner ad at the bottom of the screen that is not ever going away .", "This Stack question has got me wondering again though iAd Admob Interstitial Integration on iPhone http : stackoverflow.com questions 19102935 iad-admob-interstitial-integration-on-iphone .. . .. . So are full screen interstitials possible on iPhone using iAds", "the interstitial shown when the activity launch .", "It is not possible to programatically close an interstitial ad .", "Here is a screenshot before the interstitial is shown :", "In AdMob s DOC https : firebase.google.com docs admob android interstitial page you can find some examples :", "I use this example : AdMob Android Guides - Interstitial Ad https : developers.google.com mobile-ads-sdk docs admob advanced .", "In my android app I m using MoPub http : www.mopub.com to show an interstitial on app exit .", "I tried integrating InMobi interstitial ad to my android application by following the instructions mentioned here .", "How to show interstitial ads", "The first interstitial displays fine and when interstitialWillDismissScreen is called it exits back to the game and reloads a new interstitial as it s supposed to .", "Possible duplicate of Swift Admob Interstitial Error http : stackoverflow.com questions 37455298 swift-admob-interstitial-error", "when i display interstitial ads with .. . .. . interstitial presentFromViewController : self .. . .. . i get the warning that this method is deprecated in iOS 7 .", "in my swift game when I dismiss an admob interstitial it creates a banner at the bottom of the screen that never ever goes away .", "The interstitial will only show to the user on the transition to the details screen and not on every transition as I don t want to obstruct the app experience .", "I ve implemented the Facebook Network SDK in my app in form of an Interstitial Ad which appears when a UIViewController is loaded to screen .", "The interstitial ad is only supposed to load on one screen -- and it loads fine when I test it in the xcode simulator .", "setContentView mLayout I didn t get the issue full interstitial ads are popup right", "I ve been trying to get my app to where it can display multiple interstitial iAd s through a sequence of clicking a button click-click-Interstitial-click-click-click-interstitial .", "Hey.. . @user1888143.. . Interstitial ads of Google", "And i know interstitial needs to be loaded .", "If there was no interstitial ad then perform the segue as normal .", "GameScene The interstitial function no longer happens .", "I have two kind of ads : banner and interstitial .", "I want to ensure that interstitial is shown if it s available .", "What s the behavior of the admob interstitial after an error occurs", "Possible duplicate of Swift Interstitial Making a Banner Ad", "Interstitial ads that trigger after every user click .", "You re trying to present interstitial from itself .", "Unlikely to be an issue of too few requests for an interstitial .", "Corrected the typo in Request next interstitial : onAdLoaded - onAdOpened", "You need to explicitly load an interstitial each time .", "Are test interstitial ads not served on test devices", "It has to do with how you are presenting the interstitial ad : .. . .. . Completing an Advertising Action .. . .. . If the full-screen ad displayed the rich media ad inside your app it calls your delegate s interstitialAdActionDidFinish : method after the ad finishes .", "I use sdl2 for android and I trying to show interstitial ads in my app but it s doesn t show .", "I followed the instructions here https : developers.google.com mobile-ads-sdk docs admob android interstitial .", "I ve integrated InMobi into my Android App and it doesn t fetch any ads when the app is first run Banner or Interstitial .", "We re developing an app using mobclix to provide advertisements .", "If I comment this line setContentView mLayout and call displayinterstitial all works fine except all sdl native content screen is black : - .. . .. . And question is How to make work interstitial ads with sdl on android", "I d bet this is your issue : .. . .. . You re presenting your interstitial and then immediately overwriting your interstitial .", "The problem is from the code I have is a @5 seconds delay from the moment that interstitial function start until interstitial appear checked in LogCat .", "How to make a android app which will-change a particular wallpaper when button is presses and will successful message and will show Interstitial Ads when back button is pressed", "I have an issues with interstitial ad using admob for Android which is the commercial video still running even I tap home button or goes to background .", "Take a look at appodeal.com +signup http : appodeal.com +signup .Using it on android they pay an eCPM of 7-9 in average and support interstitials and interstitial video", "Don t forget to cycle the interstitial after each presentation the interstitial ad object gets released after presentation which is the biggest difference between an interstitial ad and a banner type ad .", "That way once the user is done with the interstitial they will be back to MainVC .", "What is happening is the Interstitial loads then immediately closes .", "Or is the interstitial ad actually shown in a new process .. .", "is i have to create the adview of interstitial ad", "Test Interstitial Ads are working on my emulator .", "I want to preload the interstitial ad in one activity .", "I have a problem with interstitial ads from Apple .", "We show interstitial iAds between levels .", "Change this to a larger number to give the interstitial time to load .", "I show a full screen advertisement with this code which works showing a full page advertisement .", "I have a question on interstitial ads .", "Is there a way to force interstitial to release memory", "I have a simple interstitial DFP DoubleClick for Publishers ad in my Android app .", "But every time I switch from the activity showing interstitial ad to activity showing banner ad my screen gets corrupted .", "Gameover method where i am trying to put interstitial", "Banner AD Works Properly But Interstitial AD Shows Ad for One Time .", "I m trying to add an interstitial to my app that uses setContentView .", "Today I noticed AdMob is offering rewarded interstitial option .", "I recently put Admob interstitial ads in my game .", "I just added Admob interstitial ads to my Swift SpriteKit app .", "http : stackoverflow.com questions 37475218 swift-interstitial-making-a-banner-ad", "And for interstitial delegates you will need to implement GADInterstitialDelegate to able to use it .", "I want the interstitial to appear before the user clicks on a button in an app .", "Click again and there is a message The interstitial didn t finish loading or failed to load .", "Interstitial ads loading unexpectedly while a user is viewing the app s content .", "Here is the code : .. . .. . Is there any way to cache the interstitial before that function is called .", "I ve also been waiting for interstitial ads for iPhone from iAd .", "I still have not received any interstitial iAds as of this moment .", "Will update answer again if and when I do start receiving interstitial iAds .", "@DanielStormApps this works almost just interstitial presentFromViewController : self is deprecated since iOS7 .", "When I run my app on simulator the interstitial runs fine .", "Yes I do see the test ad on interstitial every time .", "So I ve supposed that interstitial loaded contents are kept in some way in memory even if interstitial becomes eligible for GC ." ] }
{ "confidence": [ 39.8659782409668, 37.65336227416992, 36.98920440673828, 35.990814208984375, 34.44092559814453, 34.05758285522461, 33.866233825683594, 33.421104431152344, 31.81851577758789, 31.20363998413086, 30.937877655029297, 30.852638244628906, 30.63930892944336, 29.995906829833984, 29.58074951171875, 29.56707000732422, 29.369712829589844, 29.05764389038086, 29.057464599609375 ], "content": [ "Question : null .. . Answer : I just added Admob interstitial ads to my Swift SpriteKit app . The problem is when an interstitial ad is dismissed it seems to make its own banner ad and place it at the bottom of the screen . It won t go away and I can t make it go away . I have a banner ad on the menu scene but it only displays on that scene and using prints I have confirmed it is a different banner . .. . .. . The problem banner then blocks the game and vital UI in the store . I need this fixed it made its way onto the live version of my app so if anyone has any clue what is going on please post . For reference if you need to see my app here is the link https : itunes.apple.com us app frog-leap id1054643963 ls 1 mt 8 to it in the app-store . And no I m not just posting the link-to try and earn 0.01 from advertisements from you . Comment : I still desperately need help with this . For some reason when I dismiss an interstitial ad it is making a banner ad at the bottom of the screen that is not ever going away . It is blocking parts of my game and ruining it . Comment : Possible duplicate of Swift Interstitial Making a Banner Ad http : stackoverflow.com questions 37475218 swift-interstitial-making-a-banner-ad", "Question : null .. . Answer : I am currently developing an iOS app could be Android or sth else that s not the issue here and have just included the MoPub kit through fabric in order to monetize the app through ads . After implementing a full screen interstitial ad with the test unit id the interstitial shows perfectly . However when using my personal ad unit ID the ad doesn t show up . What I get from the console is the following : .. . .. . N.B : if I do the exact same process with the banner no issues for some reason I ignore it only happens to me with the interstitial . Does anyone know how to solve this issue", "Question : How to show interstitial ads I use sdl2 for android and I trying to show interstitial ads in my app but it s doesn t show . If I comment this line setContentView mLayout and call displayinterstitial all works fine except all sdl native content screen is black : - .. . .. . And question is How to make work interstitial ads with sdl on android Full SDLActivity code here : http : pastebin.com DsRRtRS5 Comment : Hey.. . @user1888143.. . Interstitial ads of Google or MillennialMedia or AdMob Comment : Admob and i use this example developers.google.com mobile-ads-sdk docs admob advanced https : developers.google.com mobile-ads-sdk docs admob advanced .. . Answer : Comment : It s generally a good idea to add some explanation to your code not just post a block of code as your answer .", "Question : How to show interstitial ads I use sdl2 for android and I trying to show interstitial ads in my app but it s doesn t show . If I comment this line setContentView mLayout and call displayinterstitial all works fine except all sdl native content screen is black : - .. . .. . And question is How to make work interstitial ads with sdl on android Full SDLActivity code here : http : pastebin.com DsRRtRS5 Comment : Hey.. . @user1888143.. . Interstitial ads of Google or MillennialMedia or AdMob Comment : Admob and i use this example developers.google.com mobile-ads-sdk docs admob advanced https : developers.google.com mobile-ads-sdk docs admob advanced .. . Answer : It seems that you have not mentioned : displayInterstitial anywhere in onCreate Method You sure the code execution reaches the displayInterstitial method Also you will have some point where the code returns after the ad has been fully loaded and ready to display . Such as : Comment : It s a little strange situation for me . If I comment this line setContentView mLayout and call displayinterstitial all works fine and interstitial shows fine on any function i call it . but sdl content doesn t show . But if I dont t comment this line SetContentView mLayout and SDL native content shows correctly interstitial show only if i do : interstitial.setAdListener new AdListener public void onAdLoaded displayInterstitial Comment : And i know interstitial needs to be loaded . I see in logcat when it s loaded and call it but it doesnt shows . Comment : setContentView mLayout I didn t get the issue full interstitial ads are popup right Doesn t need to have a layout set.. . which we are trying in setContentView mLayout Comment : mLayout is for showing SDL native c++ content and interstitial ads doesn t shows if SDL content shows but if I coment itSetContentView mLayout i.e . I don t show SDL content when interstitial works fine . Comment : My SDL apps needs setContentView mLayout to show it self : -", "Question : null .. . Answer : I am trying to have an interstitial ad full screen in the transition from this VC to another VC . It is not full screen . The navigation bar iAd banner view and tab bar are all in the view instead if the interstitial ad being fullscreen . Also instead of opening when they transition to the detailedVC it happens when they click the back button .", "Question : I have implemented a method on my view controller via a protocol which my game-engine calls to present Interstitial advertisements . I want to prevent the control loop from returning to the caller while a full screen advertisement is in play and not affect subsequent animations of SKScene objects happening while the ad cleans up and delays processing . I have achieved this with the following code which checks if an advert will be presented and blocks the current thread until the advert is no longer being shown and the view isn t unloading for that ad . Without the dismiss check my transitions appeared to be effected too early . I know that the iAD model is simpler in iOS7 no need to implement delegates etc . But what is the right way of waiting for interstitial ads to complete in iOS7 . Note I m using SpriteKit not storyboarding . Do I have to revert to using iOS6 or less style delegates .. . Answer : The code above does not work on iOS8 tested on iPhone 4s in simulator it will loop infinitely . So I ve had to change it . This isn t perfect there is still a bit of jerkiness between transitions but is less hacky . First in the view controller create a helper method to pause and un-pause the current SKView .. . .. . then make your full screen ad method pause the view immediately but un-pause if adverts didn t show . You ll un-pause later . Then handle when your view comes back into play - and resume animations . The key thing is to make sure after you call the presentFullScreenAd method that you put your code in follow on block actions against nodes in the view so that you don t have to worry about when the ads are gone do this bit of code . If anyone has any refinements - please ad . I ve purposefully not included extra code where I only launch fullscreen adverts every three minutes - easy to do .", "Question : null .. . Answer : I have been Googling and reading but haven t found clear information on this yet . Ad : AdMob Interstitial OS : iOS Android .. . .. . I want to show an AdMob Interstitial Ad on transition to a new screen details . But as the user will be going back and forth a lot I don t want the ad to show on every transition . So I have a timer set to show the ad only if an ad hasn t been shown for 60+ seconds . The interstitial will only show to the user on the transition to the details screen and not on every transition as I don t want to obstruct the app experience . Does this meet AdMob policies or is this a violation", "Question : My developer and I had previously tried to get interstitial adverts loading on iPhone and iPad however only managed to get this working on iPad . During our testing we discovered that interstitials weren t supported on iPhone but since the release of iOS7 some people now say this is possible . However I can t find any decent documentation on this . This Stack question has got me wondering again though iAd Admob Interstitial Integration on iPhone http : stackoverflow.com questions 19102935 iad-admob-interstitial-integration-on-iphone .. . .. . So are full screen interstitials possible on iPhone using iAds Comment : They don t support iAds yet but many other networks like Admob Amazon and Chartboost . Take a look at appodeal.com +signup http : appodeal.com +signup .Using it on android they pay an eCPM of 7-9 in average and support interstitials and interstitial video .. . Answer : My original answer is starting to age away so here s a newer Swift implementation : .. . .. . This implementation uses a Manual ADInterstitialPresentationPolicy so we can present our interstitials at our own intervals . When manually presenting your interstitial it does not load with its own close button to dismiss itself . So what I ve done is created a UIView to present the interstitial in and used the interstitial s delegate methods to dismiss the UIView . The inconsistency with receiving an ad from the iAd network still arises when testing . Sometimes you receive an ad sometimes it fails to load which allows us to request a new ad and sometimes nothing happens at all . This just seems to be the nature of iAd s interstitials . Comment : This is great thanks Comment : i use above code but always got error msg didFailWithError : Error Domain ADErrorDomain Code 3 The operation couldn t be completed . Ad inventory unavailable UserInfo 0x7fe5584be760 ADInternalErrorCode 3 NSLocalizedFailureReason Ad inventory unavailable ADInternalErrorDomain ADErrorDomain Requesting new ad Ad not loaded-------- i enable setting developer fill rate to always 100", "Question : i have created one app and i am using admob Interstitial Ads . As i have created new Interstitial Ad unit ID for that app but ad is showing black with close button but if i use my old applications Ad unit ID ads will show up . I dont know why this issue is happening Thanks . .. . Answer : For a newly created ad unit it may take some time before getting live ads . Add your device as a test device and check with test ads . They should render fine . Comment : yes you are right . i have added test device and found code is working ads are showing but as app is now live on play store from last 20 hrs . still it was showing me blank ads . Comment : probably some network issue or faulty caching . try clearing cache deleting ad caches using some cleaning app . or reinstall . also try on other device or second user on the same device Comment : also may be ur app has not sent enough requests and the ad unit id is still warming up on servers despite being live for 20 hours . just a possibility . Comment : Unlikely to be an issue of too few requests for an interstitial . If that were the case then no ad would have been made available in the first place .", "Question : I want to make sure that Interstitial ads on android using the android admob sdk can be closed After some search it seem to me that this is not possible due to the ad being a separate activity . what i want to do is close the ad after 5 seconds . Can someone assure me that closing the the interstitial ad is impossible and if there s another hack .. . Answer : It is not possible to programatically close an interstitial ad . Comment : But any hack is possible Comment : Not that I know of . Comment : Okay thanks man", "Question : null .. . Answer : We re developing an app using mobclix to provide advertisements . Our android version works as desired but our iOS version occasionally gets fullscreen I believe they call them interstitial ads showing up without clicking on the ad banner . This is extremely irritating as it happens even when you re interacting with the app . Edit : we ve now seen the issue on android as well so it s not iOS specific . We ve made sure that we re returning NO from adViewCanAutoplay and returning YES from richMediaRequiresUserInteraction although that doesn t seem related . We also have Allow Auto-play Ads in our dashboard set to No for all ad units and the Platform : iPhone Ad Unit : Fullscreen has Ads Running set to No .. . .. . We ve submitted a support request from mobclix but they ve just said we need to send them screenshots of the ads so they can pull them . It seems weird that their functionality can t detect an ad trying to resize the ad banner to fullscreen and prevent it and doubly weird that they re expecting us to curate their content for them . Note : this is after waiting a week to see if changing settings in the dashboard etc takes a while to go into effect . Does anyone know of a way to make mobclix behave Comment : are you still having this problem or did you manage to get it resolved Comment : Mobclix told us that an ad provider was serving the wrong sized ads and we should disable them as an provider and now the problem seems to be gone . I wouldn t call this resolved as this doesn t fix the problem of mobclix functionality not explicitly disallowing oversized ads . Currently looking into other ad middleware and if we ever get oversized ads again without asking for them that ll force our hand Comment : Never got a solution to this other than to block Mobile Theory as an ad provider . They apparently serve full screen ads when you re only asking for banner ads . Still not sure why mobclix s functionality can t detect that their banner is attempting to resize and just block the thing so I m not posting this as an answer . Also this is not just an iOS issue we saw one on our android version the other day .", "Question : My developer and I had previously tried to get interstitial adverts loading on iPhone and iPad however only managed to get this working on iPad . During our testing we discovered that interstitials weren t supported on iPhone but since the release of iOS7 some people now say this is possible . However I can t find any decent documentation on this . This Stack question has got me wondering again though iAd Admob Interstitial Integration on iPhone http : stackoverflow.com questions 19102935 iad-admob-interstitial-integration-on-iphone .. . .. . So are full screen interstitials possible on iPhone using iAds Comment : They don t support iAds yet but many other networks like Admob Amazon and Chartboost . Take a look at appodeal.com +signup http : appodeal.com +signup .Using it on android they pay an eCPM of 7-9 in average and support interstitials and interstitial video .. . Answer : I ve also been waiting for interstitial ads for iPhone from iAd . I finally have it implemented into one of my apps and it is running and showing test ads just fine . The app is currently in review and I will update my answer once it is approved and I can test if any actual ads are being served . In the meantime here is the code I used to implement iAd interstitials : .. . .. . ViewController.h .. . .. . ViewController.m .. . .. . I just call - void showFullScreenAd after the user performs a certain action . For more information refer to UIViewController iAd Additions Reference https : developer.apple.com library ios documentation iAd Reference UIViewController iAd Additions Reference Reference.html apple ref occ instm UIViewController requestInterstitialAdPresentation .. . .. . EDIT : 01 03 14 The app update was approved and has been live for 12 hours now . I still have not received any interstitial iAds as of this moment . It may be due to the lack of inventory for interstitial ads on iPhone or it may have something to do with the following message I ve received in my iAd module on iTunes Connect . The message reads .. . .. . When you submit your app app name for approval it will also be reviewed by iAd for use on the App Network to determine its appropriateness for receiving ads from iAd advertisers . Once your app is approved you will be ready to start earning revenue for ads that run in your app . I ve never received this message before I usually receive the Your app is now eligible to receive ads message as soon as the update is released in the App Store . It s either because of the new implementation of interstitial ads in my app or Apple has updated some of its iAd procedures . Will update answer again if and when I do start receiving interstitial iAds . In the meantime you may test it yourself on my app +Quotes https : itunes.apple.com us app +quotes-discover-share-inspirational id653287635 mt 8 . The above code is invoked and an interstitial ad should show once a user shares via Facebook within the app . EDIT : 01 07 14 Contacted iAd directly and received a response today .. . .. . Hello Daniel Initial fill rates will reflect the recent launch of interstitials on iOS 7 . Thank you for your patience as we ramp up ad serving . If you haven t already we recommend you integrate standard portrait and landscape iAd banners in your app to take advantage of all available types of advertising inventory . Finally for future reference when you submit your app for approval it will also be reviewed by iAd to determine its appropriateness for receiving ads from iAd advertisers . Therefore it may take a few days for your new iAd enabled app to begin receiving ad impressions . Best Regards iAd App Network Support .. . .. . So interstitial iAds for iPhone do work with iOS 7.0 and above but have a low fill rate currently . Comment : Is the code iOS7 only Look forward to seeing your update once your app goes live . Comment : @Buckers Yes the new iAd additions require iOS 7.0 or above noted here UIViewController iAd Additions Reference https : developer.apple.com library ios documentation iAd Reference UIViewController iAd Additions Reference Reference.html apple ref occ instm UIViewController requestInterstitialAdPresentation Comment : @DanielStormApps this works almost just interstitial presentFromViewController : self is deprecated since iOS7 . Use interstitial presentInView : self.view instead Comment : anyone else have a black screen when the ad finished delegate is called Comment : @4GetFullOf stackoverflow.com a 26965071 2108547 http : stackoverflow.com a 26965071 2108547", "Question : I want to make sure that Interstitial ads on android using the android admob sdk can be closed After some search it seem to me that this is not possible due to the ad being a separate activity . what i want to do is close the ad after 5 seconds . Can someone assure me that closing the the interstitial ad is impossible and if there s another hack .. . Answer : It s going to be a very late answer but I faced similar issue . A trick can be to call the back button event programmatically . this.dispatchKeyEvent new KeyEvent KeyEvent.ACTION DOWN KeyEvent.KEYCODE BACK .. . .. . As whenever you press on back button the interstitial ad is closed so firing the back button event will eventually close the interstitial ad . Rest depends on the requirement .", "Question : null .. . Answer : I came across a very weird issue when trying to implement MobFox interstitial ads into my app . The moment the interstitial is shown the whole view of my app moves up about 20px even the status bar goes out of the screen leaving some white space on the bottom of the app . Is this some iOS 9 issue I could not reproduce the problem however it happens trough out my whole app . Here is a screenshot before the interstitial is shown : enter image description here http : i.stack.imgur.com AABdf.png .. . .. . And this is what happens after it is shown : enter image description here http : i.stack.imgur.com KUI2u.png .. . .. . Any ideas what is going on here", "Question : I used to display AdMob banner on my future apps and I d like to give a try to the interstitial ads . I checked the AdMob SDK for implementation and I copied their example source because it was exactly what I want i.e . the interstitial shown when the activity launch . I tried it on emulator and on my Galaxy no ad has been displayed . Here is the source code : .. . .. . The imports are OK and the Google Play Services library is of course imported . I use this example : AdMob Android Guides - Interstitial Ad https : developers.google.com mobile-ads-sdk docs admob advanced . Could someone tell me what s wrong in my code Comment : what logcat says. . .. . Answer : You didn t call displayInsterstitial . But what you should do is call the listener for the interstitial : .. . .. . It will then implements the Listener to your Activity and then display it onAdLoaded or something .", "Question : I created an iOS app that simulates a shaver . The user turns on the shaver and it makes some noise the user turns off the shaver and the noise stops and it shows an interstitial ad from AdMob . So there s a button in the center of the screen to switch ON OFF . After three months of earnings I get this email from google saying that they blocked the ads for this reason : .. . .. . .. . .. . LAYOUT ENCOURAGES ACCIDENTAL CLICKS - INTERSTITIAL ADS : Publishers are not permitted to encourage users to click AdMob interstitial ads in any way . This includes any implementation that may encourage accidental clicks such as placing an interstitial ad in a way that prevents viewing the app s core content or placing an interstitial ad in a way that interferes with navigating or interacting with the app s core content and functionality . Please review how you ve implemented interstitial ads and be mindful of the following common examples of non-compliant implementations : .. . .. . Interstitial ads that appear before the app has opened or after the app has closed . Interstitial ads that are triggered after a user closes another interstitial ad . Interstitial ads loading unexpectedly while a user is viewing the app s content . Remember to only serve interstitials between pages of content . Interstitial ads that trigger after every user click . Interstitial ads that appear during periods of game play or heavy user interaction . .. . .. . .. . .. . As I said before the ad shows up when the user pushes on the button to stop the sound . It s not suddenly popping up . Can someone help me since I don t want my account to be blocked .. . Answer : Based on the reasons that are stated in the email I would say that this is the case because either the ad is showing right after you clicked the button so the user might click on the ad when he she is clicking once too many to stop the shaver Which would be that it is loading while the user is viewing the app s content . Or it is because it is triggererd after every second user click which is of course not after every click but I think you might get the gist .. . .. . Of course it would be best if you could just contact Google to ask what seems to be the problem but I do not think that will work . Another option would be to have a small part of the app itself show an ad instead of using an interstitial ad . But that is of course up to you to think of an alternative . Comment : The ad shows when the user switches to OFF . I thought it was ok to show an ad after a click . I can t find a way to contact them . I need the interstitial on the app", "Question : I want to use interstitial ads in my app so I implemented all necessary delegate methods . The problem is if I use self requestInterstitialAdPresentation to show the ad only the interstitialAdDidLoad : method gets called . The interstitialAdActionDidFinish : methods doesn t get called.. . But if I use the deprecated self.interstitial presentFromViewController : self to show the ad everything works . Is there anything new to implement to get things work .. . .. . Thanks in advance .. . Answer : iOS 9.2.1 Xcode 7.2.1 ARC enabled .. . .. . @Jellyjoey I confirmed viewDidAppear is called when the ad is closed . And as you might expect when you tap the ad viewDidDisappear gets called . It has to do with how you are presenting the interstitial ad : .. . .. . Completing an Advertising Action .. . .. . If the full-screen ad displayed the rich media ad inside your app it calls your delegate s interstitialAdActionDidFinish : method after the ad finishes . Your implementation of this method should restore any services paused by your app when the action started . .. . Important : If your app was moved into the background because the willLeave parameter was YES then the app s user-interface is never covered by the banner view and your app does not receive a call to interstitialAdActionDidFinish : . However if your interface was covered by the banner view your app could still be moved into the background later either because the advertisement launched another app or because the user chose to do so . In all cases if your user-interface was covered by the banner view it is uncovered and your delegate s interstitialAdActionDidFinish : is invoked before your app moves to the background . Because the app may be moving into the background your delegate should return quickly from its interstitialAdActionDidFinish : method . To view the excerpt above and the rest of the guidelines for interstitial ads : .. . .. . https : developer.apple.com library ios documentation UserExperience Conceptual iAd Guide Full-ScreenAdvertisements Full-ScreenAdvertisements.html apple ref doc uid TP40009881-CH5-SW24 .. . .. . Here are two examples provided by Apple of how to use full page ads : .. . .. . https : developer.apple.com library ios samplecode iAdInterstitialSuite Introduction Intro.html apple ref doc uid DTS40010627-Intro-DontLinkElementID 2", "Question : null .. . Answer : I know this is a frequently asked question but I didn t find my answer after reading all the similar questions . So here is my issue I am integrating Ads in my application and basically what I m trying to achieve is to show an Interstitial during the SplashScreen just before accessing the HomePage . For now this is what I have : .. . .. . - Launch the App - Display the SplashScreen - Display the HomePage and right after Display the Interstitial . .. . .. . What I want : .. . .. . - Launch the App - Display the SplashScreen - Display the Interstitial and when the Ad is closed Display the HomePage . .. . .. . I can display the Interstitial during the SplashScreen but my performSegueWithIdentifier is not working either it shows me a Blackscreen or the App blocks on the Splas enter code here hScreen . To illustrate what I m saying here is some code of my SplashScreen ViewController . The Interstitial Delegate : .. . .. . And the displayHome method called when the user closes the Ad : .. . .. . I think this is a simple behaviour maybe I don t really understand how Segues work but if I don t call the Interstitial and instead directly call my HomePage it is working . Thank you for reading let me know if you have some advices . Comment : As far as I can remember you can t really control interstitial lifecycle as it is treated like a modal . I have code that does exactly what you want to achieve but don t have access to it right now . What I would suggest you to do would be : Create a home screen that mimics your splash-screen From there call your interstitial Listen to interstitial closed callback to perform segue to the next screen .", "Question : when i display interstitial ads with .. . .. . interstitial presentFromViewController : self .. . .. . i get the warning that this method is deprecated in iOS 7 . But it still works fine When i display the ad view with .. . .. . i get no warning and the ad is loading but there is no X in the ad that the user can close the ad . Do somebody knows how to fix this Comment : Did you get to the bottom of this Also when the ad is tapped I get a black screen instead of the view I presented the ad in . .. . Answer : hey there this is the troublemaker interstitial presentInView : self.view instead try this delegate methods t should be removed manualy .. . .. . I have the same bug Use the old API or put custom x button .I thinks this is a bug from presentinView . i am not sure it could be apple desired feature there s no documentation on this.At least i haven t seen any.Please share if you find something official on this ." ] }
[ "yes-answer-long", "yes-answer-short" ]
ios
UNK_RELATION
mathjs@node.js@67
mathjs -- math.js is an extensive math library for javascript and @placeholder .
{ "confidence": [ 30.76060676574707, 29.99070930480957, 26.921842575073242, 25.593647003173828, 24.049163818359375, 19.764135360717773, 18.110851287841797, 18.110851287841797, 13.602041244506836, 13.602041244506836, 13.602041244506836, 13.602041244506836, 13.602041244506836, 13.602041244506836, 13.602041244506836, 13.602041244506836, 13.602041244506836, 13.602041244506836, 13.602041244506836 ], "content": [ "I think that the subset function in mathjs https : github.com josdejong mathjs blob master docs datatypes matrices.md does this .", "How might I do these things with mathjs", "The expression parser of math.js doesn t support adding custom operators so you will have to clone the project and adjust the code of the parser for that : .. . .. . https : github.com josdejong mathjs blob master lib expression parse.js .. . .. . Note that right now the character is used as start of a comment in the parser .", "I want to be able to write a J-like language using the mathjs math.parser function result .", "I just now realize that you made maintain mathjs o O Thanks for showing me peg and jison they are perfect tools for the job at hand .", "Is there a more elegant way to do this in javascript node", "Possible duplicate of How would I extend the JavaScript language to support a new-operator", "http : stackoverflow.com questions 20762338 how-would-i-extend-the-javascript-language-to-support-a-new-operator", "I have to update retrieve values from a matrix based on the index for example a 2 3 refers to the element in the second row and third column that can now be read or set .", "Is there a way to do this with sylvester https : github.com NaturalNode node-sylvester", "Let s say I want to define an operator that returns the length of an array .", "Ideally it would work like this : .. . .. . Then for fun an operator that takes two arrays and combines them .", "If I cannot do them what tool might I use instead", "Why it s different .. . .. . I want to be able to use it like this :", "@Vihan It s sort of related but I specifically want to use them in the parser eval method .", "If you want to create your own parser for your own specific syntax you could do so using a parser-generator like jison http : zaa.ch jison or peg http : pegjs.org .", "Okay thanks", "I ll accept but still leave the bounty up until later .", "ok good to hear" ] }
{ "confidence": [ 43.98497772216797, 36.14691925048828 ], "content": [ "Question : I want to be able to write a J-like language using the mathjs math.parser function result . Let s say I want to define an operator that returns the length of an array . Ideally it would work like this : .. . .. . Then for fun an operator that takes two arrays and combines them . How might I do these things with mathjs If I cannot do them what tool might I use instead Why it s different .. . .. . I want to be able to use it like this : Comment : Possible duplicate of How would I extend the JavaScript language to support a new-operator http : stackoverflow.com questions 20762338 how-would-i-extend-the-javascript-language-to-support-a-new-operator Comment : @Vihan It s sort of related but I specifically want to use them in the parser eval method . .. . Answer : The expression parser of math.js doesn t support adding custom operators so you will have to clone the project and adjust the code of the parser for that : .. . .. . https : github.com josdejong mathjs blob master lib expression parse.js .. . .. . Note that right now the character is used as start of a comment in the parser . If you want to create your own parser for your own specific syntax you could do so using a parser-generator like jison http : zaa.ch jison or peg http : pegjs.org . Comment : Okay thanks I ll accept but still leave the bounty up until later . Comment : I just now realize that you made maintain mathjs o O Thanks for showing me peg and jison they are perfect tools for the job at hand . Comment : ok good to hear", "Question : null .. . Answer : I have to update retrieve values from a matrix based on the index for example a 2 3 refers to the element in the second row and third column that can now be read or set . Is there a way to do this with sylvester https : github.com NaturalNode node-sylvester I think that the subset function in mathjs https : github.com josdejong mathjs blob master docs datatypes matrices.md does this . Is there a more elegant way to do this in javascript node" ] }
[ "yes-answer-long", "yes-answer-short" ]
node.js
UNK_RELATION
wso2as@hosting@137
wso2as -- wso2 application server is a lightweight high performing easy to manage and maintain platform for service and web application @placeholder .
{ "confidence": [ 40.66392517089844, 39.679283142089844, 38.68233108520508, 38.59417724609375, 38.172767639160156, 35.911563873291016, 35.478092193603516, 34.80995559692383, 33.34927749633789, 33.07392120361328, 32.925628662109375, 32.27122116088867, 31.93291473388672, 31.6746826171875, 31.083663940429688, 30.836109161376953, 30.80908203125, 29.953243255615234, 29.953243255615234, 29.427078247070312, 29.422168731689453, 28.657791137695312, 28.467079162597656, 27.318973541259766, 27.268312454223633, 27.169363021850586, 26.992202758789062, 26.8746280670166, 26.409269332885742, 26.136356353759766, 26.136356353759766, 26.129932403564453, 26.10715103149414, 26.106122970581055, 26.02663803100586, 26.021514892578125, 25.780412673950195, 25.282922744750977, 25.282922744750977, 25.251676559448242, 25.136993408203125, 24.650239944458008, 24.624866485595703, 24.567447662353516, 24.520431518554688, 24.4149169921875, 24.21175765991211, 24.152633666992188, 24.13114356994629, 24.079376220703125, 23.718984603881836, 23.718984603881836, 23.596405029296875, 23.561481475830078, 23.532665252685547, 23.532665252685547, 23.209789276123047, 22.937362670898438, 22.937362670898438, 22.673564910888672, 22.49031639099121, 22.488441467285156, 22.461872100830078, 22.419469833374023, 22.403766632080078, 22.350250244140625, 22.13549041748047, 21.988391876220703, 21.988391876220703, 21.988391876220703, 21.988391876220703, 21.9471435546875, 21.66547393798828, 21.348304748535156, 21.348304748535156, 21.040874481201172, 20.945816040039062, 20.899354934692383, 20.84638023376465, 20.813526153564453, 20.767000198364258, 20.767000198364258, 20.767000198364258, 20.767000198364258, 20.767000198364258, 20.628150939941406, 20.624177932739258, 20.120927810668945, 20.120927810668945, 20.10578727722168, 19.91263198852539, 19.624988555908203, 19.624988555908203, 19.624744415283203, 19.624744415283203, 19.543155670166016, 19.477645874023438, 19.477645874023438, 19.477645874023438, 19.477645874023438 ], "content": [ "Exists the solution for WSO2 Application Server", "I am developing an application service based on WSO2 AS .", "I am using wso2 application server for building a SaaS application .", "I have installed Wso2-Application server 5.3.0 on ubundo 14.0 . when i run echo web service try this service .", "WSO2 Application Server 5.3.0 is not a fully fledged JEE container like JBoss .", "I am using WSO2 Developer Studio and currently have a Web Application and a WSO2 Composite Application Project .", "UPDATE : .. . .. . I have deployed this in WSO2 application server http : wso2.com products application-server in CXF environment .", "I compiled pizza shack sample application and deployed directly on WSO2 Application Server .", "wso2 app server version is : 5.3.0 The application has previously been successfully deployed to a jboss enterprise app server without this error .", "We are using WSO2 Carbon 4.2.0 through the WSO2 Application Server AS package .", "I am deploying this in wso2 application server http : wso2.com products application-server and Jax rs implementation is Axis2 CXF .", "I try to deploy a war web application into WSO2 AS 5.3.0 and get an unexpected error regarding to slf4j as below .. . .. .", "From where wso2 application taking this ip-address", "I m using WSO2 Application Server 5.2.1 and Oracle Database XE 11g and developing testing on Windows 7 .", "When i did Deploy the web service in WSO2 Application server then its work fine but After clicking Find Services i can t see available RESTful services .", "The logic here is slightly complex hence a custom application was chosen over the use of WSO2 DSS .. . .. . This application is uploaded on WSO2 AS 5.2.1 and runs quite seamlessly .", "Alternately when I copied the file over to c : wso2as-5.2.1 Holidays.xml the application ran as expected .", "I m setting up a simple WSO2 Application Server cluster with one master node and one worker node .", "As the title says I would like to know if I can deploy fab bundles on the WSO2 application server .", "This is error since WSO2AS-5.2.1 .. . .. . A greeting .", "How to setup a WebSocket application and deploy it on WSO2 AS", "So if you provide a url which has your web application those application would be automatically deployed into the Application server .", "svn.wso2.org repos wso2 carbon platform branches turing http : svn.wso2.org repos wso2 carbon platform branches turing is the working branch for turing .", "Tried it but I get an exception below : org.wso2.carbon.CarbonException : Error while deploying webapp : StandardContext ROOT .File home ubuntu WSO2 wso2as-5.0.1 repository deployment server webapps ROOT .. .", "I just download the archive of wso2as 5.3.0 and start on windows-10 : .. . .. . After some time these exceptions occurs : .. . .. . After some search i found this issue https : wso2.org jira browse REGISTRY-2977 But this is only solve for WSO2 Governance Registry .", "then application will automatically logout when i am the service list page .", "LinkageError http : i.stack.imgur.com kZp6f.png .. . .. . The application is working well in both Tomcat 8.0.32 and Wildfly 10 Application Server .", "Is there a way to confugure WSO2AS or Liferay to get rid of this exception", "I getting the following exception while trying to deploy a liferay portal 6.2 GA4 on WSO2 Application Server 5.3.0 to the ROOT context .", "I want to customize application server replace the current JSP pages with HTML5 .", "To achieve above results the APIs of application server should be exposed as REST services .", "I am currently attempting to upgrade some existing working webservices from WSO2 App Server WSO2as-3.1.0 to the latest version of the WSO2 and other associated software and am consequently now using WSO2as-5.2.1 Axis2-1.5 and Rampart-1.6.2 under java1.8 .. . .. . On my webservice side I have the following code : .. . .. . the dataHandler is then incorporated in the service response .", "FAB requires Karaf Fuse as the OSGi application server .", "I am trying to see the SQL generated by openjpa on WSO2AS 5.3.0 .", "I am trying to upload my web application.war to wso2 as 5.2.1 and when I did that it displayed in the console the following error message .", "my intention is that the application should be deployed in an AS-cluster in order to cope with the high volume traffic .", "The Car Project contains the web application as a dependency .", "Yes it is in wso2 AM console", "Yes it is in WSo2 AM console", "The connection-string works within the context.xml and also works if I create a Data Service under WSO2 .", "And how to deploy a web-application to all nodes in this AS cluster environment .", "I have a JAX-RS Web App created by wso2 Studio .", "I am planning to use WSO2 ESB WSO2 IS and WSO2 AS for my project .", "hope this helps : .. . .. . 1 http : svn.wso2.org repos wso2 carbon platform tags turing-chunk01", "I am trying to run API Manager and Application Server on the same server along with configuration of Identify Server .", "However I m unsure what will happen if we have to cluster the AS application server .", "I found an alternative which WSO2 claimed supporting http : wso2.com products elastic-load-balancer .", "The basic issue is that when I deploy to WSO2 developer studio using car package the maven dependencies in the web application the one which car is eventually deploying are not being packaged .", "I have developed it under WSO2 Studio and deployed it with WSO2 AS Web interface all very simple .", "All WSO2 products run on top of WSO2 Carbon framework .", "But when I try to deploy the car file to WSO2 Application server the war file created does not contain the required libraries and hence the deployment of my war file is failing .", "When I deploy a webapp war to WSO2 application server it gets deployed to a context path such as MyApp How do I deploy it to the root context so that MyApp runs at", "I want to deploy .war file to the Application Server .", "Similar page WSO2 4.1.2 :", "Hi Thusitha : still getting this error- java.io.FileNotFoundException : C : WSO2AS 1.1 Holidays.xml The system cannot find the file specified", "I have a project built with Spring Boot and let me know if you can deploy WSO2AS .", "I m trying to Create RESTful web service using WSO2 Developer studio I m new to this So i used this tutorial http : codeoncloud.blogspot.com 2015 02 build-simple-java-jax-rs-restful-web.html .", "I m using WSO2 Developer Studio 3.8.0 and WSO2 AS 5.2.1 .", "Note : I tried to deploy on both WSO2 ESB and WSO2 AS .", "However after a final desparate scrape across the fs I noticed the original activemq-all jar had been copied from the wso2as repository components lib directory in to the wso2as repository components dropin directory and so was still in the classpath .", "What I don t understand is why is WSO2 looking for the file under c : wso2-5.2.1", "1 https : wso2.org jira browse WSAS-2249", "After going through the latest code of Application server I found that the tenant management APIs have been exposed as SOAP services .", "This is applicable for latest WSO2 products .", "There after if you modify your web apps say web app version 2 and commit the changes to your repository Stratos PP automatically update Application server with the new web apps .", "UPDATE .. . .. . I have write this extreme simple websocket application : .. . .. . If I deploy on Tomcat server it run correctly if I deploy on WSO2 AS 5.3.0 snapshot the websocket is unreachable .", "Actually PEP is one of the component in XACML architecture which will enforce your application to get authorized with Identity server using XACMl .", "WSO2 Carbon takes the address from your system .", "I m new to xacml questions tagged xacml and wso2 .", "I m new to wso2 and xacml.Please help me", "That page is not longer exist in any of the WSO2 products .", "Best on WSO2 AS .", "Exposes a few web service methods to perform some functionality .", "It is clearly explained in this tutorial of WSO2 IS https : docs.wso2.com display IS410 Enabling+SSO+for+WSO2+Servers .", "can you create JIRA in wso2.org jira browse WSAS https : wso2.org jira browse WSAS", "i have the following errors while deploying a maven web application on wso2 application server : .. . .. . java.lang.Exception : Error while deploying webapp : StandardContext invent360.war .File home iceman95 Development wso2as-5.3.0 repository deployment server webapps invent360.war at org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.handleWebappDeployment TomcatGenericWebappsDeployer.java : 405 at org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.handleWarWebappDeployment TomcatGenericWebappsDeployer.java : 212 at org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.handleHotDeployment TomcatGenericWebappsDeployer.java : 179 at org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.deploy TomcatGenericWebappsDeployer.java : 144 at org.wso2.carbon.webapp.mgt.AbstractWebappDeployer.deployThisWebApp AbstractWebappDeployer.java : 224 at org.wso2.carbon.webapp.mgt.AbstractWebappDeployer.deploy AbstractWebappDeployer.java : 114 at org.wso2.carbon.webapp.deployer.WebappDeployer.deploy WebappDeployer.java : 42 at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy DeploymentFileData.java : 136 at org.apache.axis2.deployment.DeploymentEngine.doDeploy DeploymentEngine.java : 807 at org.apache.axis2.deployment.repository.util.WSInfoList.update WSInfoList.java : 144 at org.apache.axis2.deployment.RepositoryListener.update RepositoryListener.java : 377 at org.apache.axis2.deployment.RepositoryListener.checkServices RepositoryListener.java : 254 at org.apache.axis2.deployment.RepositoryListener.startListener RepositoryListener.java : 371 at org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository SchedulerTask.java : 59 at org.apache.axis2.deployment.scheduler.SchedulerTask.run SchedulerTask.java : 67 at org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask.runAxisDeployment CarbonDeploymentSchedulerTask.java : 93 at org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask.run CarbonDeploymentSchedulerTask.java : 138 at java.util.concurrent.Executors RunnableAdapter.call Executors.java : 471 at java.util.concurrent.FutureTask.runAndReset FutureTask.java : 304 at java.util.concurrent.ScheduledThreadPoolExecutor ScheduledFutureTask.access 301 ScheduledThreadPoolExecutor.java : 178 at java.util.concurrent.ScheduledThreadPoolExecutor ScheduledFutureTask.run ScheduledThreadPoolExecutor.java : 293 at java.util.concurrent.ThreadPoolExecutor.runWorker ThreadPoolExecutor.java : 1145 at java.util.concurrent.ThreadPoolExecutor Worker.run ThreadPoolExecutor.java : 615 at java.lang.Thread.run Thread.java : 745 Caused by : org.wso2.carbon.tomcat.CarbonTomcatException : Webapp failed to deploy at org.wso2.carbon.tomcat.internal.CarbonTomcat.addWebApp CarbonTomcat.java : 356 at org.wso2.carbon.tomcat.internal.CarbonTomcat.addWebApp CarbonTomcat.java : 252 at org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.handleWebappDeployment TomcatGenericWebappsDeployer.java : 314 .. . 23 more Caused by : java.lang.IllegalStateException : ContainerBase.addChild : start : org.apache.catalina.LifecycleException : Failed to start component StandardEngine Catalina .StandardHost localhost .StandardContext invent360 at org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.java : 904 at org.apache.catalina.core.ContainerBase.addChild ContainerBase.java : 877 at org.apache.catalina.core.StandardHost.addChild StandardHost.java : 649 at org.wso2.carbon.tomcat.internal.CarbonTomcat.addWebApp CarbonTomcat.java : 344 .. . 25 more .. . .. . can any one please help .", "http : svn.wso2.org repos wso2 carbon platform tags turing-chunk01 products as 5.2.0 .. . .. . You need to get the tag as it contains the unmodified code of the released product .", "preferably it could be something that could be generated dynamically by a application server instance accessible in the program environment understood and used by the load balancer to route request.. . .. . .. . anyone has any idea", "Then enable SSO on authenticators.xml of each WSO2 product .", "I built a JAX-RS REST API using Developer Studio 3.8.0 JAX-RS Service Project and I deployed it in the WSO2 AS 5.2.1 .", "Using WSO2 AS 5.2.1 been unable to read a xml file in the classpath .", "But WSO2 AS 5.2.1 supports only the tomcat specific websocket implementation .", "You can use WSO2 AS 5.3.0 Alpha pack and test the new functionality .", "I am new to WSO2 API Manager using version 1.9.1 .", "I m trying to setup Http Session Replication based on WSO2 AS cluster v5.3.0 .", "WSO2 AS 5.3.0 Alpha is already released and you can try out the web socket support using the alpha pack https : svn.wso2.org repos wso2 people kasung as5.3.0-alpha .", "5.3.0 supports only JEE web profile through Apache TomEE", "That is a kinown bug wso2.org jira browse REGISTRY-2977 https : wso2.org jira browse REGISTRY-2977 you can apply the fix mentioned in the jira and create a patch for your self", "Similar page WSO2 4.1.2 : 2.bp.blogspot.com -92R83muEJjI T6kJYz4ipyI AAAAAAAAFNI http : 2.bp.blogspot.com -92R83muEJjI T6kJYz4ipyI AAAAAAAAFNI 5fsHJohyjK8 s1600 DepSync-UI-wso2-appserver.png", "If you think a bit more : the service will be called numerous time whileas the setTrustStoreParams and the setKeyStoreParams will only be needed to executed once at the server service initiate .", "I am trying to implement the WSO2 APIM + JWT assertion looking at http : lalajisureshika.blogspot.in 2013 06 passing-end-user-details-from-client-to.html and http : sumedha.blogspot.in 2012 08 using-jwt-to-send-application-user.html but the steps are not too good enough to understand .", "Downloaded from h ttp : wso2.com files Service Integration Artifacts.zip .. . .. . .. . .. . 3 .", "For more Connectors visit WSO2 ESB Connectors https : store.wso2.com", "There you can find the available cartridges you should find Application Server as a cartridge .", "After you subscribe PP will clone what is in your GIT repository url in to Application server .", "The login you have to use to the Pizza Shack application is the same you use to login to the API Store as a subscriber - Prior to deploying the PizzaApp you need to set the right consumer key consumer secret values in the web app settings and re-compile it .", "Sorry for the brevity but I am new to WSO2 .", "WSO2 Private PaaS onlys supports Git at the moment .", "WSO2 AS 5.2.1 have Websocket tomcat specific support .", "But standard JSR356 Websocket support is not available in WSO2 AS 5.2.1 ." ] }
{ "confidence": [ 50.00898742675781, 49.35405731201172, 48.60516357421875, 48.317840576171875, 48.317840576171875, 45.97479248046875, 43.233768463134766, 40.22117614746094, 39.994686126708984, 39.406463623046875, 38.94301986694336, 38.7363395690918, 38.54509735107422, 37.916133880615234, 37.83327865600586, 36.90425491333008, 36.29468536376953, 36.215782165527344, 35.64305114746094, 34.578819274902344 ], "content": [ "Question : I just download the archive of wso2as 5.3.0 and start on windows-10 : .. . .. . After some time these exceptions occurs : .. . .. . After some search i found this issue https : wso2.org jira browse REGISTRY-2977 But this is only solve for WSO2 Governance Registry . Exists the solution for WSO2 Application Server .. . Answer : I found a workaround I have a system operative in spanish I changed date-format in Control Panel to English United States", "Question : Using WSO2 AS 5.2.1 been unable to read a xml file in the classpath . Here is the code and the accompanying error : .. . .. . And the output is : .. . .. . No matter where I stuff the xml file in WEB-INF classes or in the directory of the source file it keeps looking for that file in WSO2 HOME installation directory . Very dire situation . Would appreciate your help . Comment : This is exception is because you are trying to create a File object for a location which does not exist . Where did you initialize xmlFile Comment : The file has been provided under WEB-INF classes . The absolute path of the file is c : ws02-5.2.1 repository deployment server webapps mock WEB-INF classes . What I don t understand is why is WSO2 looking for the file under c : wso2-5.2.1 Comment : Alternately when I copied the file over to c : wso2as-5.2.1 Holidays.xml the application ran as expected . I need help in figuring out how to read a classpath resource using WS02 . Thanks . Comment : can you try with getClass .getResourceAsStream Comment : Hi Thusitha : still getting this error- java.io.FileNotFoundException : C : WSO2AS 1.1 Holidays.xml The system cannot find the file specified .. . Answer : You can read the config file with the following .. . .. . context.getServletContext .getResource META-INF holidays.xml .. . .. . thanks .", "Question : i have the following errors while deploying a maven web application on wso2 application server : .. . .. . java.lang.Exception : Error while deploying webapp : StandardContext invent360.war .File home iceman95 Development wso2as-5.3.0 repository deployment server webapps invent360.war at org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.handleWebappDeployment TomcatGenericWebappsDeployer.java : 405 at org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.handleWarWebappDeployment TomcatGenericWebappsDeployer.java : 212 at org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.handleHotDeployment TomcatGenericWebappsDeployer.java : 179 at org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.deploy TomcatGenericWebappsDeployer.java : 144 at org.wso2.carbon.webapp.mgt.AbstractWebappDeployer.deployThisWebApp AbstractWebappDeployer.java : 224 at org.wso2.carbon.webapp.mgt.AbstractWebappDeployer.deploy AbstractWebappDeployer.java : 114 at org.wso2.carbon.webapp.deployer.WebappDeployer.deploy WebappDeployer.java : 42 at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy DeploymentFileData.java : 136 at org.apache.axis2.deployment.DeploymentEngine.doDeploy DeploymentEngine.java : 807 at org.apache.axis2.deployment.repository.util.WSInfoList.update WSInfoList.java : 144 at org.apache.axis2.deployment.RepositoryListener.update RepositoryListener.java : 377 at org.apache.axis2.deployment.RepositoryListener.checkServices RepositoryListener.java : 254 at org.apache.axis2.deployment.RepositoryListener.startListener RepositoryListener.java : 371 at org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository SchedulerTask.java : 59 at org.apache.axis2.deployment.scheduler.SchedulerTask.run SchedulerTask.java : 67 at org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask.runAxisDeployment CarbonDeploymentSchedulerTask.java : 93 at org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask.run CarbonDeploymentSchedulerTask.java : 138 at java.util.concurrent.Executors RunnableAdapter.call Executors.java : 471 at java.util.concurrent.FutureTask.runAndReset FutureTask.java : 304 at java.util.concurrent.ScheduledThreadPoolExecutor ScheduledFutureTask.access 301 ScheduledThreadPoolExecutor.java : 178 at java.util.concurrent.ScheduledThreadPoolExecutor ScheduledFutureTask.run ScheduledThreadPoolExecutor.java : 293 at java.util.concurrent.ThreadPoolExecutor.runWorker ThreadPoolExecutor.java : 1145 at java.util.concurrent.ThreadPoolExecutor Worker.run ThreadPoolExecutor.java : 615 at java.lang.Thread.run Thread.java : 745 Caused by : org.wso2.carbon.tomcat.CarbonTomcatException : Webapp failed to deploy at org.wso2.carbon.tomcat.internal.CarbonTomcat.addWebApp CarbonTomcat.java : 356 at org.wso2.carbon.tomcat.internal.CarbonTomcat.addWebApp CarbonTomcat.java : 252 at org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer.handleWebappDeployment TomcatGenericWebappsDeployer.java : 314 .. . 23 more Caused by : java.lang.IllegalStateException : ContainerBase.addChild : start : org.apache.catalina.LifecycleException : Failed to start component StandardEngine Catalina .StandardHost localhost .StandardContext invent360 at org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.java : 904 at org.apache.catalina.core.ContainerBase.addChild ContainerBase.java : 877 at org.apache.catalina.core.StandardHost.addChild StandardHost.java : 649 at org.wso2.carbon.tomcat.internal.CarbonTomcat.addWebApp CarbonTomcat.java : 344 .. . 25 more .. . .. . can any one please help . wso2 app server version is : 5.3.0 The application has previously been successfully deployed to a jboss enterprise app server without this error . .. . Answer : Are you able to deploy your webapp in Tomcat or TomEE WSO2 Application Server 5.3.0 is not a fully fledged JEE container like JBoss . 5.3.0 supports only JEE web profile through Apache TomEE", "Question : I just download the archive of wso2as 5.3.0 and start on windows-10 : .. . .. . After some time these exceptions occurs : .. . .. . After some search i found this issue https : wso2.org jira browse REGISTRY-2977 But this is only solve for WSO2 Governance Registry . Exists the solution for WSO2 Application Server .. . Answer : You can change your system locale to English . this is a workaround . Comment : thanks for the answer but is an workaround I tested changing only the JVM and works. . I m searching for the solution definitive . If I find out I ll post here .", "Question : I just download the archive of wso2as 5.3.0 and start on windows-10 : .. . .. . After some time these exceptions occurs : .. . .. . After some search i found this issue https : wso2.org jira browse REGISTRY-2977 But this is only solve for WSO2 Governance Registry . Exists the solution for WSO2 Application Server .. . Answer : I added the following Java Options in my startscript of APIM1.10 . : Comment : thanks for the answer but is an workaround its works. . I m searching for the solution definitive . If I find out I ll post here . Comment : Btw it should be : -Duser.language en", "Question : null .. . Answer : I getting the following exception while trying to deploy a liferay portal 6.2 GA4 on WSO2 Application Server 5.3.0 to the ROOT context . Meanwhile if I deploy the liferay portal to non-ROOT context on OWS2 AS it deploys and works fine . Also I was able to deploy LR portal to the ROOT context on pure tomcat so the problem seems in WSO2 AS . I found the similar problem with struts sorry it is in russian only http : rsdn.ru forum java 2071556 and the author says that slash should be added while creating context - some thing like this Context tx embeddedTomcat.createContext webApplName webApplName So may be there is a bug in WSO2AS Is there a way to confugure WSO2AS or Liferay to get rid of this exception Any advice is appreciated . Thanks in advance", "Question : null .. . Answer : I am currently attempting to upgrade some existing working webservices from WSO2 App Server WSO2as-3.1.0 to the latest version of the WSO2 and other associated software and am consequently now using WSO2as-5.2.1 Axis2-1.5 and Rampart-1.6.2 under java1.8 .. . .. . On my webservice side I have the following code : .. . .. . the dataHandler is then incorporated in the service response . Which I think is the standard approach . Where file is a .tmp file which is created and written to as expected . The data handler is added to a SOAP response but when the response is sent back to the client the following exception is thrown : .. . .. . I m a relative newcomer to web-services in general . So my appraisal of the situation is that something in WS02 Axis is trying to read a bean property for the commandMap which again I presume isn t defined . So if that is the case can anyone tell me where I need to define configure such a property or if I m barking up the wrong tree whether there is another fix for this . I ve spent a day trying to sort this out already and would be really grateful for any help .", "Question : I am developing an application service based on WSO2 AS . my intention is that the application should be deployed in an AS-cluster in order to cope with the high volume traffic . the cluster should be a dynamic one in order to scale up or down as per the traffic changes . also a user s service might persist in one of the instances for quite some time in case of failure a user s service should be restored in a peer instance by the backup and restore mechanism of an object archive database . So the challenge is : .. . .. . I need to tell the load balancer something about the instance in which the user service persists . so that the load balancer will always route the same user s requests to the same instance in the cluster . and in case of failure I could update the load balancer with the new instance in which the user s service had been restored . preferably it could be something that could be generated dynamically by a application server instance accessible in the program environment understood and used by the load balancer to route request.. . .. . .. . anyone has any idea thanks a lot Comment : Can t you use session replication Comment : Hello Thusitha . thanks for the response but I have no idea about session replication . Can you please elaborate a bit more Comment : You can read up docs.wso2.com display AS520 https : docs.wso2.com display AS520 Clustering+and+Http+Session+Replication Session replication is basically your current session is replicated in all other cluster nodes . .. . Answer : After googling around for some time . I found an alternative which WSO2 claimed supporting http : wso2.com products elastic-load-balancer . NGinx Plus comes with a feature named Session Persistence https : www.nginx.com products session-persistence which provides methods directing load balancer of its routing of incoming requests to a specific back end server", "Question : I m trying to Create RESTful web service using WSO2 Developer studio I m new to this So i used this tutorial http : codeoncloud.blogspot.com 2015 02 build-simple-java-jax-rs-restful-web.html . When i did Deploy the web service in WSO2 Application server then its work fine but After clicking Find Services i can t see available RESTful services . I m getting this error .. . Answer : This error can happen when you are using invalid class in cxf-servlet.xml . So make sure that the value for class is correct in the cxf-servlet.xml . You can find this file inside src main webapp WEB-INF directory .", "Question : I want to check out the app server code but don t know which repository I should check out . There are truck branches tags and many other repositories . Which repository is AS 5.2.0 .. . Answer : you can check out the chunk01 release to get the AS 5.2.0 1 . you should find AS under products- as . hope this helps : .. . .. . 1 http : svn.wso2.org repos wso2 carbon platform tags turing-chunk01 Comment : Thanks pulasthi . This helps . And I also want to check out the latest code so that I can follow your step : and Carbon 4.2 is called turing Comment : yes we have changed the naming-conventions and 4.2.0 is called turing : . svn.wso2.org repos wso2 carbon platform branches turing http : svn.wso2.org repos wso2 carbon platform branches turing is the working branch for turing . release s are done as chunks as you can see in the tags . Comment : OK I get it . thank you very much Comment : Hi I see AS repository is almost empty but I see components application-mgt consists of codes that I can find in the AS plugins folder . I wonder which components I should check out if I want to see the whole picture of AS at least I want to debug or learn how the code stream goes on . Can you show me how you manage your dev job through IDE : D Comment : Its not easy to just checkout each component you need . You can check out the whole chunk01 and then open the component you need from your ide and debug using remote debug . its not easy to understand the product by looking at each component separately", "Question : null .. . Answer : I have installed Wso2-Application server 5.3.0 on ubundo 14.0 . when i run echo web service try this service . then application will automatically logout when i am the service list page . login to portal .. . go to service list page -- https : xx.xx.xx.xx : 9443 carbon service-mgt index.jsp region region1 item services list menu .. . open try echo service -- http : xx.xx.xx.xx : 9763 services echo tryit .. . now refresh the service list page -- https : xx.xx.xx.xx : 9443 carbon service-mgt index.jsp region region1 item services list menu will redirects to https : xx.xx.xx.xx : 9443 carbon admin login.jsp Comment : I tried out the steps mentioned above but this is not reproducible .", "Question : I have wasted 2 days on this and now given up after trashing a working WSO system to go back to basics just WSO2 AS + Activemq . I just cannot get the jms transport to work . I keep getting this error .. . .. . TID : 0 AS 2015-06-01 13 : 20 : 12 179 ERROR org.apache.axis2.engine.ListenerManager - Couldn t initialize the jmstransport listener org.apache.axis2.engine.ListenerManager org.apache.axis2.transport.base.BaseTransportException : JNDI lookup of name TopicConnectionFactory returned a org.apache.activemq.ActiveMQConnectionFactory while a interface javax.jms.ConnectionFactory was expected .. . .. . I have tried the installation instructions that came with WSO2 AS and the banking sample that comes with the AS . I have googled far too many solutions that have included not putting the geronimo libraries in the AS lib directory all the way to unpacking the activemq-all jar to remove the jms class from it and repackage but still the same problem . The last thing I read from the banking sample was that this error is caused by having multiple copies of the geronimo class in my classpath but I have scoured the path and that is not true unless it is embedded in other class packages . The previous versions of AS and activemq I worked with last year worked out of the box but this is just impossible . Can anyone tell me how to get WSO2 products to work with activemq before I ditch the whole architecture and go with something else that does work out of the box Comment : if the edit from OS2 to WSO2 changed your intent you need to change it back.. . .. . Answer : Finally found the problem after multiple re-installs . Turns out the original problem is caused by the acvtivemq-all jar which can be resolved by repackaging without the jms package as I previously did . However after a final desparate scrape across the fs I noticed the original activemq-all jar had been copied from the wso2as repository components lib directory in to the wso2as repository components dropin directory and so was still in the classpath . I hate systems that do this : .. . .. . After removing that jar from the dropin directory the server booted without the error .", "Question : We have developed a custom JAX-WS application that essentially achieves two things . 1 . Exposes a few web service methods to perform some functionality . 2 . Utilizes org.quartz.Scheduler to schedule and execute some polling tasks that monitors and processes data on a few database tables . The logic here is slightly complex hence a custom application was chosen over the use of WSO2 DSS .. . .. . This application is uploaded on WSO2 AS 5.2.1 and runs quite seamlessly . However I m unsure what will happen if we have to cluster the AS application server . Logically I would think that each node will have its own instance of the custom application running within it and hence its own scheduler . Would this not increase the risk of processing the same record across both instances . Is my interpretation of the above scenario correct from a clustering perspective .. . Answer : Yes.You are correct.In cluster of app server nodes each nodes will have its own instance of the application.In your case each node will have seperate scheduler.You may consider using tasks https : docs.wso2.com display ESB490 Working+with+Tasks from ESB 4.9.0 . there WSO2 has added coordination support to work in cluster environment .", "Question : I m trying to Create RESTful web service using WSO2 Developer studio I m new to this So i used this tutorial http : codeoncloud.blogspot.com 2015 02 build-simple-java-jax-rs-restful-web.html . When i did Deploy the web service in WSO2 Application server then its work fine but After clicking Find Services i can t see available RESTful services . I m getting this error .. . Answer : This error is telling you that your class name is incorrect somewhere . Quick Tip - Scroll down and read the portion right below the error message that says Caused by : . It will give you more insight . Check your cxf-servlet.xml file to make sure the fully qualified class name actually exists in the specified package . Also check your classes that are annotated with @WebService to make sure that your endpointInterface parameter is correct . Hope this helps .", "Question : I have a project built with Spring Boot and let me know if you can deploy WSO2AS . Try deploy as war but fails any ideas This is error since WSO2AS-5.2.1 .. . .. . A greeting . Comment : It would be better if you added that stacktrace rather than adding image of it . Comment : And it traces this error . Thank you for any help . Comment : Already deployed but I had to put another version of Spring Boot 1.1.12.RELEASE . The new error but is running the WS org.springframework.beans.factory.BeanCreationException : Invocation of init method failed nested exception is java.lang.NoClassDefFoundError : Could not initialize class com.sun.xml.internal.messaging.saaj.soap.SAAJMetaFactoryImpl Comment : possible duplicate of java.lang.NoSuchMethodError : javax.servlet.ServletContext.getContextPath Ljava lang String http : stackoverflow.com questions 8611777 java-lang-nosuchmethoderror-javax-servlet-servletcontext-getcontextpathljava .. . Answer : This is most probably spring-boot version uses standard JSR356 based websocket implementation . But WSO2 AS 5.2.1 supports only the tomcat specific websocket implementation . You can use WSO2 AS 5.3.0 Alpha pack and test the new functionality . It supports JSR356 based standard websocket implementation", "Question : When I deploy a webapp war to WSO2 application server it gets deployed to a context path such as MyApp How do I deploy it to the root context so that MyApp runs at I have tried setting WebContextRoot in carbon.xml to MyApp but doing that just results in a 404 error . Any suggestions .. . Answer : As I understand you want to run some your webapp as the root webapp If so you have to follow the below steps .. . .. . 1 . Change WebContextRoot top something like console in the carbon.xml .. . 2 . file Rename your webapp as ROOT.war .. . .. . Then you will be able to deploy your webapp as the root webapp . Comment : Tried it but I get an exception below : org.wso2.carbon.CarbonException : Error while deploying webapp : StandardContext ROOT .File home ubuntu WSO2 wso2as-5.0.1 repository deployment server webapps ROOT .. . Caused by : org.wso2.carbon.tomcat.CarbonTomcatException : Webapp failed to deploy .. . Caused by : java.lang.IllegalArgumentException : addChild : Child name is not unique Comment : did you change the webcontextroot in carboon.xml Comment : Yes I did change it to console as suggested Comment : Ok . I got it to work in ROOT context by removing all other web apps from webapps folder . But now I get a bunch of errors in log file like TID : 0 AS 2016-03-18 10 : 37 : 58 286 ERROR org.wso2.carbon.url.mapper.internal.HotUpdateManager - error while getting webapp for host org.wso2.carbon.url.mapper.internal.HotUpdateManager org.wso2.carbon.url.mapper.internal.exception.UrlMapperException : Failed to retrieve the servicename from the host app1.youtility.in for every request . contd.. . Comment : I do not want to use the URL mapping feature here . I tried setting repository conf etc url-mapping-config.xml : mappings 0 mappings but it still throws the above errors . so how do I get rid of these url-mapping errors", "Question : null .. . Answer : We are using WSO2 Carbon 4.2.0 through the WSO2 Application Server AS package . In replacing an older highly customized Carbon installation provided by a company that no longer supports the product has abandoned it and refuses to work on it and left us no details on how what they modified in Carbon we have deployed a couple web-applications in the webapps container as they were deployed before in the older instance . We have changed our WebContextRoot in the carbon.xml from the default to a sub-URL of ex : stuff as is also detailed in the self-answered SO question here http : stackoverflow.com questions 23933482 wso2-application-server-will-redirect-to-carbon-upon-404-error-is-expected . However the answer given there is not detailed in what the OP actually encountered when he modified his WSO2 instance . In testing the above configuration we noticed that if a user were to go to a non-existent web address on the server depending on the format of the URL they are either : .. . .. . 1 . redirected to a blank page .. . 2 . receive a 500 Internal server error I suspect this is the embedded Tomcat .. . 3 . get sent to the Carbon login page which we definitely do not want to happen for security reasons or .. . 4 . get an XML document stating : .. . .. . faultString The service cannot be found for the endpoint reference EPR stuff services nonexistantservicename faultString .. . .. . .. . At least in the case of missing content we wish the user to be sent to a standardized 404 error page or at the least be sent an HTTP 404 error by the server . For services the XML error is palatable we can deal with that . The only option for us right now to circumvent this issue is to place a proxy in front of the WSO2 instance which would be another layer to manage and tune and possibly degrade performance . Please know that I am not a programmer but just an admin with DevOps experience . I would not know how to handle this with e.g . a Java solution or re-coding parts of WSO2 . Customizing the core product would also hamper future upgrades of WSO2 a scenario we are trying to dig ourselves out of now as detailed above . Is there no internal WSO2 mechanism to handle non-existent content Can we not redirect any errors to a standard canned response page Comment : Your question is not so clear . What is your actual requirement Comment : I thought my final question is quite clear : Can we direct standard HTTP errors like 404 to custom pages rather than the current situation HTTP 404 is a standardized error-code for non-existent content on a web server : w3.org Protocols rfc2616 rfc2616-sec10.html http : www.w3.org Protocols rfc2616 rfc2616-sec10.html .", "Question : null .. . Answer : I want to implement a Restful service to upload a file . Following is what I have done so far . I can t get the file . Service Interface .. . .. . The implementation as follows .. . .. . OUTPUT is .. . .. . I don t know how to get access the file here . I searched a lot but couldn t get a good resource . I am deploying this in wso2 application server http : wso2.com products application-server and Jax rs implementation is Axis2 CXF . Comment : What is the implementation of Attachment Comment : Are you using Jersey Comment : @Smutje it is org.apache.cxf.jaxrs.ext.multipart.Attachment Comment : @sgpalit No I m using wso2 products and it uses axis2 CXF . Comment : Use attachment.getValue", "Question : I am trying to run API Manager and Application Server on the same server along with configuration of Identify Server . I am getting Address already bind exceptions when starting server one after another . Please suggest me how to configure these servers on the same system .. . Answer : All WSO2 products run on top of WSO2 Carbon framework . Each product will be using a set of ports http : docs.wso2.org display Carbon420 Default+Ports+of+WSO2+Products in your system . So when you run multiple products in the same server without any configurations changes you will run in to address already in use exceptions . To avoid this you can just set a port offset for your products . Please edit PRODUCT HOME repository conf carbon.xml . Search for Offset . Here I m quoting the docs http : docs.wso2.org display Carbon420 Configuring+carbon.xml . Offset Ports offset . This entry will set the value of the ports defined below to the define value + Offset . e.g . Offset 2 and HTTPS port 9443 will set the effective HTTPS port to 9445 . Once you give different offsets for each product you will be able to run multiple products in the same server . I hope this helps Comment : Where can we see the new ports once the offset is applied Comment : There is no specific place to see all ports . But the management console or the logs will show you the correct port after adding the offset whenever there is a URL . Comment : btw when I am running on my local system I am surprisingly seeing urls mapped with different IP Address when using the same I am not able to access the application . for e.g . : 100.101.153.254 : 9783 pizza-shack-web-1.0.0 http : 100.101.153.254 : 9783 pizza-shack-web-1.0.0 which is not working . And this ip is not my public ip . From where wso2 application taking this ip-address Comment : WSO2 Carbon takes the address from your system . So that IP must be there in your configs . Please double check . What are the versions you are using API Manager 1.5.0", "Question : I have a working JAX-RS webapp that implement some RESTfull services . I have developed it under WSO2 Studio and deployed it with WSO2 AS Web interface all very simple . Now I want add-on my WebApp the possibility to open a WebSocket . I don t have found a standard procedure or examples on WSO2 AS documentation . My question is : .. . .. . 1 . Is possible do that 2 . Can I have RESTfull implementation and WebSocket in the same war package There is an example for do that Best on WSO2 AS . 3 . How to setup a WebSocket application and deploy it on WSO2 AS Thank you . UPDATE .. . .. . I have write this extreme simple websocket application : .. . .. . If I deploy on Tomcat server it run correctly if I deploy on WSO2 AS 5.3.0 snapshot the websocket is unreachable . I don t understand what i do wrong . .. . Answer : WSO2 AS 5.2.1 have Websocket tomcat specific support . You can find the example webapp inside the AS HOME repository deployment server webapps folder . But standard JSR356 Websocket support is not available in WSO2 AS 5.2.1 . It will be available in WSO2 AS 5.3.0 which will be released very soon . WSO2 AS 5.3.0 Alpha is already released and you can try out the web socket support using the alpha pack https : svn.wso2.org repos wso2 people kasung as5.3.0-alpha . Start the server point the browser to http : localhost : 9763 example websocket index.xhtml and you will find four web sockets samples there . You can have a look at the release mail http : markmail.org message ju7wn37h5a7zt557 for new features in WSO2 AS 5.3.0 . Comment : But perhaps there is a workaround for the problem In examples available Tomcat think there are also WebSocket echo snake and chat . What do you think about it Comment : I have made some changes to my answer - please have a look at it again . Yes WSO2 AS 5.2.1 have some Websocket support based on tomcat specific implementation . You can find a sample example webapp inside AS HOME repository deployment server webapps folder . You can get an idea from this sample . Standard JSR356 based Websocket implementation will be available in 5.3.0 ." ] }
[ "yes-answer-long", "yes-answer-short" ]
hosting
UNK_RELATION
ssis-2008@ssis@56
ssis-2008 -- microsoft sql-server integration services @placeholder is a platform for building enterprise-level data-integration and data transformations solutions .
{ "confidence": [ 46.51315689086914, 41.7164192199707, 38.34420394897461, 33.41242980957031, 32.6177864074707, 32.542884826660156, 32.40419006347656, 32.37504196166992, 31.665504455566406, 30.41498565673828, 30.202938079833984, 30.202938079833984, 30.047090530395508, 29.29489517211914, 29.258581161499023, 29.146991729736328, 29.129730224609375, 29.001625061035156, 28.835506439208984, 28.83144760131836, 28.07024383544922, 27.67626190185547, 27.67626190185547, 27.53604507446289, 27.36651611328125, 27.359455108642578, 27.244354248046875, 27.244354248046875, 27.244354248046875, 27.244152069091797, 27.184974670410156, 27.18099594116211, 27.032794952392578, 26.93170166015625, 26.777812957763672, 26.57813262939453, 26.49126434326172, 26.4178524017334, 25.7193603515625, 25.381874084472656, 25.359254837036133, 25.30928611755371, 25.250350952148438, 25.15048599243164, 25.070541381835938, 24.602394104003906, 24.596275329589844, 24.45125961303711, 24.31859588623047, 24.31859588623047, 24.20488739013672, 24.20488739013672, 24.20488739013672, 24.028474807739258, 23.903762817382812, 23.88005256652832, 23.81816291809082, 23.787460327148438, 23.492095947265625, 23.401981353759766, 23.360950469970703, 23.329734802246094, 23.329734802246094, 23.232868194580078, 23.23284912109375, 23.136720657348633, 23.06283950805664, 23.054689407348633, 23.048995971679688, 22.972097396850586, 22.924415588378906, 22.878463745117188, 22.786582946777344, 22.592613220214844, 22.580894470214844, 22.580894470214844, 22.580894470214844, 22.580894470214844, 22.580894470214844, 22.464462280273438, 22.464462280273438, 22.447616577148438, 22.447616577148438, 22.43349838256836, 22.39202880859375, 22.227502822875977, 21.877525329589844, 21.877525329589844, 21.765974044799805, 21.695959091186523, 21.47768783569336, 21.47768783569336, 21.368511199951172, 21.25011444091797, 21.25011444091797, 21.25011444091797, 21.228975296020508, 21.211673736572266, 21.211673736572266, 20.94517707824707 ], "content": [ "I am using SSIS SQL Server Integration Services and using the Ole DB Source Component .", "One of the packages is going to implement using SQL Server Integration Services SSIS Transactions without MSDTC .", "mssqltips.com sqlservertip 4150 https : www.mssqltips.com sqlservertip 4150 how-to-read-data-from-an-excel-file-starting-from-the-nth-row-with-sql-server-integration-services", "I have an SSIS 2008 package .", "Here s a good link-to Best Practices http : blogs.msdn.com b sqlcat archive 2013 09 16 top-10-sql-server-integration-services-best-practices.aspx from this SO post http : stackoverflow.com questions 2739320 ssis-2008-rows-per-batch-and-maximum-insert-commit-size .", "simple-talk.com sql reporting-services https : www.simple-talk.com sql reporting-services using-sql-server-integration-services-to-bulk-load-data One thing I dont see mentioned often is the source connection-manager advanced properties .", "An SSIS package exporting data to the flat-file text .", "I am trying to load the data from an Excel source to a SQL Server destination using a SSIS package .", "Source : Microsoft SQL Server Native Client 10.0 Hresult : 0x80004005 Description : Error converting data type nvarchar to int . .", "Join your data table to IDsWanted in an SQL query and use this as the source for your SSIS operations .", "SSIS 2008 version is being used.The data flow tasks connects to a Oralce DB .", "I need to export data from OLEDB source to xml file with SSIS 2008 R2 .", "As you have SQL Server 2008 installed that won t work .", "You should look into Scribe www.scribesoft.com and Kingswaysoft http : www.kingswaysoft.com products ssis-integration-toolkit-for-microsoft-dynamics-crm .. . .. . These companies both provide tools for migrating data into Dynamics CRM .", "Connect item https : connect.microsoft.com SQLServer feedback details 282396 ssis-flat-file-parser-does-not-read-column-delimiters-embedded-in-text-data covering the behaviour change for SQL Server 2012+", "Once you have finished your BIML script using BIDS SQL Server 2008 to create the SSIS package you simply right-click the BIML file and click Generate SSIS packages .", "If the data is on the same server use T-SQL to join it on the server first .", "If you create an SSIS Package using VS 2010 2012 that package will only run on a SQL Server 2012 installation .", "I would like to read a specific range on worksheet in an xlsx file with SSIS 2008 .", "support.microsoft.com en-us kb 318452 https : support.microsoft.com en-us kb 318452 mssqltips.com sqlservertip 1674 https : www.mssqltips.com sqlservertip 1674 retrieve-excel-schema-using-sql-integration-services-ssis proteanit.com b 2008 03 05 http : www.proteanit.com b 2008 03 05 code-to-query-excel-schema-in-ssis-script-component", "For the same data you can see how 2008 versus 2012 will preview the data .", "EDIT Fiddler is running on the SQL Server host when the SSIS package is executed from the SQL Server Agent job .", "Fiddler is running on the SQL Server host when the SSIS package is executed from the SQL Server Agent job .", "All that SSIS is doing is launching something to be done by SQL Server .", "I m currently using VS2008 and SQL 2008 R2 .", "It could be a source problem of setting in Excel Source Editor choose Data acces mode : SQL Command and write in SQL command-text : SELECT FROM Report Data 1 A3 : K", "Error : 0xC0202009 at Data Flow Task OLE DB Source 111 : SSIS Error Code DTS E OLEDBERROR .", "Edit : Please close this as a duplicate of How do I get SSIS Data Flow to put 0.00 in a flat-file", "http : stackoverflow.com questions 2868348 how-do-i-get-ssis-data-flow-to-put-0-00-in-a-flat-file .", "An ssis-2005 package has been upgraded into 2008.But everytime i open this 2008 package a popup window opens welcome to ssis package upgradation wizard .Any sugestion how to disable it", "In the Split transformation editor specify boolean SSIS expression in Condition column something like .. . .. . Or .. . .. . Conditional Split https : www.simple-talk.com sql ssis ssis-basics-using-the-conditional-split", "Import data into SQL table .", "For each table create two Data Flows in SSIS Package which will load data from A B and A C .", "I have a SQL 2008 data flow task that is built to pull 1.6 billion records from one database to another .", "My configuration is : .. . .. . SSIS 2008 R2 .. . Teradata 15 .. . Attunity 1.2", "When SSIS sends the command to SQL Server it sends it as a single line so semi-colons are needed to show SQL Server where each new command begins .", "It could be a source problem of setting in Excel Source Editor choose Data acces mode : SQL Command and write in SQL command-text :", "Yes via SSIS building a scrip task that calls windows compression passing dynamic folder name.. .", "sql-server-2008-r2 .. . .. . Task 1 : Copy transfer both the databases into 3rd server D with the names A B and A C .", "SSIS Package In BIDS 2008 http : i.stack.imgur.com SWR4g.png .. . .. . SSIS Package in BIDS 2012 http : i.stack.imgur.com VN7g9.jpg", "A CTE is compatiable with SSIS .", "I have a query to extract data from server .", "I have a Stored Procedure in SQL Server 2008 like below .", "SSIS and also T-SQL have the UPPER function .", "I have a scenario where i would like to compress my folder due to presence of large number of files present in them using SSIS 2008 .", "I thought of writing a package that will copy this access DB on SQL server in US and push the data to respective database .", "I have one senario Need to read data from files which are in multiple sub folders using SSIS and put into data-warehouse .. . .. . Example : .. . .. . could you please suggest me on this .", "When i try to load data from excel source to the teradata with ssis and using microsoft connector for teradata by attunity 1.2 i got below error what am i missing", "I have to extract the data using SSIS if and only if file content is different than previously processed files .", "Add some steps to the SSIS package to insert data into the child table after the inserts into the parent table are complete .", "I am trying to call a stored procedure in SSIS OLE- DB DataSource My Datasource would be SQL Server 2012 .", "I have one already developed SSIS application using SQL Server 2005 .", "Is there a reason you don t just use the native SSIS logging to a SQL Server table", "sometimes ssis package break .", "I m using BIDS 2008 and have tried to edit and save the existing SSIS package which is created by me .", "I want learn ssis DQS service component read this tutorial : .. . SSIS DQS https : msdn.microsoft.com en-us library jj819740 v sql.120 .aspx .. . but in the this window : .. .", "I would suggest doing the conversion in the SQL Command of the OLE DB Source or adding a Data Conversion data flow transformation to your Data Flow Task between the OLE DB Source and OLE DB Destination .", "..import a piece of data from an Excel spreadsheet", "In an SSIS project I am building expressions to create connection strings with dates from the prior weekday .", "Take a look at the following link : stackoverflow.com questions 2868348 http : stackoverflow.com questions 2868348 how-do-i-get-ssis-data-flow-to-put-0-00-in-a-flat-file", "Description : SSIS Error Code DTS E OLEDBERROR .", "To open the whole sheet I need to add Report Data 1 in the OpenRowset field under advanced settings in the excel data source panel .", "The error I m getting is : Error at Data Flow Task Excel Source 9 : Opening a rowset for Report Data 1 A3 : K100 failed .", "Because you are using execute sql tasks there is no SSIS performance tuning .", "What necessary tuning I can do in ssis level if all of the functionality have been implemented using the Execute SQL task stored-procedures .", "Each SQL or Data Flow Task : Supported .. . 4 .", "enter image description here http : i.stack.imgur.com rsRss.png .. . .. . The script is made using c choose Script Language : Microsoft Visual C 2008 .. . .. .", "B : Export the data from CRM 4.0 using Data Migration Manager then upload it using SSIS or custom code", "Are you inserting with a data flow", "Consider it like i have one Source Folder and one Target Folder and while moving files from SRC to TGT the folder must be compressed in destination.Now feasible option for doing this i think is SSIS Script task since I cannot use Execute Process task due to restriction of using any third party software like 7z Winrar etc.But i am not able to implement this even after using SSIS Script Component.Tried many online solutions but it did not work.How can i implement such thing using SSIS 2008", "Columns cannot contain the text qualifier prior to SQL SERVER 2012 .", "SQL Server 2014 Source .", "myStoredProcedure CounterDeceasedPatients .. . .. . This is giving me the error : .. . .. . Source : Microsoft OLE DB Provider for SQL Server Hresult : 0x80040E07 Description : Error converting data type nvarchar to int . .", "I tried a few other combinations but none of these work : .. . .. . Report Data 1 A3 : K Report Data 1 A3 : K Report Data 1 A3 : K .. . .. . I also tried with fixed amount of rows didn t help .", "In wich order are returned the fileNames from the method FtpClientConnection.GetListing from SSIS", "Is there any way to make SSIS read those cells with double quotes in it", "To create packages for SSIS 2012 you should use Visual Studio 2010 .", "The scenario is I have a SSIS package where I call a stored procedure .", "The sheet which SSIS is trying to open in your Excel file does not exist .", "Could anyone help me build an SSIS", "I looked into event-handling but there is no OnSuccess event in SSIS .", "MSSQL 2008r2 .. . .. . I have a SSIS package that has a script task that posts data to an external web service .", "Here https : hansmichielscom.wordpress.com 2013 06 20 how-to-add-a-rownumber-to-a-data-flow-task-in-ssis-2012 is an example .", "ssis experts please answer. .", "I am thinking about generating software DB in MS Access in India and push it to SQL server in US using BIDS 2008 .", "Using SQL 2008 i was trying to setup an ETL and i run into the error below while running my dtsx package .", "I am calling this SP via SSIS by using an OLE DB Command in Data Flow which enables each rows in my file go to the SP - with the sql command : EXEC dbo .", "All most all tables being used are already indexed.Please suggest some useful ssis tuning tips for such kind of packages.Do I have to implement all these execute sql tasks to Data flow task", "I am stuck with a scenario in SSIS .", "The server contains millions of data and I need to filter out only 56000 of Doc IDs out of those .", "The first row contains the site URL the second is empty and from the 3rd row come the headers and the data .", "Alex the SELECT FROM Report Data 1 A3 : K solution worked if you post it as an answer I will mark it :", "Possible duplicate of SSIS Looping through Excel Sheets http : stackoverflow.com questions 17572766 ssis-looping-through-excel-sheets", "How to achieve Check point functionality in SSIS with out using check point .", "Possible duplicate of How to iterate over several files in several folders on SSIS", "It tripped me up in the beginning when I was learning SSIS .", "Do I have to install SQL Server 2012 only or do I have to change my VS version too", "3 SQL Server : at database level trailing spaces don t matter for operator abc abc abc .", "Just turned on Logging on SQL Server at package level when the OnError event occurs .", "I have the below script in the Source Editor in a SSIS package and I get an error ." ] }
{ "confidence": [ 49.81879806518555, 49.73241424560547, 48.87885665893555, 46.33970260620117, 45.02409362792969, 44.38653564453125, 43.6944465637207, 40.72453689575195, 40.172027587890625, 39.6412467956543, 39.17420959472656, 38.605628967285156, 38.34099578857422, 38.28700256347656, 38.26038360595703, 36.3297233581543, 34.74916076660156, 34.35775375366211, 34.0340576171875, 33.87653350830078 ], "content": [ "Question : null .. . Answer : I am using SSIS SQL Server Integration Services and using the Ole DB Source Component . One of the columns is specified as DataType : DT NUMERIC Precision : 18 Scale : 4 . When the number to the left of the decimal is zero the zero gets truncated . Is there a simple solution to preserving the zero or do I need to create a derived column and convert the value to a string and pad it with a zero as needed Edit : Please close this as a duplicate of How do I get SSIS Data Flow to put 0.00 in a flat-file http : stackoverflow.com questions 2868348 how-do-i-get-ssis-data-flow-to-put-0-00-in-a-flat-file . Comment : What is your destination component : database-table text file etc . If a text file then apply a derived column . If a database-table then try modifying the Input Output Parameters setting the value to a decimal scale of 2 . Take a look at the following link : stackoverflow.com questions 2868348 http : stackoverflow.com questions 2868348 how-do-i-get-ssis-data-flow-to-put-0-00-in-a-flat-file Comment : Destination is a text file CSV . The scale is already correct but it looks like I ll use a derived column . Thanks", "Question : I have a requirement in which I need to compare columns of 2 Excel files . If columns are matched then proceed with next steps of SSIS package . If columns are not matched SSIS package should stop . Please help . Comment : You need to use GetOleDbSchemaTable . Here are some examples . Try these and come back with any specific problems . support.microsoft.com en-us kb 318452 https : support.microsoft.com en-us kb 318452 mssqltips.com sqlservertip 1674 https : www.mssqltips.com sqlservertip 1674 retrieve-excel-schema-using-sql-integration-services-ssis proteanit.com b 2008 03 05 http : www.proteanit.com b 2008 03 05 code-to-query-excel-schema-in-ssis-script-component Comment : Thanks Nick it worked . .. . Answer : 1 . Import data into SQL table . 2 . Compare columns .. . 3 . then proceed based on match or no match . Do i miss anything here Comment : Thanks Ken yes I was particularly looking for implementation of step 1 mentioned by you above . Its done . Thanks much", "Question : What necessary tuning I can do in ssis level if all of the functionality have been implemented using the Execute SQL task stored-procedures . All most all tables being used are already indexed.Please suggest some useful ssis tuning tips for such kind of packages.Do I have to implement all these execute sql tasks to Data flow task Comment : My guess is the procedures are where you need to focus . And just saying the tables are indexed does NOT mean they are indexed correctly for performance . .. . Answer : To answer your question no . Data flow tasks in my opinion are mostly useful when moving data between two sources or to do complex logic that you would rather use a c script and not use the .Net CLR in SQL Server to perform that script . If the source and destination are on the same instance I have never seen an occasion where SSIS data flow tasks can out-perform a properly built stored procedure . Because you are using execute sql tasks there is no SSIS performance tuning . All that SSIS is doing is launching something to be done by SQL Server . I would focus on your stored-procedures look into the execution plans and read up on SQL Server Query Performance Tuning . It could range from a very simple index recommended when you look at the execution plan moderate effort using Query Analyzer tool or very complex . It depends on your data and queries . Comment : This is very useful Comment : There is one data flow task.How to calculate the max insert commit size and other properties such buffer sizes .Is it based on the number of rows coming from source multiplied by each column length Comment : I have found that the default values are best . Make sure Table or View - Fast Load is selected so that bulk operations will be performed . Here is a good article on the topic . simple-talk.com sql reporting-services https : www.simple-talk.com sql reporting-services using-sql-server-integration-services-to-bulk-load-data One thing I dont see mentioned often is the source connection-manager advanced properties . Here is a link-to a question I asked on the topic . stackoverflow.com questions 36727130 http : stackoverflow.com questions 36727130 ssis-oledb-fast-load-vs-bulk-insert-task", "Question : I would like to read a specific range on worksheet in an xlsx file with SSIS 2008 . To open the whole sheet I need to add Report Data 1 in the OpenRowset field under advanced settings in the excel data source panel . Now I need everything from line 3 including headers so I assumed Report Data 1 A3 : K would be the good choice but didn t work . I tried a few other combinations but none of these work : .. . .. . Report Data 1 A3 : K Report Data 1 A3 : K Report Data 1 A3 : K .. . .. . I also tried with fixed amount of rows didn t help . The error I m getting is : Error at Data Flow Task Excel Source 9 : Opening a rowset for Report Data 1 A3 : K100 failed . Check that the object exists in the database . .. . .. . I tried with another test sheet and if there s no space in the sheet name I can read the range with Sheet1 A3 : K4 in the OpenRowset property . What is the proper syntax for the openrowset property Comment : Could you better explain the task ..import a piece of data from an Excel spreadsheet Comment : I have extracts from Sharepoint logs made every month . The first row contains the site URL the second is empty and from the 3rd row come the headers and the data . I did some research how to skip the first x rows and the generic solution - define the range to read - doesn t work on this sheet . The only thing I can think on is that it has spaces in its name . Comment : It could be a source problem of setting in Excel Source Editor choose Data acces mode : SQL Command and write in SQL command-text : SELECT FROM Report Data 1 A3 : K Comment : mssqltips.com sqlservertip 4150 https : www.mssqltips.com sqlservertip 4150 how-to-read-data-from-an-excel-file-starting-from-the-nth-row-with-sql-server-integration-services Comment : Alex the SELECT FROM Report Data 1 A3 : K solution worked if you post it as an answer I will mark it : .. . Answer : It could be a source problem of setting in Excel Source Editor choose Data acces mode : SQL Command and write in SQL command-text :", "Question : null .. . Answer : I m trying to read a CSV file with this kind of lines : .. . .. . A text Another text A text with quotes .. . .. . In my Flat File connection I filled the Text qualifier as . When I click on the Preview button the lines are shown properly : A text with quotes Shouldn t it show only one double quote btw But as soon as I try to execute the package an error occurs saying that the column delimiter cannot be found : .. . .. . Source du fichier plat 1313 Erreur : Le s parateur de colonne pour la colonne COL3 est introuvable . If I remove those double double-quotes within the cell value it works fine . Is there any way to make SSIS read those cells with double quotes in it For the same data you can see how 2008 versus 2012 will preview the data . Observe that Col2 either does or does not escape the double quote A text with quotes vs A text with quotes .. . .. . enter image description here http : i.stack.imgur.com jipOC.png .. . .. . The result-of using the 2008 version is that it will fail with the following error messages .. . .. . The column delimiter for column Col2 was not found . .. . An error occurred while processing file c : ssisdata so input so 36033443.txt on data row 1 . A reproduction of the problem using Biml follows Comment : Columns cannot contain the text qualifier prior to SQL SERVER 2012 . Comment : Thank you @Balde . I m currently using VS2008 and SQL 2008 R2 . Do I have to install SQL Server 2012 only or do I have to change my VS version too Thanks again . Comment : To create packages for SSIS 2012 you should use Visual Studio 2010 . Comment : If you create an SSIS Package using VS 2010 2012 that package will only run on a SQL Server 2012 installation . As you have SQL Server 2008 installed that won t work . Connect item https : connect.microsoft.com SQLServer feedback details 282396 ssis-flat-file-parser-does-not-read-column-delimiters-embedded-in-text-data covering the behaviour change for SQL Server 2012+ Comment : @billinkc Thank you very much", "Question : In SSIS If we select the FAST LOAD Option then we have to set the 2 properties .. . .. . OLEDB Destination Rowsperbatch and MaximuminsertCommitSize .. . .. . Normally we go with default values but it has been understood that it gives a maximum performance if we can calculate these values Just seen in a package which has been developed by some old collegues who already left the team . How to calculate theses .. . .. . propertiesd value to get maximum Performance .. . Answer : There is no set formula for this . It s basically - understanding the impacts they have and trial and error preferably on a dev environment . If you are inserting large-files -- you should not use the defaults but no one will be able to give a set formula for what you should use . Every server database is different . But large commit sizes can result in huge tempdb growth. . so understanding and caution is needed . Here s a good link-to Best Practices http : blogs.msdn.com b sqlcat archive 2013 09 16 top-10-sql-server-integration-services-best-practices.aspx from this SO post http : stackoverflow.com questions 2739320 ssis-2008-rows-per-batch-and-maximum-insert-commit-size .", "Question : null .. . Answer : Using SQL 2008 i was trying to setup an ETL and i run into the error below while running my dtsx package . Description : SSIS Error Code DTS E OLEDBERROR . An OLE DB error has occurred . Error code : 0x80004005 . An OLE DB record is available . Source : Microsoft SQL Server Native Client 10.0 Hresult : 0x80004005 Description : Error converting data type nvarchar to int . . The dtsx is running smoothly with SQL 2005 . I searched for possible answers through the web but none is helpful . Hope you can share your ideas for this error . Thanks for those who will answer : Comment : I would suggest doing the conversion in the SQL Command of the OLE DB Source or adding a Data Conversion data flow transformation to your Data Flow Task between the OLE DB Source and OLE DB Destination . Comment : Could you add other informations related to step execution", "Question : I have a Stored Procedure in SQL Server 2008 like below . I am calling this SP via SSIS by using an OLE DB Command in Data Flow which enables each rows in my file go to the SP - with the sql command : EXEC dbo . myStoredProcedure . The order of data in my file is : Id hin checkValue .. . .. . What I want to do is to count how many different records different rows entered the if condition in my SP . SO I believe need to place a row counter somewhere filtering its usage where @checkValue is not null . But I couldnt find it how . I am a newbie in SSIS so I appreciate if someone helps me to figure this out . Thanks . EDIT : I am trying to select only @checkValue as an input parameter for my ROW COUNT but it is giving error : enter image description here http : i.stack.imgur.com EMgS5.png .. . .. . EDIT2 : I updated my SP . I added CounterDeceasedPatients variable as Int32 in SSIS and assigned it to 0 . My sql execute command is : EXEC dbo . myStoredProcedure CounterDeceasedPatients .. . .. . This is giving me the error : .. . .. . Source : Microsoft OLE DB Provider for SQL Server Hresult : 0x80040E07 Description : Error converting data type nvarchar to int . . When I use EXEC dbo . myStoredProcedure CounterDeceasedPatients output as SQL command then I receive the error : .. . .. . Description : Cannot use the OUTPUT option when passing a constant to a stored procedure . I need help . Comment : Have you heard for Row Count Transformation https : msdn.microsoft.com en-us library ms141136.aspx in SSIS Comment : Yes I read this page : techbrothersit.com 2013 07 ssis-how-to-use-row-count.html http : www.techbrothersit.com 2013 07 ssis-how-to-use-row-count.html But I couldnt manage Row Count working and couldnt see where to filter it . Comment : Add an SSIS variable @rowcount . Initialise it to 0 . Create an output parameter in your stored procedure and modify your stored procedure so it adds one to it inside the if . Map your SSIS variable to that output parameter so each call it passes in the value that was potentially modified in previous calls . Comment : I updated my question based on ur comments Martin . I appreciate if you help . .. . Answer : Use a script transformation and a DataFlow-level package variable . Create the int-type variable with a default of 0 and in the script transformation increment the variable if checkvalue is not null for the incoming row and then use the value of the variable to set the value of your counter column . Note that I am suggesting this INSTEAD of trying to update the counter with an OUTPUT variable in your stored procedure and not as a way of trying to get that idea to work .", "Question : I have a query to extract data from server . The server contains millions of data and I need to filter out only 56000 of Doc IDs out of those . Could anyone help me build an SSIS I cannot use Merge here since I would ave to extract the entire data from the server and then merge it with 56000 IDs . Comment : Can t you use some view A WHERE clause with thousands of parameters looks very wrong . Comment : Could you throw some light one the VIEW part Comment : GIYF : SQL : using Views http : www.tutorialspoint.com sql sql-using-views.htm Comment : Where do these 50 000 ids come from the optimal solutions depend on that . For example you may be importing them from excel.. . .. . Answer : Put your 56000 IDs into a table called e.g . IDsWanted on the server . Join your data table to IDsWanted in an SQL query and use this as the source for your SSIS operations . Obviously a PK on column IDsWanted.ID will help performance of this query .", "Question : I have a scenario where i would like to compress my folder due to presence of large number of files present in them using SSIS 2008 . Consider it like i have one Source Folder and one Target Folder and while moving files from SRC to TGT the folder must be compressed in destination.Now feasible option for doing this i think is SSIS Script task since I cannot use Execute Process task due to restriction of using any third party software like 7z Winrar etc.But i am not able to implement this even after using SSIS Script Component.Tried many online solutions but it did not work.How can i implement such thing using SSIS 2008 Comment : Could you run Windows commands to perform simple zip from SSIS user Comment : @alex No I cannot..No using of any third party commands . Comment : Sorry I referred to the standard compression of windows it would be fine Is the name of the folder dynamic or fixed Comment : Nope it is not what i am looking for since the folder name is dynamic ...Also no manual work..There may be many folder in different server we cannot go in every server and compress folders manually..Need to do via SSIS only Comment : Yes via SSIS building a scrip task that calls windows compression passing dynamic folder name.. . .. . Answer : You can use the ZipPackage class if you are targeting .Net 3 and above . Complete example here : .. . .. . https : msdn.microsoft.com en-us library system.io.packaging.zippackage.aspx .. . .. . There is also a ZipArchive class example here : .. . .. . https : msdn.microsoft.com en-us library system.io.compression.ziparchive v vs.110 .aspx", "Question : I have to migrate data from CRM 4.0 to MS CRM Online customer has around 35GB data now my question is which would be the best way to migrate the data A : Using CRM 4.0 Data Migration Manager to export the data then using import the data using ConfigurationMigration Is that be viable solution B : Export the data from CRM 4.0 using Data Migration Manager then upload it using SSIS or custom code Any idea how much time usual it should take to upload that much data 35GB this includes Account Appointments Lead few custom entities .. . Answer : You should look into Scribe www.scribesoft.com and Kingswaysoft http : www.kingswaysoft.com products ssis-integration-toolkit-for-microsoft-dynamics-crm .. . .. . These companies both provide tools for migrating data into Dynamics CRM .", "Question : When i try to load data from excel source to the teradata with ssis and using microsoft connector for teradata by attunity 1.2 i got below error what am i missing Teradata Destination 23 Error : TPT Import error encountered during Initiate phase . Could Not Find Message Catalog opermsgs SSIS.Pipeline Error : component Teradata Destination 23 failed the pre-execute phase and returned error-code 0x80004005 . My configuration is : .. . .. . SSIS 2008 R2 .. . Teradata 15 .. . Attunity 1.2 Comment : Are you running in 32-bit mode Comment : Yes in 32-bit mode .. . Answer : I had this same error . Using Visual Studio 2012 with Data Tools installed . SQL Server 2014 Source . TD destination . Attunity 2.0 Teradata . You have to have Java client installed Correctly for TPT . I had the path as shown in the above all 4 but still was getting error . I rebooted and error was resolved . This TD upload in INSANE fast. . I m at 500 million in just a few minutes. . works great .", "Question : One of the packages is going to implement using SQL Server Integration Services SSIS Transactions without MSDTC . The Execute SQL task has placed before the data flow Df insert for begin transaction.There are several update steps and index creation steps after this First data flow Df Insert .There is an update scripts which is in another sequence container and need to be part of this transaction . Is there any way to include only the Df insert and the update scripts in the transaction . The control-flow looks like the below .. . .. . enter image description here http : i.stack.imgur.com OSo4y.jpg Comment : The first container is not a FEL It is a Sequence container .Sorry for the mistake .. . Answer : From SQL Transaction point of view ALL DML statements i.e . inserts-updates-deletes between BEGIN TRAN and COMMIT are part of this transaction and not deducible . Your task - committing only DFT and update script - means that update update2 and delete are temp data used in your update script and discarded later on . Approach - rework your logic to move results of update update2 and possibly delete results into TEMP tables and use it afterwards . Regular temp table will be fine since you have to use RetainSameConnection true for transaction without MSDTC . Comment : Thanks .update update2 and delete are not temp data used in the script.It does update a source table and delete somehing from another table.Just wondering is ther any otehr way to implement this with out move result-of update update2 and delete Comment : Just other way around . You created modified some data source and other table in update update2 and delete statements delete creates minus data . This data is used somehow used in your SCRIPT . You can offload this data somewhere and discard it later on . Alternative could be storing data from your source into Temp table with SELECT INTO Temp performing required data manipulations and doing your SCRIPT . Anyway it is hard to tell without knowledge of your data manipulations .", "Question : I have a scenario where i would like to compress my folder due to presence of large number of files present in them using SSIS 2008 . Consider it like i have one Source Folder and one Target Folder and while moving files from SRC to TGT the folder must be compressed in destination.Now feasible option for doing this i think is SSIS Script task since I cannot use Execute Process task due to restriction of using any third party software like 7z Winrar etc.But i am not able to implement this even after using SSIS Script Component.Tried many online solutions but it did not work.How can i implement such thing using SSIS 2008 Comment : Could you run Windows commands to perform simple zip from SSIS user Comment : @alex No I cannot..No using of any third party commands . Comment : Sorry I referred to the standard compression of windows it would be fine Is the name of the folder dynamic or fixed Comment : Nope it is not what i am looking for since the folder name is dynamic ...Also no manual work..There may be many folder in different server we cannot go in every server and compress folders manually..Need to do via SSIS only Comment : Yes via SSIS building a scrip task that calls windows compression passing dynamic folder name.. . .. . Answer : I did this exercise I created a Script Task to perform compression of a folder by using the compression provided by Windows the folder name can dynamically change . In this way it is not necessary to use third party software like 7z Winrar etc. . .. . .. . You need to provide to the Script Task the folder to be zipped and the name of the compressed folder as ReadOnlyVariables to be added in the tab ReadOnlyVariables .. . .. . These two variables must be defined in the Variables tab String type of the package and can be changed dynamically through a cycle eg . for each .. . .. . I use these two varibles : .. . .. . enter image description here http : i.stack.imgur.com rsRss.png .. . .. . The script is made using c choose Script Language : Microsoft Visual C 2008 .. . .. . enter image description here http : i.stack.imgur.com WteGC.png .. . .. . This is the code to be added in the Main method : .. . .. . You can also manage a single file .. . .. . I hope can help Comment : Hello @alex Appreciate your help I tried doing by your way . I did exactly the way u suggested but my package is simply getting executed successfully and not compressing the folder . Consider the situation the way i tried..sFolderCompressed -- D : Archieve sFolderSource -- D : Source..these are the value I passed and called them in Read Only variable in Script task as you suggested . But nothing got changed . Also the code objException is giving message as the value is declared but never used I dont get this since i am quite not familiar with C . Please correct me where i made mistake .", "Question : null .. . Answer : I ve a new package containing a sequence container with a bunch of sql and data flow tasks inside . The intended behaviour is to create a transactional process over the container : if any task fail then a rollback needs to be performed and the error message must be logged for analysis . I set TransactionOption property of different objects as follow : .. . .. . 1 . Package level : Supported .. . 2 . Container : Required .. . 3 . Each SQL or Data Flow Task : Supported .. . 4 . Enabled Microsoft Distributed Transaction Coordinator .. . .. . I ve also introduced a duplicate primary-key error. . and effectively works as expected : the rollback works fine . The next step would be log into a SQL Server table the duplicate primary-key error message . My questions are : .. . .. . 1 . Which is the most appropiate place to catch the error message OnError event of the containt The PostExecute event of the container Others 2 . On my investigation. . I m loading the error message into a SSIS package variable . How can I pass it through a stored procedure input parameter Any comments suggestions will be welcome . Thanks in advance Comment : The OnError event is the most appropriate place to handle errors . Have you googled any EXECUTE SQL Task tutorials They all explain how to pass variables to parameters . Comment : Is there a reason you don t just use the native SSIS logging to a SQL Server table There you just select the things you re interested in logging . Like OnError OnTaskFailed etc It ll be far less work and future maintenance than the road you appear to be going down Comment : @billinkc -- +1 for sheeding light on the darkness . I digged into the approach you suggested and worked to the end I was investigating . Just turned on Logging on SQL Server at package level when the OnError event occurs . Many thanks . Comment : My logging preference is : OnError OnTaskFailed OnWarning OnPreExecute OnPostExecute and OnInformation . Armed with those I ve been able to answer most of my SSIS related questions - how long did the package run how long did the tasks run What configurations were n t applied What threw errors What tasks actually failed etc", "Question : In my package when I lookup a value based on FULL Cache Mode it goes to no match output even when the datatype and value is same in lookup table and source . There is no duplicate row as well . When I put No Cache mode it s matching correctly . Any suggestion why is it happening so .. . Answer : Full cache .. . .. . The default cache mode for the lookup is Full cache . In this mode the database is queried once during the pre-execute phase of the data flow . The entire reference set is pulled into memory . .. . One thing to note is that the lookup will not swap memory out to disk so your data flow will fail if you run out-of-memory . source https : blogs.msdn.microsoft.com mattm 2008 10 18 lookup-cache-modes This means that all compare operations are done by SSIS engine that is case sensitive and sensitive with trailing spaces . This means that abc Abc ABC and also this means that abc abc abs plus one space at the end of string . For above reasons if source value is abc and reference data is ABC or ABC No Match . No cache .. . .. . As the name implies in this mode the lookup transform doesn t maintain a lookup cache actually not quite true we keep the last match around as the memory has already been allocated . In most situations this means that you ll be hitting the database for every row . source https : blogs.msdn.microsoft.com mattm 2008 10 18 lookup-cache-modes .. . .. . 1 . If SQL Server database is touched and .. . 2 . If column collation is case insensitive all my databases are CI abc Abc ABC and .. . 3 . Because trailing spaces don t matter abc abc Abc Abc .. . .. . For above reasons if source value is abc and reference data is ABC or ABC Match . Comment : 3 SQL Server : at database level trailing spaces don t matter for operator abc abc abc . Note : see also this https : www.timmitchell.net post 2009 09 29 space-sensitivity-in-ssis-lookups . Comment : I used UPPER and it worked . However when I check data on both tables they all are already in upper case . The collation of the columns are also same . Can you tell me why is it appearing to be in upper case-when I select the record in the tables Comment : You have to be more specific . SSIS and also T-SQL have the UPPER function . My assumption : very likely you have had issues because of Full cache setting and trailing spaces .", "Question : I have the below script in the Source Editor in a SSIS package and I get an error . I change to a Select and it works . I m not sure why this is not working . It works in P SQL . Any help would be appreciated This works in my package : .. . .. . This does not work in my package but works in PL SQL and I get the below error . Error : 0xC0202009 at Data Flow Task OLE DB Source 111 : SSIS Error Code DTS E OLEDBERROR . An OLE DB error has occurred . Error code : 0x80040E14 . Comment : Bottom line : I want to be able to extract only where Dense rank 1 in a SSIS Package . .. . Answer : Best approach for this questions is instead of creating a subquery one could create a CTE . A CTE is compatiable with SSIS .", "Question : When i try to load data from excel source to the teradata with ssis and using microsoft connector for teradata by attunity 1.2 i got below error what am i missing Teradata Destination 23 Error : TPT Import error encountered during Initiate phase . Could Not Find Message Catalog opermsgs SSIS.Pipeline Error : component Teradata Destination 23 failed the pre-execute phase and returned error-code 0x80004005 . My configuration is : .. . .. . SSIS 2008 R2 .. . Teradata 15 .. . Attunity 1.2 Comment : Are you running in 32-bit mode Comment : Yes in 32-bit mode .. . Answer : today I faced with the same error . My problem was solved when I added a way to TPT folders in PATH runtime variable . This folders are :", "Question : null .. . Answer : I am trying to load the data from an Excel source to a SQL Server destination using a SSIS package . There are about 65 columns a few columns are getting the data but the rest of the columns are loaded as nulls . What could be the reason", "Question : A couple of my co-workers have been having trouble connecting to password protected MS Access 2010 database from SSIS using . I decided to make an attempt at troubleshooting this . To simplify the situation I created a new MS Access 2010 database with one table and one row with no password-protection . I copied that database updated the data in the one row so that I could differentiate the source and then applied a password . Both databases on the same network path for which I am using the full UNC path . I created two SSIS packages one for each database . All the packages do is read from the one table and write the data to a CSV . For my connection to the Access database I am using the Microsoft Office 12.0 Access Database Engine OLE DB Provider . For the password protected database-connection I am putting the password in the Jet OLEDB : Database Password field . When running on my machine through Visual Studio both SSIS package work as expected and write the data from the Access database-table to a CSV file at the same location as the database . However when I upload the packages and create a SQL job for each of them the one without a password works but the one with a password does not . Here is the error I get with the user Xed out .. . .. . .. . Any suggestions Comment : We believe the problem is the server have an outdated driver . I ll post a comment if that turns out to be the issue . .. . Answer : 1 . Have your package security set to EncryptSensitiveWithPassword .. . 2 . When you deploy your package ensure you have re-entered the username and password or full connection-string for your connection . Comment : Where do I put in the password with which to encrypt the package Whenever I put something in the PackagePassword package property it seems to disappear . Comment : Within the properties page PackagePassword click on the .. . button to the right . You then get a dialog to enter and then re-enter your password . You are correct though - it is not very intuitive Comment : When I do that I still end up with a blank property value . It seems like it should be or something like that . And if I do get it to stick how and where do I specify password value on my SQL Server Comment : I think I figured out how to specify the password on SQL Server . This is unacceptable . stackoverflow.com a 3040091 632537 http : stackoverflow.com a 3040091 632537 Comment : If you re happy with the answer can you mark it as so - thank you ." ] }
[ "yes-answer-long", "yes-answer-short" ]
ssis
UNK_RELATION
clique@subset@148
clique -- in the mathematical area of graph-theory a clique in an undirected graph is a subset of its vertices such that every two vertices in the @placeholder are connected by an edge .
{ "confidence": [ 113.65791320800781, 66.13471984863281, 65.66258239746094, 64.07244873046875, 62.76301574707031, 61.24032211303711, 61.084468841552734, 61.05937194824219, 60.54415512084961, 59.00634002685547, 57.63805389404297, 57.377044677734375, 55.76105499267578, 53.914798736572266, 53.90102005004883, 53.64680099487305, 53.54728317260742, 53.324951171875, 52.740928649902344, 52.331298828125, 52.30572509765625, 51.99212646484375, 51.95185089111328, 51.80121994018555, 51.413761138916016, 51.0057258605957, 50.35856246948242, 50.32178497314453, 50.292598724365234, 50.0120735168457, 49.944339752197266, 49.60696792602539, 49.450096130371094, 49.43687438964844, 49.26409149169922, 49.14828109741211, 49.14828109741211, 49.13278579711914, 48.86791229248047, 48.63579559326172, 48.553199768066406, 47.87095260620117, 47.87095260620117, 47.87095260620117, 47.62952423095703, 47.54265594482422, 47.19166946411133, 47.17532730102539, 47.13086700439453, 47.13086700439453, 46.48775863647461, 46.455474853515625, 46.379486083984375, 45.941444396972656, 45.88616943359375, 45.48652648925781, 45.13569641113281, 45.110267639160156, 45.04404067993164, 44.77886962890625, 44.76233673095703, 44.569122314453125, 44.29095458984375, 44.23805236816406, 43.96793746948242, 43.740318298339844, 43.734458923339844, 43.47077560424805, 43.386871337890625, 43.23283767700195, 43.002403259277344, 42.89310836791992, 42.89310836791992, 42.85113525390625, 42.6825065612793, 42.67900848388672, 42.663211822509766, 42.483707427978516, 42.470130920410156, 42.228973388671875, 41.90779113769531, 41.902915954589844, 41.837100982666016, 41.837100982666016, 41.79623794555664, 41.7841796875, 41.628780364990234, 41.628780364990234, 41.48035430908203, 41.271995544433594, 41.22348403930664, 41.22348403930664, 41.092376708984375, 41.084014892578125, 41.084014892578125, 41.04082489013672, 40.85396194458008, 40.850990295410156, 40.838111877441406 ], "content": [ "The definition of cliques wikipedia says that a clique in an undirected graph is a subset of its vertices such that every two vertices in the subset are connected by an edge .", "Clearly this undirected graph contains a 3 clique .", "A maximUM clique is a clique with the highest number of vertices possible .", "clique number is the number of vertices in the maximum clique .", "In graph-theory a clique is a set of vertices such that between every two vertices in the set there is an edge .", "An easier reduction from Clique to CCIS is to take your input graph for Clique and add k isolated vertices to it .", "You give the black-box an undirected graph G with a bound k and it outputs either Yes or No that the graph G has a clique with at least k vertices .", "Clique http : i.stack.imgur.com EIdds.png .. . .. . .. . .. . EDIT : .. . .. . As correctly pointed out by @GaborCsardi it is not necessary to subset the graph since a clique is a complete graph .", "Finding the largest clique in a graph is the clique number of the graph and is also known as the maximum clique-problem MCP .", "Is there any software or an algorithm description that would let to find a maximum clique approximately with known number of vertices in a graph with 17000 weighted vertices and 75 density", "I would like to know a fast algorithm to find only the clique number without actually finding the clique of a graph with about 100 vertices .", "For every permanent node in the clique the residual graph is its copy of K k-1 k-1 and the clique .", "The CLIQUE problem-- problem of finding the maximum clique in a graph is NP-complete .", "Hint : Reduce CLIQUE to this problem by adding some vertices .", "Complete graph with 20 nodes having maximal clique equal to the graph itself .", "Let G k an arbitrary instance of the clique-problem where k is the number of vertices of the clique .", "You are trying to find a clique in a graph .", "This problem is called clique edge cover not clique cover .", "how to you define clique for directed-graph since this concept is usually used in the context of undirected graph", "The graph has a c-clique if and only if the formula is satisfiable .", "@AlexK well the question is to solve clique-problem given an initial set of vertices that exists in each maximal clique found .", "Hint : Every clique is a subset of the neighbourset of some vertex .", "If there s two vertices from the clique not in a set then the edge between them isn t covered so any cover must have at least n-1 vertices .", "Given an undirected graph G G V E how can I find the size of the largest clique in it in polynomial time", "Recently I try to develop an algorithm to find out the clique that has the maximum edge-weighted clique in a graph as we know maximum edge-weighted clique-problem MEC-problem .", "Finding a clique is easy -- any edge is a clique .", "Even finding a maxim al clique -- that is a clique that cannot have any more vertices added to it while still remaining a clique -- can be done in poly-time .", "The set 1 for example is a clique but it is not maximal because it is a subset of the clique 1 3 .", "For example take a graph consisting of three vertices and one edge .", "The maximum clique-problem in a weighted graph in general is intractable .", "The algorithm for each k-tuple of vertices if it is a clique then return true works for sure .", "Suppose we are given a graph G which has a clique C of size k . We can reduce this graph into a graph G read : G prime which has both a clique C of size k and independent-set I of size k by attaching k vertices to each vertex in C . This reduction occurs in polynomial time since the addition of the vertices takes O n k time n vertices in the graph and k vertices attached to each node .", "However the verification here is not just whether it s a clique but also is whether it is a maximum clique in the graph .", "A fast algorithm to find the size of the largest clique in a perfect graph this one having odd cycles with at least 1 chord with about 100 vertices", "More Details about the Terms .. . .. . Max-weight Clique : Every edge in the graph has a weight .", "The general intuition here : it s easy to prove a graph contains an N-clique : just show me the clique .", "It s hard to prove a graph that doesn t have an N-clique in fact doesn t have an N-clique .", "Let say there is a black-box an algorithm which gives me a clique of a graph .", "Every maximUM clique is a maximAL clique but the other direction isn t correct .", "Also if by 2-tuple you actually do mean sets of vertices such that the set has exactly 2 vertices and the set forms a clique then all 2-cliques of any graph are exactly the edges .", "The decision version of clique asks if the graph has a clique of size k . Given a candidate solution you can test its feasibility in polynomial time .", "For every 1-clique every vertex that connects to the vertex in the 1-clique contributes to a 2-clique .", "For every 2-clique every vertex that connects to each vertex in the 2-clique contributes to a 3-clique .", "For every k-1 -clique every vertex that connects to each vertex in the k-1 clique contributes to a k-clique .", "This is NP-complete and you can t do it much better than actually finding the maximum clique and counting its vertices .", "Graph 1 http : i.stack.imgur.com 3uQPU.png .. . .. . Plot 2 clique : .. . .. .", "I was trying to solve a basic clique-problem but i have stucked at some following points : .. . .. . what is is the minimum size of the largest clique in any graph with N nodes and M edges .. . .. . To Find the largest clique in a graph .. . .. . Please tell me difference between above two statement .", "Consider the following recursive relation : A k+1 -subgraph is a clique if the first k vertices form a clique and vertex k+1 is adjacent to each of the first k vertices .", "Note that the size of the clique is k which is the largest possible clique size in a complete k-partite graph .", "The reduction to the clique-problem is trivial since we don t need to modify the graph at all to find only a clique .", "There is no real good methods for clique-problem within high-density graph .", "Every vertex is a 1-clique .", "The isolated vertex is a maximAL clique but not a maximUM clique .", "So for instance given a specific graph and a subgraph of it we should be able to check whether that subgraph is a clique of maximum size in that graph .", "That is CLIQUE is .. . .. . a .", "Now search recursively for a small clique edge cover .", "I am doing a problem on fixed parameter tractability where-in we are given a graph G V E and an integer k and the k-clique edit problem asks whether there exists a set U i.e a subset of V such that G-U is a clique and I need to show that the k-clique edit problem is FPT .", "You don t actually need to create the induced subgraph a clique is just a full graph so just create a full graph and set its vertex names .", "@KevinVanRyckegem Imagine that you give the verifier a set of nodes that isn t a clique even though the graph does contain a set of nodes that do form a clique .", "At any point when entering the recursive function the candidates array contains all graph elements which are not in the potential clique but which are individually connected to all members of the potential clique .", "However thanks to clique hardness it can be extremely slow .. . .. . What I want to do is to use an initial set of vertices that I know they are connected .", "A Java program that determines if there is a 3-clique in a graph : .. . .. . The problem defined : .. . .. . https : en.wikipedia.org wiki Clique problem .. . .. . Input format : .. . .. . The input to the method called three clique is a String encoding representing an undirected graph that is represented like this : .. . .. . This encoding denotes an undirected graph with three nodes : 1 2 3 .", "Branch-and-bound algorithm is obviously adaptive to the clique-problem even though we couldn t find a non-poly time algorithm due to the scale of the clique of graph .", "In an undirected graph the matrix should be symmetric .", "I got tangled up trying to understand graph-theory and the clique-problem in general : .", "Let call this newly created graph G instance of CLIQUE-OR-INDEPENDENT-SET .", "A question about the clique-problem specifically k-clique .", "R has an initial clique", "The maximum edge-weighted clique-problem is polynomial Turing reducible to MAX-CLIQUE problem .", "This implementation is a generator of lists each of which contains the members of a maximal clique .. . .. . Does this mean that you can generate a clique remove an edge and then generate the next clique and our generator will know that we ve removed an edge", "I have a problem that I m trying to solve I want to implement a method that takes a clique and returns the largest clique that contains that clique .", "This is similar to a depth-first tree-traversal where the children of a tree node are the vertices larger than the largest vertex in the current clique .", "How would you use this black-box to find the vertices of a maximum clique in polynomial time", "whats the difference between the certificates if any of CLIQUE HALF-CLIQUE MAXIMUM-CLIQUE-CONTAINING-A-SPECIFIC MEMBER .", ".. . .. . You ll need all of the maximal cliques of the graph before you try to calculate clique cover number .", "This does not look like a clique a and c are not connected .", "Now every unique sub-square of all 1s will correspond to a clique .", "iff the graph G has a complete subgraph with k vertices .", "The weight of a clique is the sum of the weights of all edges in the clique .", "I have some graph structures of nodes connected with undirected links .", "Let s take a look at the definitions of independent set and clique : .. . .. . Independent set : A set of nodes where no two are adjacent .. . .. . Clique : A set of nodes where every pair is adjacent .. . .. . By these definitions a set of nodes is independent if in the complement of the graph the set is a clique .", "You can find some supposedly hard clique instances here : nlsde.buaa.edu.cn kexu benchmarks graph-benchmarks.htm http : www.nlsde.buaa.edu.cn kexu benchmarks graph-benchmarks.htm", "Just as CLIQUE is NP -complete the complement of CLIQUE is co-NP -complete .", "I m not completely following : why will the verifier of CLIQUE say no if the set of nodes is a clique", "First the clique must be a maximal clique which does not belong to any larger clique .", "For each maximal clique that contains this edge construct a candidate solution comprised of that clique and the output of a recursive call where the clique edges are removed from set of edges remaining .", "the number of vertices in each clique is 2 k I hope to find a really fast algorithm e.g .", "How to prove that any minimum vertex cover of a clique of size n must have exactly n-1 vertices", "The set 1 3 5 is not a clique because there is no edge between 3 and 5 .", "Ok number vertices 1 .. . n and convert the graph to a boolean adjacency-matrix - 1 at i j meaning that i and j are connected .", "Edit : if P is connected to Q and Q is connected to P then P and Q are in a clique .", "If P is connected to Q and Q is connected to P then P and Q are in a clique .", "Since the decision problem is NP-Complete finding the clique number of a general graph must be NP-Hard .", "Finding a clique in G should find you the equivalent clique in G .", "Then the sum of edges of the clique must be the largest of all maximal clique .", "Here is the Context to my question : .. . .. . I have a homework question : Describe a linear time algorithm in the size of the vertices ie O V to determine if there is a max clique in a graph where all the vertices have a max degree of size 3 .", "Start with a k-clique .", "You can apply this in two directions : .. . Start with a 1-clique and gradually expand the clique until you get the desired size .", "The Boost Graph Library http : www.boost.org doc libs 1 55 0 boost-graph actually seems to have an implementation of a clique search algorithm although I have not been able to find the documentation for it ." ] }
{ "confidence": [ 95.41993713378906, 89.69986724853516, 89.46153259277344, 89.17127990722656, 89.15518951416016, 84.60040283203125, 83.48062133789062, 83.33551788330078, 83.18458557128906, 82.79551696777344, 82.39999389648438, 81.77320861816406, 80.94255828857422, 79.79820251464844, 79.69095611572266, 79.42317962646484, 78.70203399658203, 77.0725326538086, 75.88250732421875, 75.23992156982422 ], "content": [ "Question : How to prove that any minimum vertex cover of a clique of size n must have exactly n-1 vertices THx Comment : This question appears to be off-topic because it is graph-theory rather than a concrete programming or implementation question Comment : This question appears to be off-topic because it is should be asked on cs.stackexchange.com http : cs.stackexchange.com Comment : This question appears to be off-topic because it shows no effort whatsoever and reeks of homework . .. . Answer : If there s two vertices from the clique not in a set then the edge between them isn t covered so any cover must have at least n-1 vertices . Any subset of n-1 vertices is a cover trivially .", "Question : After struggling with this problem for a while I am hoping to get some advice here . I am wondering if anyone is aware of an automated method for determining pairwise grouping labels based on significance . The question is independent of the significance test e.g . Tukey for parametric or Mann-Whitney for non-parametric - given these pairwise comparisons some boxplot-type figures often represent these groupings with a sub-script : .. . .. . enter image description here http : i.stack.imgur.com Ibom9.png .. . .. . I have done this example by hand which can be quite tedious . I think that the sequence of labeling in the algorithm should be based on the number of levels in each group - e.g . those groups containing single levels that are significantly different from all other levels should be named first then groups containing 2 levels then 3 etc . all the while checking that new groupings add a new needed grouping and do not violate and differences . In the example below the tricky part is getting the algorithm to recognize that level 1 should be grouped with 3 and 5 but 3 and 5 should not be grouped i.e . share a label . Example code : Comment : If I understand correctly and you want the minimum number of labels then this is the clique cover problem http : en.wikipedia.org wiki Clique cover problem . Comment : Yes correct - the least number of labels possible . Do you happen to know of an implementation of this in R Comment : How many populations can there be Comment : I m not at all an R user . Comment : @DavidEisenstat - I m trying to find some general solution that I can use for various situations - not just the example here containing 7 levels . .. . Answer : First let me restate the problem in the language of graph-theory . Define a graph as follows . Each sample gives rise to a vertex that represents it . Between two vertices there is an edge if and only if some test indicates that the samples represented by those vertices could not be distinguished statistically . In graph-theory a clique is a set of vertices such that between every two vertices in the set there is an edge . We re looking for a collection of cliques such that every edge in the graph belongs-to at least exactly one of the cliques . We d like to use as few cliques as possible . This problem is called clique edge cover not clique cover . We then assign each clique its own letter and label its members with that letter . Each sample distinguishable from all others gets its own letter as well . For example the graph corresponding to your sample input could be drawn like this . My proposed algorithm is the following . Construct the graph and use the Bron--Kerbosch algorithm http : en.wikipedia.org wiki Bron-Kerbosch algorithm to find all maximal cliques . For the graph above these are 1 3 1 5 and 4 6 . The set 1 for example is a clique but it is not maximal because it is a subset of the clique 1 3 . The set 1 3 5 is not a clique because there is no edge between 3 and 5 . In the graph .. . .. . the maximal cliques would be 1 3 5 and 4 6 . Now search recursively for a small clique edge cover . The input to our recursive function is a set of edges remaining to be covered and the list of maximal cliques . Find the least edge in the remaining set where e.g . edge 1 2 1 5 2 3 2 5 3 4 . For each maximal clique that contains this edge construct a candidate solution comprised of that clique and the output of a recursive call where the clique edges are removed from set of edges remaining . Output the best candidate . Unless there are very few edges this may be too slow . The first performance improvement is memoize : maintain a map from inputs to outputs of the recursive function so that we can avoid doing the work twice . If that doesn t work then R should have an interface to an integer program solver and we can use integer-programming to determine the best collection of cliques . I ll explain this more if the other approach is insufficient . Comment : Thank you so much for this . You got me much of the way and the other half came from this other question http : stackoverflow.com q 23686729 1199289 .", "Question : Given an undirected graph G G V E how can I find the size of the largest clique in it in polynomial time Knowing the number of edges I could put an upper limit on the maximal clique size with .. . .. . http : cs.stackexchange.com questions 11360 size-of-maximum-clique-given-a-fixed-amount-of-edges .. . .. . and then I could iterate downwards from that upper limit to 1 . Since this upper cap is O sqrt E I think I can check for the maximal clique size in O sqrt E sqrt E sqrt E time . Is there a more efficient way to solve this NP-complete problem Comment : Are you sure you understand that example Complete graph with 20 nodes having maximal clique equal to the graph itself . Then there will be 20 cliques of size 19 etc . Knowing the upper bound does not help you to find the real maximal clique . Comment : Hmm couldn t I get the upper bound and iterate through the nodes in decreasing degree Comment : Or is there a dynamic-programming method to find the maximal clique size Comment : @DavidFaux - well you can however I do not think you save much time with it . Dynamic programming can solve the problem to pseudopolynomial but I do not know one : Comment : Just so you won t get confused by the most widely used terminology a maximAL clique is one where if you add any vertex it s not a clique anymore . A maximUM clique is a clique with the highest number of vertices possible . Every maximUM clique is a maximAL clique but the other direction isn t correct . For example take a graph consisting of three vertices and one edge . The isolated vertex is a maximAL clique but not a maximUM clique . .. . Answer : Well I was thinking a bit about some dynamic-programming approach and maybe I figured something out . First : find nodes with very low degree can be done in O n . Test them if they are part of any clique and then remove them . With a little luck you can crush graph into few separate components and then solve each one independently which is much much faster . To identify component O n time is required . Second : For each component you can find if it makes sense to try to find any clique of given size . How Lets say you want to find clique of size 19 . Then there has to exist at least 19 nodes with at least 19 degree . Otherwise such clique cannot exist and you dont have to test it .", "Question : Say you were given a black-box that solves a clique-problem in constant-time . You give the black-box an undirected graph G with a bound k and it outputs either Yes or No that the graph G has a clique with at least k vertices . How would you use this black-box to find the vertices of a maximum clique in polynomial time Comment : This sounds a lot like homework -- it should be tagged as homework . Comment : Obvious homework with no attempt a solution - vote to close as too broad . Comment : I m not asking for a complete solution just some help on how to get started . What do you mean by tag as homework It says the homework tag is not allowed . .. . Answer : As a hint think about what happens if you choose a node from the graph delete it and then check whether there s still a k-clique . The black-box will either say that there is or that there isn t . What do you learn if there still is a k-clique What do you learn if there isn t Hope this helps Comment : I see so are you saying all you need to do is remove a node from the graph reinsert the graph into the black-box and test again So every node that is removed in this way which results in a yes- no change is a node that is part of the maximum clique otherwise it is not .", "Question : Given an undirected graph G G V E how can I find the size of the largest clique in it in polynomial time Knowing the number of edges I could put an upper limit on the maximal clique size with .. . .. . http : cs.stackexchange.com questions 11360 size-of-maximum-clique-given-a-fixed-amount-of-edges .. . .. . and then I could iterate downwards from that upper limit to 1 . Since this upper cap is O sqrt E I think I can check for the maximal clique size in O sqrt E sqrt E sqrt E time . Is there a more efficient way to solve this NP-complete problem Comment : Are you sure you understand that example Complete graph with 20 nodes having maximal clique equal to the graph itself . Then there will be 20 cliques of size 19 etc . Knowing the upper bound does not help you to find the real maximal clique . Comment : Hmm couldn t I get the upper bound and iterate through the nodes in decreasing degree Comment : Or is there a dynamic-programming method to find the maximal clique size Comment : @DavidFaux - well you can however I do not think you save much time with it . Dynamic programming can solve the problem to pseudopolynomial but I do not know one : Comment : Just so you won t get confused by the most widely used terminology a maximAL clique is one where if you add any vertex it s not a clique anymore . A maximUM clique is a clique with the highest number of vertices possible . Every maximUM clique is a maximAL clique but the other direction isn t correct . For example take a graph consisting of three vertices and one edge . The isolated vertex is a maximAL clique but not a maximUM clique . .. . Answer : Finding the largest clique in a graph is the clique number of the graph and is also known as the maximum clique-problem MCP . This is one of the most deeply studied problems in the graph domain and is known to be NP-Hard so no polynomial time algorithm is expected to be found to solve it in the general case there are particular graph configurations which do have polynomial time algorithms . Maximum clique is even hard to approximate i.e . find a number close to the clique number . If you are interested in exact MCP algorithms there have been a number of important improvements in the past decade which have increased performance in around two orders of magnitude . The current leading family of algorithms are branch-and-bound and use approximate coloring to compute bounds . I name the most important ones and the improvement : .. . .. . Branching on color MCQ .. . Static initial ordering in every subproblem MCS and BBMC .. . Recoloring : MCS .. . Use of bit strings to encode the graph and the main operations BBMC http : www.sciencedirect.com science article pii S0305054810001504 .. . Reduction to maximum satisfiability to improve bounds MaxSAT .. . Selective coloring BBMCL .. . .. . and others . It is actually a very active line of research in the scientific community . The top algorithms are currently BBMC MCS and I would say MaxSAT . Of these probably BBMC and its variants which use a bit string encoding are the current leading general purpose solvers . The library of bitstrings used for BBMC is publicly available https : chessprogramming.wikispaces.com Pablo+San+Segundo .", "Question : I would like to know a fast algorithm to find only the clique number without actually finding the clique of a graph with about 100 vertices . I am trying to solve the following problem . http : uva.onlinejudge.org external 1 193.html Comment : @poly : en.wikipedia.org wiki Clique number Definitions http : en.wikipedia.org wiki Clique number Definitions Comment : clique number is the number of vertices in the maximum clique . Comment : Thanks for the UVA link I ll try to work on this over the weekend . Note that the problem is in Brute Force Backtracking - Easy categories however : uva.onlinejudge.org http : uva.onlinejudge.org index.php option com onlinejudge Itemid 8 category 108 page show problem problem 129 .. . Answer : This is NP-complete and you can t do it much better than actually finding the maximum clique and counting its vertices . From Wikipedia http : en.wikipedia.org wiki Clique problem : .. . .. . Clique problems include : .. . .. . solving the decision problem of testing whether a graph contains a clique larger than N .. . .. . These problems are all hard : the clique decision problem is NP -complete one of Karp s 21 NP -complete problems .. . .. . If you can find the clique number in P then the decision problem is answerable in P you simply compute the clique number and compare it with N . Since the decision problem is NP-Complete finding the clique number of a general graph must be NP-Hard .", "Question : First of all I want to mention that this is my homework . However to solve my problem I can use any literature I want . Even though I think that problem is clear from its name I will give it description : For given undirected graph G and given integer k does G contain totally connected clique subgraph of size k or totally disconnected subgraph independent set of size k . .. . .. . I know about polynomial reductions from 3-SAT to CLIQUE and from 3-SAT to INDEPENDENT-SET . http : mlnotes.com 2013 04 29 npc.html However I have problem with this one because I cannot combine those two reductions . I also tried reduction from CLIQUE to CLIQUE-OR-INDEPENDENT-SET but without much success . So I would really appreciate any hints Thanks in advance . .. . Answer : I found out reduction from problem INDEPENDENT-SET to CLIQUE-OR-INDEPENDENT-SET . All you need to do is to add n isolated vertices to graph G which is an instance of INDEPENDENT-SET and has n vertices . Let call this newly created graph G instance of CLIQUE-OR-INDEPENDENT-SET . Then it is not hard to prove that G has k independent-set iff G has n+k independent-set of clique since by construction it cannot have n+k clique .", "Question : null .. . Answer : Subgraph isomorphism .. . .. . We have the graphs G 1 V 1 E 1 G 2 V 2 E 2 . Question : Is the graph G 1 isomorphic to a subgraph of G 2 i.e . is there a subset of vertices of G 2 V V 2 and subset of the edges of G 2 E E 2 such that V V 1 and E E 1 and is there a one-to-one matching of the vertices of G 1 at the subset of vertices V of G 2 f : V 1 - V such that u v E 1 f u f v E .. . .. . Show that the problem Subgraph isomorphism belongs-to NP . Show that the problem is NP-complete reducing the problem Clique to it . Hint : consider that the graph G 1 is complete .. . .. . I have tried the following : .. . .. . A non-deterministic Turing machine first guesses the subset of nodes V and the subset of edges E of G 2 and after that it verifies that V V 1 and E E 1 and that there is a one-to-one correspondence f : V 1 - V such that u v E 1 f u f v E . Since there are O V 2 2 different pairs of vertices the check requires polynomial time . So the problem belongs-to NP . Let G k an arbitrary instance of the clique-problem where k is the number of vertices of the clique . We can construct an instance of the Subgraph isomorphism problem in polynomial time as follows : G 2 is a graph on n vertices . G 1 is a complete graph on k vertices for some k n . Let G G 2 . The problem Subgraph Isomorphism has a solution iff there is a complete subgraph of G 2 with k vertices i.e . iff the graph G has a complete subgraph with k vertices . Thus the instance of the problem Subgraph Isomorphism has a solution iff the initial instance of the problem Clique has a solution . Therefore the problem Subgraph Isomorphism is NP-complete . Could you tell me if it is right or if I could improve something Comment : Your solutions seems correct on both parts to me . Comment : @amit How could we justify further at the first part that the check requires polynomial time Comment : You pretty much did it you check all possible pairings - there are O n 2 of those and for each you check if it fits each such check is O E 1 O n 2 . This yields total of O n 4 algorithm to check if a given subgraph is isomorph or not which is polynomial in the size of the input . Comment : @amit I am a little confused right now . At the beginning we say that a non-deterministic Turing machine first guesses the subset of nodes V and the subset of edges E of G 2 . Then don t we have to look at all the V nodes that we have chosen in order to check if there are V 1 of them such that 1 ... . V 1 ... . V 1 Or am I wrong If so after that don t we look at the edges If I am right wouldn t the check require O V 2 time if we assume that the graphs are represented by adjacency matrices Comment : You first have to also guess the right pairing which vertex from V1 matches which vertex from V2 . There are O n 2 such vertices . For each matching you go through each vertex and see that the edges connected to this vertex are also fine identical . This takes O E time and is repeated for each possible matching out of the n 2 possibilities so the complexity is O V 2 E O V 4 - which is polynomial .", "Question : Here is the Context to my question : .. . .. . I have a homework question : Describe a linear time algorithm in the size of the vertices ie O V to determine if there is a max clique in a graph where all the vertices have a max degree of size 3 . I know that there is a polynomial time algorithm to do this . What I m struggling to come up with is an O V algorithm to do this . Also I do realize that the largest a clique could be is of size 4 . Here is where I keep getting stumped : .. . .. . It seems to me that at some point along the way you would need to enumerate all k-tuples of size 4 . But how can this be done in O V time Also of note is that I have tried playing around with dynamic-programming to solve this but I fail to see how to do this in linear time . Answers thoughts suggestions Comment : Hint : Every clique is a subset of the neighbourset of some vertex . Comment : When you say max clique I assume you mean maximal not maximum correct Comment : @G.Bach The homework writer wouldn t have specified a degree bound if they had meant maximal . Comment : @DavidEisenstat Oh I just realized I misread the question I had thought it said minimum vertex degree . Still this doesn t change the difference in graphs with maximum vertex degree 3 there can still be maximal cliques that are not maximum cliques . Comment : @tmyklebu What .. . Answer : Finding every k-tuple in O V time is not possible because the desired output is larger than the complexity you want to achieve . But actually finding a max-clique doesn t require you to find all k-tuples . The only k-tuples you have to consider are the one that forms a neighbourhood of some vertex including the vertex itself . Comment : First as stated this answer doesn t help me . It s me not you . Preferably I would like a rephrasing of the answer . If not could you at least say what the last sentence means . Lastly I don t see how you can find every 4-tuple in O V time . To see why I am struggling this I don t see how to find all 2-tuples in linear time but can do this in quadratic time . If I can t do 2-tuple in linear time what chance do I have of find 4-tuple in O V time Comment : @user678392 The neighbourhood of a vertex v is defined as the set S such that for all s in S there is an edge v s so in simpler words : the neighbourhood of v is the set of all vertices that are adjacent to v . Any v can only form a clique with the vertices from its neighbourhood . Also if by 2-tuple you actually do mean sets of vertices such that the set has exactly 2 vertices and the set forms a clique then all 2-cliques of any graph are exactly the edges . Comment : @G.Bach I m sorry but I don t see how this helps me . How do I find every 3 tuple in linear time Comment : @Thomash I don t understand this statement : The only k-tuples you have to consider are the one that forms a neighbourhood of some vertex including the vertex itself . How does this help Comment : @user678392 Take a vertex x of degree three call its neighbours u v and w . Which edges does the graph have to have in order for x u v w to be a clique How many operations do you need to check that", "Question : Real-world problem : .. . .. . I have data on directors across many firms but sometimes John Smith director of XYZ and John Smith director of ABC are the same person sometimes they re not . Also John J . Smith director of XYZ and John Smith director of ABC might be the same person or might not be . Often examination of additional information e.g . comparison of biographical data on John Smith director of XYZ and John Smith director of ABC makes it possible to resolve whether two observations are the same person or not . Conceptual version of the problem : .. . .. . In that spirit am collecting data that will identify matching pairs . For example suppose I have the following matching pairs : a b b c c d d e f g . I want to use the transitivity property of the relation is the same person as to generate connected-components of a b c d e f g . That is a b c d e is one person and f g is another . An earlier version of the question referred to cliques which are apparently something else this would explain why find cliques in networkx was giving the wrong results for my purposes . The following Python code does the job . But I wonder : is there a better less computationally costly approach e.g . using standard or available libraries There are examples here and there that seem related e.g . Cliques in python http : stackoverflow.com questions 9713492 cliques-in-python but these are incomplete so I am not sure what libraries they are referring to or how to set up my data to use them . Sample Python 2 code : .. . .. . This produces the desired output : Set a c b e d Set g f . Sample Python 3 code : .. . .. . This produces set a c b e d set g f : Comment : Examples are probably referring to networkX lib : networkx.github.io documentation latest reference https : networkx.github.io documentation latest reference algorithms.clique.html It is a computationaly costly algorithm NP complete to find the largest clique but you have to check complexity of your code compared to the NX functions . Comment : Thanks . I am not a computer scientist in any way but it seems this problem which I have encountered twice in one week is well-known en.wikipedia.org wiki Clique problem http : en.wikipedia.org wiki Clique problem . I couldn t get networkx to do what I wanted it to do . My solution takes about 20 minutes on 78 000 pairs applied from PostgreSQL using PL Python so fine for the current problems . Comment : Unless I m missing something your problem isn t the clique-problem : it s instead variously called set consolidation or finding the connected-components in a graph see also Union-Find . Comment : This does not look like a clique a and c are not connected . Comment : So may be the question should now be reformulated with connected-components and consolidation tags instead of cliques .. . Answer : I don t believe correct me if I m wrong that this is directly related to the largest clique-problem . The definition of cliques wikipedia says that a clique in an undirected graph is a subset of its vertices such that every two vertices in the subset are connected by an edge . In this case we want to find which nodes can reach eachother even indirectly . I made a little sample . It builds a graph and traverses it looking for neighbors . This should be pretty efficient since each node is only traversed once when groups are formed . If your data set is best modeled like a graph and really big maybe a graph database such as Neo4j http : neo4j.com is appropriate Comment : I think if b : would better be if b is not None : -- otherwise you re ruling out 0 as an element for no reason which happened to break my tests . : - Comment : Thanks for the code-review : Comment : You re not benchmarking all the suggested solutions are you : D Comment : @Andr Laszlo Thanks for your answer . First you are right . This isn t the clique-problem . I picked up this term from a casual usage I read in researching this quickly . I haven t yet tried your approach as the networkX way works so well . Thanks also for directing me to the idea of graph-databases . In their book Graph Databases Ian Robinson Jim Webber and Emil Eifrem make a distinction between the underlying storage and the processing engine . I guess I m using PostgreSQL for the former but I guess by using networkX some kind of graph database for the latter . Comment : @IanGow I haven t read Graph Databases but the idea of separating storage and processing is interesting . I m guessing the facts that you are storing are pretty flat or fit well in the relational world Otherwise I think Neo4j for example might have storage that is also optimized for generic graph operations - I m no expert . I m glad that you found a solution that works well", "Question : Prove that it is NP-Complete to determine given input G and k whether G has both a clique of size k and an independent set of size k . Note that this is 1 problem not 2 the answer is yes if and only if G has both of these subsets . We were given this problem in my algorithms course and a large group of students could not figure it out . Here is what we have so far.. . .. . .. . We know that both the clique and independent set problems are NP-Complete in of themselves . We also know that the verification of this problem given some certificate is in NP . The problem is somehow performing a reduction on the above problem which contains both independent sets and cliques to either a problem consisting entirely of cliques or independent sets at least that s what we think we need to do . We don t know how to perform this reduction without losing information needed to reduce the reduction back to its original form . Comment : See also Question about NP-Completeness of the Independent Set Problem . http : stackoverflow.com questions 2128839 question-about-np-completeness-of-the-independent-set-problem .. . Answer : Thanks to Moron and Rafal Dowgird for the hints Based on that I think I ve got a solution . Please correct me if I am incorrect : .. . .. . Since we already know the the clique and independent-set problems are NP-Complete we can use that as a foundation for proving our problem . Let s call our problem the Combination Clique Independent Set problem CCIS . Suppose we are given a graph G which has a clique C of size k . We can reduce this graph into a graph G read : G prime which has both a clique C of size k and independent-set I of size k by attaching k vertices to each vertex in C . This reduction occurs in polynomial time since the addition of the vertices takes O n k time n vertices in the graph and k vertices attached to each node . Note that C C and k k . Now suppose we are given a graph G which has a clique C of size k and independent-set I of size k which is determined to be true . The reduction to the clique-problem is trivial since we don t need to modify the graph at all to find only a clique . Comment : An easier reduction from Clique to CCIS is to take your input graph for Clique and add k isolated vertices to it . Strictly speaking if k is presented in the input in binary adding k extra vertices is an exponential amount of work relative to the length of the input . So you should check that k is at most the number of vertices in the graph : if k is greater than that produce any small no instance e.g . the graph on a single vertex .", "Question : I have a graph and it s nodes adjacent matrix . The issue is to find all nodes adjacent all to all . For example at the picture the result must be 1 2 3 7 all of this nodes connected together . For any kind graph I need get get the list of all all to all nodes collection . How to solve it Thanks . enter image description here http : i.stack.imgur.com isYdM.png .. . Answer : You are trying to find a clique in a graph . Finding a subgraph that is clique in an NP complete problem . You can read through the material here http : www.dfki.de neumann ie-seminar presentations finding cliques.pdf They have mentioned multiple methods here . Comment : Finding a clique is easy -- any edge is a clique . Even finding a maxim al clique -- that is a clique that cannot have any more vertices added to it while still remaining a clique -- can be done in poly-time . Only finding a maxim um clique which it seems is what the OP wants though s he isn t 100 clear is NP-hard .", "Question : I m working on a Twitternetwork based on follower-relations in R . In this Network I want to determine the size of the largest cliques within everybody can read each others tweets in his or her timeline . Therefore I would need largest.cliques . But this function is ignoring directionality . I know its not integrated in the igraph package but is there a way to find cliques in directed networks where every node is actively and passivly connected to each other .. . Answer : For this problem you can convert the directed instance of the problem to an undirected instance . Consider any two nodes if there is only one directed edge between them you know they cannot be part of a clique by your definition . Hence we can dismiss any edge u v if there is no corresponding v u . Otherwise if we have both v u and u v it is equivalent to an undirected edge . In other words we create an undirected graph G with edges between u and v if and only if there is are directed edges u - v and v - u . Finding a clique in G should find you the equivalent clique in G .", "Question : null .. . Answer : So I have an adjacency-matrix for a directed-graph and I want to find cliques in the graph . What I do is make the adjacency-matrix symmetric then cube it after which I look at the diagonal entries and if they re positive it means that the vertex at that entry is in some clique . What I m trying to figure out is how to distinguish between different cliques and know which vertices go in which cliques . Edit : if P is connected to Q and Q is connected to P then P and Q are in a clique . Comment : how to you define clique for directed-graph since this concept is usually used in the context of undirected graph Comment : Sorry about that edited the post . If P is connected to Q and Q is connected to P then P and Q are in a clique . Comment : What I do is make the adjacency-matrix symmetric then cube it . Take the adjacency-matrix 0 1 1 0 cube it and you get the same matrix 0 1 1 0 . None of the diagonal entries is 0 but there is a clique . Don t you mean square it not cube it Comment : Are you trying to find strong components https : en.wikipedia.org wiki Strongly connected component Comment : @Baki You live with exponential time cost approximate or benchmark heuristics since CLIQUE https : en.wikipedia.org wiki Clique problem is NP-hard . As for the matrix powers nonzero entry in component u v of the k-th power of the adjacency-matrix tells you there is a path with exactly k edges from u to v . Here http : www.nada.kth.se viggo wwwcompendium node33.html are pointers to approximation algorithms .", "Question : I have been trying to solve Maximum clique-problem with the algorithm mentioned below and so far not been able to find a case in which it fails . Algorithm : .. . For a given graph each node numbered from 1 to N . .. . 1 . Consider a node as permanent node and form a set of nodes such that each node is connected to this permanent node . the set includes permanent node as well .. . 2 . Now form a subgraph of the original graph such that it contains all the nodes in the set formed and only those edges which are between the nodes present in the set . 3 . Find degree of each node . 4 . If all the nodes have same degree then we have a clique . 5 . Else delete the least degree node from this subgraph and repeat from step 3 . 6 . Repeat step 1-5 for all the nodes in the graph . Can anyone point out flaw in this algorithm Here is my code http : pastebin.com tN149P9m . Comment : What have you tried to find a counter-example Comment : You can find some supposedly hard clique instances here : nlsde.buaa.edu.cn kexu benchmarks graph-benchmarks.htm http : www.nlsde.buaa.edu.cn kexu benchmarks graph-benchmarks.htm Comment : Yes I formed a graph such that there are 2 or more nodes with least degree . But the deletion order didn t matter in those examples . Comment : Does it work on a random example Comment : I made some graphs and also used one given on wikipedia page for this problem . .. . Answer : What you propose looks very much like the following sorting algorithm combined with a greedy clique search : .. . .. . Consider a simple undirected graph G V E .. . .. . Initial sorting .. . .. . Pick the vertex with minimum degree and place it first in the new list L . From the remaining vertices pick the vertex with minimum degree and place it in the second position in L . Repeat the operations until all vertices in V are in L . .. . .. . Find cliques greedily .. . .. . Start from the last vertex in L and move in reverse order . For each vertex v in L compute cliques like this : .. . .. . 1 . Add v to the new clique C .. . 2 . Compute the neighbor set of v in L : N v .. . 3 . Pick the last vertex in N v .. . 4 . v w L L intersection with N v .. . 5 . Repeat steps 1 to 4 .. . .. . Actually the proposed initial sorting is called a degeneracy ordering and decomposes G in k-cores see Batagelj et al . 2002 http : vlado.fmf.uni-lj.si pub networks doc cores cores.pdf A k-core is a maximal subgraph such that all its vertices have at least degree k . The initial sorting leaves the highest cores with largest k at the end . When vertices are picked in reverse order you are picking vertices in the highest cores first similar to your step 4 and trying to find cliques there . There are a number of other possibilities to find cliques greedily based on k-cores but you can never guarantee an optimum unless you do full enumeration . The proposed initial sorting is used for example when searching for exact maximum clique and has been described in many research papers such as Carraghan and Pardalos 90 http : dl.acm.org citation.cfm id 2309759", "Question : I would like to know a fast algorithm to find only the clique number without actually finding the clique of a graph with about 100 vertices . I am trying to solve the following problem . http : uva.onlinejudge.org external 1 193.html Comment : @poly : en.wikipedia.org wiki Clique number Definitions http : en.wikipedia.org wiki Clique number Definitions Comment : clique number is the number of vertices in the maximum clique . Comment : Thanks for the UVA link I ll try to work on this over the weekend . Note that the problem is in Brute Force Backtracking - Easy categories however : uva.onlinejudge.org http : uva.onlinejudge.org index.php option com onlinejudge Itemid 8 category 108 page show problem problem 129 .. . Answer : Although the problem is NP-hard the size of graph you mention is not any problem for today s fastest maximum clique exact solvers for any configuration . If you are ready to implement the code then I recommend you read the papers connected with the family of algorithms MCQ MCR and MCS as well as the family BBMC BBMCL and BBMCX . An interesting starting point is the comparison survey by Prosser Prosser 12 http : www.mdpi.com 1999-4893 5 4 545 . It includes explanation for a Java implementation of these algorithms .", "Question : One of the assignments in my algorithms class is to design an exhaustive search algorithm to solve the clique-problem . That is given a graph of size n the algorithm is supposed to determine if there is a complete sub-graph of size k . I think I ve gotten the answer but I can t help but think it could be improved . Here s what I have : .. . .. . Version 1 .. . .. . input : A graph represented by an array A 0 .. . n -1 the size k of the subgraph to find . output : True if a subgraph exists False otherwise .. . .. . Algorithm in python-like pseudocode : .. . .. . Version 2 .. . .. . input : An adjacency-matrix of size n by n and k the size of the subgraph to find .. . .. . output : All complete subgraphs in A of size k . .. . .. . Algorithm this time in functional Python pseudocode : .. . .. . Does anybody have any thoughts comments or suggestions This includes bugs I might have missed as well as ways to make this more readable I m not used to using much pseudocode . Version 3 .. . .. . Fortunately I talked to my professor before submitting the assignment . When I showed him the pseudo-code I had written he smiled and told me that I did way too much work . For one I didn t have to submit pseudo-code I just had to demonstrate that I understood the problem . And two he was wanting the brute-force solution . So what I turned in looked something like this : .. . .. . input : A graph G V E the size of the clique to find k .. . .. . output : True if a clique does exist false otherwise .. . .. . Algorithm : .. . .. . 1 . Find the Cartesian Product Vk . 2 . For each tuple in the result test whether each vertex is connected to every other . If all are connected return true and exit . 3 . Return false and exit . UPDATE : Added second version . I think this is getting better although I haven t added any fancy dynamic-programming that I know of . UPDATE 2 : Added some more commenting and documentation to make version 2 more readable . This will probably be the version I turn in today . Thanks for everyone s help I wish I could accept more than one answer but I accepted the answer by the person that s helped me out the most . I ll let you guys know what my professor thinks . Comment : You meant complete subgraph of size k right Also I think k isn t used in your pseudocode . Comment : Yup you re correct on both counts . : - Comment : @Jason : There are n vertices right i.e . A 1 .. . n Comment : Arghhh.. . I got it wrong in the above . I meant A 0 .. . n-1 though I suppose A 1 .. . n would work as well . Comment : @Jason : Suggestion : Could you document what the two functions are suppose to do .. . Answer : The algorithm for each k-tuple of vertices if it is a clique then return true works for sure . However it s brute-force which is probably not what an algorithms course is searching for . Instead consider the following : .. . .. . 1 . Every vertex is a 1-clique . 2 . For every 1-clique every vertex that connects to the vertex in the 1-clique contributes to a 2-clique . 3 . For every 2-clique every vertex that connects to each vertex in the 2-clique contributes to a 3-clique . 4 . .. . .. . 5 . For every k-1 -clique every vertex that connects to each vertex in the k-1 clique contributes to a k-clique . This idea might lead to a better approach .", "Question : One of the assignments in my algorithms class is to design an exhaustive search algorithm to solve the clique-problem . That is given a graph of size n the algorithm is supposed to determine if there is a complete sub-graph of size k . I think I ve gotten the answer but I can t help but think it could be improved . Here s what I have : .. . .. . Version 1 .. . .. . input : A graph represented by an array A 0 .. . n -1 the size k of the subgraph to find . output : True if a subgraph exists False otherwise .. . .. . Algorithm in python-like pseudocode : .. . .. . Version 2 .. . .. . input : An adjacency-matrix of size n by n and k the size of the subgraph to find .. . .. . output : All complete subgraphs in A of size k . .. . .. . Algorithm this time in functional Python pseudocode : .. . .. . Does anybody have any thoughts comments or suggestions This includes bugs I might have missed as well as ways to make this more readable I m not used to using much pseudocode . Version 3 .. . .. . Fortunately I talked to my professor before submitting the assignment . When I showed him the pseudo-code I had written he smiled and told me that I did way too much work . For one I didn t have to submit pseudo-code I just had to demonstrate that I understood the problem . And two he was wanting the brute-force solution . So what I turned in looked something like this : .. . .. . input : A graph G V E the size of the clique to find k .. . .. . output : True if a clique does exist false otherwise .. . .. . Algorithm : .. . .. . 1 . Find the Cartesian Product Vk . 2 . For each tuple in the result test whether each vertex is connected to every other . If all are connected return true and exit . 3 . Return false and exit . UPDATE : Added second version . I think this is getting better although I haven t added any fancy dynamic-programming that I know of . UPDATE 2 : Added some more commenting and documentation to make version 2 more readable . This will probably be the version I turn in today . Thanks for everyone s help I wish I could accept more than one answer but I accepted the answer by the person that s helped me out the most . I ll let you guys know what my professor thinks . Comment : You meant complete subgraph of size k right Also I think k isn t used in your pseudocode . Comment : Yup you re correct on both counts . : - Comment : @Jason : There are n vertices right i.e . A 1 .. . n Comment : Arghhh.. . I got it wrong in the above . I meant A 0 .. . n-1 though I suppose A 1 .. . n would work as well . Comment : @Jason : Suggestion : Could you document what the two functions are suppose to do .. . Answer : Some comments : .. . .. . You only need to consider n-choose-k combinations of vertices not all k-tuples n k of them . connected tuple doesn t look right . Don t you need to reset unconnected inside the loop As the others have suggested there are better ways of brute-forcing this . Consider the following recursive relation : A k+1 -subgraph is a clique if the first k vertices form a clique and vertex k+1 is adjacent to each of the first k vertices . You can apply this in two directions : .. . Start with a 1-clique and gradually expand the clique until you get the desired size . For example if m is the largest vertex in the current clique try to add vertex m+1 m+2 .. . n-1 to get a clique that is one vertex larger . This is similar to a depth-first tree-traversal where the children of a tree node are the vertices larger than the largest vertex in the current clique . Start with a subgraph of the desired size and check if it is a clique using the recursive relation . Set up a memoization http : en.wikipedia.org wiki Memoization table to store results along the way . implementation suggestion Use an adjacency-matrix 0-1 to represent edges in the graph . initial pruning Throw away all vertices with degree less than k .", "Question : My Problem .. . .. . Whether there s an efficient algorithm to find a max-weight or min-weight k - clique http : en.wikipedia.org wiki Clique problem in a complete k -partite graph a graph in which vertices are adjacent if and only if they belong to different partite sets according to wikipedia http : en.wikipedia.org wiki Glossary of graph-theory More Details about the Terms .. . .. . Max-weight Clique : Every edge in the graph has a weight . The weight of a clique is the sum of the weights of all edges in the clique . The goal is to find a clique with the maximum weight . Note that the size of the clique is k which is the largest possible clique size in a complete k-partite graph . What I have tried .. . .. . I met this problem during a project . Since I am not a CS person I am not sure about the complexity etc . I have googled several related papers but none of them deals with the same problem . I have also programmed a greedy algorithm + simulated-annealing to deal with it the result seems not good . I have also tried something like Dynamic Programming but it does not seem efficient . So I wonder whether the exact optimal can be computed efficiently . Thanks in advance . EDIT Since my input can be really large e.g . the number of vertices in each clique is 2 k I hope to find a really fast algorithm e.g . polynomial of k in time that works out the optimal result . If it s not possible can we prove some lower-bound of the complexity Comment : What do you mean by weight Comment : @ColonelPanic Each edge in the graph has a weight . The weight of a clique is the sum of the weights of all edges in the clique . Comment : yeah forget my comment on spanning tree.. . i misread your text and already deleted my wrong comments : Comment : @fordprefect thank you for your attention anyway : Comment : This may be useful for you - engineering.uiowa.edu krokhmal pdf bitCLQ.pdf http : www.engineering.uiowa.edu krokhmal pdf bitCLQ.pdf .. . Answer : Generalized Maximum Clique Problem GMCP .. . .. . I understand that you are looking for the Generalized Maximum minimum Clique Problem GMCP where finding the clique with maximum score or minimum cost is the optimization problem . This problem is a NP-Hard problem as shown in Generalized network design problems http : www.sciencedirect.com science article pii S0377221702004046 so there is currently no polynomial time exact solution to your problem . Since there is no known polynomial solution to your problem you have 2 choices . Reducing the problem size to find the exact solution or to find an estimated solution by relaxing your problem and it leads you to a an estimation to the optimal solution . Example and solution for the small problem size .. . .. . In small k-partite graphs in our case k is 30 and each partite has 92 nodes we were able to get the optimal solution in a reasonable time by a heavy branch and bounding algorithm . We have converted the problem into another NP-hard problem Mixed Integer Programming reduced number of integer variables and used IBM Cplex optimizer to find the optimal solution to GMCP . You can find our project page http : crcv.ucf.edu projects GMCP Classifier and paper useful . I can also share the code with you . How to estimate the solution .. . .. . One straight forward estimation to this NP-Hard problem is relaxing the Mixed Integer Programming problem and solve it as a linear-programming problem . Of course it will give you an estimation of the solution but still you might get a reasonable answer in practice . More general problem Generalized Maximum Multi Clique Problem .. . .. . In another work we solve the Generalized Maximum Multi Clique Problem GMMCP where maximizing the score or minimizing the cost of selecting multiple k-cliques in a complete k-partite graph is in interest . You can find the project page http : crcv.ucf.edu projects GMMCP-Tracker by searching for GMMCP Tracking .", "Question : Does anyone know of a library or some code preferably Java that solves the clique cover problem I found an OCaml version http : theinf1.informatik.uni-jena.de ecc README but I would like to use something I can more easily integrate with . I ve also found Java code http : jgrapht.org javadoc org jgrapht alg BronKerboschCliqueFinder.html and C code to find the maximum clique in a graph but I don t know of a way to leverage this code to find a clique cover e.g . iteratively removing maximum cliques until no nodes are left does not yield an optimum solution . Comment : Unless the OCaml version has some optimizations it should be easy to write a brute-force version in Java by generating all the partitions and testing . Comment : Thanks for the suggestion I m keeping this option as a last resort . Yes the OCAml version seems to have great runtime performance . .. . Answer : A Java program that determines if there is a 3-clique in a graph : .. . .. . The problem defined : .. . .. . https : en.wikipedia.org wiki Clique problem .. . .. . Input format : .. . .. . The input to the method called three clique is a String encoding representing an undirected graph that is represented like this : .. . .. . This encoding denotes an undirected graph with three nodes : 1 2 3 . There are edges between 1 and 2 2 and 3 and 3 and 1 . It looks like a triangle . Clearly this undirected graph contains a 3 clique . This encoding of an undirected graph does not contain a 3-clique : .. . .. . The code : .. . .. . Output .. . .. . The program outputs a series of seven dots on the screen which means all the unit tests pass . To prove it works add some more unit test cases for large undirected graphs like this one : 1 2 3 4 5 1 5 1 4 1 3 1 2 1 1 And see if it returns false . Runtime complexity : .. . .. . Computational complexity is Polynomial https : en.wikipedia.org wiki Time complexity Polynomial time specifically O n 3 . So it s very inefficient and is certainly not the optimal algorithm for this problem . But it demonstrates the starting point how to approach and solve the clique-problem in Java ." ] }
[ "yes-answer-long", "yes-answer-short" ]
subset
UNK_RELATION
mongocsharpdriver@asynchronous@64
mongocsharpdriver -- the official mongodb .net driver provides @placeholder interaction with mongodb .
{ "confidence": [ 18.449554443359375, 17.617136001586914, 15.264165878295898, 13.422388076782227, 13.422388076782227, 13.422388076782227, 13.422388076782227, 13.422388076782227, 13.422388076782227, 13.422388076782227, 13.422388076782227, 13.422388076782227, 13.422388076782227, 13.422388076782227, 13.422388076782227, 13.422388076782227, 9.493792533874512, 9.493792533874512, 9.493792533874512, 9.493792533874512, 9.493792533874512, 9.493792533874512, 9.493792533874512 ], "content": [ "I notice that whenever I try filtering by nearSphere through the C driver the filter just returns all matches regardless of whether they re in the given range or not .", "I have a couple of room objects in the database that have the RoomLocation field which is a defined in the database as a type : Point Created in the C driver as a GeoJsonPoint object that then gets serialized .", "I dont want to use dictionary because this stuff isn t well configured in the monbo driver and there are lots of serialization and stuff to do .", "I m having this weird problem while using mongo to query locations near a geographical point .", "What s weirder is that the same query works in the mongo-shell itself and returns only the correct matches .", "E.g .", "These points have the coordinates 0 0 and 3 3 and I m querying from 0 0 with max distance of 3 so the second point should not be found These are geographical locations so the distance should be a good few hundreds of kilometers certainly not 3 .", "The query I m running is : .. . .. . Which works fine and only returns the 0 0 point .", "However if I run the following code in my C project : .. . .. . And call it on location new GeoPoint 0 0 i SearchRadius 3 in the same manner as I do in the shell then the result-of this query will include both points .", "The index is set up properly on the RoomLocation field .", "Can anyone see some obvious mistake I m making here", "Since I m really not sure what s going on right now .", "Thanks .", "Ok so I think I found it .", "Apparently using the overload of NearSphere that accepts 2 arguments as doubles doesn t work .. . .. . But changing to the overload that accepts a GeoJsonPoint object with a GeoJson2DGeographicCoordinates as the generic type makes it work properly .", "Like this : .. . .. . Just for future reference .", "I have the following object .", "I want the list of vote to act as a dictionary where the key is the UserId .", "I want to store a single vote for a single user per match .", "Im using the following code : .. . .. . It seems I can t do that because im getting an exception of trying to update the same field twice .", "Is there a way to use Set somehow and if no record is found for the Set it will insert one", "Something like SetOnInsert but the problem here is that I dont want inserting new Matches they are fixed in the system and I dont wish users will just create matches .", "TIA" ] }
{ "confidence": [ 18.762840270996094, 14.643645286560059 ], "content": [ "Question : I m having this weird problem while using mongo to query locations near a geographical point . I notice that whenever I try filtering by nearSphere through the C driver the filter just returns all matches regardless of whether they re in the given range or not . What s weirder is that the same query works in the mongo-shell itself and returns only the correct matches . E.g . I have a couple of room objects in the database that have the RoomLocation field which is a defined in the database as a type : Point Created in the C driver as a GeoJsonPoint object that then gets serialized . These points have the coordinates 0 0 and 3 3 and I m querying from 0 0 with max distance of 3 so the second point should not be found These are geographical locations so the distance should be a good few hundreds of kilometers certainly not 3 . The query I m running is : .. . .. . Which works fine and only returns the 0 0 point . However if I run the following code in my C project : .. . .. . And call it on location new GeoPoint 0 0 i SearchRadius 3 in the same manner as I do in the shell then the result-of this query will include both points . The index is set up properly on the RoomLocation field . Can anyone see some obvious mistake I m making here Since I m really not sure what s going on right now . Thanks . .. . Answer : Ok so I think I found it . Apparently using the overload of NearSphere that accepts 2 arguments as doubles doesn t work .. . .. . But changing to the overload that accepts a GeoJsonPoint object with a GeoJson2DGeographicCoordinates as the generic type makes it work properly . Like this : .. . .. . Just for future reference .", "Question : null .. . Answer : I have the following object . I want the list of vote to act as a dictionary where the key is the UserId . I dont want to use dictionary because this stuff isn t well configured in the monbo driver and there are lots of serialization and stuff to do . I want to store a single vote for a single user per match . Im using the following code : .. . .. . It seems I can t do that because im getting an exception of trying to update the same field twice . Is there a way to use Set somehow and if no record is found for the Set it will insert one Something like SetOnInsert but the problem here is that I dont want inserting new Matches they are fixed in the system and I dont wish users will just create matches . TIA" ] }
[ "yes-answer-long", "yes-answer-short" ]
asynchronous
UNK_RELATION
tomcat5@tomcat@51
tomcat5 -- version 5.x october 2002 of the apache @placeholder servlet container .
{ "confidence": [ 31.738636016845703, 28.60505485534668, 26.173219680786133, 24.149642944335938, 22.942337036132812, 21.720487594604492, 21.616703033447266, 21.29722023010254, 20.87264633178711, 20.69112205505371, 19.736967086791992, 19.736967086791992, 19.730609893798828, 18.861473083496094, 18.84532928466797, 18.016923904418945, 18.016923904418945, 17.450576782226562, 16.32387924194336, 16.32387924194336, 16.08172035217285, 15.693754196166992, 15.676376342773438, 15.259763717651367, 15.125568389892578, 14.827627182006836, 14.560876846313477, 14.43966007232666, 14.422281265258789, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 14.30384635925293, 13.71928882598877, 12.413457870483398, 12.413457870483398, 12.413457870483398, 12.413457870483398, 12.413457870483398, 12.413457870483398, 12.413457870483398, 12.413457870483398, 12.413457870483398, 12.413457870483398, 12.413457870483398, 12.413457870483398 ], "content": [ "Tomcat 6.x is a Servlet 2.5 JSP 2.1 container so it supports it .", "Unable to open the service Tomcat5 .", "I ve got a system develop in Java + MySql + Tomcat5 .", "Tomcat 5.0 is however a Servlet 2.3 JSP 1.2 container so it doesn t support it .", "This is working fine in tomcat5 and jdk 1 4 but when i switched it to tomcat6 and jdk 1.6 once the filter is running then for next request httprequest.getsession false is null .", "You re missing a dependency of Apache commons pool .", "The problem with the web.xml file that you provided is that there are no servlet s and servlet-mapping s defined .", "Actually for Servlet 2.3 JSP 1.2 you really have to write all your JSF code as at highest JSF version 1.1 not as 1.2 .", "There are already some Apache commons-xxx.jar files in-place but not commons-collection.jar .", "Not sure but googling for the exception leads to loads of threads like apache-commons.680414.n4.nabble.com http : apache-commons.680414.n4.nabble.com Exception-in-thread-quot-main-quot-java-lang-NoClassDefFoundError-org-apache-commons-collections-Curt-td738972.html", "First of all I am using Tomcat 5 here .", "So this question is no longer tagged with Groovy and Grails but Java and Tomcat 5 .", "For now i don t want to run it through Apache and instead just want to access tomcat directly .", "I used Tomcat 5.0.25 as our production is using the same version .", "I am receiving this error message : The requested resource package servlet access is not available .", "I did that and now I am just accessing the application when that happens I think that servlet checks whether the user has access .", "Tomcat needs all the servlets in your application defined in the web.xml file plus the mappings in order to know which servlet to call when you open a URL .", "This store is per java version so this would explain why the older version is working while the new version is not .", "Your best bet is using the as of JSF 1.2 deprecated ValueBinding http : download.oracle.com javaee 5 api javax faces el ValueBinding.html and friends .", "code is working well in tomcat 5 but in tomcat 6 its setting session null after filter is executed its loosing all the contents .", "The javadoc of HttpServletRequest.getSession boolean create http : tomcat.apache.org tomcat-7.0-doc servletapi javax servlet http HttpServletRequest.html getSession boolean clearly states that if you pass a false value to its parameter it will only return the HttpSession if there is one existing already .", "I have read few documents about XSS attack but could not found a proper solution which can work with the given tomcat version .", "Unified EL ValueExpression http : download.oracle.com javaee 5 api javax el ValueExpression.html and consorts was introduced in JSP 2.1 note the Since note at the bottom of the introductory text in javadoc .", "I used to work with Java6 but I updated my machine to win8 with java7 and when I run my servlet I got this error from Tomcat .", "So i ve deployed Tomcat and configured server.xml see below but when i start it i am not able to see the tomcat 5 welcome page using this URL : global.int.com : 9082 .. . .. . I can see Tomcat is running as Catalina.out says : .. . .. . Jan 27 2012 8 : 21 : 56 PM org.apache.coyote.http11.Http11Protocol start INFO : Starting Coyote HTTP 1.1 on http-9082 Jan 27 2012 8 : 21 : 56 PM org.apache.jk.common.ChannelSocket init INFO : JK2 : ajp13 listening on 0.0.0.0 : 9020 Jan 27 2012 8 : 21 : 56 PM org.apache.jk.server.JkMain start INFO : Jk running ID 0 time 1 14 config home tomcat tomcat5 fcl uat conf jk2.properties Jan 27 2012 8 : 21 : 56 PM org.apache.catalina.startup.Catalina start INFO : Server startup in 2173 ms .. . .. . And Command lsof -i TCP Shows : .. . .. . java 29923 tomcat 5u IPv6 373023 TCP : 9082 LISTEN .. . .. . I can t figure out why i can t see the tomcat page .", "I have an application that is distributed with tomcat I wanted to simply take the webapp from the webapps folder and put it into the webapps folder of a tomcat server however when I do this and restart it etc whenever a servlet is referenced such as controller it returns a 404 as-if the servlets or the mapping aren t working .", "In most cases XSS has nothing to do with the version of Tomcat you re using it s caused by an incorrect implementation of your application it looks like you re outputting the username entered by the user directly into your HTML page without escaping any special-characters .", "It would seem that the root cause of this problem is that when you are running the newer version tc7 jdk1.7 you application is unable to find the certificate store .", "The error is the following : .. . .. . I was doing some research and noticed that the cacerts file might be behind this however could it still be the case since the Tomcat 5 application is working and only the Tomcat 7 one is not", "I m trying to put in a Tomcat server on our unix machine access remotely which will be used for test projects .", "I have another Tomcat server running on port 9081 and we can access it just fine by using url global.int.com : 9081 and the above server.xml is a carbon copy of that except the port numbers are changed .", "Can anyone please give me a hint on where things are falling apart .", "Thanks .. . .. . UPDATE2 : .. . .. . Result of wget -S from Remote Desktop : .. . .. . Below is the result-of wget -S on LocalHost machine : .. . .. . UPDATE 3 : Result of iptables -L -v -n : .. . .. . Correct me if I am wrong - but result-of above shows the reason why I cannot access tomcat given I ve assigned port 9082 to tomcat and that port does not exist in the above list .", "All port numbers used in server.xml are unique I ve double checked .", "Any suggestions on why I can t get to see the Tomcat main page and how to fix it", "Check if you are not using the same shutdown port 9007 as the other tomcat on the same machine .", "Also wget -S output would definitely be useful .", "hi I checked the Shutdown ports as you suggested and 9007 is unique .", "I also updated my post with result-of wget -S .", "Can you access the content if physically coming from the same server e.g .", "running wget from localhost", "Maybe you have got some firewall which is blocking the access to all ports", "Hi @mindas - Thanks for trying to help- The above wget -S result i posted first was from localhost Same server which shows all is well so it might have confused people .", "The result from computer i am trying is also now updated in the question .", "Would you point your finger at the firewall for being the issue", "Yes this is the most likely .", "If you re running on Linux iptables -L -v -n from root shell would probably show the cause .", "Or you might have your outgoing connections from remote desktop firewalled but this is far less likely .", "Turns out this was a firewall issue which was blocking the incoming connections .", "iptables -L -v -n on Linux has helped to reveal the actual problem .", "See comments under the article for more details .", "I have tomcat 5.0.3 in the link its mentioned that the attribute is availiable for tomcat 5.5 onwards .", "The attribute packetSize is only available in Tomcat 5.5.20+ and 6.0.2+ .", "how do increase the packetsize in tomcat 5.0.3 .", "I am debugging a Java application that runs Groovy program for a certain database transaction call .", "When the pointer passes the following line of the Groovy program .. . .. . It prints the following exception .. . .. . sce expiry.groovy is the groovy file name .", "The solutions other people got recommended are like making sure the common-collections.jar and groovy-all.jar are in the classpath .", "I have verified .", "Both jar files are located in the lib folder of the webapp s directory inside my Tomcat .", "And the class can be found inside common-collections.jar with the same package name .", "I actually have almost 0 experience with Groovy .", "So I m really not sure whether some additional configuration is needed .", "Does anyone have any idea", "--------------------------Solution found and question might change-------------- .. . .. . Alright so I found out two ways to make this work .", "And they are related .", "In the Tomcat folder there is a common lib directory for users to place jar files shared by applications .", "If I put a copy of commons-collection.jar together with the existing jar file it will work", "Alternatively remove one jar file commons-dbcp.jar it will work as well .", "Both commons-collection.jar and commons-dbcp.jar are available in the application s own lib folder .", "Yet I need to do more research on this but I suspect that commons-dbcp.jar need to work together with commons-collection.jar for the function I call and that common lib folder takes a higher priority to be read in .", "Therefore once commons-dbcp.jar is read in Tomcat will ingore the same in the app s lib folder and will only work with the one in the common lib folder .", "While commons-collection was not available in the common lib folder it complained when commons-dbcp.jar was looking for it .", "Please correct me if I m wrong .", "I don t know perfectly how Tomcat works. .", "This isn t a groovy issue afaict", "@tim yates Are you talking about a commons- .jar", "If yes which jar do you think it could be", "The class sits inside the commons-collections.jar which I do have in my classpath .", "I am using tomcat 5.5.9 on windows 2003 platform for SOAP server .", "the Application is automatically crashed after startup .", "below is startup log attached .", "Kindly help in this regard .", "PDB return null to MNP", "Will sen alarm is not a known Tomcat error .", "It is some illterate message provided by an application programmer .", "You will have to look it up in the source code for yourself .", "We have this scenario where an application on a particular server using Tomcat 5 JDK 1.4 can successfully connect with a web service using HTTPS and the same application using Tomcat 7 JDK 1.7 on another server fails to connect to this web service .", "I have created an application which build a grid or a matrix of elements dinamycally .", "When I try to navigate to another page I get an error : .. . .. . This is the code : .. . .. . CODE to create a row of cells with the data from the bean .. . .. . This code WORKS PERFECT in tomcat 6.0.18 .. . .. . but in Tomcat 5.0 I get the next error : .. . .. . The line which produce the error is : .. . .. . If I put just ccelda.setValue myValue works great but I need to get the value from the bean that the reason I use the ValueExpression .", "I can t see a way to debug this .", "If anyone is interested I have a stand-alone project to see how it works .", "Thanks for your comment .", "I have used ValueBinding and friends and the result is the same .", "I don t know where exactly the error happens .", "I have added a jsf lifecycle as you have in blogspot .", "Every phase if fired until phase 6 .", "Here is it : .. . .. . If you or anybody want to take a look this is the link-to download : https : docs.google.com leaf id 0B5-kdDLa5NdMMDYxOGQ2MWMtMWMwNS00MDFlLTkxMWQtM2EzYmZkZDgyMTgy hl en https : docs.google.com leaf id 0B5-kdDLa5NdMMDYxOGQ2MWMtMWMwNS00MDFlLTkxMWQtM2EzYmZkZDgyMTgy hl en .. . .. . Take a look at Grid.java .. . .. . Thanks .. . .. . Updated : .. . .. . Finally it works .. . .. . I have used valueBinding curiosly I had used before but I left the libraries for jsf1.2 .", "Now I have eliminated this libraries from the lib s folder and it works .", "With the other code I had the posibility to specify the type of the value String Integer etc. . ." ] }
{ "confidence": [ 35.59590148925781, 29.39908218383789, 24.255050659179688, 23.89065933227539, 21.771488189697266, 21.622406005859375, 19.986961364746094, 17.900890350341797, 16.91721534729004, 14.551567077636719, 14.551567077636719, 14.23983383178711, 12.592921257019043, 12.592921257019043, 11.29961109161377, 7.953751564025879 ], "content": [ "Question : I have created an application which build a grid or a matrix of elements dinamycally . When I try to navigate to another page I get an error : .. . .. . This is the code : .. . .. . CODE to create a row of cells with the data from the bean .. . .. . This code WORKS PERFECT in tomcat 6.0.18 .. . .. . but in Tomcat 5.0 I get the next error : .. . .. . The line which produce the error is : .. . .. . If I put just ccelda.setValue myValue works great but I need to get the value from the bean that the reason I use the ValueExpression . I can t see a way to debug this . If anyone is interested I have a stand-alone project to see how it works . .. . Answer : Unified EL ValueExpression http : download.oracle.com javaee 5 api javax el ValueExpression.html and consorts was introduced in JSP 2.1 note the Since note at the bottom of the introductory text in javadoc . Tomcat 6.x is a Servlet 2.5 JSP 2.1 container so it supports it . Tomcat 5.0 is however a Servlet 2.3 JSP 1.2 container so it doesn t support it . Your best bet is using the as of JSF 1.2 deprecated ValueBinding http : download.oracle.com javaee 5 api javax faces el ValueBinding.html and friends . Actually for Servlet 2.3 JSP 1.2 you really have to write all your JSF code as at highest JSF version 1.1 not as 1.2 .", "Question : I have written one filter which would invalidate current session and create new session and copy attributes of old session into new session . This is working fine in tomcat5 and jdk 1 4 but when i switched it to tomcat6 and jdk 1.6 once the filter is running then for next request httprequest.getsession false is null . Why its behaving differently in tomcat 6 . Please help . here is the code snippet .. . Answer : The javadoc of HttpServletRequest.getSession boolean create http : tomcat.apache.org tomcat-7.0-doc servletapi javax servlet http HttpServletRequest.html getSession boolean clearly states that if you pass a false value to its parameter it will only return the HttpSession if there is one existing already . If there is no session associated with the request it will return null . So if you invalidate your current session obviously calling request.getSession false in your next request will return null . If you want to create a new session after invalidating the current one then use : request.getSession true or more simply : request.getSession . Comment : after invalidating it i am creating a new session Comment : and copying the old attributes in to new session.see the above code . i created filer only for login submit action . code is working well in tomcat 5 but in tomcat 6 its setting session null after filter is executed its loosing all the contents . Comment : Have you tried using request.getSession instead of request.getSession true Comment : would it make any difference because code till filter is working well.but once the page is redirected to home page from login page http session is returning null . Comment : It shouldn t but please try .", "Question : I ve got a system develop in Java + MySql + Tomcat5 . I used to work with Java6 but I updated my machine to win8 with java7 and when I run my servlet I got this error from Tomcat . Does anybody know why it s happening this or how to fix it . I have now idea why this is happening and I don t get any information from google . Thanks for your help . Have a good day : .. . Answer : I have seen this exception thrown due to DST daylight savings time constraints when parsing dates in Brazil . It seems in the case at hand GregorianCalendar is throwing an IllegalArgumentException due to DST constraints . When the DB driver tries to read a date field the stored date is not a valid date according to GregorianCalendar because the time portion is zero midnight and there is no midnight for that specific day . I know it sounds strange but the problem is the way DST is defined at least thats the case in Brasil I dont know about other countries where we have the clock change from midnight to 1am when we enter DST . This causes the phenomenom of not having midnight since it is replaced by 1am instead and this causes the problem we see here . In the US we dont have this problem because DST changes at 3am so midnight is always there where it should be . I wonder how the 3am - 4am times are handled to avoid this kind of quirk . The only way I know of dealing with this issue is to never store dates with zeroed time portions .", "Question : null .. . Answer : I am debugging a Java application that runs Groovy program for a certain database transaction call . When the pointer passes the following line of the Groovy program .. . .. . It prints the following exception .. . .. . sce expiry.groovy is the groovy file name . The solutions other people got recommended are like making sure the common-collections.jar and groovy-all.jar are in the classpath . I have verified . Both jar files are located in the lib folder of the webapp s directory inside my Tomcat . And the class can be found inside common-collections.jar with the same package name . I actually have almost 0 experience with Groovy . So I m really not sure whether some additional configuration is needed . Does anyone have any idea --------------------------Solution found and question might change-------------- .. . .. . Alright so I found out two ways to make this work . And they are related . First of all I am using Tomcat 5 here . In the Tomcat folder there is a common lib directory for users to place jar files shared by applications . There are already some Apache commons-xxx.jar files in-place but not commons-collection.jar . If I put a copy of commons-collection.jar together with the existing jar file it will work Alternatively remove one jar file commons-dbcp.jar it will work as well . Both commons-collection.jar and commons-dbcp.jar are available in the application s own lib folder . Yet I need to do more research on this but I suspect that commons-dbcp.jar need to work together with commons-collection.jar for the function I call and that common lib folder takes a higher priority to be read in . Therefore once commons-dbcp.jar is read in Tomcat will ingore the same in the app s lib folder and will only work with the one in the common lib folder . While commons-collection was not available in the common lib folder it complained when commons-dbcp.jar was looking for it . Please correct me if I m wrong . I don t know perfectly how Tomcat works. . So this question is no longer tagged with Groovy and Grails but Java and Tomcat 5 . Comment : You re missing a dependency of Apache commons pool . This isn t a groovy issue afaict Comment : @tim yates Are you talking about a commons- .jar If yes which jar do you think it could be Comment : Not sure but googling for the exception leads to loads of threads like apache-commons.680414.n4.nabble.com http : apache-commons.680414.n4.nabble.com Exception-in-thread-quot-main-quot-java-lang-NoClassDefFoundError-org-apache-commons-collections-Curt-td738972.html Comment : The class sits inside the commons-collections.jar which I do have in my classpath .", "Question : I m not sure what s happening here . I have Tomcat5.5.26 installed on a Windows2008 Server . The service works fine and starts automatically . However when I log into the system I get a dialog box saying Access is denied . Unable to open the service Tomcat5 . There are no issues with the service afaik and I can view it just fine through services.msc . In fact I ve verified that I can change the logon credentials of the service and its start-up type . I ve tried searching the Windows Event Logs for this error but can t find it . Any idea why it s popping up The account I m logging in as has Administrator Privileges though interestingly when I try to run Tomcat5w.exe unless I explicitly right-click and choose Run as Administrator I m not able to open it . .. . Answer : It turns out the last statement I included about permissions was the key . It s still not clear to me why I get the error on startup since my account has sys admin privileges but.. . .. . .. . .. . to make the error go away I had to right-click on the tomcat5w.exe file bin tomcat5w.exe properties compatibility tab . Under sub-section Privilege Level check off Run this program as an administrator .", "Question : I know this question has been asked many many times but I can not seem to find a solution . I am receiving this error message : The requested resource package servlet access is not available . I have this web.xml file : .. . .. . The java file which is not being found is located in the Package.Servlets package in the sources folder in netbeans . I am new to Tomcat Environment and would like to know needs to be done . I tried to check for usages from that class but none could be found . Therefore I am assuming this is related to the web.xml settings . EDIT : I have also checked the logs there doesn t seem to be any exceptions being raised . Comment : What are you trying to do and get that error Also note that Java is case sensitive and by convention package names should be lower case Comment : @mavroprovato - This is a very large system and I was assigned to recover some missing sources from our source control by decompiling existing class files . I did that and now I am just accessing the application when that happens I think that servlet checks whether the user has access . Comment : And do you have the original web.xml file Comment : @mavroprovato - That s the original XML File . The only change I might have done is move some servlets from the default package to the Servlets package . Having said that I tried to move the Servlets to the root but that did not work either . Is there some mappings I should be doing .. . Answer : The problem with the web.xml file that you provided is that there are no servlet s and servlet-mapping s defined . Tomcat needs all the servlets in your application defined in the web.xml file plus the mappings in order to know which servlet to call when you open a URL . You can see an example of this in the webapps examples WEB-INF web.xml file in your tomcat installation", "Question : I m trying to put in a Tomcat server on our unix machine access remotely which will be used for test projects . I used Tomcat 5.0.25 as our production is using the same version . For now i don t want to run it through Apache and instead just want to access tomcat directly . So i ve deployed Tomcat and configured server.xml see below but when i start it i am not able to see the tomcat 5 welcome page using this URL : global.int.com : 9082 .. . .. . I can see Tomcat is running as Catalina.out says : .. . .. . Jan 27 2012 8 : 21 : 56 PM org.apache.coyote.http11.Http11Protocol start INFO : Starting Coyote HTTP 1.1 on http-9082 Jan 27 2012 8 : 21 : 56 PM org.apache.jk.common.ChannelSocket init INFO : JK2 : ajp13 listening on 0.0.0.0 : 9020 Jan 27 2012 8 : 21 : 56 PM org.apache.jk.server.JkMain start INFO : Jk running ID 0 time 1 14 config home tomcat tomcat5 fcl uat conf jk2.properties Jan 27 2012 8 : 21 : 56 PM org.apache.catalina.startup.Catalina start INFO : Server startup in 2173 ms .. . .. . And Command lsof -i TCP Shows : .. . .. . java 29923 tomcat 5u IPv6 373023 TCP : 9082 LISTEN .. . .. . I can t figure out why i can t see the tomcat page . I have another Tomcat server running on port 9081 and we can access it just fine by using url global.int.com : 9081 and the above server.xml is a carbon copy of that except the port numbers are changed . Can anyone please give me a hint on where things are falling apart . Thanks .. . .. . UPDATE2 : .. . .. . Result of wget -S from Remote Desktop : .. . .. . Below is the result-of wget -S on LocalHost machine : .. . .. . UPDATE 3 : Result of iptables -L -v -n : .. . .. . Correct me if I am wrong - but result-of above shows the reason why I cannot access tomcat given I ve assigned port 9082 to tomcat and that port does not exist in the above list . All port numbers used in server.xml are unique I ve double checked . Any suggestions on why I can t get to see the Tomcat main page and how to fix it Comment : Check if you are not using the same shutdown port 9007 as the other tomcat on the same machine . Also wget -S output would definitely be useful . Comment : hi I checked the Shutdown ports as you suggested and 9007 is unique . I also updated my post with result-of wget -S . Comment : Can you access the content if physically coming from the same server e.g . running wget from localhost Maybe you have got some firewall which is blocking the access to all ports Comment : Hi @mindas - Thanks for trying to help- The above wget -S result i posted first was from localhost Same server which shows all is well so it might have confused people . The result from computer i am trying is also now updated in the question . Would you point your finger at the firewall for being the issue Comment : Yes this is the most likely . If you re running on Linux iptables -L -v -n from root shell would probably show the cause . Or you might have your outgoing connections from remote desktop firewalled but this is far less likely . .. . Answer : Turns out this was a firewall issue which was blocking the incoming connections . iptables -L -v -n on Linux has helped to reveal the actual problem . See comments under the article for more details .", "Question : We have this scenario where an application on a particular server using Tomcat 5 JDK 1.4 can successfully connect with a web service using HTTPS and the same application using Tomcat 7 JDK 1.7 on another server fails to connect to this web service . Having said that the Tomcat 7 application is able to connect to the web service using port 8080 and HTTP . The problem seems to be when connecting with HTTPS . The error is the following : .. . .. . I was doing some research and noticed that the cacerts file might be behind this however could it still be the case since the Tomcat 5 application is working and only the Tomcat 7 one is not Comment : Look here stackoverflow.com questions 9619030 http : stackoverflow.com questions 9619030 resolving-javax-net-ssl-sslhandshakeexception-sun-security-validator-validatore Comment : @Michael - This scenario is different . The issue is slightly different since one particular application is connecting while the other is not . .. . Answer : It would seem that the root cause of this problem is that when you are running the newer version tc7 jdk1.7 you application is unable to find the certificate store . Are you specifying where the certificates are stored in you java code Or anywhere else for that matter If so you may be doing it in a Java1.4 way that has been updated in later versions . The default certificate store for java is JAVA HOME lib security cacerts If your certificate is not being stored here then this may be your problem . This store is per java version so this would explain why the older version is working while the new version is not . This is covered in the post linked to by Michael .. . .. . If this doesn t fix the problem then it would be useful if you could post some more information about how you are connecting i.e . the java code which is throwing the exception.. . . Also your platform would be useful . Hope this helps", "Question : I have an application that is distributed with tomcat I wanted to simply take the webapp from the webapps folder and put it into the webapps folder of a tomcat server however when I do this and restart it etc whenever a servlet is referenced such as controller it returns a 404 as-if the servlets or the mapping aren t working . I d provide more information but I am so at a loss I don t even know where to start debugging this very new to tomcat can someone point me in the right direction Why would it work locally but not on this server . Here is my web.xml file Comment : Can you share your web.xml file Comment : Thanks for your input added the web.xml Comment : how to send a request to server Like localhost : 8080 beergame controller .. . Answer : in the web.xml you have PlayerController and AdminController in the serlet mapping . So you should call .. . .. . localhost : 8080 beergame PlayerController or localhost : 8080 beergame AdminController .. . .. . Where beergame is the name of the folder which you have copied you", "Question : null .. . Answer : I have tomcat 5.0.3 in the link its mentioned that the attribute is availiable for tomcat 5.5 onwards . The attribute packetSize is only available in Tomcat 5.5.20+ and 6.0.2+ . how do increase the packetsize in tomcat 5.0.3 .", "Question : null .. . Answer : I am using tomcat 5.5.9 on windows 2003 platform for SOAP server . the Application is automatically crashed after startup . below is startup log attached . Kindly help in this regard . Comment : PDB return null to MNP Will sen alarm is not a known Tomcat error . It is some illterate message provided by an application programmer . You will have to look it up in the source code for yourself .", "Question : I am using tomcat 5.5.36 . I built an application with JSP . I used a toolOwasp Zap security tool to scan my application . In the report I found a issue related to XSS . I am using a form to login user and sending it with post . In the report its saying Cross Site Scripting Reflected .. . .. . parameter - username Attack - span script alert 1 script span Evidence - span script alert 1 script span .. . .. . I am using sesson id to authenticate a user . I have read few documents about XSS attack but could not found a proper solution which can work with the given tomcat version . Note : Is there any solution using CSRF token . Comment : In most cases XSS has nothing to do with the version of Tomcat you re using it s caused by an incorrect implementation of your application it looks like you re outputting the username entered by the user directly into your HTML page without escaping any special-characters . This needs to be fixed in your code . The CSRF token has nothing to do with the problem . Comment : Its a bit vague but the tool might be referring to the technique to have a different sessionId before and after login to prevent session hijacking . Comment : @yole No I am not outputting the username directly . I am just having a form with the action url and method as post and in the form I just have two input fields . username and password . The code in the question is generated by the tool showing the possibility of having CSRF . .. . Answer : Firstly praise is in order You have taken the biggest step to securing your applications and becoming a great developer - you actually considered security . Seriously that makes me feel better about the future of developers because so few in industry even make it that far . Well done : - .. . .. . Now for the fun part : Protecting your application against cross site scripting or indeed any other kinds of vulnerabilities is not something that can be achieved simply by installing something or enabling something in Tomcat in fact the fact that you are using Tomcat should not really be relevant to any application level vulnerabilities . Additionally Cross Site Request Forgery is a separate unrelated vulnerability . Sorry : - .. . .. . Looking at your specific example for a moment - basically the issue you have is that your application is taking any input a user puts into the login form and is printing it out in the page without sanitising it . In the report it is telling you that it tried to log in with username span script alert 1 script span and found that the script and alert were printed out in the response . You can try this yourself and you will see the problem - you will get an alert popup . Unfortunately there is no simple switch to flip to protect your application . You have to learn about and understand your all of the common vulnerability types and then learn the standard approaches and tools to combat each . A great starting point is the OWASP Top 10 wiki where you can find oodles of information about various vulnerabilities what they are how they work and what you should be doing to protect against them . https : www.owasp.org index.php Top 10 2013-Top 10 .. . .. . You can even find code samples and worked examples to help . I feel a bit like leading a lamb to slaughter here - I know that reading through all of that will be quite daunting but take your time and don t panic . Once you understand each of the vulnerability types you will find that most are pretty easy to prevent . Hope this helps Charlie Comment : Thanks for the great suggestion . Actually I am using the same tool to analysis my application and the report is having few more issue like this . I asked about the CSRF token because I found this in the cheat sheet I was reading through https : www.owasp.org index.php CSRF Prevention Cheat Sheet Synchronizer Token Pattern . Comment : No problemo - sorry I can t just give you a simple answer : - I m just glad to see someone take an active interest in how to secure their applications . If you can get a firm understanding of these issues then you will be a great developer - in fact questions about these types of vulnerabilities are often used in interviews to judge the caliber of potential developers .", "Question : I have created an application which build a grid or a matrix of elements dinamycally . When I try to navigate to another page I get an error : .. . .. . This is the code : .. . .. . CODE to create a row of cells with the data from the bean .. . .. . This code WORKS PERFECT in tomcat 6.0.18 .. . .. . but in Tomcat 5.0 I get the next error : .. . .. . The line which produce the error is : .. . .. . If I put just ccelda.setValue myValue works great but I need to get the value from the bean that the reason I use the ValueExpression . I can t see a way to debug this . If anyone is interested I have a stand-alone project to see how it works . .. . Answer : Thanks for your comment . I have used ValueBinding and friends and the result is the same . I don t know where exactly the error happens . I have added a jsf lifecycle as you have in blogspot . Every phase if fired until phase 6 . Here is it : .. . .. . If you or anybody want to take a look this is the link-to download : https : docs.google.com leaf id 0B5-kdDLa5NdMMDYxOGQ2MWMtMWMwNS00MDFlLTkxMWQtM2EzYmZkZDgyMTgy hl en https : docs.google.com leaf id 0B5-kdDLa5NdMMDYxOGQ2MWMtMWMwNS00MDFlLTkxMWQtM2EzYmZkZDgyMTgy hl en .. . .. . Take a look at Grid.java .. . .. . Thanks .. . .. . Updated : .. . .. . Finally it works .. . .. . I have used valueBinding curiosly I had used before but I left the libraries for jsf1.2 . Now I have eliminated this libraries from the lib s folder and it works . With the other code I had the posibility to specify the type of the value String Integer etc. . . Now with ValueBinding it take the value by default in my case Integer . I don t know why . I suppose because Integer is the type of the bean . Anyway thanks", "Question : But my tomcat 5.0 is starting in eclipse IDE without any trouble . i have done all the known steps by me .. . .. . 1 http : i.stack.imgur.com bbyoj.jpg : http : postimg.org image sfpfw4b97 error image http : i.stack.imgur.com bbyoj.jpg .. . Answer : hey guys got rectified the problem .. . .. . we need to set .. . .. . JAVA HOME to upto c programmfiles java jdk .. . .. . and path to c programmfiles java jdk bin .. . .. . note down the difference . . .. . .. . happy coding", "Question : There are a few similar posts around but nothing that matched my specific technology stack . The answer that solved the issue wasn t specified in any other post so I have added it here . Comment : Thanks Andrew . Unfortunately there are still plenty of us around who have to maintain these systems . I am sure I am not the only person out there which is why I posted the answer . .. . Answer : I needed to log on to the machine as an administrative user .", "Question : I am working on a Windows 2008 Server and have successfully set up a webapp on Tomcat v5.5 . I can access the app via http but not via https . In my Tomcat server.xml I have defined the https connector as follows : .. . .. . I ve also verified that the keystore file-exists and that I can view the certificate contained within using the specified keypass . Is there anything else I m missing I did NOT create the keystore file locally but rather copied it from another system . Do I need to install it somehow Lastly does IIS have to be installed configured to access Tomcat via https locally I also cannot access Tomcat in general via https in the browser : .. . .. . Accessing Tomcat via http works fine : Comment : Look in the logs and maybe there will be an error Comment : No errors as far as I can see . I ve searched through all the logs . When I try connecting it just spins for a while then finally says This page can t be displayed in IE not by choice Comment : Is there a particular log file I should be looking at Comment : try catalina.out in the tomcat logs directory Comment : No dice . The file catalina.2013-11-21 doesn t have any statements indicating an attempt to connect to it . Should I add more logging .. . Answer : My server.xml looks like and works .. . .. . so your file with keystore .jks looks wrong - no angle brackets eh . Comment : I put in the brackets simply to indicate that it s a file . The actual filename does not contain any unusual characters Comment : I think the problem may be that I m reusing a certificate from a different machine . Comment : well maybe you should try doing it from the same machine then ." ] }
[ "yes-answer-long", "yes-answer-short" ]
tomcat
UNK_RELATION
jmx-ws@web-services@57
jmx-ws -- jmx java management extensions connector uses @placeholder to make jmx instrumentation available remotely .
{ "confidence": [ 77.64352416992188, 70.16188049316406, 64.58844757080078, 51.065147399902344, 47.301025390625, 47.301025390625, 47.301025390625, 45.58647155761719, 43.515743255615234, 43.515743255615234, 42.28593063354492, 42.02796173095703, 42.02796173095703, 41.53477478027344, 40.31340408325195, 38.80073165893555, 36.57173156738281, 36.379669189453125, 35.186119079589844, 35.186119079589844, 29.547183990478516, 27.199546813964844, 26.037796020507812, 24.204118728637695, 22.645803451538086, 22.618385314941406, 22.438573837280273, 21.81357192993164, 21.4425106048584, 20.72402000427246, 20.43967628479004, 20.33075523376465, 20.33075523376465, 20.099016189575195, 19.898059844970703, 19.879358291625977, 19.879358291625977, 19.879358291625977, 19.879358291625977, 19.879358291625977, 19.2528076171875, 19.2528076171875, 18.604875564575195, 18.18350601196289, 16.971250534057617, 16.971250534057617, 16.971250534057617, 16.971250534057617, 16.971250534057617, 16.971250534057617, 16.971250534057617, 16.971250534057617, 16.971250534057617, 16.971250534057617, 16.971250534057617, 16.971250534057617, 16.971250534057617, 16.971250534057617, 16.971250534057617, 16.971250534057617, 16.971250534057617, 16.971250534057617, 16.971250534057617, 16.971250534057617, 16.971250534057617, 16.971250534057617, 16.971250534057617, 16.971250534057617, 16.971250534057617, 16.971250534057617, 16.971250534057617, 16.971250534057617, 16.971250534057617, 16.971250534057617, 16.971250534057617, 16.971250534057617, 16.971250534057617, 16.971250534057617, 16.971250534057617, 16.971250534057617, 16.971250534057617, 16.971250534057617, 16.971250534057617, 16.971250534057617, 16.971250534057617, 16.971250534057617, 16.971250534057617, 16.971250534057617, 16.971250534057617, 16.971250534057617, 15.256695747375488, 15.256695747375488, 15.256695747375488, 15.256695747375488, 15.256695747375488, 15.256695747375488, 15.256695747375488, 15.256695747375488, 15.256695747375488 ], "content": [ "I am very interested in the Web Services Connector for Java Management Extensions JMX Agents http : jcp.org en jsr detail id 262 and the reference implementation ws-jmx-connector https : ws-jmx-connector.dev.java.net .", "I ve been running the samples that come with ws-jmx-connector http : ws-jmx-connector.java.net locally and succesfully .", "Should I attach the ws-jmx-connector to TOMCAT on both sides", "In WSO2 the custom datasources monitoring via JMX is not yet available .", "But I want to set or change listener port sessions using JMX .", "My requirement is to change listener port sessions using JMX .", "Project link : here http : docs.oracle.com javase tutorial jmx examples jmx examples.zip", "I want to monitor application datasources health using JMX console .", "Maybe the article java.dzone.com articles a-first-look-jmx-web-services- http : java.dzone.com articles a-first-look-jmx-web-services- can give you some helpful information for usage with JConsole .", "If you are using Tomcat JDBC Pool outside the container you will have to register the JDBC Pool with JMX http : tomcat.apache.org tomcat-7.0-doc jdbc-pool.html JMX .", "I found this simple example of JBoss monitoring with JMX and Java .. . .. . I want to call this code every 3 seconds to get live performance data .", "Question and Answer in this http : stackoverflow.com questions 1287658 how-should-i-monitor-a-web-application-on-tomcat-using-jmx link .", "I am new in using JMX and have a requirement to access IBM Web Sphere Application server resources .", "Are there any open-source Java tools or products which are JSR 262 enabled and expose MBeans over JMX WS - so that the JSR 262 reference implementation can be used without the need to modify their source code", "But I must be missing something because I have enabled JMX and connected to it but I m still unable to get the datasource details .", "But I am not able to figure out what query-string to use in the JMX call to get all security domains in my Websphere application server .", "I am using JMX-WS and want to edit the outbound SOAP Message from the server in order to append two characters to the message AFTER the end closing tag of the envelope as the client legacy code is expecting it .", "JSR 262 will provide a new opportunity for cross-platform cross-language enterprise integration projects given the option to communicate with JMX Agents using non-Java clients .", "I am using Websphere Applicaiton Server 8.5 and using JMX code in my client to get values from Websphere such as : cells nodes and datasources using query strings like : Websphere Config Data Display Name WebSphere : type DataSource name respectively .", "But I want to do this using a JMX call due to performance reasons : to create a script jacl or python and then to run it by exec of wsadmin to fetch my domains would take a lot of time .", "For Tomcat if you use JNDI datasources http : tomcat.apache.org tomcat-7.0-doc jndi-datasource-examples-howto.html managed via Tomcat Container you will be able to see the JNDI datasources via JMX http : wiki.apache.org tomcat FAQ Monitoring JNDI DataSource .", "you could try with Java program that uses Python Interpreter .", "The next step is to run them remotely between two PC s .", "They re all described in the javadocs for MemoryPoolMXBean http : java.sun.com javase 6 docs api java lang management MemoryPoolMXBean.html .. . .. . Memory Usage .. . .. . The getUsage method provides an estimate of the current usage of a memory-pool .", "I assume this is all in one JVM.. . .. . .. . If you are using the platform agent I recommend you acquire the MBeanServer using the ManagementFactory http : docs.oracle.com javase 1.5.0 docs api java lang management ManagementFactory.html as follows : .. . .. . That way you will always get the same MBeanServer instance .", "Edit : Or did you mean open-source java tools that uses it to expose MBeans so that you can use them from delphi or whatever", "I use the code in Java standalone application .", "please check this http : blog.smartbear.com programming embedding-jython-in-java-applications", "This is fixed in current master branch and it will be available in future versions .", "I have deployed a Java-based application in it .", "If you look here http : java.sun.com javase 6 docs technotes guides management jconsole.html there is an example on how to extend the classpath when starting jconsole .", "Can you show me some code example how I can make one connection and reuse it many times", "If your standalone application is running 24x7 you can either make the connection part of a static field or use a Singleton pattern .", "Java applications and tools could offer this option quite easily then .. .", "If you deploy this code as an EJB you can make it a @Singleton @Startup with the connection being set at a @PostConstruct method while the metrics are gathered periodically according to a @Schedule .", "An implementation should document when this is the case . .. . .. . Peak Memory Usage .. . .. . The Java virtual-machine maintains the peak memory usage of a memory-pool since the virtual-machine was started or the peak was reset .", "After a Java virtual-machine has expended effort in reclaiming memory space by recycling unused objects in a memory-pool at garbage-collection time some number of bytes in the memory pools that are garbaged collected will still be in use .", "In addition the collection usage threshold count will then be incremented . .. . .. . The isCollectionUsageThresholdSupported method can be used to determine if this functionality is supported . .. . .. . A Java virtual-machine performs collection usage threshold checking on a memory-pool basis .", "The Java virtual-machine performs the collection usage threshold checking at garbage-collection time . .. . .. . Some garbage-collected memory pools may choose not to support the collection usage threshold .", "I m not using jboss but the local Java virtual Machine but my scope is to deploy this simple application in one ejb autostart and another ejb will read all informations .", "Unless there is a well-defined garbage-collection time which is the best appropriate time to check the memory usage the collection usage threshold should not be supported . .. . .. . The collection usage threshold is designed for monitoring the memory usage after the Java virtual-machine has expended effort in reclaiming memory space .", "I have created a simple mbean and I have registered it on the default mBeanServer that is run Via eclipse or java -jar mbean.jar and in the same process if I try to fouund the mbean registered with a simple query : .. . .. . the query retuerns my mbean but if I start another process and try to search this mbean registered the mbeas is not found", "This example should be more useful : .. . .. . Object Hello : .. . .. . Interface HelloBean implemented by Hello .. . .. . Simple Main .. . .. . So now I have exported this project as jar file and run it as java -jar helloBean.jar and by eclipse I have modified the main class to read informations of this read Example Name attribute by using the same objectname used to registry it .", "Just make sure it is in the classpath and specify a valid service url probably something like service : jmx : ws : localhost : 8080 test when connecting .", "What I don t get is how do I get the client and server to talk to each other from one PC to another .", "I m not sure how this works but I m assuming I have to configure TOMCAT to allow this somehow", "I haven t found a good explanation on the net .", "Any help appreciated Thanks", "I ve asked a similiar question Actually pretty identical and answered myself after figuring it out .", "What is the difference between CollectionUsage PeakUsage Usage fields in any memorypool bean", "I saw these in the path of any application in a jconsole window : .. . mbeans tab java.lang memorypool select any bean .", ".. . In the right hand side pane we can see these attributes .", "For a garbage-collected memory-pool the amount of used memory includes the memory occupied by all objects in the pool including both reachable and unreachable objects . .. . .. . In general this method is a lightweight operation for getting an approximate memory usage .", "For some memory pools for example when objects are not packed contiguously this method may be an expensive operation that requires some computation to determine the current memory usage .", "The peak memory usage is returned by the getPeakUsage method and reset by calling the resetPeakUsage method . .. . .. . Collection Usage Threshold .. . .. . Collection usage threshold is a manageable attribute only applicable to some garbage-collected memory pools .", "The collection usage threshold allows a value to be set for this number of bytes such that if the threshold is exceeded a collection usage threshold exceeded notification will be emitted by the MemoryMXBean .", "This checking is enabled if the collection usage threshold is set to a positive value .", "If the collection usage threshold is set to zero this checking is disabled on this memory-pool .", "Default value is zero .", "For example a memory-pool is only managed by a continuous concurrent garbage collector .", "Objects can be allocated in this memory-pool by some thread while the unused objects are reclaimed by the concurrent garbage collector simultaneously .", "The collection usage could also be monitored by the polling and threshold notification mechanism described above for the usage threshold in a similar fashion .", "Thanks for the answer .", "It answered my question .", "I am now clear about it .", "I want to set the maximum no .", "of listener port sessions .", "I tried a lot but didn t get any solution .", "I got exception something like Cannot Set Maximum Sessions as I already know it doesn t have setMaxSessions function .", "It only provides us getMaxSessions function .", "Can any one help me", "If it doesn t have a published setter then why do you think you can do it", "I Know .", "Do you have any solution", "Aside from doing web queries sorry no .", "I have a problem about the mbeans .", "why", "The approch is : Process that is running .. . .. . So this is the first process that is running that has the only pourpose to registry the mbean because there is another process that want to read these informations .", "So I start another process to search this mbean but nothing .", "All suggestions are really apprecciated .", "Main to read : .. . .. . But nothing the bean is not found .", "Any idea", "I suspect the issue here is that you have multiple MBeanServer instances .", "You did not mention how you acquired the MBeanServer in each case but in your second code sample you are creating a new MBeanServer instance which may not be the same instance that other threads are reading from .", "Wait.. . two different jvms", "I can achieve this using jython : AdminTask.listSecurityDomains -listDescription true .. . .. . and using jacl : .. . .. . AdminTask listSecurityDomains .", "Is there a way to open one connection to the server and send frequent requests", "For instance :", "If your standalone application starts run this code and shuts down there s no possibility to keep the connection .", "Can you show me some example please", "I have been able to use the reference implementation with a Delphi client with little effort .", "I am quite interested in it as well but I haven t had time to work with it .", "However as it is just another protocol implementation you should be able to use it with the standard tools like jconsole .", "I ve used that technique for a few other protocols and it usually just works .", "In order to give you a good example I downloaded the the JSR-262-ri.jar ran the installation and added the jar-files in the lib directory to my classpath but all I got was : .. . .. . so I guess I had some conflict that I really cannot motivate myself to spend time on right now.. .", "If anyone knows feel free to comment .", "I would love to get it working on my server-side to play around .", "I hope this is at least a better answer than having the question unanswered .", "In that case I will gladly open-source a simple tool if I can just get rid of that error above : -" ] }
{ "confidence": [ 84.83578491210938, 78.01748657226562, 63.79948806762695, 62.548057556152344, 55.79290008544922, 50.04206848144531, 49.93183898925781, 43.89282989501953, 23.184110641479492 ], "content": [ "Question : I ve been running the samples that come with ws-jmx-connector http : ws-jmx-connector.java.net locally and succesfully . The next step is to run them remotely between two PC s . What I don t get is how do I get the client and server to talk to each other from one PC to another . I m not sure how this works but I m assuming I have to configure TOMCAT to allow this somehow Should I attach the ws-jmx-connector to TOMCAT on both sides I haven t found a good explanation on the net . Any help appreciated Thanks .. . Answer : I ve asked a similiar question Actually pretty identical and answered myself after figuring it out . Question and Answer in this http : stackoverflow.com questions 1287658 how-should-i-monitor-a-web-application-on-tomcat-using-jmx link .", "Question : I am very interested in the Web Services Connector for Java Management Extensions JMX Agents http : jcp.org en jsr detail id 262 and the reference implementation ws-jmx-connector https : ws-jmx-connector.dev.java.net . JSR 262 will provide a new opportunity for cross-platform cross-language enterprise integration projects given the option to communicate with JMX Agents using non-Java clients . I have been able to use the reference implementation with a Delphi client with little effort . Are there any open-source Java tools or products which are JSR 262 enabled and expose MBeans over JMX WS - so that the JSR 262 reference implementation can be used without the need to modify their source code .. . Answer : I am quite interested in it as well but I haven t had time to work with it . However as it is just another protocol implementation you should be able to use it with the standard tools like jconsole . Just make sure it is in the classpath and specify a valid service url probably something like service : jmx : ws : localhost : 8080 test when connecting . If you look here http : java.sun.com javase 6 docs technotes guides management jconsole.html there is an example on how to extend the classpath when starting jconsole . I ve used that technique for a few other protocols and it usually just works . In order to give you a good example I downloaded the the JSR-262-ri.jar ran the installation and added the jar-files in the lib directory to my classpath but all I got was : .. . .. . so I guess I had some conflict that I really cannot motivate myself to spend time on right now.. . If anyone knows feel free to comment . I would love to get it working on my server-side to play around . I hope this is at least a better answer than having the question unanswered . Edit : Or did you mean open-source java tools that uses it to expose MBeans so that you can use them from delphi or whatever In that case I will gladly open-source a simple tool if I can just get rid of that error above : - Comment : Yes I am looking for tools and applications which expose MBeans over JSR 262 I have been able to build one myself based on the Sun tutorial HelloMBean this was quite easy . Maybe the article java.dzone.com articles a-first-look-jmx-web-services- http : java.dzone.com articles a-first-look-jmx-web-services- can give you some helpful information for usage with JConsole . Maybe I should post the complete Maven project so others can try it . Comment : Except from the error it seemed to work without any code changes at all with my proprietary product . All I did was to give it a new JMXURL to register . The product itself is unaware of it it just publishes its MBeans on the default MBean server . Comment : This is good news I have to try this too . If I understand correctly it would be very easy to implement a simple configuration setting to switch on JSR 262 support . Java applications and tools could offer this option quite easily then .. .", "Question : I am using Tomcat 7.0 . I have deployed a Java-based application in it . I want to monitor application datasources health using JMX console . But I must be missing something because I have enabled JMX and connected to it but I m still unable to get the datasource details . Same question goes about monitoring in wso2esb . .. . Answer : In WSO2 the custom datasources monitoring via JMX is not yet available . This is fixed in current master branch and it will be available in future versions . Please check the WSO2 Carbon JIRA : CARBON-15172 https : wso2.org jira browse CARBON-15172 . For Tomcat if you use JNDI datasources http : tomcat.apache.org tomcat-7.0-doc jndi-datasource-examples-howto.html managed via Tomcat Container you will be able to see the JNDI datasources via JMX http : wiki.apache.org tomcat FAQ Monitoring JNDI DataSource . If you are using Tomcat JDBC Pool outside the container you will have to register the JDBC Pool with JMX http : tomcat.apache.org tomcat-7.0-doc jdbc-pool.html JMX .", "Question : I am using Websphere Applicaiton Server 8.5 and using JMX code in my client to get values from Websphere such as : cells nodes and datasources using query strings like : Websphere Config Data Display Name WebSphere : type DataSource name respectively . But I am not able to figure out what query-string to use in the JMX call to get all security domains in my Websphere application server . I can achieve this using jython : AdminTask.listSecurityDomains -listDescription true .. . .. . and using jacl : .. . .. . AdminTask listSecurityDomains . But I want to do this using a JMX call due to performance reasons : to create a script jacl or python and then to run it by exec of wsadmin to fetch my domains would take a lot of time . .. . Answer : you could try with Java program that uses Python Interpreter . please check this http : blog.smartbear.com programming embedding-jython-in-java-applications", "Question : null .. . Answer : I am new in using JMX and have a requirement to access IBM Web Sphere Application server resources . I want to set the maximum no . of listener port sessions . I tried a lot but didn t get any solution . I got exception something like Cannot Set Maximum Sessions as I already know it doesn t have setMaxSessions function . It only provides us getMaxSessions function . But I want to set or change listener port sessions using JMX . Can any one help me Comment : If it doesn t have a published setter then why do you think you can do it Comment : I Know . My requirement is to change listener port sessions using JMX . Do you have any solution Comment : Aside from doing web queries sorry no .", "Question : Is there a way to retrieve the full SOAP message to handle it envelope and all when using the javax.xml.soap.SOAPMessage class I am using JMX-WS and want to edit the outbound SOAP Message from the server in order to append two characters to the message AFTER the end closing tag of the envelope as the client legacy code is expecting it . So ideally I would like to be able to edit the full message as a String is this possible .. . Answer : You can do this with cxf : .. . .. . http : www.mastertheboss.com web-interfaces 337-apache-cxf-interceptors.html .. . .. . Take a look at the LogInterceptor example Comment : That looks like it will do the trick thanks", "Question : I found this simple example of JBoss monitoring with JMX and Java .. . .. . I want to call this code every 3 seconds to get live performance data . Is there a way to open one connection to the server and send frequent requests .. . Answer : If you deploy this code as an EJB you can make it a @Singleton @Startup with the connection being set at a @PostConstruct method while the metrics are gathered periodically according to a @Schedule . For instance : Comment : I use the code in Java standalone application . Can you show me some code example how I can make one connection and reuse it many times Comment : If your standalone application is running 24x7 you can either make the connection part of a static field or use a Singleton pattern . If your standalone application starts run this code and shuts down there s no possibility to keep the connection . Comment : Can you show me some example please", "Question : I have a problem about the mbeans . I have created a simple mbean and I have registered it on the default mBeanServer that is run Via eclipse or java -jar mbean.jar and in the same process if I try to fouund the mbean registered with a simple query : .. . .. . the query retuerns my mbean but if I start another process and try to search this mbean registered the mbeas is not found why The approch is : Process that is running .. . .. . So this is the first process that is running that has the only pourpose to registry the mbean because there is another process that want to read these informations . So I start another process to search this mbean but nothing . I m not using jboss but the local Java virtual Machine but my scope is to deploy this simple application in one ejb autostart and another ejb will read all informations . All suggestions are really apprecciated . This example should be more useful : .. . .. . Object Hello : .. . .. . Interface HelloBean implemented by Hello .. . .. . Simple Main .. . .. . So now I have exported this project as jar file and run it as java -jar helloBean.jar and by eclipse I have modified the main class to read informations of this read Example Name attribute by using the same objectname used to registry it . Main to read : .. . .. . But nothing the bean is not found . Project link : here http : docs.oracle.com javase tutorial jmx examples jmx examples.zip Any idea .. . Answer : I suspect the issue here is that you have multiple MBeanServer instances . You did not mention how you acquired the MBeanServer in each case but in your second code sample you are creating a new MBeanServer instance which may not be the same instance that other threads are reading from . I assume this is all in one JVM.. . .. . .. . If you are using the platform agent I recommend you acquire the MBeanServer using the ManagementFactory http : docs.oracle.com javase 1.5.0 docs api java lang management ManagementFactory.html as follows : .. . .. . That way you will always get the same MBeanServer instance . Comment : Wait.. . two different jvms", "Question : What is the difference between CollectionUsage PeakUsage Usage fields in any memorypool bean I saw these in the path of any application in a jconsole window : .. . mbeans tab java.lang memorypool select any bean . .. . In the right hand side pane we can see these attributes . .. . Answer : They re all described in the javadocs for MemoryPoolMXBean http : java.sun.com javase 6 docs api java lang management MemoryPoolMXBean.html .. . .. . Memory Usage .. . .. . The getUsage method provides an estimate of the current usage of a memory-pool . For a garbage-collected memory-pool the amount of used memory includes the memory occupied by all objects in the pool including both reachable and unreachable objects . .. . .. . In general this method is a lightweight operation for getting an approximate memory usage . For some memory pools for example when objects are not packed contiguously this method may be an expensive operation that requires some computation to determine the current memory usage . An implementation should document when this is the case . .. . .. . Peak Memory Usage .. . .. . The Java virtual-machine maintains the peak memory usage of a memory-pool since the virtual-machine was started or the peak was reset . The peak memory usage is returned by the getPeakUsage method and reset by calling the resetPeakUsage method . .. . .. . Collection Usage Threshold .. . .. . Collection usage threshold is a manageable attribute only applicable to some garbage-collected memory pools . After a Java virtual-machine has expended effort in reclaiming memory space by recycling unused objects in a memory-pool at garbage-collection time some number of bytes in the memory pools that are garbaged collected will still be in use . The collection usage threshold allows a value to be set for this number of bytes such that if the threshold is exceeded a collection usage threshold exceeded notification will be emitted by the MemoryMXBean . In addition the collection usage threshold count will then be incremented . .. . .. . The isCollectionUsageThresholdSupported method can be used to determine if this functionality is supported . .. . .. . A Java virtual-machine performs collection usage threshold checking on a memory-pool basis . This checking is enabled if the collection usage threshold is set to a positive value . If the collection usage threshold is set to zero this checking is disabled on this memory-pool . Default value is zero . The Java virtual-machine performs the collection usage threshold checking at garbage-collection time . .. . .. . Some garbage-collected memory pools may choose not to support the collection usage threshold . For example a memory-pool is only managed by a continuous concurrent garbage collector . Objects can be allocated in this memory-pool by some thread while the unused objects are reclaimed by the concurrent garbage collector simultaneously . Unless there is a well-defined garbage-collection time which is the best appropriate time to check the memory usage the collection usage threshold should not be supported . .. . .. . The collection usage threshold is designed for monitoring the memory usage after the Java virtual-machine has expended effort in reclaiming memory space . The collection usage could also be monitored by the polling and threshold notification mechanism described above for the usage threshold in a similar fashion . Comment : Thanks for the answer . It answered my question . I am now clear about it ." ] }
[ "yes-answer-long", "yes-answer-short" ]
web-services
UNK_RELATION
netwire@reactive-programming@62
netwire -- efficient and flexible wire arrows for functional @placeholder and other forms of locally stateful programming .
{ "confidence": [ 33.8140983581543, 33.16166687011719, 32.711158752441406, 29.72053337097168, 29.43389129638672, 28.793249130249023, 28.204742431640625, 28.204742431640625, 28.07137107849121, 28.030019760131836, 28.030019760131836, 27.769298553466797, 27.547901153564453, 26.860599517822266, 26.748279571533203, 26.40009307861328, 26.212291717529297, 26.040260314941406, 26.02054214477539, 25.861003875732422, 25.861003875732422, 25.861003875732422, 25.85738754272461, 25.85738754272461, 25.69252586364746, 25.429109573364258, 25.429109573364258, 24.96869659423828, 24.80978012084961, 24.735891342163086, 24.535503387451172, 24.349746704101562, 24.170490264892578, 24.170490264892578, 24.170490264892578, 23.8093204498291, 23.588764190673828, 23.554903030395508, 23.554903030395508, 23.520488739013672, 23.442138671875, 23.4200382232666, 23.391748428344727, 23.228252410888672, 23.228252410888672, 23.18581771850586, 23.152189254760742, 23.048995971679688, 23.048995971679688, 23.048995971679688, 22.943138122558594, 22.943138122558594, 22.943138122558594, 22.830219268798828, 22.74728775024414, 22.6071720123291, 22.6071720123291, 22.403390884399414, 22.403390884399414, 22.403390884399414, 22.336042404174805, 22.198104858398438, 22.175500869750977, 22.156688690185547, 22.109363555908203, 21.98919677734375, 21.898250579833984, 21.898250579833984, 21.898250579833984, 21.898250579833984, 21.78264045715332, 21.78264045715332, 21.78264045715332, 21.78264045715332, 21.78264045715332, 21.729524612426758, 21.729524612426758, 21.729524612426758, 21.729524612426758, 21.704853057861328, 21.704853057861328, 21.640216827392578, 21.625791549682617, 21.535594940185547, 21.495304107666016, 21.25262451171875, 21.168779373168945, 21.168779373168945, 20.77675437927246, 20.77675437927246, 20.77675437927246, 20.77675437927246, 20.77675437927246, 20.71287727355957, 20.71287727355957, 20.640514373779297, 20.640514373779297, 20.640514373779297, 20.507591247558594, 20.21945571899414 ], "content": [ "Update after three months .. . .. . I have an answer below using netwire-5.0.1 + sdl in a structure of Functional Reactive Programming using Arrows and Kleisli Arrows for I O .", "Well the ArrowLoop instance for Netwire runs mfix on the second argument of the passed wire .", "Using netwire-4.0.7 http : hackage.haskell.org package netwire-4.0.7 .. . .. . As the question title says I m trying to create a wire that produces positions moving the position with a certain velocity in each step bouncing off other objects .", "I m using netwire-4.0.7 .", "First make a helper function that makes a continuous time filter wire : .. . .. . Use mkFW to make a filter : .. . .. . Then we need another convenient function to make a stateful wire from a stateful function of type b - a - b : .. . .. . Next construct a stateful wire that remembers all key status : .. . .. . The last piece of wire segment fires the game event : .. . .. . To actively fire discrete events netwire events that contain game events we need to hack netwire a bit I think it is still quite incomplete since it does not provide a wire that always fires events : .. . .. . Comparing to the implementation of now the only difference is never and always .", "I m trying to understand FRP and Netwire .", "The easiest way to get input in and output out of netwire is through the inputs and outputs of the outermost wire http : stackoverflow.com a 25636139 414413 .", "http : hub.darcs.net ertes netwire events .You can construct an Event inside a Wire with now and never .", "I don t think this is possible with netwire or any of the other modern FRP libraries .", "Kleisli Arrow in Netwire 5", "Doesn t have to be netwire-specific .", "http : stackoverflow.com questions 32745934 kleisli-arrow-in-netwire-5 and Console interactivity in Netwire http : stackoverflow.com questions 30992299 console-interactivity-in-netwire 32836079 .", "You can do this with the existing integral from Netwire :", "First there are some imports for the Netwire 5 library .. . .. . Now this is the core of making a Kleisli Wire .", "With these ideas we can see the main driver of wires in netwire : .. . .. . stepWire wire timestate input does exactly what we said earlier : It takes a wire and passes it the current timestate and input from the previous wire .", "Is is possible to locally extend the data Wire definition with WCarry and extend add the interesting Class instances with corresponding definitions", "I can build a PID controller http : en.wikipedia.org wiki PID controller in the Haskell FRP library netwire http : hackage.haskell.org package netwire using loop from the ArrowLoop instance provided for Wire s .", "The easiest way to explain it is using arrow notation : .. . .. . Now I don t know the first thing about Netwire but that Monad m constraint is there because that is needed for the Arrow instance of Wire s e m .", "I am trying to convert challenge 3 https : ocharles.org.uk blog posts 2013-08-01-getting-started-with-netwire-and-sdl.html from netwire 4.0 to netwire 5.0 using OpenGL .", "Linked article uses accumT which in current version of Netwire is AFAIK gone .", "I was following the same article along trying to translate it to Netwire 5.0 as well .", "I am trying to implement a dynamic set of wires in netwire 5 properly .", "I m getting started with Netwire version 5 .", "Or maybe Netwire already provides distributed wires .", "This means that it is not in general possible to turn a Wire .. . Wire .. . a into a Wire a .", "From the netwire documentation http : hub.darcs.net ertes netwire we are allowed to deconstruct Event s if we are developing a framework .", "First I would point to Kleisli Arrow in Netwire 5 http : stackoverflow.com questions 32745934 kleisli-arrow-in-netwire-5 .", "This is almost directly copied from http : hackage.haskell.org package netwire-5.0.0 docs src FRP-Netwire-Move.html integralWith all I did was fiddle with the types to get it to work .", "This would work fine with pure wires but if you re using this for pure wires you should map just with a function instead of a wire but what about stateful ones", "Netwire does not export the constructors of the Event type by default .", "Once that happens we switch to the other wire using -- .", "The documentation for switches https : hackage.haskell.org package netwire-5.0.1 docs Control-Wire-Switch.html mostly requires you to follow the types http : stackoverflow.com questions 25376120 confused-about-diagrams-of-yampa-switches 25396338 25396338 .", "To try out Netwire I m implementing Pong using the library .", "What is the right way to create wires that handle multiple events at once in netwire", "netwire uses the concept of inhibition to implement switching between wires .", "I think my answers of stackoverflow.com questions 32745934 kleisli-arrow-in-netwire-5 http : stackoverflow.com questions 32745934 kleisli-arrow-in-netwire-5 and stackoverflow.com questions 30992299 http : stackoverflow.com questions 30992299 console-interactivity-in-netwire also helps", "I was using Netwire and I encountered the exact same problem so I think it will be useful to answer this .", "I m trying to get into Netwire I ve dug to find documentations introductions tutorials and whatnot but just about every tutorial existing-code is outdated as to Netwire 5 and uses functions from Netwire 4 that are just no longer with us .", "Sessions : The author of the netwire library gave a really good answer http : stackoverflow.com questions 14787797 full-example-for-netwire 14789325 14789325 about the basic structure of a netwire program .", "In the code I have a ball wire and a computer paddle wire and since they depend on each other for some values I ve been running into issues with infinite loops .", "The other accepted answer works different : the wire will-change the state then continue producing the same result for 2 seconds and then change it again .", "The problem seems to be that you treat your stateWire as-if it was a continuous wire but it really should be an event wire itself .", "http : stackoverflow.com questions 30992299 console-interactivity-in-netwire", "I am testing with the Netwire haskell library and made it work with a simple time wire : .. . .. . Note : the run is basically modified from testWire so I don t know if it is the correct way to form a network of wires .", "This lets us see that Event http : hackage.haskell.org package netwire-5.0.1 docs Control-Wire-Unsafe-Event.html t : Event is just .. . .. . We will make a very simple-framework that uses one action in m for input and one for output .", "Assuming I understood your intent correctly it should probably be accumE flip const nextState initialState - see the event docs https : hackage.haskell.org package netwire-5.0.1 docs Control-Wire-Event.html for accumE - then you can use it like this : .. . .. . stateWire .", "We need the Arrows syntax : .. . .. . Also we need to import some stuff : .. . .. . We need to understand how to construct Kleisli Wires : Kleisli Arrow in Netwire 5 http : stackoverflow.com questions 32745934 kleisli-arrow-in-netwire-5 .", "Note : I don t use netwire and I haven t tried compiling this .", "I have to say I don t understand how Netwire works .", "Though useless it demonstrates a probably good practice of using Netwire 5 .", "This way the wire gets always from behind the border .", "And it s not too pretty - integrating by hand when there is a wire for that.. .", "It works for combining outputs of the existing set and a new wire .", "My best source of practical knowledge is this post http : ocharles.org.uk blog posts 2013-08-01-getting-started-with-netwire-and-sdl.html however it s a bit outdated as it s written in Netwire 4 and I m using version 5.0 .", "double is the outermost wire of the program .", "It might be really late to answer this but I have an answer here that contains the minimalistic structure of Netwire 5 program : Console interactivity in Netwire", "A basic structure of a interactive program using Kleisli Wires is shown in this example : Console interactivity in Netwire http : stackoverflow.com questions 30992299 console-interactivity-in-netwire .", "Basically this splits the passed string into lines and turns them into a wire that produces the first line once and then behaves like a similar wire except with the first element removed .", "fifo takes values from the previous wire adding the result from the previous wire in every instance because of that we have to keep producing .", "It s transition function will be of the type .. . .. . and given the initial state the constructor will produce a Wire like this : .. . .. . only introducing WCarry type instead of WGen type into the resulting wire .", "bs is the list of results from arrows preceding r analogous to xs in selects and as are the results from the arrows following r .", "I d like the following output : .. . .. . I m sure that I m just missing some intuition here about the correct way to approach this class of problem with Netwire .", "For each r we feed in the results of the other arrows but not the result-of r itself which is a .", "From what I can read here http : stackoverflow.com questions 10000074 which-frp-package-to-choose and there http : www.haskell.org haskellwiki Netwire Netwire and reactive-banana have different purposes and goals .", "pure x -- pure 0 wire .", "I started with this tutorial http : todayincode.tumblr.com post 96914679355 almost-a-netwire-5-tutorial which was enough to get me up and running pretty easily -- I now have a spinning cube controlled by a simple incrementing number wire : .. . .. . and the application will quit when Esc is pressed making use of the wires supplied in netwire-input-glfw https : hackage.haskell.org package netwire-input-glfw : .. . .. . An important distinction between these is that spin never inhibits -- it should always return some value -- while shouldQuit inhibits all the time until the key is actually pressed in which case I quit the application .", "I m using netwire an arrowized FRP library and having some trouble getting this arrowloop implemented .", "I wonder if I could use Netwire for FRP and Cloud Haskell to allow wires to be distributed over different nodes .", "I m playing around with the netwire package trying to get a feel for FRP and I have a quick question .", "Good luck with Netwire 5 I m playing with it too and I just begin to like it .", "I don t believe I m missing any wire definitions here .", "As Richard Huxton explained your wire is getting stuck behind the border .", "And I would like to be able to create a wire from Int s to Strings .", "But what if I want to run my wire every 2 seconds", "The key to make addWire relies in that you don t want to modify the old wire .", "I would like use a wire of type Wire s e m a b to handle multiple inputs .", "That s perfect for the shouldQuit wire but notice I have to pattern match on wt the output of the spin wire .", "At the very top level of your program you re going to have some wire that has abbreviated type Wire a b .", "For example if we already know about no events and get a list with one wire in it we should use the new wire .", "The game is implemented using netwire-5.0.1 with SDL handling graphics .", "I am trying to create a game using Haskell + Netwire 5 + SDL .", "Update 3 : In the six months since asking this question I developed a simple rendering engine https : github.com danielkeller H3D based around Netwire and the concept of entity-component programming .", "Therefore we lift that into a wire .", "Let s drop the removing part for simplicity and just make it possible to add Wire s : .. . .. . Each event adds a new wire to the initially empty list or other set of wires hidden inside and they all run all getting the input of type a and have their outputs collected into a list .", "To put it another way consider the type signature for-loop : .. . .. . In Netwire the instance of ArrowLoop is : .. . .. . This means that the loop function s type when used with wires is : .. . .. . Since loop does not take an initial argument of type d this means that there is no way to initialize any sort of conventional looping over the wire .", "This wire inhibits for 10 seconds and then outputs 20 .", "As an alternative to the accepted answer it s also possible to filter out the NoEvent without changing the wire : .. . .. . In this case the wire will-change the state inhibit for 2 seconds and then change it again .", "What you want is create a new wire with the given subwire s output added so this may be what you were looking for : .. . .. . This wire feeds both wires and then joins the outputs .", "I have just started using netwire and I m having trouble with the very basics .", "To demonstrate how to hook up netwire to events we ll make a little framework for running wires .", "@CarlDong Events in netwire are just an opaque Maybe type An Event a is either occurring at this point in time with data a or it isn t occurring .", "I ve been comparing pull-only FRP ie netwire with push-pull FRP ie reactive-bannana in the implementation of games .", "After having used netwire in a game-engine I can say that it is excellently suited for that purpose for the reasons that you stated .", "The wire that gets passed as an argument to loop never actually steps more than once since stepWire is applied to the same wire over and over with different inputs .", "Only when the wire actually produces a fixed value does the function step and produce another wire which behaves the same way as the first .", "I think I m fundamentally misunderstanding how to attack this type of problem with Netwire : .. . .. . I have the following test-case : .. . .. . I d like to take a string-split it into lines print each line then exit .", "Note : This is for an older version of netwire before events worked like they do now so some translating of the code would be required to make this work properly with the current version .", "As I am just getting into FRP and Haskell myself I m not sure if something like this already exists in the netwire library or not or if it is even generally useful or if there is a simpler way that I have not yet seen .", "If you are willing I can get some simple netwire wires and maybe you could go from there to see why it doesn t work", ".. . .. . If I understood you right you want a wire that produces the lines of a string and then inhibits when it s done with that" ] }
{ "confidence": [ 48.04169464111328, 41.89675521850586, 41.46302032470703, 41.348114013671875, 41.185569763183594, 40.94351577758789, 40.21687698364258, 39.943538665771484, 39.63034439086914, 39.20978927612305, 37.87261962890625, 37.280609130859375, 36.95716857910156, 36.68442153930664, 36.0036506652832, 35.83708572387695, 35.785667419433594, 35.75352478027344, 34.50193405151367, 33.951663970947266 ], "content": [ "Question : Update after three months .. . .. . I have an answer below using netwire-5.0.1 + sdl in a structure of Functional Reactive Programming using Arrows and Kleisli Arrows for I O . Though too simple to be called a game it should be very composible and very extendable . Original .. . .. . I am just learning Haskell and trying to make a small game out of it . However I would like to see what structure a small canonical text game can be . I also try to keep the code as pure as possible . I am now struggling to understand how to implement : .. . .. . 1 . The main loop . There is an example here How do I write a game loop in Haskell http : stackoverflow.com questions 19285691 how-do-i-write-a-game-loop-in-haskell but it seems that the accepted answer is not tail recursive . I am not exactly sure whether this matters . In my understanding the memory usage will grow right 2 . State transition . I think this is quite related to the first one though . I tried a bit using State and something in http : www.gamedev.net page resources technical game-programming haskell-game-object-design-or-how-functions-can-get-you-apples-r3204 but although individual components may work and update in finite steps I don t see how it can be used in an infinite-loop . If possible I would like to see a minimal example which basically : .. . .. . 1 . Asks the player to input something repeatedly .. . 2 . When some condition is met change state .. . 3 . When some other contition is met exit .. . 4 . Theoretically can run for infinite time without blowing the memory .. . .. . I don t have any postable code because I cannot get the very basic stuff . Any other material examples I found on the web either use some other libraries like SDL or GTK to drive events . The only one written totally in Haskell I found is http : jpmoresmau.blogspot.com 2006 11 my-first-haskell-adventure-game.html but that one does not look like a tail-recursion in its main loop too Again I don t know if it matters . Or probably Haskell is not intended to do things like this Or probably I should put the main in C Edit 1 .. . .. . So I modified a small example in https : wiki.haskell.org Simple StateT use and made it even simpler and it does not meet my criteria : .. . .. . However it will eventually overflow the memory . I tested with .. . .. . and the memory usage starts growing linearly . Edit 2 .. . .. . OK I found Haskell recursion and memory usage http : stackoverflow.com questions 13782222 haskell-recursion-and-memory-usage and gained some understanding about the stack .. . So is there anything wrong about my testing method Comment : Haskell isn t any other language you ve used . Function calls don t use the stack . And IO isn t a function anyway . You need new mental models - the ones you ve got are leading you astray . Comment : I would not suggest that adventure game as a model . The code appears to be insufficiently structured and nearly unreadable . Comment : Tail recursion isn t as central to memory behavior in Haskell as it tends to be in call-by-value languages . A closer mental model of what you re after is tail-recursion modulo cons a less common scheme but Haskell s actual operational semantics is based on graph reduction . The best way to think about it is probably to reduce expressions by hand working always from the outside in . Comment : Your game is basically a big while-loop . Write the loop body - the function that implements the logic of the game - and the rest is trivial . You should certainly leverage the power of StateT and other monad-transformers . Say your body function has type ExceptT String StateT GameState IO - the StateT for game logic ExceptT for exiting IO for well IO - then your entire game will be Control.Monad.forever body . Comment : So even it is not tail-recursion I don t need to worry about stack-overflow .. . Answer : Foreword .. . .. . After 3 months of digging through numerous websites and trying out some small projects I finally get to implement a minimalistic game or is it in a very very different way . This example exists merely to demonstrate one possible structure of a game written in Haskell and should easily be extended to handle more complex logic and gameplay . Full code and tutorial available on https : github.com carldong HMovePad-Tutorial .. . .. . Abstract .. . .. . This mini game has only one rectangle which the player can move left and right by pressing Left and Right key and that is the whole game . The game is implemented using netwire-5.0.1 with SDL handling graphics . If I understand correctly the architecture is fully functional reactive . Almost everything is implemented by Arrow composition with only one function exposed in IO . Therefore I expect the reader to have basic understanding of the Arrow syntax of Haskell since it is used extensively . The implementation order of this game is chosen to make debugging easy and the implementation itself is chosen to demonstrate different usage of netwire as much as possible . Continuous time semantic is used for I O but discrete events are used to handle game events within the game logic . Set up SDL .. . .. . The very first step is to make sure SDL works . The source is simple : .. . .. . If everything works there should be a white rectangle appearing on the bottom of the window appearing . Note that clicking the x will not close the window . It has to be closed by Ctrl-C or killing . Set up Output Wires .. . .. . Since we do not want to implement all the way to the last step and find that nothing can be drawn on screen we are doing the output part first . We need the Arrows syntax : .. . .. . Also we need to import some stuff : .. . .. . We need to understand how to construct Kleisli Wires : Kleisli Arrow in Netwire 5 http : stackoverflow.com questions 32745934 kleisli-arrow-in-netwire-5 . A basic structure of a interactive program using Kleisli Wires is shown in this example : Console interactivity in Netwire http : stackoverflow.com questions 30992299 console-interactivity-in-netwire . To construct a Kleisli Wire from anything with type a - m b we need : .. . .. . Then since I did not get trace to work under Arrow processes a debug wire is made to print objects to console : .. . .. . Now it is time to write some functions to be lifted into wires . For output we need a function that returns a SDL.Surface with proper rectangle drawn given the X coordinate of the pad : .. . .. . Be careful this function does destructive updates . The surface passed in will be blitted onto the window surface later . Now we have the surface . The output wire is then trivil : .. . .. . Then we put wires together and play with them a bit : .. . .. . Finally we change main and drive the wires properly : .. . .. . Note that if you like you can also make another wire to handle the main window surface too and it is easy and better than my current implementation but I was too late and lazy to add that . Check out the interactive example I mentioned above to see how simple run can get it can get even simpler if inhibition is used instead of quitWire in that example . When the program is run its appearance should be the same as before . Here is the complete code : .. . .. . Input Wires .. . .. . In this section we are going to construct wires that gets player input into the program . Since we will use discrete events in the logic part we need a data type for game events : .. . .. . As comment suggested the Monoid instance only applies for this particular game since it has only two opposite operations : left and right . First we will poll events from SDL : .. . .. . Obviously enough this function polls events from SDL as a list and inhibits when the Quit event is received . Next we need to check whether an event is a keyboard event : .. . .. . We will have a list of keys that are currently pressed and it should update when a keyboard event occurs . In short when a key is down insert that key into the list and vice versa : .. . .. . Next we write a function to convert a keyboard event to a game event : .. . .. . We fold on the game events and get a single event really really game specific : .. . .. . Now we can start making wires . First we need a wire that polls events : .. . .. . Note that mkKleisli makes wire that does not inhibit but we want inhibition in this wire since the program should quit when it is supposed to . Therefore we use mkGen here . Then we need to filter the events . First make a helper function that makes a continuous time filter wire : .. . .. . Use mkFW to make a filter : .. . .. . Then we need another convenient function to make a stateful wire from a stateful function of type b - a - b : .. . .. . Next construct a stateful wire that remembers all key status : .. . .. . The last piece of wire segment fires the game event : .. . .. . To actively fire discrete events netwire events that contain game events we need to hack netwire a bit I think it is still quite incomplete since it does not provide a wire that always fires events : .. . .. . Comparing to the implementation of now the only difference is never and always . Finally a big wire that combines all input wires above : .. . .. . An example of debugging is also shown in this wire . To interface with the main program modify gameWire to use the input : .. . .. . Nothing else needs to be changed . Well interesting isn t it When the program is run the console gives a lot of output showing the current game events being fired . Try pressing left and right and their combinations and see whether the behavior is expected . Of course the rectangle will not move . Here is a huge block of code : .. . .. . Game Logic --- Finally putting everything together First we write an integrating function of the X position of the pad : .. . .. . I hard coded everything but those are not important for this minimalistic example . It should be straightforward . Then we create the wire that represents the current position of the pad : .. . .. . hold holds at the latest value of a stream of discrete event . Next we put all logic things in a big logic wire : .. . .. . Since we have one state about the X coordinate we need to modify the output wire : .. . .. . Finally we chain everything in the gameWire : .. . .. . Nothing needs to be changed in main and run . Wow And this is it Run it and you shou be able to move the rectangle left and right A GIGANTIC block of code I am curious how long will a C++ program that does the same thing be : Comment : Is there really no better way to figure out what keys are down I d have expected that sort of thing to be in a library . Comment : But since I am using SDL so I have to make some functions Comment : It appears that mkSW should probably use accumE along with one of the switchers from Control.Wire.Switch but I ve never used Netwire . Anyway nice job putting this whole thing together with explanations . Comment : mkSW is a custom function for constructing stateful wires while accumE works on events . I don t think I need switchers for this simple game though .", "Question : I m getting started with Netwire version 5 . I have no problem writing all the wires I want to transform my inputs into my outputs . Now the time has come to write the IO wrapper to tie in my real-world inputs and I am a bit confused . Am I supposed to create a custom session type for the s parameter of Wire s e m a b and embed my sensor values in there If so I have these questions : .. . .. . 1 . What s up with the Monoid s context of class Monoid s Real t HasTime t s s - t What is it used for 2 . I was thinking of tacking on a Map String Double with my sensor readings but how should my monoid crunch the dictionaries Should it be left-biased Right-biased None of the above If not what am I supposed to do I want to end up with wires of the form Wire s InhibitionReason Identity Double for some s representing my input . It s my understanding that I don t want or need to use the monadic m parameter of Wire for this purpose allowing the wires themselves to be pure and confining the IO to the code that steps through the top-level wire s . Is this incorrect Comment : There s a monoid instance for Map that s left biased . And I d actually think making the monadic context here a reader monad and stuffing your sensor information in there would be reasonable here . This doesn t really impact the place where you step your wires because you can just runReader or runReaderT if you wanna stuff in even more stuff . Comment : Tutorials examples out there suggest to use IO actions in inner wires to get sensor data . e.g . use mkGen with getKey in it . I would be interested in generalizing the question to : What are advantages and disadvantages of allowing IO actions inside wires as compared to feeding all IO data as input to the outermost wire .. . Answer : I just solved this in an Arrow way so this might be more composible . You can read my posts if you like . Kleisli Arrow in Netwire 5 http : stackoverflow.com questions 32745934 kleisli-arrow-in-netwire-5 and Console interactivity in Netwire http : stackoverflow.com questions 30992299 console-interactivity-in-netwire 32836079 . The second post has a complete interactive program .. . .. . First you need this to lift Kleisli functions That is anything a - m b : .. . .. . Then assuming you want to get characters from terminal you can lift hGetChar by doing this : .. . .. . I haven t tested this runWire function I just stripped code off from my previous posts but it should run your wires : .. . .. . You can compose the input wire wherever you like like any other Wires or Arrows . In my example I did this don t just copy other parts of the program are different : .. . .. . Or one-liner :", "Question : I am trying to implement a dynamic set of wires in netwire 5 properly . I ve read the answer to wires of wires http : stackoverflow.com questions 28918915 haskell-netwire-wires-of-wires question and I don t particularly like how the code in the example relies on the Event converted to a behaviour to show up non-empty on exactly one execution of stepWire . So I want to add and remove wires in the dynamic set via Event s and hopefully without tapping into Unsafe.Event or equivalent hackery . Let s drop the removing part for simplicity and just make it possible to add Wire s : .. . .. . Each event adds a new wire to the initially empty list or other set of wires hidden inside and they all run all getting the input of type a and have their outputs collected into a list . The running part is relatively easy with googleable examples e.g . : .. . .. . Example above ignores events . I suspect that it is impossible to use the event inside the transition function other than by the event function from Unsafe.Event . Is that correct I want to avoid Unsafe.Event . When I step back and look at the suggested ways of using events I see a function that looks very promising : .. . .. . Now what if I start with simplified runWires : .. . .. . and make dynWireSet a krSwitch : .. . .. . I am almost there Now if I only could fmap a : over runWires2 and get the new wire inserted into newwires I d be all set But this is not possible in general case . In fact fmap over WGen just fmaps over the output if I get it right . Useless . And now here is my idea . Let s introduce a new variant of data Wire I ll provisionally call it WCarry g st because it will carry its internal state in a distinct data type . It s transition function will be of the type .. . .. . and given the initial state the constructor will produce a Wire like this : .. . .. . only introducing WCarry type instead of WGen type into the resulting wire . It is easy to reformulate runWires in terms of mkCarry . Then fmap instance would look something like this : .. . .. . It will-change the hidden inside state object and we ll be able to use krSwitch function meaningfully on this sort of Wire s to tweak their internal state without losing the previous value . Does this make sense If what I am trying to do is possible in a simpler way please advice If what I am talking about makes sense how could I go about it Is is possible to locally extend the data Wire definition with WCarry and extend add the interesting Class instances with corresponding definitions Any other advice Thanks . .. . Answer : I was using Netwire and I encountered the exact same problem so I think it will be useful to answer this . I agree that using safe Events is the right way to go . However I don t like adding the WCarry it doesn t seem very intuitive . You were actually extremely close to the answer . The key to make addWire relies in that you don t want to modify the old wire . What you want is create a new wire with the given subwire s output added so this may be what you were looking for : .. . .. . This wire feeds both wires and then joins the outputs . Hope it helps Comment : It works for combining outputs of the existing set and a new wire . But on the next step I will obviously want to remove the wires from the set using e.g . a map for representation . I can remove unwanted outputs the same way as you suggest but won t that lead to memory leak Comment : Commenting on own comment perhaps using a lazy map would alleviate the memory leak problem Would it Comment : You can make w ws respond to an event that switches back to ws when you want to remove w .", "Question : I m trying to understand FRP and Netwire . My best source of practical knowledge is this post http : ocharles.org.uk blog posts 2013-08-01-getting-started-with-netwire-and-sdl.html however it s a bit outdated as it s written in Netwire 4 and I m using version 5.0 . I want to have player controlled square that bounces off screen edges . Based on that post I have this : .. . .. . I want position wire to integrate velocity correct the position to stay within bounds of the screen and produce Bool indicating that collision occurred . Linked article uses accumT which in current version of Netwire is AFAIK gone . And it s not too pretty - integrating by hand when there is a wire for that.. . I know that I can limit position using integralWith but it can t produce anything more than a Fractional . I tried like this : .. . .. . And forgive me that . Now I know that there is an internal state in integral wire which I do not modify this way . So what is the correct way to achieve what I want Comment : Well I m learning FRP for fun of trying something new among other things . So I ll check myself if it s a good tool in gamedev . Also I don t get what you mean by physics-engine in this context . Comment : Do you share the code at github Comment : I moved my interest somewhere else during what time it took to get the answer so no I don t have any code to share . .. . Answer : I was following the same article along trying to translate it to Netwire 5.0 as well . This was indeed a bit of a sticky point . I ended up creating a new integralWith function similar in design to the integralWith but which takes as input a single value and produces two values . This is almost directly copied from http : hackage.haskell.org package netwire-5.0.0 docs src FRP-Netwire-Move.html integralWith all I did was fiddle with the types to get it to work . My position function ended up looking like this . As I am just getting into FRP and Haskell myself I m not sure if something like this already exists in the netwire library or not or if it is even generally useful or if there is a simpler way that I have not yet seen .", "Question : I m trying to understand FRP and Netwire . My best source of practical knowledge is this post http : ocharles.org.uk blog posts 2013-08-01-getting-started-with-netwire-and-sdl.html however it s a bit outdated as it s written in Netwire 4 and I m using version 5.0 . I want to have player controlled square that bounces off screen edges . Based on that post I have this : .. . .. . I want position wire to integrate velocity correct the position to stay within bounds of the screen and produce Bool indicating that collision occurred . Linked article uses accumT which in current version of Netwire is AFAIK gone . And it s not too pretty - integrating by hand when there is a wire for that.. . I know that I can limit position using integralWith but it can t produce anything more than a Fractional . I tried like this : .. . .. . And forgive me that . Now I know that there is an internal state in integral wire which I do not modify this way . So what is the correct way to achieve what I want Comment : Well I m learning FRP for fun of trying something new among other things . So I ll check myself if it s a good tool in gamedev . Also I don t get what you mean by physics-engine in this context . Comment : Do you share the code at github Comment : I moved my interest somewhere else during what time it took to get the answer so no I don t have any code to share . .. . Answer : You can do this with the existing integral from Netwire :", "Question : Following the lead of the excellent answer in this post http : stackoverflow.com questions 6976944 how-does-arrowloop-work-also-mfix I m trying to get a working example of ArrowLoop that doesn t use arrow notation . I m uncomfortable using arrow notation until I fully understand how arrows work under the hood . That being said I ve constructed a small program that based on my limited understanding of Arrows should work . However it ends up terminating with the dreaded loop exception : .. . .. . My intuition tells me that the loop exception usually comes when you don t supply the initial value to the loop . Haven t I done that with the line containing fn i 0.0 The output disagrees : .. . .. . Does anyone know what I m doing wrong Comment : loop Is GHCs way of telling you that it has detected an evaluation loop an expression where during GHCs evaluation it ran back into the same thunk . Comment : Right I d like a little more explanation about why it s happening in this case since I don t expect it to . .. . Answer : The main point of confusion seemed to be the integral relationship between ArrowLoop and mfix . For the uninitiated fix is a function that finds the fixed-point http : en.wikibooks.org wiki Haskell Fix and recursion of a given function : .. . .. . mfix is the monadic extension of this function whose type signature is unsurprisingly : .. . .. . So what does this have to do with ArrowLoop Well the ArrowLoop instance for Netwire runs mfix on the second argument of the passed wire . To put it another way consider the type signature for-loop : .. . .. . In Netwire the instance of ArrowLoop is : .. . .. . This means that the loop function s type when used with wires is : .. . .. . Since loop does not take an initial argument of type d this means that there is no way to initialize any sort of conventional looping over the wire . The only way to get a value out of it is to keep applying the output as the input until it finds a termination condition which is analogous to the way fix works . The wire that gets passed as an argument to loop never actually steps more than once since stepWire is applied to the same wire over and over with different inputs . Only when the wire actually produces a fixed value does the function step and produce another wire which behaves the same way as the first . For completeness here is code for my original intuition for how loop was supposed to work which I have named semiLoop : .. . .. . Edit .. . .. . After the wonderful answer http : stackoverflow.com questions 25256138 convert-from-arrow-notation 25266149 25266149 provided by Petr the delay combinator is essential to preventing the loop combinator from diverging . delay simply creates a single-value buffer between the laziness of using the next value in the mfix portion of the loop described above . An identical definition of semiLoop above is therefore :", "Question : I ve been comparing pull-only FRP ie netwire with push-pull FRP ie reactive-bannana in the implementation of games . Are there advantages to one over the other Things I ve notices are : .. . .. . Push events make it easy to have events for mouse clicks key presses from GLFW or GLUT .. . Arrowized FRP that netwire uses has much less IO floating around which is always better . It looks like having pull-only responses to things like mouse movement could cause time leaks . What else have I missed Edit to make this less opinion-based : The main goal is to have something that is as expressive concise as possible without time leaks . Update : A big issue I have found with Netwire is that there doesn t seem to be a convenient way to have more than one framerate as described in the article Fix your Timestep . Update 2 : The way i ve gotten around this is to make my game simulation wire return a Float - IO that takes the alpha value and does all the GL calls with everything interpolated by that alpha . Ideally I should be able to pass this draw function into another thread via an MVar and run it in that thread . Man Haskell is awesome . Update 3 : In the six months since asking this question I developed a simple rendering engine https : github.com danielkeller H3D based around Netwire and the concept of entity-component programming . In this process I have actually not found the use of FRP to be terribly helpful . The expressiveness of Wire s has actually turned out to be a hindrance in some circumstances . The problem centers around the identity of objects . When defining a value of Wire type it has no identity i.e . it may be re-used in the overall network multiple times and represent different physical things each time . This is a huge pain when you want to do something like collision-detection and have no way to traverse the scene graph because it cannot exist without being fused into a single opaque wire . This problem does not occur in toy examples because it is easy to specify exactly https : github.com bernstein breakout blob master src Main.hs L99 which properties of which objects interact with which other objects in which ways . I believe this is a problem with either type of FRP . It would be awesome if some Haskell wizard were to prove me wrong on this but I don t really see a way around it . Also I m sorry if the explanation isn t great but it s not really that easy to understand without trying it yourself . .. . Answer : From what I can read here http : stackoverflow.com questions 10000074 which-frp-package-to-choose and there http : www.haskell.org haskellwiki Netwire Netwire and reactive-banana have different purposes and goals . Netwire specialises in modelising framed signals such as a game server because what a game server typically does is sending its state to client in periodic frames . Reactive-banana would be the better choice for creating a GUI because a GUI is a purely event-driven model and is not tolerant to time leak . It seems to me you can use both depending of which aspect you want to implement . Comment : Interesting . Are they compatible with each other I.e . can you transfer information from one to the other Comment : After having used netwire in a game-engine I can say that it is excellently suited for that purpose for the reasons that you stated .", "Question : I asked a question about this earlier but I don t think I really knew what I was asking . I think I understand my problem slightly better now . I m using netwire an arrowized FRP library and having some trouble getting this arrowloop implemented . I have .. . .. . Such that g basically ties every element in the given list with the list of every other element using f ...um...this is hard to really say using words so I ll give an example with a list of length 4 : .. . .. . I have a helper function selects : : a - a a that turns something like x y z into x y z y x z x x y .. . .. . Now...I ve compiled this hard-coded version and this already works and delivers exactly the results that I wanted mostly . It runs without any funky issues . Does anyone know if it s possible to do this exact thing...but with a general number of list elements .. . .. . For reference my implementation of selects comes from Simon Marlow .. . Answer : I couldn t test this properly since I didn t have any example f to run it against but I believe this generalizes the arrow pattern you have : .. . .. . So first we map with f to get the list of arrows f x0 f x1 .. . and then we feed it to a combinator I named listLoop which takes a list of arrows and defines a recursive arrow which essentially has the same logic as your selects . bs is the list of results from arrows preceding r analogous to xs in selects and as are the results from the arrows following r . For each r we feed in the results of the other arrows but not the result-of r itself which is a . Then we recurse appending a to the list of preceding results . Comment : This compiles I m sorry that I can t really say anything though because it ends up working for some reason I get a lot of NaN s in my calculation . If you are willing I can get some simple netwire wires and maybe you could go from there to see why it doesn t work I appreciate your help however . Comment : Yeah if you can include some example wire that works with your hardcoded g and some simple runnable main I d be happy to debug it further .", "Question : I ve been wanting to give FRP a shot for a while now and yesterday I finally bit the bullet and had a go using Netwire 5 to begin with a fairly arbitrary choice in itself but I have to start somewhere . I ve managed to get to the point of code which works but I ve noticed a couple of patterns which I m not sure are part of how the library is expected to be used or whether they are a symptom that I m doing something wrong somewhere . I started with this tutorial http : todayincode.tumblr.com post 96914679355 almost-a-netwire-5-tutorial which was enough to get me up and running pretty easily -- I now have a spinning cube controlled by a simple incrementing number wire : .. . .. . and the application will quit when Esc is pressed making use of the wires supplied in netwire-input-glfw https : hackage.haskell.org package netwire-input-glfw : .. . .. . An important distinction between these is that spin never inhibits -- it should always return some value -- while shouldQuit inhibits all the time until the key is actually pressed in which case I quit the application . The thing that makes me uneasy is the way I end up having to use these wires . Right now it looks something like this : .. . .. . There are two things about this pattern that make me feel uncomfortable . First the fact that I pass Right undefined to both calls to stepWire . I think if my understanding is correct that this parameter is for sending events to a wire and that since my wires don t make any use of events this is safe but it feels bad EDIT maybe events is the wrong word here -- the tutorial describes it as for blocking values but the point still stands -- I never intend to block and don t make use of the e parameter anywhere in my wire . I looked to see if there was a version of stepWire for the situation where you know you never have an event and you wouldn t respond to it even if you did have one but couldn t see one . I tried making the wires e parameter and then passing Right everywhere which feels marginally less dirty than undefined but still doesn t quite seem to represent my intent . Similarly the return-value is also an Either . That s perfect for the shouldQuit wire but notice I have to pattern match on wt the output of the spin wire . I really don t know what it would mean for that to inhibit so I just return but I can imagine this getting unwieldy as the number of wires increases and again it just doesn t seem that representative of my intent -- to have a wire which never inhibits and which I can rely upon always to hold the next value . So although I have code which works I m left with the uneasy feeling that I m doing it wrong somehow and since Netwire 5 is fairly new it s difficult to find examples of idiomatic code that I can check against and see if I m near the mark . Is this how the library is intended to be used or am I missing something EDIT : I ve managed to resolve the second problem I mention pattern-matching on the Either result-of spin by combining spin and shouldQuit into a single Wire : .. . .. . Stepping this wire gives me a much more sensible return-value -- if it s Left I can quit otherwise I have the piece of data to work with . It also hints at a greater degree of composability than my original method . I still have to pass Right undefined as the input to this new wire though . Admittedly there s only one of them now but I m still not sure if this is the right approach . Comment : I tend not to use effects in my wires . Events are passed to the main wire while the monad is left polymorphic . .. . Answer : At the very top level of your program you re going to have some wire that has abbreviated type Wire a b . This is going to need to be passed something of type a and it will return something of type b every time you take a step . For example both a and b can be some WorldState for a game or maybe RigidBody for a physics simulator . In my opinion it s OK to pass Right undefined at the top level . That being said you re ignoring the important Alternative instance of Wire a b for the input wires . It provides an operator that works in a very nice way : .. . .. . Suppose we have two wires : .. . .. . If w1 inhibits then .. . .. . If w1 doesn t inhibit then .. . .. . This means that w1 w2 will only inhibit if both w1 and w2 inhibit . This is great this means that we can do things like : .. . .. . When you press F you will spin twice as fast If you want to change the semantics of a wire after pressing a button you have to be a bit more creative but not much . If your wire behaves differently it means you re doing some sort of switch . The documentation for switches https : hackage.haskell.org package netwire-5.0.1 docs Control-Wire-Switch.html mostly requires you to follow the types http : stackoverflow.com questions 25376120 confused-about-diagrams-of-yampa-switches 25396338 25396338 . Here s a wire that will act like the identity wire until you press the given key and will then inhibit forever : .. . .. . With this you can do cool things like : .. . .. . This will toggle the spinner between going forwards and backwards whenever you hit F . Comment : I think my answers of stackoverflow.com questions 32745934 kleisli-arrow-in-netwire-5 http : stackoverflow.com questions 32745934 kleisli-arrow-in-netwire-5 and stackoverflow.com questions 30992299 http : stackoverflow.com questions 30992299 console-interactivity-in-netwire also helps", "Question : I am testing with the Netwire haskell library and made it work with a simple time wire : .. . .. . Note : the run is basically modified from testWire so I don t know if it is the correct way to form a network of wires . Part of the code origin from http : todayincode.tumblr.com post 96914679355 almost-a-netwire-5-tutorial but that tutorial does not say about events . Now I am trying to add a bit interactivity to the program . For now quit the program when any key is pressed . I suppose I should do some event switching . However I am stuck here because I cannot find a way to either change wire or switch the behaviour . I tried to read the API document and the source but I don t see how to actually fire an Event or using it to switch the wire . Again since I am not yet very familiar with Haskell I may have made some big stupid mistakes here . Update 1 2 .. . .. . I got my goal working by the following code . The timer stops on any key press . Update 2 I managed to separate out pollInput into another IO only function Yay However this raises some further questions . First is this good practise del Second what is the type of pollInput I tried to manually type it out but without success . Automatic type deduction works though . del .. . .. . This is my explanation of how this code works : .. . .. . First the user input from console is polled and after some logic the input to wire is generated poor name choice but that input generated is the wire input and passed along the network . Here I simply pass an inhibition Left something and will cause the loop to exit . Of course when exiting the program produces a newline to make console look nicer . Well I still don t understand how Event works though .. . .. . Update 3 4 .. . .. . After reading @Cirdec s answer and fiddled a lot on my editor I get this single-threaded version without IORef also quitting on pressing x Update 4 : del but it does not output anything del : .. . .. . I think this is much better than my original but I am still not completely convinced whether it is good practise or not . Comment : The easiest way to get input in and output out of netwire is through the inputs and outputs of the outermost wire http : stackoverflow.com a 25636139 414413 . Comment : The thing is I am trying to prevent the input from blocking . .. . Answer : First I would point to Kleisli Arrow in Netwire 5 http : stackoverflow.com questions 32745934 kleisli-arrow-in-netwire-5 . I came up with that answer after a longggg time of trying to understand Monads and Arrows . del I will put a minimal example using Kleisli Wire soon . del .. . .. . This program merely echos what the user types and quits when it hits a q . Though useless it demonstrates a probably good practice of using Netwire 5 . This is the Kleisli wire constructor written in the answer in the post referenced . In summary this function lifts any Kleisli function a - m b into Wire s e m a b . This is the core about any I O we are doing in this program . Since we are echoing as user types hGetChar is probably the best choice . Therefore we lift that into a wire . Similarly we use the following wire to output characters on screen . Then to determine when we need to quit a pure wire is constructed to output True when q is the input Note that mkSF can be used instead of arr . To actually use the information of quitting we need to write a special but really simple runWire function which runs a wire of type Wire s e m Bool . When the wire is inhibited or returns false the function ends . Now let s put wires together . Of course we can use the Arrow syntax : .. . .. . Not sure if the proc version is faster or not but in this simple example both are quite readable . We get input from inputWire feed it to both quitWire and outputWire and get a tuple Bool . Then we take the first one as the final output . At last we run everything in main Here comes the final code I used :", "Question : I think I m fundamentally misunderstanding how to attack this type of problem with Netwire : .. . .. . I have the following test-case : .. . .. . I d like to take a string-split it into lines print each line then exit . The pieces I m missing are : .. . .. . How to inhibit after a value early in a pipeline but then if that value is split and the results produced later not inhibit until all those results are consumed . What the main loop function should look like .. . If I should use once .. . .. . Here is the code I have so far : .. . .. . This outputs the following : .. . .. . and then quits . If I remove the once then the program performs as expected repeatedly outputting the full list of lines forever . I d like the following output : .. . .. . I m sure that I m just missing some intuition here about the correct way to approach this class of problem with Netwire . Comment : I couldn t find the wires you re using . Could you please add relevant imports or if they re your own functions include them to make the whole example SSCCE http : www.sscce.org Comment : I don t believe I m missing any wire definitions here . I m using netwire-4.0.7 . Comment : Thanks for that edit Dan . .. . Answer : Note : This is for an older version of netwire before events worked like they do now so some translating of the code would be required to make this work properly with the current version . .. . .. . If I understood you right you want a wire that produces the lines of a string and then inhibits when it s done with that It s a bit hard to tell . once as the name implies produces exactly once and then inhibits forever . Again it s a bit unclear what your wires are doing because you didn t tell us but it s not something you normally put into your main wire so far I ve only ever used once with andThen . If that is correct I d probably do it something along the lines of : .. . .. . You could write that as a fold or something I just thought this was a bit clearer . -- is pretty for andThen in case you didn t know . Basically this splits the passed string into lines and turns them into a wire that produces the first line once and then behaves like a similar wire except with the first element removed . It inhibits indefinitely once all values were produced . Is that what you wanted Update .. . .. . I see what you were trying to do now . The wire you were trying to write could be done as .. . .. . The part in the parentheses produce adf nqwer nzxc for one instant and then produces forever . fifo takes values from the previous wire adding the result from the previous wire in every instance because of that we have to keep producing . The rest is as you know it I m using the function-like notation rather than the arrow notation because I prefer it but that shouldn t be a problem for you . Comment : This certainly achieves what I m after : I think I need to look into nested wires .", "Question : Using netwire-4.0.7 http : hackage.haskell.org package netwire-4.0.7 .. . .. . As the question title says I m trying to create a wire that produces positions moving the position with a certain velocity in each step bouncing off other objects . The simplest example I could think of was moving within a box like in some screen savers . I wrote this function as an attempt to do just that for one axis only : .. . .. . I actually use it with a different monad but this code doesn t actually use it and it would overcomplicate the issue here . Stepping it with a counterSession 1 60 however I get a problem - instead of bouncing off the wall it gets stuck there . I think what happens is that it keeps flipping the velocity v over and over but I m not sure why . I think I might be using delay wrong or something . .. . Answer : As Richard Huxton explained your wire is getting stuck behind the border . One solution is to check that you don t just reverse velocities you always point them to the right direction . This way the wire gets always from behind the border . Another solution is to change the position back inside the borders if it gets out . This way the wire is never perceived to get behind which is something you usually want to do in games . Combined together it could look like .. . .. . I m not very familiar with the arrow notation so I used Category and Applicative notation composition of wires using . . For this task object is particularly handy . It integrates the velocity and loops internally and all we need to do is to give it a modifying function and extract position from the output .", "Question : As a simple example I have this . And I would like to be able to create a wire from Int s to Strings . I think it should be easy but I m having no luck . .. . Answer : You need to split the original Int input and fan it out to both w and arr f . The easiest way to explain it is using arrow notation : .. . .. . Now I don t know the first thing about Netwire but that Monad m constraint is there because that is needed for the Arrow instance of Wire s e m . If you want to get rid of the arrow notation the above can be rewritten as .. . .. . You can of course generalize the concept into this abstraction :", "Question : I am testing with the Netwire haskell library and made it work with a simple time wire : .. . .. . Note : the run is basically modified from testWire so I don t know if it is the correct way to form a network of wires . Part of the code origin from http : todayincode.tumblr.com post 96914679355 almost-a-netwire-5-tutorial but that tutorial does not say about events . Now I am trying to add a bit interactivity to the program . For now quit the program when any key is pressed . I suppose I should do some event switching . However I am stuck here because I cannot find a way to either change wire or switch the behaviour . I tried to read the API document and the source but I don t see how to actually fire an Event or using it to switch the wire . Again since I am not yet very familiar with Haskell I may have made some big stupid mistakes here . Update 1 2 .. . .. . I got my goal working by the following code . The timer stops on any key press . Update 2 I managed to separate out pollInput into another IO only function Yay However this raises some further questions . First is this good practise del Second what is the type of pollInput I tried to manually type it out but without success . Automatic type deduction works though . del .. . .. . This is my explanation of how this code works : .. . .. . First the user input from console is polled and after some logic the input to wire is generated poor name choice but that input generated is the wire input and passed along the network . Here I simply pass an inhibition Left something and will cause the loop to exit . Of course when exiting the program produces a newline to make console look nicer . Well I still don t understand how Event works though .. . .. . Update 3 4 .. . .. . After reading @Cirdec s answer and fiddled a lot on my editor I get this single-threaded version without IORef also quitting on pressing x Update 4 : del but it does not output anything del : .. . .. . I think this is much better than my original but I am still not completely convinced whether it is good practise or not . Comment : The easiest way to get input in and output out of netwire is through the inputs and outputs of the outermost wire http : stackoverflow.com a 25636139 414413 . Comment : The thing is I am trying to prevent the input from blocking . .. . Answer : If you don t want to block on input and output don t block on input and output . To demonstrate how to hook up netwire to events we ll make a little framework for running wires . We ll avoid blocking the stepping of the wire by performing all IO in separate threads . From the netwire documentation http : hub.darcs.net ertes netwire we are allowed to deconstruct Event s if we are developing a framework . Netwire does not export the constructors of the Event type by default . If you are a framework developer you can import the Control.Wire.Unsafe.Event module to implement your own events . This lets us see that Event http : hackage.haskell.org package netwire-5.0.1 docs Control-Wire-Unsafe-Event.html t : Event is just .. . .. . We will make a very simple-framework that uses one action in m for input and one for output . It runs an action m Either e a to read an action or inhibit . It either runs an action b - m to output or stops when the wire inhibits . We will use this to run an example program that outputs the time every second and stops inhibits when the x key is pressed . The input and output events carry multiple events in case more than one event takes place in the same time step . The input events are just pressed character keys . The output events are IO actions . Our non-blocking IO will run three threads : an input thread an output thread and a wire thread . They will communicate with each other by atomically modifying IORef s . This is overkill for an example program we could have just used hReady when reading and not enough for a production program The IO threads will spin waiting on characters and output . In practice polling for events and scheduling output will usually be provided by some other IO framework OpenGL a gui toolkit a game-engine etc . The main thread sets up the queues spawns the IO threads runs the wire and signals the IO threads when the program has stopped . The input thread waits for keys spinning when there is no input ready . It sends KeyPressed events to the queue . The output thread runs the actions it is sent as long as it is instructed to continue and once more after it is signaled to stop to make sure all the output happens . We can run the example program with runKeyboard . Comment : Wow that is a lot of stuff.. . Do I really need to build a whole framework in order to achieve the goal Comment : I have to say I don t understand how Netwire works . Especially how the wires and events are related together . Are events just special wires Or are they signals that pass-through wires Comment : I am kind of stuck on trying to dissect fmap : . print periodic 1 . time . What is being fmap ed on to what I am intrigued by the infix operator . Is trying to apply fmap : . print onto periodic 1 . time If so then why a function of type f a - f IO can be applied on Wire s e m a Event t Is the latter type just the a in the function Comment : @CarlDong It s normal to make a small framework to hook up an FRP library to the outside world . This is also needed in for other FRP libraries for example in reactive-banana you build a framework using Reactive.Banana.Frameworks https : hackage.haskell.org package reactive-banana-0.8.1.2 docs Reactive-Banana-Frameworks.html Comment : @CarlDong Events in netwire are just an opaque Maybe type An Event a is either occurring at this point in time with data a or it isn t occurring . They are kept opaque for reasons of correctness . This is necessary in order to protect continuous time semantics . You cannot access event values directly . http : hub.darcs.net ertes netwire events .You can construct an Event inside a Wire with now and never . Event s expose a Functor instance so you can fmap on them . There s nothing special about wires holding events except that you are allowed to use them for switching .", "Question : I would like use a wire of type Wire s e m a b to handle multiple inputs . The intended semantics would be .. . .. . If the input list is do nothing and return an empty list .. . If the input list is a : as step the wire with input a recursively step the resulting wire with input as and then collect the results into a list .. . .. . Is this a sensible thing to do Is my implementation sensible Inhibitions are completely ignored here which seems strange . What is the right way to create wires that handle multiple events at once in netwire Comment : I don t really think this is a good idea . The way I understood it wires should only be stepped once per instant otherwise you re violating continuous time semantics . This would work fine with pure wires but if you re using this for pure wires you should map just with a function instead of a wire but what about stateful ones Comment : I don t understand the objection . I can already write wires that do this by hand . I m just asking if this combinator is a sensible way to abstract the process . .. . Answer : Your question is kind of difficult to answer since abstractions are really only useful to the applications that use them . Ignoring inhibition is not a problem per se but you do lose a lot of the functionality from things like the Alternative typeclass . Suppose you had a wire that converts keypresses into actions and inhibits when no key is pressed : .. . .. . You could create a wire that falls back to a default action if the first wire inhibits : .. . .. . If you wanted to create something that handled multiple inputs ideally you d like to do something like : .. . .. . .. . but this wouldn t really work with your implementation . You could add a guard to check for nonempty lists from many but you re making something much more verbose than it needs to be . .. . .. . The objection that @Cubic mentioned about the lack of continuous time semantics however is a problem . Suppose you had a wire that switches based on a certain amount of time : .. . .. . In this example pulseFooBar will handle the input as foo for three seconds and then as bar for three seconds and then alternate back . In this context many pulseFooBar doesn t make any sense . Since you step multiple times in any given timestep pulseFooBar will no longer switch every three seconds and becomes dependent on the input and time between timesteps .", "Question : I am trying to create a game using Haskell + Netwire 5 + SDL . Now I am working on the output part where I would like to create wires that read in some game state and output the SDL surfaces to be blitted on screen . However the problem is that SDL surfaces are contained in IO monad so any function that creates such surfaces must have type a - IO b . Of course arr does not construct a Wire from a - m b . However since the type signature of a wire is Monad m Monoid e Wire s e m a b it looks quite like a Kleisi Arrow but I cannot find a suitable constructor for making such a wire . I am new to FRP and Arrows and have not programmed a lot in Haskell so this may not be the best way to implement the graphics output . If I am wrong from the beginning please let me know . Some SDL functions related : .. . .. . Update 1 .. . .. . This code type checks but now I am trying to interface it with SDL for testing Comment : Apparently you ve already answered your own question . Put it as an answer instead of adding it to your question . In particular it s probably enough to mention mkGen and it s type in the answer the particular implementation is likely less interesting for future readers . If you have more questions ask them separately instead of changing your questions . Comment : No I have not verified whether it works yet Comment : Now I kind of verified using putStrLn as a simpler example . Comment : Wires and FRP in general are a way to model time-varying values . They shouldn t really create anything ever . Your program as you have it written will create a new SDL surface every time the wire is evaluated Comment : Will the previous unused surfaces be garbage collected Of course semantically it is the same to update the same surface it is state anyway but I think those are implementation details . .. . Answer : Now after playing around with Arrows I will answer my own question using the function putStrLn . It has type String - IO which is a - m b so the method should generalize to all Kleisli wires . I also illustrate how to drive the wire and the result is amazingly simple . The entire code is written in Literate Haskell so just copy it and run . First there are some imports for the Netwire 5 library .. . .. . Now this is the core of making a Kleisli Wire . Assume you have a function with type a - m b that needs to be lifted into a wire . Now notice that mkGen has type mkGen : : Monad m a - m Either e b - Wire s e m a b .. . .. . So to make a wire out of a - m b we first need to get a function with type a - m Either b . Notice that Left inhibits the wire while Right activates it so the inner part is Either b instead of Either b . Actually if you try the latter an obscure compile error will tell you get this in the wrong way . To get a - m Either b first consider how to get m Either b from m b we extract the value from the monad m b lift it to Right then return to the monad m . In short : mB return . Right . Since we don t have the value mB here we make a lambda expression to get a - m Either b : .. . .. . Now we can make a Kleisli wire : .. . .. . So let s try the canonical hello world wire Now comes the main function to illustrate how to drive the wire . Note that comparing to the source of testWire in the Control.Wire.Run from the Netwire library there is no use of liftIO : the outer program knows nothing about how the wires work internally . It merely steps the wires ignoring what is in it . Maybe this Just means better composition than using Nothing about Kleisli Wires No pun intended Now here comes the code . Unfortunately StackOverflow does not work quite well with Literate Haskell.. . .. . .. . Update .. . .. . Thanks to Cubic s inspiration . liftToEither can actually be written in you guess it liftM : Comment : Note that m return . f is just fmap f m . Also I m not sure what you mean when you say putStrLn generalizes to all wires Comment : Is it Does fmap work with Monads Comment : When I say it generalizes to all wires I actually mean that similar things applies to lifting all a - m b functions into Wire s e m a b Comment : Right a - fmap Right f a works too . But I think a - f a return . Right probably expresses better for this purpose Comment : No sorry fmap doesn t seem to work with Monads . The compiler tells me to add Functor m but that is not correct .", "Question : I m trying to get into Netwire I ve dug to find documentations introductions tutorials and whatnot but just about every tutorial existing-code is outdated as to Netwire 5 and uses functions from Netwire 4 that are just no longer with us . The README http : hub.darcs.net ertes netwire browse README.md is kind of helpful but not everything compiles and still it barely provides enough information to get started . I am asking for explanation or an example just to get a game-loop running and being able to respond to events so I seek information so I ll eventually know : .. . .. . 1 . The basic structure like how in reactive-banana you actuate network-descriptions that consume handlers define behaviors and reactimate to events . 2 . How it ultimately goes in main . 3 . How to handle IO events like a mouse-click a key-down or a game-loop callback how do events come in sessions etc . And anything else relevant . I figure that from there I could get something running and so I could learn the rest by experimentation as the state of documentation and tutorials for this in the 5th version is horribly non-existent I hope some will appear very shortly . Thank you .. . Answer : Disclaimer : I haven t been able to find any large-scale programs that use Netwire so everything I m about to write you should take with a grain of salt as it s based on my own experiences using Netwire . The examples that I use here are mostly taken from my own library http : www.github.com Mokosha Lambency and attempt at writing a game using FRP https : github.com Mokosha HsTetrisAttack and might not be the right way to do things . .. . .. . Question 1 : The basic structure like how in reactive-banana you actuate network-descriptions that consume handlers define behaviors and reactimate to events . Sessions : The author of the netwire library gave a really good answer http : stackoverflow.com questions 14787797 full-example-for-netwire 14789325 14789325 about the basic structure of a netwire program . Since it s a bit old I will outline some of the points here . Before we look at wires let s first take a look at how netwire handles time the underlying driver of FRP . The only way to advance time without using the testing harness testWire is to produce a Session that will statefully return time deltas . The way Sessions preserve state is encapsulated in their type : .. . .. . Here a Session lies within a Monad usually IO and every time it is evaluated returns a time state value of type s and a new Session . Usually any useful state s can be written as a Timed value that can return some instance of Real t : .. . .. . For example in games you usually want a fixed timestep http : gafferongames.com game-physics fix-your-timestep to do your update calls . netwire encodes this notion with : .. . .. . A countSession takes as input the timestep in this case a fixed value of type t and produces a Session whose state values are of type Timed t . This means that they only encode a single value of type t and do not carry any additional state with the value . After we discuss wires we will see how this plays a role in evaluating them . Wires : The main type of a wire in Netwire is : .. . .. . This wire describes a reactive http : en.wikipedia.org wiki Reactive programming value of type b that does the following : .. . .. . Takes as input a reactive value of type a .. . Operates within the Monad m .. . May inhibit or not produce a value yielding an inhibition value of type e .. . Assumes a time state given by s .. . .. . By the nature of being reactive values wires can be thought of as time-varying functions . Hence each wire is encoded as a function of time or the time state s that produces at that instant in time a new value of type b and a new wire with which to evaluate the next input of type a . By returning a value and a new wire the function can encompass state by propagating it through the function definitions . Additionally wires may inhibit or not produce a value . This is useful for when computations are not defined such as when the mouse is outside of the application window . This allows you to implement things like switch where a wire changes to a different wire to continue execution such as a player finishing his jump . With these ideas we can see the main driver of wires in netwire : .. . .. . stepWire wire timestate input does exactly what we said earlier : It takes a wire and passes it the current timestate and input from the previous wire . Then in the underlying Monad m it either produces a value of Right b or inhibits with a value of Left e and then gives the next wire to use for the computation . Question 2 : How it ultimately goes in main . Armed with values of type Session and Wire we can construct a loop that does two things over and over : .. . .. . 1 . Steps a session to receive a new time state .. . 2 . Uses the new time state to step a wire .. . .. . Here is an example of a program that alters a fixed counter to count by twos forever : .. . .. . Question 3 : How to handle IO events like a mouse-click a key-down or a game-loop callback how do events come in sessions etc . There is somewhat of a debate about how to do this . I think in this situation it s best to take advantage of the underlying Monad m and simply pass a snapshot of the current state to the stepWire function . In doing so most of my input wires look something like this : .. . .. . Where the input to the wire is ignored and the mouse input is read from a State monad . I use State and not Reader in order to handle key debounces properly so that clicking on UI doesn t also click on something underneath UI . The state is set in my main function and passed to runState which also does the wire stepping . The inhibition behavior of wires like this can make for some elegant code . For example suppose you have wires right and left for your arrow keys that produce a value if the key is pressed and inhibit otherwise . You can create character movement with a wire that looks like this : .. . .. . Since wires are an instance of Alternative if right inhibits it ll just move on to the next possible wire . a b will inhibit only if both a and b inhibit . You could also write your code to take advantage of netwire s Event system but you d have to make your own wires that return an Event using Control.Wire.Unsafe.Event . That being said I have yet to find this abstraction more useful than simple inhibition .", "Question : To try out Netwire I m implementing Pong using the library . In the code I have a ball wire and a computer paddle wire and since they depend on each other for some values I ve been running into issues with infinite loops . Some pseudo-code to explain : .. . .. . The thing to notice is they take each other for inputs . I ve tried to alleviate this by doing the following : .. . .. . and other variations of using the delay function in these two wires but I m getting the loop runtime-error regardless . How do I initialize one of the wires so that this system can work .. . Answer : Of course 5 minutes later I find the magic combination that seems to work . What I did was I altered the inputs the wires took in to be .. . .. . then when it came to creating my network of wires I did this : .. . .. . This acknowlegdes their dependency and gives the paddle the dummy initial value for the ball on it s first pass .", "Question : I have just started using netwire and I m having trouble with the very basics . The following code works fine for me : .. . .. . But this does not : .. . .. . fails with error : .. . .. . So I changed it to : .. . .. . which gives me the error : .. . .. . Changing it to : .. . .. . Gives the following error : .. . .. . Can someone explain why this happens and how I can fix my second code example .. . Answer : Edit : Here s a complete compiling running solution to this problem : .. . .. . Here s the original answer that discussed why we should change the type of yeah and then the necessary changes to the type of forYeah : .. . .. . Change the type of yeah to Monad m Wire s e m a String . Monad m Wire s e m a has an Applicative instance so pure should exist without specifying that the second type argument to Wire in yeah s type is . Note : I don t use netwire and I haven t tried compiling this . I ve only looked at the types in the documentation . Edit : You probably also need to change the type of forYeah . Wire also has a Category instance : .. . .. . Category s . operator has the following type : .. . .. . So for Wire s it is : .. . .. . for has the following type : .. . .. . So for 3 would have a type like HasTime Int s Monoid e Wire s e m a a . Combined with yeah s type of Monad m Wire s e m a String for 3 . yeah would have a type like .. . .. . So we could probably change the type of forYeah to : .. . .. . Edit : Even better type for forYeah .. . .. . Since an integer numeral without a decimal point is actually equivalent to an application of fromInteger to the value of the numeral as an Integer http : www.haskell.org tutorial numbers.html and fromInteger : : Num a Integer - a the literal 3 actually has type Num t t . The best type we can choose is therefore probably :", "Question : Consider the following code : .. . .. . As you can imagine testWire will run the wire as fast as it can and print the output to screen . But what if I want to run my wire every 2 seconds Looking at the docs periodic may be the solution : .. . .. . This almost works . The output seems to be static for about 2 seconds but when it s updated it s clear that the wire were running while the output was stopped . Maybe I should do the other way around However the end result is exactly like my first try . What am I missing here EDIT : See this answer http : stackoverflow.com a 28839272 851863 for a inferior alternative to the accepted answer . Comment : I d recommend you to post your edit as an answer instead Answering your own questions is permitted on stackoverflow and makes more sense than putting the answer into the question . Also there s probably no need to replicate my answer unless you want to emphasize some difference between them . .. . Answer : The problem seems to be that you treat your stateWire as-if it was a continuous wire but it really should be an event wire itself . Assuming I understood your intent correctly it should probably be accumE flip const nextState initialState - see the event docs https : hackage.haskell.org package netwire-5.0.1 docs Control-Wire-Event.html for accumE - then you can use it like this : .. . .. . stateWire . periodic 2 the other way round would not work . The reason why your original version doesn t work is that periodic doesn t inhibit when there s no event it instead just produces a NoEvent value . And since your stateWire just ignores its input whether or not an event is produced doesn t make any difference to it when the periodic wire is in front whereas putting the periodic wire in the back just means periodically catch a snapshot of the current state which is also not what you want . Note : Front and back in the previous paragraph refer to the order of execution not to the layout in source code which is in reverse if you use the . combinator . Comment : I guess you mean accumE flip const nextState initialState . This works but it made me realize that I can make it work with a continuous wire if I filter it with when occurred . Comment : Yeah that was a typo . Fixed now . That requires Unsafe.Event and IMHO a state change that depends on an event is should be certainly an event itself . Doing it like that you suddenly get a wire that claims to be continuous but actually doesn t produce values for any interval . Comment : You re right . Thinking in events really seems the correct way to model this problem . Also edited my question according to your feedback . Thanks" ] }
[ "yes-answer-long", "yes-answer-short" ]
reactive-programming
UNK_RELATION
wordpress-json-api@wordpress@64
wordpress-json-api -- a plugin that provides a restful api for @placeholder .
{ "confidence": [ 44.728233337402344, 43.25673294067383, 39.290809631347656, 37.37815856933594, 37.25956726074219, 35.85224151611328, 35.851600646972656, 35.851600646972656, 35.44065856933594, 35.23940658569336, 34.48666763305664, 33.954803466796875, 33.63622283935547, 33.61747360229492, 33.61747360229492, 33.43450164794922, 32.72655487060547, 32.02754211425781, 30.59624671936035, 30.396522521972656, 30.086380004882812, 30.027122497558594, 29.933879852294922, 28.576086044311523, 28.576086044311523, 28.3681640625, 27.78601837158203, 27.655284881591797, 27.655284881591797, 27.629396438598633, 27.074420928955078, 27.063583374023438, 26.984981536865234, 25.69921112060547, 25.510427474975586, 25.427349090576172, 25.180049896240234, 25.180049896240234, 25.149742126464844, 25.08245849609375, 25.08245849609375, 24.979568481445312, 24.965940475463867, 24.862808227539062, 24.755481719970703, 24.715499877929688, 24.586034774780273, 24.381200790405273, 24.22201919555664, 23.824539184570312, 23.728378295898438, 23.711580276489258, 23.711580276489258, 22.745441436767578, 22.630237579345703, 22.205738067626953, 22.103050231933594, 21.98394775390625, 21.590412139892578, 21.574569702148438, 21.566879272460938, 21.487525939941406, 21.330047607421875, 21.236772537231445, 21.10405731201172, 20.946956634521484, 20.858036041259766, 20.82726287841797, 20.80347442626953, 20.654848098754883, 20.654848098754883, 20.603656768798828, 20.551959991455078, 20.30118751525879, 20.30118751525879, 20.284770965576172, 20.251670837402344, 20.020442962646484, 19.89846420288086, 19.58970069885254, 19.529495239257812, 19.340442657470703, 19.28357696533203, 19.265647888183594, 19.186811447143555, 19.136608123779297, 19.065771102905273, 19.065771102905273, 18.967336654663086, 18.967336654663086, 18.898923873901367, 18.898923873901367, 18.898923873901367, 18.62390899658203, 18.431365966796875, 18.431365966796875, 18.381317138671875, 18.197792053222656, 18.197792053222656, 18.197792053222656 ], "content": [ "When i installed and activated plugin json-api on wordpress .", "I m working on WordPress json-api plugin .", "I used wordpress 4.5.3 with plugin json-api 1.1.1 and i installed wordpress on ubuntu-16.04 i used apache2 and php7 .", "I m creating an app using the JSON API plugin in conjunction with this Events Manager Plugin in WordPress and I want to create an event using the create post controller .", "I have recently started working with WordPress had my first task using JSON API .", "So if you want to try the JSON API you can install wordpress.org plugins json-rest-api https : wordpress.org plugins json-rest-api .. . first you need to authenticate http : wp-api.org guides authentication.html then you can create the post http : wp-api.org posts create-a-post .. . You can read the post codeable.io community how-to-import-json-into-wordpress https : codeable.io community how-to-import-json-into-wordpress and in the last section they talk about the security nonce", "For some reason out-of-the-box the Wordpress JSON API does not work on Nginx .", "I am new to PHP and I am working on wordpress JSON api .", "I use json-api plugin https : wordpress.org plugins json-api and I have three custom taxonomies .", "refer to this http : stackoverflow.com questions 10132685 json-api-to-show-advanced-custom-fields-wordpress question .", "There are plugins available to create a REST API from your WordPress site like this one : https : wordpress.org plugins json-rest-api .", "Using https : wordpress.org plugins json-api in an environment that segregates the standard wordpress install from a site that effectively uses wordpress as a service .", "I am developing an Android App that is able to register users on a WordPress website and update their user meta vars by sending http requests GET Method using the JSON API Auth https : wordpress.org plugins json-api-auth and JSON API User https : wordpress.org plugins json-api-user plugins installed on WordPress .", "Here I am using JSON API for Wordpress to validate users .", "You can use the JSON API to add a post to Wordpress .", "Here is what I ve done so far : .. . .. . Plugin installations .. . .. . I ve installed and activated the WordPress JSON API and the Basic Auth plugins on my website .", "I am very new to wordpress trying to create post with featured image from a separate .Net application using JSon api .", "I am using AJAX to load a json array created by the WP Json API Plugin .", "My question is : How to create post using JSON API when you aren t logged in in the WP Admin Panel", "This is my JSON API url marineinsight.com api get recent posts http : www.marineinsight.com api get recent posts", "Thank you for your comment but I am using Custom Fields on a wordpress post and not Advanced Custom Fields wordpress-plugin .", "However this plugin does not generate the posts the WordPress way and I am unable to retrieve a well formatted JSON output when I access a page with it .", "Doesn t WordPress API can be used in another way", "I looked at JSON API and I found something interesting that one can generate posts using the get posts method .", "This caught my attention but I have no idea how to implement this from JSON API .", ".. . .. . Site A http : example.com the consumer .. . .. . Site B http : wordpress.example.com the standard wordpress site with the json-api plugin installed .. . .. . .. . .. . Old slug : test-article New slug : test-article-new .. . .. . .. . .. . Site A consumes site B via the JSON API Query : : get method .. . .. . So a call might look like : http : wordpress.example.com api post get post slug test-article .. . .. . But this will return no results because the slug is now test-article-new .. . .. . However a http call to bog-standard wordpress i.e .", "here ya go https : wordpress.org plugins json-api other notes .. .", "I would like to make requests to the WordPress API much faster .", "Problem is that WP-API is loading the whole WordPress for every single call .", "I was just providing you with a plugin that will turn any archive single post page etc into a json formatted object instead for quick API access .", "Try to use json get recent posts just to make sure that the plugin is working", "Check out this link https : github.com WP-API WP-API issues 433 .", "http : wordpress.mysite.com test-article will correctly 301 to http : wordpress.mysite.com test-article-new .. . .. . Is the ability to follow old permalinks canonical URLs available in the json-api plugin", "Put the plugin folder in root wordpress install .", "You would then initiate a request to a JSON-based API wait for the response map the returned JSON to Realm objects and store them in your database .", "My API is implemented in a plugin using register rest route to register my routes .", "For a better working API connect your site with JetPack to Wordpress.com and use their API .", "sure - marineinsight.com api get recent posts http : www.marineinsight.com api get recent posts", "I had a problem about wordpress .", "As an FYI I am developing a cordova application and attempting to use the WP JSON API for WP backend .", "I have installed the wp-rest-api v2 to get the data in json array format .", "WP-API http : v2.wp-api.org out of the box the plugin works great .", "If not how can this functionality be mimicked in the API controllers", "This link api get recent posts is a link after you configured .htaccess .", "Hi i am using JSON API and JSON API USER to get content to my App which is connected to my wordpressblog what it does presently is getting recent post and some specific pages but in my website i have membership so that users can view only specific content but i am unable to use the same in my App if restrict some content either all users are unable to see in App or All are able to see .", "i want to get all posts that contains specific characters using json-api plugin in wordpress i successes to get post where title is equal to string mytitle using this http : mysite json get posts post type my type title mytitle http : mysite json get posts post type my type title mytitle but i want to get all posts that contains mytitle string can any one help", "EDIT : Since the OP is actually concerned with the WP-API not WordPress in general I am adding this to address the actual question .", "@Qu nhNguy n Yup .htaccess was set as default of wordpress", "Can someone suggest me a way or a plugin or edit my json to get user to access data based on their subscription user role .", "I have this JSON content from a WordPress Site .. . .. . I want to fetch the url from medium to display as image .", "The API thinks you re looking for the get userinfo insecure cool endpoint .", "XMLRPC works fine but i am getting data in json format", "is it appropriate to use XMLRPC when the data you are receiving is in JSON format", "Since most plugin making use of the WP-API doesn t need any other plugins to be loaded even less a theme.. .", "Please help with the info about how can I upload image from external source using url and mark as featured image using the api .", "from the WordPress site and put it into the list wherever I need it in the app .", "I call it this way : wp-json posts .. . .. . How can I make sure the JSON response also contains my Post Custom Fields", "Yea I ve been playing around a little with this plugin but how can I format the JSON as I wish", "I m trying to get recent posts from my wordpress blog but it s returning html instead of json .", "Objective .. . .. . So I want to be able to check for changes since a given date whenever the local database was last updated and send the changed records to the mobile app via the wp JSON api .", "I realized I could generate the post links using this plugin .", "To clarify this file is a part of a plugin but it is called independently of WordPress itself via Ajax and directly .", "I am receiving the data from another server in JSON format and using that I want to create a post but due the nonce factor I can t create post if I am not logged in .", "@IsmailRBOUH : I tried http : 172.16.1.38 json get recent posts and it worked .", "However since this is a plugin everything is loaded with it the child-theme and the theme and basically a query to this API is taking half a second because of all this useless parts loaded .", "For my question it s a bit different since I am using WP-API I want to make my API available through the WP-API system .", "I m trying to create a PhP script that will automatically post an article on my wordpress website I m using the wordpress CMS it s not a wordpress.com website .", "Basically this is what a call to my API does .", "I m thinking about using WordPress as the backend and then use a HTML parser such as jSoup to get the text images etc .", "The response for all posts in wp-json does not include a couple of Custom Fields that I created in my posts .", "Thus I decided to generate just the links and somehow use these links to generate a JSON response .", "I edited WordPress index.php file and used microtime true to record when everything started and then edited one of the REST controllers to calculate how long it took from start to getting to the API endpoint .", "I am using a plugin known as Top Ten to generate the most viewed posts .", "I was able to correct permalinks for a wordpress site in a subdirectory on an nginx site .", "The app is preinstalled with a snapshot of the content of a Wordpress mySQL database it uses custom types .", "Convert json to array remove keys and then convert back to json .", "You could use one of these libraries for that : https : cocoapods.org q oauth .. . .. . See the API documentation for information about posting something : https : developer.wordpress.com docs api", "In short what I m looking for is a way to achieve something like this : http : example.org json get posts slugs slug-one slug-two slug-n .", "I even tried the custom parameters custom event end date referenced in a previous support question https : wordpress.org support topic create-events-with-api-rest replies 1 but none of that works for me .", "With your solution we are going completely around WP-API :", "Turns out this is a problem at the mo in Wordpress but the link has a suggestion fix amongs others as such : .. . .. . You will however have to go through the full post as the above link s it turns out a lot of people are having this issue but a number of them got the issue resolved with all the suggestions in the post .", "The problem is that to register a user I have to : .. . .. . 1- Make a request to get the nonce id : DomainName api get nonce controller user method register this will return a json with nonce id .", "Ok so here is the JSON respone : .. . .. . And Here the script which creates a div each post and fills it with it with json content field .", "You should actually look at reducing this anyway cache wp-options etc but what i suggest to you in relation to the api is to cache the output using a mu-plugin .", ".json .. . json file-get-contents cache folder . endpoint .", "If you want to change the keys that are returned or meta data or modify the api in some way go to that page I linked and cntrl +f Introspector and data models", "Depending on the situation it might be easier to POST instead of GET so you can feed it a JSON object instead of a messy string .", "I don t understand what you mean by feed it a JSON object instead of a mess string .", "Are you sure thumbnail images is jsonobject and not json array", "The only thing I have gotten to work is json .", "i am trying to create a standard wordpress loop using jQuery rather than PHP .", "Basically i have a wordpress website from which I want to get the articles .", "The content of the WP database is only written via the Wordpress install the mobile app cannot write data .", "I am developing IOS app where users will be login into my WordPress site and complete the form and send the data to WordPress Database .", "My JSON response : .. . .. . All I need to do is to add the below to attachments using json-api encode add filter : .. . .. . Kindly suggest me some way to do it .", "i have ingrident array json json array which have six element in each record i want name in autocomplete populate and their other record in hidden filed .", "I created my custom controller I want to retrieve posts as Json format my work was as below : .. . .. . My php code is : .. . .. . Json result as below : .. . .. . Why price is set to null what the correct syntax to extract price from custom-fields from posts in WordPress", "How can I protect JSON data from the public", "SO.. . What s best practice for generate custom JSON from WP posts", "Assuming your JSON takes the general form of this : .. . .. . You could use this method ." ] }
{ "confidence": [ 46.1505126953125, 44.53512954711914, 42.66724395751953, 40.55317306518555, 40.24333953857422, 39.51173400878906, 37.50385284423828, 37.451194763183594, 37.30613708496094, 37.27690505981445, 37.191768646240234, 35.074371337890625, 34.34898376464844, 34.33216857910156, 33.79353332519531, 32.25782775878906, 32.05644989013672, 31.58675193786621, 31.483516693115234, 31.455223083496094 ], "content": [ "Question : null .. . Answer : I had a problem about wordpress . I used wordpress 4.5.3 with plugin json-api 1.1.1 and i installed wordpress on ubuntu-16.04 i used apache2 and php7 . When i installed and activated plugin json-api on wordpress . When i clicked link get recent posts it returned .. . .. . This is file config virtual host : .. . .. . I don t know what is problem Hope everybody can explained for me why it don t work Comment : Try to use json get recent posts just to make sure that the plugin is working Comment : This link api get recent posts is a link after you configured .htaccess . Comment : @IsmailRBOUH : I tried http : 172.16.1.38 json get recent posts and it worked . But why i clicked link as default and it didn t work . Comment : @Qu nhNguy n Yup .htaccess was set as default of wordpress Comment : Try to visit the permalink menu in the admin section and try to click save button The purpose is to refresh rules", "Question : null .. . Answer : Using https : wordpress.org plugins json-api in an environment that segregates the standard wordpress install from a site that effectively uses wordpress as a service . .. . .. . Site A http : example.com the consumer .. . .. . Site B http : wordpress.example.com the standard wordpress site with the json-api plugin installed .. . .. . .. . .. . Old slug : test-article New slug : test-article-new .. . .. . .. . .. . Site A consumes site B via the JSON API Query : : get method .. . .. . So a call might look like : http : wordpress.example.com api post get post slug test-article .. . .. . But this will return no results because the slug is now test-article-new .. . .. . However a http call to bog-standard wordpress i.e . http : wordpress.mysite.com test-article will correctly 301 to http : wordpress.mysite.com test-article-new .. . .. . Is the ability to follow old permalinks canonical URLs available in the json-api plugin If not how can this functionality be mimicked in the API controllers", "Question : The response for all posts in wp-json does not include a couple of Custom Fields that I created in my posts . I call it this way : wp-json posts .. . .. . How can I make sure the JSON response also contains my Post Custom Fields .. . Answer : Check out this link https : github.com WP-API WP-API issues 433 . Turns out this is a problem at the mo in Wordpress but the link has a suggestion fix amongs others as such : .. . .. . You will however have to go through the full post as the above link s it turns out a lot of people are having this issue but a number of them got the issue resolved with all the suggestions in the post . It also appears this question has been asked before . refer to this http : stackoverflow.com questions 10132685 json-api-to-show-advanced-custom-fields-wordpress question . Comment : Thank you for your comment but I am using Custom Fields on a wordpress post and not Advanced Custom Fields wordpress-plugin . Hence the get field function is undefined in my case . Comment : Just guessing but instead of the get field line try custom get post custom post id and then you should be able to access the custom array eg custom field name .", "Question : null .. . Answer : I have recently started working with WordPress had my first task using JSON API . Now I know that after getting nonce from get nonce method I can create post but it is only possible if I am logged in also as an admin . My question is : How to create post using JSON API when you aren t logged in in the WP Admin Panel I am receiving the data from another server in JSON format and using that I want to create a post but due the nonce factor I can t create post if I am not logged in . Comment : What about XMLRPC Comment : XMLRPC works fine but i am getting data in json format is it appropriate to use XMLRPC when the data you are receiving is in JSON format Comment : Well in my case I hate XMLRPC because most of the site attacks on my sites are made by XMLRPC.. . So if you want to try the JSON API you can install wordpress.org plugins json-rest-api https : wordpress.org plugins json-rest-api .. . first you need to authenticate http : wp-api.org guides authentication.html then you can create the post http : wp-api.org posts create-a-post .. . You can read the post codeable.io community how-to-import-json-into-wordpress https : codeable.io community how-to-import-json-into-wordpress and in the last section they talk about the security nonce", "Question : null .. . Answer : I have had that problem . I am using a plugin known as Top Ten to generate the most viewed posts . However this plugin does not generate the posts the WordPress way and I am unable to retrieve a well formatted JSON output when I access a page with it . This made me decide to have a look at alternatives . I realized I could generate the post links using this plugin . Thus I decided to generate just the links and somehow use these links to generate a JSON response . I looked at JSON API and I found something interesting that one can generate posts using the get posts method . The documentation went further to state that check WP Query documentation for the full list of supported parameters and at WP Query documentation I found something that I could use : post name in String slugs . This caught my attention but I have no idea how to implement this from JSON API . In short what I m looking for is a way to achieve something like this : http : example.org json get posts slugs slug-one slug-two slug-n . Any help will be appreciated . Thanks .", "Question : I am developing IOS app where users will be login into my WordPress site and complete the form and send the data to WordPress Database . Here I am using JSON API for Wordpress to validate users . Is there any plugin which allow me to enter data to WP database directly .. . Answer : You can use the JSON API to add a post to Wordpress . You do have to implement Oauth2 if you want to do so . You could use one of these libraries for that : https : cocoapods.org q oauth .. . .. . See the API documentation for information about posting something : https : developer.wordpress.com docs api", "Question : null .. . Answer : i want to get all posts that contains specific characters using json-api plugin in wordpress i successes to get post where title is equal to string mytitle using this http : mysite json get posts post type my type title mytitle http : mysite json get posts post type my type title mytitle but i want to get all posts that contains mytitle string can any one help", "Question : null .. . Answer : I am very new to wordpress trying to create post with featured image from a separate .Net application using JSon api . Please help with the info about how can I upload image from external source using url and mark as featured image using the api . Thanks. .", "Question : I m trying to create a PhP script that will automatically post an article on my wordpress website I m using the wordpress CMS it s not a wordpress.com website . Here is what I ve done so far : .. . .. . Plugin installations .. . .. . I ve installed and activated the WordPress JSON API and the Basic Auth plugins on my website . Library and code .. . .. . I ve downloaded the WP REST php Library https : github.com Automattic wp-rest-php-lib tree master and I ve uploaded the files in src in the same folder as my script . Here is the code of my php script : .. . .. . And I m getting this error : .. . .. . WP REST Exception Object message : protected HTTP error for request response : .. . .. . I m not sure if the error is coming from me not using the library properly or else . Anyone can help me with this Thanks a lot guys .. . Answer : For those having the same issue it seems that it is the Basic Auth plugin that is not working . For a better working API connect your site with JetPack to Wordpress.com and use their API . Cheers Arthur", "Question : null .. . Answer : I m creating an app using the JSON API plugin in conjunction with this Events Manager Plugin in WordPress and I want to create an event using the create post controller . For example : .. . .. . That s enough to get the event created as a draft but I m not allowed to publish it until I have the location and the date info in the proper format . I found that adding location or date doesn t work . I even tried the custom parameters custom event end date referenced in a previous support question https : wordpress.org support topic create-events-with-api-rest replies 1 but none of that works for me . Comment : location and date are probably going to be meta data to the post object . Depending on the situation it might be easier to POST instead of GET so you can feed it a JSON object instead of a messy string . Comment : Thanks for the quick feedback . I am using the POST method . I don t understand what you mean by feed it a JSON object instead of a mess string . How would I go about doing that", "Question : For some reason out-of-the-box the Wordpress JSON API does not work on Nginx . I have tried several redirect schemes in the nginx conf . The only thing I have gotten to work is json . However this does not work for authentication and registration . As an FYI I am developing a cordova application and attempting to use the WP JSON API for WP backend . Comment : Any thrown errors source codes Comment : I found the answer posted below . Thanks for your question .. . Answer : I found the solution to the problem . Make sure that permalinks are working properly before you assume like I did that it is an issue with the plugin . I was able to correct permalinks for a wordpress site in a subdirectory on an nginx site . This article will help you if you face the same issue here http : lawsonry.com 2013 11 nginx-settings-wordpress-subdirectory-permalink-fix Comment : You never suspect the simplest thing thanks saved me a lot of time", "Question : I m creating an app which has a list with content Images text.. . which is going to come from the Internet my website . I want to be able to update and add edit content easily . I m thinking about using WordPress as the backend and then use a HTML parser such as jSoup to get the text images etc . from the WordPress site and put it into the list wherever I need it in the app . I could easily add update delete content plus it is also accessible in a normal browser . Good idea why why not Anyone ever tried it Possible alternatives Comment : Use the RSS feed and I guess you could do it . But to say it s a good idea.. . probably not .. . Answer : There are plugins available to create a REST API from your WordPress site like this one : https : wordpress.org plugins json-rest-api . I think that might be useful", "Question : null .. . Answer : Hi i am using JSON API and JSON API USER to get content to my App which is connected to my wordpressblog what it does presently is getting recent post and some specific pages but in my website i have membership so that users can view only specific content but i am unable to use the same in my App if restrict some content either all users are unable to see in App or All are able to see . Can someone suggest me a way or a plugin or edit my json to get user to access data based on their subscription user role . Thanks in advance .", "Question : I m working on WordPress json-api plugin . I created my custom controller I want to retrieve posts as Json format my work was as below : .. . .. . My php code is : .. . .. . Json result as below : .. . .. . Why price is set to null what the correct syntax to extract price from custom-fields from posts in WordPress Comment : Please format your code correctly . Comment : Do a print r rows and see what you have inside . From your result post- custom fields- price seems to be null .. . .. . Answer : thank you dears for your quick help i found the solution i had to use : get post meta function to retrieve price so this line : .. . .. . will be as following : .. . .. . thank you", "Question : I would like to make requests to the WordPress API much faster . My API is implemented in a plugin using register rest route to register my routes . However since this is a plugin everything is loaded with it the child-theme and the theme and basically a query to this API is taking half a second because of all this useless parts loaded . Doesn t WordPress API can be used in another way Since most plugin making use of the WP-API doesn t need any other plugins to be loaded even less a theme.. . I don t understand how they could miss that . Is there anyway to do this Comment : the request doesn t do anything what request is that Comment : @brasofilo I have tried to make the question clearer . Basically this is what a call to my API does . Even if it does nothing it takes time anyway since all the theme and other plugins are loaded . .. . Answer : Sorry for my poor english if this is helpful for you . Put the plugin folder in root wordpress install . Or in plugin folder directly access .. . .. . Before check wp-load.php file included properly and working . wp-settings.php file load whole core plugins and themes files . wordpress is load first mu-plugins files wp-content mu-plugins and provide after action-hook muplugins loaded . Trigger this action to exit whole other files loaded . You can also find which action-hook is provide before muplugins loaded and stop other files and script execution . if define constant SHORTINIT before include wp-load.php its includes some files provide DB plugin or basic functions . When we want more load core files and not just want load plugins and theme files in this way found a solution . We check muplugins loaded hook is define wordpress early you can also find which hook is define before muplugins loaded then stop this point to after load more wordpress files . - .. . .. . When you want to test your script open file wp-settings.php and find string muplugins loaded then echo statement to check .", "Question : I would like to make requests to the WordPress API much faster . My API is implemented in a plugin using register rest route to register my routes . However since this is a plugin everything is loaded with it the child-theme and the theme and basically a query to this API is taking half a second because of all this useless parts loaded . Doesn t WordPress API can be used in another way Since most plugin making use of the WP-API doesn t need any other plugins to be loaded even less a theme.. . I don t understand how they could miss that . Is there anyway to do this Comment : the request doesn t do anything what request is that Comment : @brasofilo I have tried to make the question clearer . Basically this is what a call to my API does . Even if it does nothing it takes time anyway since all the theme and other plugins are loaded . .. . Answer : You should give this a try this http : wordpress.stackexchange.com questions 24710 is-it-possible-to-stop-selected-plugins-from-loading-on-certain-template-pages . It is a plug-in that allows you to enable disable certain plug-ins for post-types pages and other circumstances . For the theme part if you wrote it it would be easy to add something in the function.php to prevent it from attaching any hooks or filters in the case of an API request . As a sidenote couldn t you query de DB directly", "Question : I would like to make requests to the WordPress API much faster . My API is implemented in a plugin using register rest route to register my routes . However since this is a plugin everything is loaded with it the child-theme and the theme and basically a query to this API is taking half a second because of all this useless parts loaded . Doesn t WordPress API can be used in another way Since most plugin making use of the WP-API doesn t need any other plugins to be loaded even less a theme.. . I don t understand how they could miss that . Is there anyway to do this Comment : the request doesn t do anything what request is that Comment : @brasofilo I have tried to make the question clearer . Basically this is what a call to my API does . Even if it does nothing it takes time anyway since all the theme and other plugins are loaded . .. . Answer : I think you might be focusing on the wrong issue . Loading php files is not nearly as slow as reading from your db and this is likely to be your 500ms load-time . You should actually look at reducing this anyway cache wp-options etc but what i suggest to you in relation to the api is to cache the output using a mu-plugin . Using exit we can load output from file and serve that instantly . Our Method : 1 . Create a folder called mu-plugins in the wp-content folder may already be there .. . .. . 2 . create a file called api-cache.php .. . .. . 3 . enter this code into your file : .. . .. . function get api cache .. . .. . dont run if we are calling to cache the file see later in the code .. . if isset GET cachecall GET cachecall true .. . return .. . .. . url SERVER REQUEST URI .. . .. . do a little error checking .. . .. . uri explode url .. . .. . we have a array 1st key is blank .. . if uri 1 wp-json uri 2 wp uri 3 v2 .. . return .. . .. . .. . lock down the possible endpoints we dont want idiots playing with this.. . .. . allowed endpoints array .. . posts .. . .. . .. . endpoint array pop uri not sure if this is valid or not is there more structure to some api calls if in array endpoint allowed endpoints .. . return .. . .. . .. . ok reasonably confident its a api call.. . .. . .. . cache folder get stylesheet directory . api cache .. . .. . prob best if not within php server but to get you going .. . if file-exists cache folder .. . mkdir cache folder warning 777 .. . .. . Need to choose a method of control for your cached json files .. . you could clear out the folder on update post taxonomies etc .. . or cron clear out hourly weekly whatever freq you want .. . .. . .. . .. . if file-exists cache folder . endpoint . .json .. . json file-get-contents cache folder . endpoint . .json .. . header Content-Type : application json .. . echo json .. . exit we need nothing else from php exit .. . else .. . make sure there will be no errors etc. . .. . ch curl init .. . url http : SERVER HTTP HOST SERVER REQUEST URI cachecall true .. . timeout 5 .. . curl setopt ch CURLOPT URL url .. . curl setopt ch CURLOPT RETURNTRANSFER 1 .. . curl setopt ch CURLOPT CONNECTTIMEOUT timeout .. . json curl exec ch .. . curl close ch .. . file-put-contents cache folder . endpoint . .json json .. . .. . .. . .. . .. . get api cache .. . .. . .. . Now you should notice a significant difference on your load-time on the 2nd load this first time it is caching the output . A few disclaimers : .. . .. . 1 . you should read the comments in the code .. . 2 . You need curl .. . 3 . You need to be aware the cache folder is 777 I would strongly suggest you move this away from your theme folder and preferably outside your http accessible files . 4 . There were no catch all hooks to capture the data to be cached hence i used curl to grab the content this may change in the future and a hook filter would improve the process time a bit when creating the cache file . 5 . I have not included a method to update cache files . You need to decide on how often you want to update a site that gets lots of posts per day and a lot of visits you might do a cron job to just delete the files e.g . 3 times a day hourly every 10 minutes etc-- what is a reasonable tradeoff in update time or add a hook to save post to only update when your posts change etc. . .. . 6 . add your endpoints to the array for them you can remove the if-statement to allow all endpoints but then you may have a situation where 404s are being cached", "Question : I would like to make requests to the WordPress API much faster . My API is implemented in a plugin using register rest route to register my routes . However since this is a plugin everything is loaded with it the child-theme and the theme and basically a query to this API is taking half a second because of all this useless parts loaded . Doesn t WordPress API can be used in another way Since most plugin making use of the WP-API doesn t need any other plugins to be loaded even less a theme.. . I don t understand how they could miss that . Is there anyway to do this Comment : the request doesn t do anything what request is that Comment : @brasofilo I have tried to make the question clearer . Basically this is what a call to my API does . Even if it does nothing it takes time anyway since all the theme and other plugins are loaded . .. . Answer : Yes it is possible . In one of my plugins where I need the minimal WordPress core DB without plugins themes here is what I do : .. . .. . The PATH TO WORDPRESS constant I made up you just need to point that to the correct path . In plugins for example it might look like : .. . .. . Setting SHORTINIT to true certainly does help performance a bit . With WP DEBUG disabled the time it takes to bootstrap WordPress are as follows : .. . .. . Without SHORTINIT : 0.045 seconds .. . With SHORTINIT : 0.0015 seconds .. . .. . If this is for your own site where you demand performance you can probably increase this a bit by enabling an OpCache e.g . APC or PHP OpCache in recent versions . But I believe the 2 lines-of-code above to define SHORTINIT and require wp-load.php are what you re looking for . To clarify this file is a part of a plugin but it is called independently of WordPress itself via Ajax and directly . It never gets included or used by any other parts of the plugin or WP itself . EDIT : Since the OP is actually concerned with the WP-API not WordPress in general I am adding this to address the actual question . I ll leave the original answer content in case it can help someone else . I did further testing with the WP API and like @David said in his answer the issue is probably something else . I loaded up 12 plugins in addition to the rest api some fairly large plugins and my local install has about 25 themes installed one active of course . I edited WordPress index.php file and used microtime true to record when everything started and then edited one of the REST controllers to calculate how long it took from start to getting to the API endpoint . The result on my system is consistently around 0.0462 - 0.0513 seconds no PHP OpCache and no other system load . So it appears bootstrapping all of WordPress has little impact on performance . If the requests are taking half a second the bottleneck is elsewhere and cutting out plugins and themes is going to have minimal impact . At least this is what I found . Comment : That s a very good trick I actually do some stuff like that and loads wp-load.php to resolve such issues as wp-load.php and where I need callbacks . For my question it s a bit different since I am using WP-API I want to make my API available through the WP-API system . Problem is that WP-API is loading the whole WordPress for every single call . With your solution we are going completely around WP-API : Comment : My bad I had been reading the whispers of WP-API in the past months but haven t looked at it . I ll see if I can take a look at it later and revise my answer . Thanks for clearing it up . Comment : I sometimes use this trick in plugins too . In my case to define PATH TO WORDPRESS I do : define PATH TO WORDPRESS preg-replace wp-content . DIR . Comment : Hey @TigrouMeow I finally had a chance to look at this again . Edited my answer with what I found but basically I don t think loading up all of WP is the bottleneck and cutting out plugins won t really help much . Do you have any further details or the ability to profile the requests to see where the most time is being spent Comment : upvote for the investigation : the wp-query itself wont be very fast and slower on each post that is added but autoloaded wp options can be a huge draw as well . I ve often seen 100+ db queries there is a setting you can enter into wp-config quick guess define SAVEQUERIES true and then you can output all the db queries in a template wpdb- queries", "Question : null .. . Answer : I am developing an Android App that is able to register users on a WordPress website and update their user meta vars by sending http requests GET Method using the JSON API Auth https : wordpress.org plugins json-api-auth and JSON API User https : wordpress.org plugins json-api-user plugins installed on WordPress . The problem is that to register a user I have to : .. . .. . 1- Make a request to get the nonce id : DomainName api get nonce controller user method register this will return a json with nonce id . 2- Another request to register a user : DomainName api user register username john email john@domain.com nonce TheIdFromPreviousRequest display name John . Till now a user is registered . Now I want to update his user meta vars .. . .. . 3- A request for updating user meta using the cookie from registration http-request : DomainName api user update user meta vars cookie COOKIE-HERE website user-website.com city Chicago country USA skills php css js web .. . .. . Now as you see each request is dependent on values in the previous request the way I am doing this is to make 3 AsyncTasks the first will make a request and when it gets response the other will start with data from response . The AsyncTask I am using is this taken from HERE http : stackoverflow.com questions 3505930 make-an-http-request-with-android : .. . .. . My question is : what is the best way to do this is there any way to do it using a php file that will handle all the requests or is there any class or function in Android to do this the correct way or my way is the only solution Note : The user meta vars I am updating are custom-fields added by me and can t be filled with data when requesting a registration . Thank you all", "Question : I am new to PHP and I am working on wordpress JSON api . I want to remove Key : value pair inside a JSON array . Please help .. . .. . For example I want to remove slug : head-ache from post and post count : 0 from categories and next-url . Please help . UPDATE : : .. . .. . I have added the code in core.php and its not working . Can you please help me out . .. . .. . Comment : Convert json to array remove keys and then convert back to json . Comment : Possible duplicate of stackoverflow.com questions 7511821 http : stackoverflow.com questions 7511821 how-to-convert-json-string-to-array Comment : Try this : stackoverflow.com questions 2901562 http : stackoverflow.com questions 2901562 json-search-and-remove-in-php .. . Answer : You need to parse it to ordinary array then remove what you want and encode it back to json :" ] }
[ "yes-answer-long", "yes-answer-short" ]
wordpress
UNK_RELATION
secretary@clojurescript@39
secretary -- a client-side router for @placeholder .
{ "confidence": [ 31.049911499023438, 29.66339874267578, 24.800222396850586, 24.77446746826172, 24.77446746826172, 24.77446746826172, 24.183025360107422, 23.387954711914062, 23.387954711914062, 23.387954711914062, 23.35122299194336, 19.18995475769043, 18.639930725097656, 16.436508178710938, 13.724177360534668, 13.724177360534668, 13.724177360534668, 13.724177360534668, 13.724177360534668, 13.724177360534668, 13.724177360534668, 13.724177360534668, 13.724177360534668, 13.724177360534668, 13.724177360534668, 13.724177360534668, 13.724177360534668, 13.724177360534668, 13.724177360534668, 13.724177360534668, 13.724177360534668, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012, 12.337664604187012 ], "content": [ "I m using secretary and reagent .", "secretary defroute session put", "It sounds like your answer is along the right lines as far as compojure secretary being the one to handle things but I don t know how to get compojure to behave with secretary any other thoughts", "Can Secretary dispatch routes based on a submitted browser url the way many javascript routing frameworks work", "http : squirrel.pl blog 2014 05 01 navigation-and-routing-with-om-and-secretary .. . .. . it work fine", "I don t need to use secretary for this anything that works to parse the query-parameters would be ok for me .", "router also fired .", "I am using cljs-http.client that returns a channel .. . Define routes using the secretary library .", "The reason it currently works when clicking on a page link in your SPA is that it will get handled by secretary .", "I d try using a url prefix with secretary first to ensure everything else is proper .", "For example when you enter http : myapp.com my route in the browser s url I d like that to dispatch as though I had programatically entered secretary dispatch", "Here s the pertinent code : .. . .. . Client Side : .. . .. . Server Side : .. . .. . So the following link takes me to my-page and the console prints Hi asdf just fine : .. . .. . But if I type in http : localhost : 3449 sectest asdf I get an error and I can t seem to trace it .", "Note I m using Reagent Secretary and Compojure among others .. . .. . I want to create a route sectest : id and if I point my browser to that route I get the following error : .. . .. . Resource interpreted as Stylesheet but transferred with MIME type text html : http : localhost : 3449 sectest css site.css .", "Take a look at your server-side routing effectively you only have one route : .. . .. . As it handles everything all following routes will never trigger .", "I can t seem to find any examples of wiring this up .", "my route in the repl .", "It can but not by itself .", "The most common way of doing this is with Google Closure as in the README.md example : .. . .. . When you call setEnabled in the example above the NAVIGATE event will automatically fire for the current location which will cause dispatch to be invoked .", "I m new in clojure when i flow the turial .", "Then i make some change just add some app-state .", "Here is my code .", "part1 .. . .. . part 2 .. . .. . part3 .. . .. . The result is : 1 .", "first time i Fresh the page it works fine .", "refresh-navigation log nav-- twice 2 .", "but when i click nav-item the location is change .", "but no nav-- log output .", "Thanks for your help", "This is my code : .. . .. . Disregarding the : prefix value I tried and also not setting the : prefix at all this code only works with routes like : .. . .. . But it doesn t work with routes like : .. . .. . What I m actually trying to achieve is to parse the login failure from friend https : github.com cemerick friend which in case of failure redirects me to .. . .. . and display login failed message to the user .", "The hard way would be to parse the query-string which I can get with : .. . .. . I believe that this is already done well in some library .", "I found it .", "Using https : github.com cemerick url works for both clojure and clojurescript one can do :", "I am trying to make a Clojurescript app that shows recipes .", "Relevant code follows also available as a gist https : gist.github.com borkdude 257b6792b62a18e034a3 : .. . .. . What I want to accomplish : .. . .. . First fetch the recipes using an async http call .", "In the random route I want to select a random recipe .", "This can only happen when the data has been fetched and has been updated in the application atom .", "What I get now is an infinite-loop in the browser .", "What s happening", "Another option is wrapping all my routes who need data fetching first in a go block and put", "load-recipes on the first line .", "PS : I ended up with", "Using a loop construct without any parking channel operations inside it to wait is pretty much entirely contrary to the spirit of core.async .", "Keep in mind that JavaScript is single-threaded so if you don t park a thread of execution there s no opportunity for anything else to run .", "Have a channel that you close when the loading operation is complete .", "Try to read from that channel when you need to block if it returns nil it s done and if it blocks then you have the desired operation of waiting .", "If you want to periodically do something while waiting then read from both that channel and a timeout .", "Thanks that makes a lot of sense .", "I posted my updated code .", "Please comment if it can be improved .", "asdf : 1 Refused to execute script from http : localhost : 3449 sectest js app.js because its MIME type text html is not executable and strict MIME type checking is enabled .", ".. . .. . But if I click on a link in the browser that navigates to that route it works fine.. .", "I suspect it might have something to do with the code trying to find resources located at sectest which it shouldn t but I can t confirm this or figure out how to work with it.. .", "I am new to clojure so forgive if I m massively ignorant on some point any thoughts", "Order matters : .. . .. . The above should do the trick I removed the 404 route as this should be handled by the frontend routing .", "If you enter the url manually you are doing a page reload and the request is handled by compojure initially .", "Edit : .. . .. . After taking a closer look relative links to your css js files in your html template are most likely the culprit here : .. . .. . The compojure resources route won t match and the default catch all route loading-page is served as css js file to your browser .", "Hence the error .", "For my dev env I also had to correct the : asset-path of my boot cljs task as the source mapping files suffered from the problem .", "Should be similiar with lein-figwheel .", "Hm I tried it out exactly as you say and unfortunately I get the same behavior and the same error listed in the beginning of the question.. .", "Can t really think of anything else besides your code changes not being active for some reason .", "I ll try this and I was just about to write back the following : Here s a case where I get the same error and I d think it should work : GET : id id id .", "If I navigate to hello the browser shows hello .", "If I nav to hello world I get the error that I show in the beginning .", "Related", "Using URL prefixes didn t change anything I still can t figure this out though", "I just had a weird bug where I made a route defn catchall-page : p Hola", ": current-page catchall-page and if I navigate to some random route The browser shows Hola", "but then when I click anywhere I m sent back to the main page defined at route but the URL in the browser stays the same ie some random route .. . Am I crazy", "Regarding GET : id id id this will only match some string until the next so the behaviour you are seeing is correct and not related .", "Made me actually try out some things though and turns out my little pet spa project suffered from the same problem .", "Updated the answer .", ":" ] }
{ "confidence": [ 34.301509857177734, 31.138301849365234, 30.58156967163086, 29.70328140258789, 21.23555564880371 ], "content": [ "Question : null .. . Answer : I m new in clojure when i flow the turial . http : squirrel.pl blog 2014 05 01 navigation-and-routing-with-om-and-secretary .. . .. . it work fine Then i make some change just add some app-state . Here is my code . part1 .. . .. . part 2 .. . .. . part3 .. . .. . The result is : 1 . first time i Fresh the page it works fine . refresh-navigation log nav-- twice 2 . but when i click nav-item the location is change . router also fired . but no nav-- log output . Thanks for your help", "Question : Note I m using Reagent Secretary and Compojure among others .. . .. . I want to create a route sectest : id and if I point my browser to that route I get the following error : .. . .. . Resource interpreted as Stylesheet but transferred with MIME type text html : http : localhost : 3449 sectest css site.css . asdf : 1 Refused to execute script from http : localhost : 3449 sectest js app.js because its MIME type text html is not executable and strict MIME type checking is enabled . .. . .. . But if I click on a link in the browser that navigates to that route it works fine.. . Here s the pertinent code : .. . .. . Client Side : .. . .. . Server Side : .. . .. . So the following link takes me to my-page and the console prints Hi asdf just fine : .. . .. . But if I type in http : localhost : 3449 sectest asdf I get an error and I can t seem to trace it . I suspect it might have something to do with the code trying to find resources located at sectest which it shouldn t but I can t confirm this or figure out how to work with it.. . I am new to clojure so forgive if I m massively ignorant on some point any thoughts .. . Answer : Take a look at your server-side routing effectively you only have one route : .. . .. . As it handles everything all following routes will never trigger . Order matters : .. . .. . The above should do the trick I removed the 404 route as this should be handled by the frontend routing . The reason it currently works when clicking on a page link in your SPA is that it will get handled by secretary . If you enter the url manually you are doing a page reload and the request is handled by compojure initially . Edit : .. . .. . After taking a closer look relative links to your css js files in your html template are most likely the culprit here : .. . .. . The compojure resources route won t match and the default catch all route loading-page is served as css js file to your browser . Hence the error . For my dev env I also had to correct the : asset-path of my boot cljs task as the source mapping files suffered from the problem . Should be similiar with lein-figwheel . Comment : Hm I tried it out exactly as you say and unfortunately I get the same behavior and the same error listed in the beginning of the question.. . It sounds like your answer is along the right lines as far as compojure secretary being the one to handle things but I don t know how to get compojure to behave with secretary any other thoughts Comment : I d try using a url prefix with secretary first to ensure everything else is proper . Can t really think of anything else besides your code changes not being active for some reason . Comment : I ll try this and I was just about to write back the following : Here s a case where I get the same error and I d think it should work : GET : id id id . If I navigate to hello the browser shows hello . If I nav to hello world I get the error that I show in the beginning . Related Comment : Using URL prefixes didn t change anything I still can t figure this out though I just had a weird bug where I made a route defn catchall-page : p Hola secretary defroute session put : current-page catchall-page and if I navigate to some random route The browser shows Hola but then when I click anywhere I m sent back to the main page defined at route but the URL in the browser stays the same ie some random route .. . Am I crazy Comment : Regarding GET : id id id this will only match some string until the next so the behaviour you are seeing is correct and not related . Made me actually try out some things though and turns out my little pet spa project suffered from the same problem . Updated the answer . :", "Question : Can Secretary dispatch routes based on a submitted browser url the way many javascript routing frameworks work I can t seem to find any examples of wiring this up . For example when you enter http : myapp.com my route in the browser s url I d like that to dispatch as though I had programatically entered secretary dispatch my route in the repl . .. . Answer : It can but not by itself . The most common way of doing this is with Google Closure as in the README.md example : .. . .. . When you call setEnabled in the example above the NAVIGATE event will automatically fire for the current location which will cause dispatch to be invoked .", "Question : I m using secretary and reagent . This is my code : .. . .. . Disregarding the : prefix value I tried and also not setting the : prefix at all this code only works with routes like : .. . .. . But it doesn t work with routes like : .. . .. . What I m actually trying to achieve is to parse the login failure from friend https : github.com cemerick friend which in case of failure redirects me to .. . .. . and display login failed message to the user . I don t need to use secretary for this anything that works to parse the query-parameters would be ok for me . The hard way would be to parse the query-string which I can get with : .. . .. . I believe that this is already done well in some library . .. . Answer : I found it . Using https : github.com cemerick url works for both clojure and clojurescript one can do :", "Question : I am trying to make a Clojurescript app that shows recipes . Relevant code follows also available as a gist https : gist.github.com borkdude 257b6792b62a18e034a3 : .. . .. . What I want to accomplish : .. . .. . First fetch the recipes using an async http call . I am using cljs-http.client that returns a channel .. . Define routes using the secretary library . In the random route I want to select a random recipe . This can only happen when the data has been fetched and has been updated in the application atom . What I get now is an infinite-loop in the browser . What s happening Another option is wrapping all my routes who need data fetching first in a go block and put load-recipes on the first line . PS : I ended up with .. . Answer : Using a loop construct without any parking channel operations inside it to wait is pretty much entirely contrary to the spirit of core.async . Keep in mind that JavaScript is single-threaded so if you don t park a thread of execution there s no opportunity for anything else to run . Have a channel that you close when the loading operation is complete . Try to read from that channel when you need to block if it returns nil it s done and if it blocks then you have the desired operation of waiting . If you want to periodically do something while waiting then read from both that channel and a timeout . Comment : Thanks that makes a lot of sense . I posted my updated code . Please comment if it can be improved ." ] }
[ "yes-answer-long", "yes-answer-short" ]
clojurescript
UNK_RELATION
dev-c++@ide@61
dev-c + + -- a free open-source portable and extensible c c++ @placeholder .
{ "confidence": [ 38.258522033691406, 36.63663864135742, 36.60826110839844, 35.601051330566406, 35.601051330566406, 35.601051330566406, 34.57041931152344, 34.57041931152344, 34.313926696777344, 34.313926696777344, 34.209800720214844, 34.209800720214844, 34.209800720214844, 34.209800720214844, 34.209800720214844, 34.209800720214844, 33.894893646240234, 33.33517837524414, 33.179168701171875, 32.71775436401367, 32.56901550292969, 32.341346740722656, 32.341346740722656, 32.341346740722656, 32.341346740722656, 32.341346740722656, 32.341346740722656, 32.341346740722656, 32.12872314453125, 31.310710906982422, 31.310710906982422, 31.310710906982422, 31.164207458496094, 31.164207458496094, 30.981117248535156, 30.981117248535156, 30.548494338989258, 30.075469970703125, 30.075469970703125, 30.075469970703125, 30.075469970703125, 30.075469970703125, 30.075469970703125, 30.075469970703125, 29.950485229492188, 29.86527442932129, 29.810413360595703, 29.810413360595703, 29.810413360595703, 29.810413360595703, 29.810413360595703, 29.810413360595703, 29.810413360595703, 29.810413360595703, 29.810413360595703, 29.517860412597656, 28.992053985595703, 28.93821907043457, 28.779781341552734, 28.779781341552734, 28.779781341552734, 28.779781341552734, 28.779781341552734, 28.779781341552734, 28.779781341552734, 28.71524429321289, 28.71524429321289, 28.471641540527344, 28.471641540527344, 28.471641540527344, 28.464252471923828, 28.362646102905273, 28.362646102905273, 27.992694854736328, 27.96122169494629, 27.77823257446289, 27.756813049316406, 27.570940017700195, 27.570940017700195, 27.544540405273438, 27.544540405273438, 27.544540405273438, 27.544540405273438, 27.544540405273438, 27.544540405273438, 27.06073760986328, 26.86681365966797, 26.672344207763672, 26.610153198242188, 26.610153198242188, 26.610153198242188, 26.542991638183594, 26.401262283325195, 26.401262283325195, 26.401262283325195, 26.401262283325195, 26.401262283325195, 26.401262283325195, 26.401262283325195 ], "content": [ "I am looking for something like c-free dev-c++ etc .", "Its path is C : Dev-C++ MinGW64 bin .", "And Dev-C++ is just the C C++ editor I m working in .", "Dev C++ is that way .", "It was math.h is not found in DEV C++", "Using the dev-c++ compiler .", "Dev C++ is not a compiler .", "Dev C++ is an IDE .", "I recently started learning C . I started by installing Dev-C++ .", "I just installed Dev C++ and I am learning C programming .", "I am working on Dev C++ .", "PS : Don t use Dev-C++ .", "I simply installed Dev-C++ .", "I use dev-c++ 5.11", "Install new version of Dev c++ .", "Whet Dev-C++ are you using", "Try to update Dev-C++ and then restart it and see if that works .", "dev-c++ 4.9.9.2", "I have installed Dev C++ .", "I am using Dev C++ https : en.wikipedia.org wiki Dev-C 2B 2B for programming and I can create a new file but not a project .", "Here are my exact steps for my example I m trying to get mysql.h to work : .. . .. . 1 . copy mysql.h into c : dev-c++ includes .. . 2 . check that in dev-C++ tools compiler-options directories c includes and c++ includes have the path to c : dev-c++ includes .. . 3 . include include at the top of my file .. . 4 . compiled .. . .. . This is what the dev-C++ compiler told me : .. . .. . As well as other errors due to not locating the header file .. . .. . Are the steps I ve outlined correct", "I have also tried it in Dev-C++ with no luck .", "There is just one single setup for Dev-C++ .", "I think you re using Orwell Dev-C++ .", "How can I run them in dev C++ .", "Then point Dev-C++ to the custom makefile below .", "I would like to stick with Dev-c++ if possible .", "Don t use Dev-C++ it s highly outdated .", "That s because Turbo C++ is ancient and never was capable to produce portable C++ programs .", "I m starting to use allegro on Dev-C++ .", "It depends on where you installed your dev-c++ .", "Note that the compiler is actually MinGW not Dev-C++ .", "Dev C in Windows 8 : gcc Internal Error http : stackoverflow.com questions 12811762 dev-c-in-windows-8-gcc-internal-error", "Bloodshed Dev-C++ is somewhat out-of-date and largely obsolete and no longer supported the derivative Orwell Dev-C++ was supported but has not received an update for over a year .", "@sowmithreddy Related : stackoverflow.com questions 27620580 http : stackoverflow.com questions 27620580 how-to-install-a-c-library-on-windows-for-dev-c", "Moreover The console API supplied with Dev-C++ was itself a clone of a largely obsolete Borlanc C API .", "But then I run it and this error pops up .. . .. . When I use Dev-C++ to compile and run the same source file there are no issues .", "thanks so much for updating the Dev-c++ .", "I have Bloodshed Dev C++ 4.9.9.2 .", "Note that Dev-C++ is extremely out of date .", "The latest version of Dev-C++ was released in 2005 .", "I am using Dev C++ as my IDE .", "Unfortunately Dev C++ has stopped compiling .", "I am using Dev c++ with graphics .", "I m just learning to program Windows Programs in C++ and use the Dev-C++ IDE .", "If it s a .c file then your compiler may be interpreting it as C and not C++ .", "actually i was usig dev-c++ before and this wasnt showing .", "ditch dev-c++ which is horrible IDE and move to visual-studio", "I m learning Cpp programming and I m using Dev-C++ as compiler .", "When I compile in Dev-C++ and run in Command prompt then no issues .", "and I think Dev-c++ also uses minGW as a compiler .", "@ryyker There is a bin directory inside the installed folder for dev-c++ .", "There are a number of better IDEs out there since the dark days of Bloodshed Dev-C++ .", "C : Program Files x86 Dev-Cpp MinGW64 bin .. . .. . 5 .", "Must be a limitation of dev-c++ support for long-long datatype .", "From where does DEV C++ compiler includes header-files in the source code like stdio.h file.h time.h", "C uses the .c file extension .", "I am somewhat between beginner and intermediately well-versed in c++ and I managed to write a basic login program in c++ using Dev C++ Windows 7 .", "So I found some tutorials on how to configure gtk to dev-c++ .", "Not directly related to your question but Dev-C++ is really outdated .", "I am using DEV-C++ 5.11 on Windows 10 .", "Dev-C++ s debugger is notoriously bad even non-existent .", "I have added path of bin folder in dev-c++ to environment-variables .", "After adding Dev C++ path to PATH variables it worked for me .", "I have an dev-c++ Application which makes an Screenshot and writes it into an File .", "I knew a little of C from High School when we were programming it in Dev C++ program .", "I am a teacher s assistant for a C programming class and the instructor uses Dev C++ as the compiler for the class .", "I m not using bloodshed dev-c++ instead I m using orwell dev-c++ I got Allegro 5 and installed the package as a .zip file but it says allegro5 allegro.h : No such file or directory .", "I ve seen projects that are supposedly keeping it going but perhaps read Why You Shouldn t Use Dev C++ http : clicktobegin.net programming why-you-shouldnt-use-dev-c .", "Windows 7 .. . .. . If you click save all files button then close and delete the makefile and others except the .cpp .dev .c then reopen using either .dev or .cpp or .c and then run it works .", "Also is this C or C++", "Possible Duplicate : .. . long-long in C C++ http : stackoverflow.com questions 1458923 long-long-in-c-c .. . .. . Writing a simple program for a project Euler problem .", "Possible duplicate of : stackoverflow.com questions 1458923 long-long-in-c-c http : stackoverflow.com questions 1458923 long-long-in-c-c", "Install C C++ compiler for example GCC .", "It s possible to force the compiler to treat either such extension as the other but by default .c files are for C and .cpp files are compiled as C++ .", "Well I ve been using Dev-C++ for a while for learning the language c++ and some stuff wouldn t work properly like global and local-variables .", "This is for c++ CLI aka .NET c++", "Since the code is being compiled using C++ please remove the c tag .", "You can ignore the C C++ options if you use a custom makefile .", "In dev C++ I remove s from strcat and scanf and it works perfect .", "have you added your headers folder to dev-c", "We are using Blodshed Dev-C++ to in an image-processing project .", "How to compile 64-bit binary with Dev-C++ MinGW", "Please note that I m using Dev-C++ on Windows XP SP3 .. . .. . Thanks", "I am using Dev-C++ as my IDE and the library OpenCV .", "But with Dev-C++ I could just open it up control+n and write the program quickly compile and it d show up no need for a project file .", "C : pcre lib", "I installed the latest Dev-C++ 5.4.2 but still get unrecognized command-line option -std c++0x errors when I try to enable c++11 .", "An easy way to convince AVG that your C++ program is safe is to add the c++ statement : system pause in the beginning of your C++ program and recompiling and re-running .", "Well the code you re showing is C++ not C so I m guessing you re trying to compile them as C and that s why it fails .", "If you are your code is C++ not C . So if you are trying to make a C game than you should change your code .", "The default setting that Orwell Dev-C++ uses don t pass any -std option will not enable some shiny new C++11 functions like unique-ptr .", "@B a ejMichalik I agree that the compiler used by Dev-C++ is outdated but at the very least it was 1998 standard or close to it .", "It was originally made using an older version of dev-c++ probably a few years back .", "I am using dev-c++ 5.11 and using the TDM-GCC 4.9.2 32-bit compiler .", "When I run g++ --version I get GCC 4.9.2 It s the same one as used by dev-c++ .", "Also Dev-C++ is not a compiler it is an IDE and compilers don t run code they just compile it .", "I highly recommand you use either CodeBlocks or Eclipce rather than Dev-C++ .", "But after many configurations in dev-c++ i simply can t get rid of this error ." ] }
{ "confidence": [ 33.378021240234375, 32.47210693359375, 32.11177062988281, 31.870786666870117, 31.531599044799805, 31.473466873168945, 31.436052322387695, 31.34756851196289, 31.001819610595703, 30.9444580078125, 30.876850128173828, 30.876850128173828, 30.83465576171875, 30.26154327392578, 30.26154327392578, 30.26154327392578, 29.86623764038086, 29.736888885498047, 29.499069213867188, 29.42876434326172 ], "content": [ "Question : I have a folder that contains a few .h and .cpp files along with a makefile . How can I run them in dev C++ . I have just started using dev C++ hence a bit clueless about this . the make file is .. . .. . and I m getting the error main.cpp hog.cpp : no such file or directory . .. . Answer : Create a new project using File New Project . You can ignore the C C++ options if you use a custom makefile . Also an empty project will do . Add the source and header-files to the new project using Project Add to Project or the + sign in the middle of the top toolbar . Go to Project Project Options Alt+P Makefile and tick the Use custom makefile option . Then point Dev-C++ to the custom makefile below . Also be sure to update your IDE to the following version which fixes an immense list of bugs compared to the ancient 4.9.9.2 version ships with GCC 4.6.1 or 4.7.0 and is fully portable : http : sourceforge.net projects orwelldevcpp Comment : I am getting an error as I have edited in my question Comment : @MasterWayne : eh are you sure these files are put right next to the makefile If not please specify a relative-path when you invoke gcc or g++ . Comment : yes the makefile is in the same folder as those files . What else could be wrong Comment : @MasterWayne : try adding the -c flag before supplying the source files to GCC G++ . Comment : ok thanks..its working now", "Question : I just installed Dev C++ and I am learning C programming . the code i used was .. . .. . I saved it as a .c file . When I compile it works fine but when I compile and run it says source file not compiled . So I googled buncha things and came across this video on youtube which shows you how to fix it . I also saw other forums on google which suggest the same thing.. . However after doing whats asked Now I can t even compile my code . I get this error .. . .. . I have also used what is asked on this link and still no luck. . http : learntogeek.com miscellaneous solved-source-file-not-compiled-error-in-dev-cpp .. . .. . I am using windows-8 Comment : Does your source file actually include those quotation marks Comment : I cannot piece together enough concrete details from this . Please use full sentences with full words capital letters verbatim code.. . Your code and compilation commands are all about C but you tagged the question C++ . What is going on here Comment : Duplicate Dev C in Windows 8 : gcc Internal Error http : stackoverflow.com questions 12811762 dev-c-in-windows-8-gcc-internal-error Comment : Can you try to do it manually and tell me what the error is gcc -o hello hello.c or whatever your file is named .. . Answer : This error occurred because your settings are not correct . For example I receive .. . .. . .. . cannot open output file Project1.exe : Permission denied .. . collect2.exe : error : ld returned 1 exit status .. . .. . mingw32-make.exe : Project1.exe Error 1 .. . .. . .. . Because I have no permission to write on my exe file .", "Question : I am a teacher s assistant for a C programming class and the instructor uses Dev C++ as the compiler for the class . Personally I would use a different one but the choice is not mine here . Recently I installed the Windows 8 Professional 64 bit that is available on Dreamspark though my university so I can start with some metro app development for some contests . Unfortunately Dev C++ has stopped compiling . It previously worked fine with Windows 7 64 bit . I get an error when compiling that reports back : .. . .. . It says the compilation is successful but it is not so no executable is made . I want to know if anyone has any ideas of what might get Dev C++ to work on this version of Windows so I don t have to run Dev C++ in a virtual-machine I need it working so I can do class demonstrations . Comment : Is it just this one program counter.c or does it happen with any input Comment : It is with every file I attempt to compile . Even a simple helloWorld.c file . Comment : Unfortunately this is going to be a tough one . I m going to assume you re using the MinGW GCC installation that comes with Dev C++.. . it is pretty damn old . If you are desperate you could try hooking in a newer MinGW such as the TDM-GCC builds but I have my doubts as to how well Dev-C++ will handle this . Comment : Does Wwindows 8 have a compatibility function like XP mode Comment : It is the MinGW GCC install and the version he uses was copyrighted in 1991 . I will see if I can figure out how to get it to use a newer compiler version . I wonder what the differences is between running it on this new Windows vs Windows 7.. . .. . Answer : Please tell your teacher to update Dev-C++ instead : .. . .. . http : sourceforge.net projects orwelldevcpp source directory .. . .. . This one ships with a working MinGW 4.7 or a TDM-GCC 4.6.1 x64 compiler fixes endless amounts of bugs and is also portable . Comment : I felt inclined to flag this as advertisement but instead I upvoted : - .", "Question : null .. . Answer : I recently started learning C . I started by installing Dev-C++ . It is working perfectly fine compiles the source-code file and runs it with no issues . However when I compile and run the program both in cmd in Windows I get an error . When I compile in Dev-C++ and run in Command prompt then no issues . Here s what I am doing- Create a source file simple hello world and then compile it in cmd . gcc helloworld.c -o helloworld .. . .. . And it compiles just fine . But then I run it and this error pops up .. . .. . When I use Dev-C++ to compile and run the same source file there are no issues . and I think Dev-c++ also uses minGW as a compiler . So not sure why it messes up using command-prompt . I am using 32-bit windows-7 .. . Dev-C++ is latest although it seems the latest is 2015 version .. . .. . One more information which I am not sure is relevant or not is that I didn t install MinGW separately . I simply installed Dev-C++ . I did however added the path of bin folder that s inside MinGW in my System Variables . Please help . I could code through Dev-C++ directly but I want to know why I can t do it through command-prompt . Sorry if the questions are too silly . I have just started learning . Thanks in advance Vivid Comment : The conflict could be in the path you added . Is there a default bin directory that was installed with your environment i.e . installation of MinGW Comment : @ryyker There is a bin directory inside the installed folder for dev-c++ . Its path is C : Dev-C++ MinGW64 bin . I added this same path . EDIT : it says MingGW64 and my computer is 32-bit . could that be an issue Comment : If your OS is 32-bit I am surprised an installer would put something in a . . MinGW64 . . directory . And yes that could be a problem . Comment : Exactly . I am surprised too . But there is no separate installment for 32-bit . There is just one single setup for Dev-C++ . It s supposed to work on both 32 and 64 bit . Comment : sorry to hear of this issue - I teach students C and encourage them to install IDE compiler to work at home... . the students find that Pelles C is really simple to install and use smorgasbordet.com pellesc http : www.smorgasbordet.com pellesc so I wonder if you might want to try that instead -- sorry this is not the answer you want but it could be much easier to install something else rather than fight to try and solve this issue because as I see it your main goal is to be able to program in C", "Question : I just installed Dev C++ and I am learning C programming . the code i used was .. . .. . I saved it as a .c file . When I compile it works fine but when I compile and run it says source file not compiled . So I googled buncha things and came across this video on youtube which shows you how to fix it . I also saw other forums on google which suggest the same thing.. . However after doing whats asked Now I can t even compile my code . I get this error .. . .. . I have also used what is asked on this link and still no luck. . http : learntogeek.com miscellaneous solved-source-file-not-compiled-error-in-dev-cpp .. . .. . I am using windows-8 Comment : Does your source file actually include those quotation marks Comment : I cannot piece together enough concrete details from this . Please use full sentences with full words capital letters verbatim code.. . Your code and compilation commands are all about C but you tagged the question C++ . What is going on here Comment : Duplicate Dev C in Windows 8 : gcc Internal Error http : stackoverflow.com questions 12811762 dev-c-in-windows-8-gcc-internal-error Comment : Can you try to do it manually and tell me what the error is gcc -o hello hello.c or whatever your file is named .. . Answer : I guess you re using windows-7 with the Orwell Dev CPP http : sourceforge.net projects orwelldevcpp .. . .. . This version of Dev CPP is good for windows-8 only . However on Windows 7 you need the older version of it which is devcpp-4.9.9.2 setup.exe http : sourceforge.net projects dev-cpp files Binaries Dev-C++ 204.9.9.2 Download it from the link and use it . Don t forget to uninstall any other version already installed on your pc Also note that the older version does not work with windows-8 .", "Question : I m learning C Language in Dev cpp at school and I d like to do this tutorial http : www.kathekonta.com rlguide article1.html but I need to use the library Console.h . There s a source file with all the files needed but I don t know how to add the library to Dev cpp . I already followed some guides but none of them worked . Could someone help me on how to do it and explain so I won t need to ask again if I need to add another library Comment : And what does this have to do with C++ I don t see it anywhere . Comment : Console.h is a header file it is not a library . You should ask your instructor for advice with this problem . Comment : Whet Dev-C++ are you using Bloodshed Dev-C++ is somewhat out-of-date and largely obsolete and no longer supported the derivative Orwell Dev-C++ was supported but has not received an update for over a year . Moreover The console API supplied with Dev-C++ was itself a clone of a largely obsolete Borlanc C API . .. . Answer : console.h is not a library it is a header file . As I recall Dev-C++ was distributed with two files console.h and console.c or possibly console.cpp - you will need to add the .c .cpp file to your project and compile and link that along with your code .", "Question : For example this program runs fine in turbo but doesn t run in DEV compiler . please explain me why . I m using windows-xp . but in my university they have windows-8 only . and they have dev compiler only . Comment : That s because Turbo C++ is ancient and never was capable to produce portable C++ programs . Comment : If you remove include conio.h this should compile with a standard compliant compiler since compilers don t generally give errors for coding-style . You don t seem to be using anything that might come from that header anyway . Comment : goto a goto b My eyes my eyes.. . Comment : include conio.h isn t portable Comment : @B a ejMichalik I agree that the compiler used by Dev-C++ is outdated but at the very least it was 1998 standard or close to it . The IDE that s a different story as it was buggy . However usage of Turbo C++ in this day and age is a joke being played by whatever school the OP is enrolled in . .. . Answer : The console window is closing before you can see any output . Add this line as the last line of the program : .. . .. . Compile and run the program then press Enter when you are ready to close the console . Comment : thanks a lot yea it s running now . : D Comment : in fact there s still that conio.h . ..and it s running fine with that too. . Comment : That s because you do have a library header of that name but don t use any of its functions . Comment : ot s functions means Comment : I was editing my typing is terriiblle .", "Question : I just installed Dev C++ and I am learning C programming . the code i used was .. . .. . I saved it as a .c file . When I compile it works fine but when I compile and run it says source file not compiled . So I googled buncha things and came across this video on youtube which shows you how to fix it . I also saw other forums on google which suggest the same thing.. . However after doing whats asked Now I can t even compile my code . I get this error .. . .. . I have also used what is asked on this link and still no luck. . http : learntogeek.com miscellaneous solved-source-file-not-compiled-error-in-dev-cpp .. . .. . I am using windows-8 Comment : Does your source file actually include those quotation marks Comment : I cannot piece together enough concrete details from this . Please use full sentences with full words capital letters verbatim code.. . Your code and compilation commands are all about C but you tagged the question C++ . What is going on here Comment : Duplicate Dev C in Windows 8 : gcc Internal Error http : stackoverflow.com questions 12811762 dev-c-in-windows-8-gcc-internal-error Comment : Can you try to do it manually and tell me what the error is gcc -o hello hello.c or whatever your file is named .. . Answer : Install new version of Dev c++ . It works fine in Windows 8 . It also supports 64 bit version . Download link is http : sourceforge.net projects orwelldevcpp . Comment : There are a number of better IDEs out there since the dark days of Bloodshed Dev-C++ . Qt Creator even for non-Qt projects is at the top of my list followed by a good text-editor + commandline .", "Question : Well I ve been using Dev-C++ for a while for learning the language c++ and some stuff wouldn t work properly like global and local-variables . Then I decided to download Microsoft Visual C++ to see how it compared and it was absolutely great especially with its aesthetics . One thing that has bothered me though is that since I need to make lots of small source files to test out things I ve learned I have to make a large project file each and every time which take up 18mb of space . I have tried to just make a source C++ file but it never works since the compile and run buttons don t highlight without a project file and pressing f5 yields no result as well . But with Dev-C++ I could just open it up control+n and write the program quickly compile and it d show up no need for a project file . So is there a way to to compile single-source files in Microsoft Visual C++ without needing to make a project file to include it in Comment : Not easily . The IDEs are probably a bit heavy for your needs . For single-source files you can even just use a syntax-highlighting indenting code editor like Notepad++ and a command-line compiler . The IDEs are probably too much for this until you get into multi-source file projects . Comment : possible duplicate of Running small C++ programs in Visual Studio without creating projects http : stackoverflow.com questions 880803 running-small-c-programs-in-visual-studio-without-creating-projects Comment : Whoops didn t notice that Michael . Thanks for the heads up it seems to answer my question . .. . Answer : I typically make one project for temporary work and just re-use it . If you have a really desperate need to keep around your learning files then just make one project add new source files and exclude all the old ones from the build . There s no need to make a new project for every temporary or learning project .", "Question : Well I ve been using Dev-C++ for a while for learning the language c++ and some stuff wouldn t work properly like global and local-variables . Then I decided to download Microsoft Visual C++ to see how it compared and it was absolutely great especially with its aesthetics . One thing that has bothered me though is that since I need to make lots of small source files to test out things I ve learned I have to make a large project file each and every time which take up 18mb of space . I have tried to just make a source C++ file but it never works since the compile and run buttons don t highlight without a project file and pressing f5 yields no result as well . But with Dev-C++ I could just open it up control+n and write the program quickly compile and it d show up no need for a project file . So is there a way to to compile single-source files in Microsoft Visual C++ without needing to make a project file to include it in Comment : Not easily . The IDEs are probably a bit heavy for your needs . For single-source files you can even just use a syntax-highlighting indenting code editor like Notepad++ and a command-line compiler . The IDEs are probably too much for this until you get into multi-source file projects . Comment : possible duplicate of Running small C++ programs in Visual Studio without creating projects http : stackoverflow.com questions 880803 running-small-c-programs-in-visual-studio-without-creating-projects Comment : Whoops didn t notice that Michael . Thanks for the heads up it seems to answer my question . .. . Answer : You can execute the compiler from the command-line . First you will need to open a command-prompt will all the VC++ environment-variables set . Then you just invoke cl with the options you want http : msdn.microsoft.com en-us library 9s7c9wdw 28v VS.71 29.aspx . If you want to stay within the IDE then you can set up an External Tool to compile it for you : .. . .. . 1 . From Visual Studio select Tools External Tools .. . 2 . Click Add on the dialog box . 3 . Pick a suitable name like Compile .. . 4 . For Command choose cl.exe .. . 5 . Foor Arguments enter ItemPath .. . 6 . Check use Output Window so that the compiler output is sent to the output window . Now to use this you must invoke Visual Studio with the correct environment-variables set . One way is to launch a Visual Studio Command Prompt and then enter devenv.exe . Then open the file you want to compile and select the new tool under the Tools menu . Comment : Thanks for the informative answer I think I ll try this later on .", "Question : I just installed Dev C++ and I am learning C programming . the code i used was .. . .. . I saved it as a .c file . When I compile it works fine but when I compile and run it says source file not compiled . So I googled buncha things and came across this video on youtube which shows you how to fix it . I also saw other forums on google which suggest the same thing.. . However after doing whats asked Now I can t even compile my code . I get this error .. . .. . I have also used what is asked on this link and still no luck. . http : learntogeek.com miscellaneous solved-source-file-not-compiled-error-in-dev-cpp .. . .. . I am using windows-8 Comment : Does your source file actually include those quotation marks Comment : I cannot piece together enough concrete details from this . Please use full sentences with full words capital letters verbatim code.. . Your code and compilation commands are all about C but you tagged the question C++ . What is going on here Comment : Duplicate Dev C in Windows 8 : gcc Internal Error http : stackoverflow.com questions 12811762 dev-c-in-windows-8-gcc-internal-error Comment : Can you try to do it manually and tell me what the error is gcc -o hello hello.c or whatever your file is named .. . Answer : I was having this issue and fixed it by going to : C : Dev-Cpp libexec gcc mingw32 3.4.2 then deleting collect2.exe", "Question : I just installed Dev C++ and I am learning C programming . the code i used was .. . .. . I saved it as a .c file . When I compile it works fine but when I compile and run it says source file not compiled . So I googled buncha things and came across this video on youtube which shows you how to fix it . I also saw other forums on google which suggest the same thing.. . However after doing whats asked Now I can t even compile my code . I get this error .. . .. . I have also used what is asked on this link and still no luck. . http : learntogeek.com miscellaneous solved-source-file-not-compiled-error-in-dev-cpp .. . .. . I am using windows-8 Comment : Does your source file actually include those quotation marks Comment : I cannot piece together enough concrete details from this . Please use full sentences with full words capital letters verbatim code.. . Your code and compilation commands are all about C but you tagged the question C++ . What is going on here Comment : Duplicate Dev C in Windows 8 : gcc Internal Error http : stackoverflow.com questions 12811762 dev-c-in-windows-8-gcc-internal-error Comment : Can you try to do it manually and tell me what the error is gcc -o hello hello.c or whatever your file is named .. . Answer : I found a solution . Please follow the following steps : .. . .. . 1 . Right Click the My comp . Icon .. . .. . 2 . Click Advanced Setting . 3 . CLick Environment Variable . On the top part of Environment Variable Click New .. . .. . 4 . Set Variable name as : PATH then Set Variable Value as : the location of g++ .exe For ex . C : Program Files x86 Dev-Cpp MinGW64 bin .. . .. . 5 . Click OK", "Question : Well I ve been using Dev-C++ for a while for learning the language c++ and some stuff wouldn t work properly like global and local-variables . Then I decided to download Microsoft Visual C++ to see how it compared and it was absolutely great especially with its aesthetics . One thing that has bothered me though is that since I need to make lots of small source files to test out things I ve learned I have to make a large project file each and every time which take up 18mb of space . I have tried to just make a source C++ file but it never works since the compile and run buttons don t highlight without a project file and pressing f5 yields no result as well . But with Dev-C++ I could just open it up control+n and write the program quickly compile and it d show up no need for a project file . So is there a way to to compile single-source files in Microsoft Visual C++ without needing to make a project file to include it in Comment : Not easily . The IDEs are probably a bit heavy for your needs . For single-source files you can even just use a syntax-highlighting indenting code editor like Notepad++ and a command-line compiler . The IDEs are probably too much for this until you get into multi-source file projects . Comment : possible duplicate of Running small C++ programs in Visual Studio without creating projects http : stackoverflow.com questions 880803 running-small-c-programs-in-visual-studio-without-creating-projects Comment : Whoops didn t notice that Michael . Thanks for the heads up it seems to answer my question . .. . Answer : I was browsing for answers but just thought hmm....What about just add .. . .. . My Code... . .. . .. . This just comments everything between .... . .. . .. . Then remove .... . if I want to run the specific code later on . That way you do not have to eliminate your old code by using Exclude From Project :", "Question : I just installed Dev C++ and I am learning C programming . the code i used was .. . .. . I saved it as a .c file . When I compile it works fine but when I compile and run it says source file not compiled . So I googled buncha things and came across this video on youtube which shows you how to fix it . I also saw other forums on google which suggest the same thing.. . However after doing whats asked Now I can t even compile my code . I get this error .. . .. . I have also used what is asked on this link and still no luck. . http : learntogeek.com miscellaneous solved-source-file-not-compiled-error-in-dev-cpp .. . .. . I am using windows-8 Comment : Does your source file actually include those quotation marks Comment : I cannot piece together enough concrete details from this . Please use full sentences with full words capital letters verbatim code.. . Your code and compilation commands are all about C but you tagged the question C++ . What is going on here Comment : Duplicate Dev C in Windows 8 : gcc Internal Error http : stackoverflow.com questions 12811762 dev-c-in-windows-8-gcc-internal-error Comment : Can you try to do it manually and tell me what the error is gcc -o hello hello.c or whatever your file is named .. . Answer : You can always try doing it manually from the command-prompt . Navigate to the path of the file and type :", "Question : I just installed Dev C++ and I am learning C programming . the code i used was .. . .. . I saved it as a .c file . When I compile it works fine but when I compile and run it says source file not compiled . So I googled buncha things and came across this video on youtube which shows you how to fix it . I also saw other forums on google which suggest the same thing.. . However after doing whats asked Now I can t even compile my code . I get this error .. . .. . I have also used what is asked on this link and still no luck. . http : learntogeek.com miscellaneous solved-source-file-not-compiled-error-in-dev-cpp .. . .. . I am using windows-8 Comment : Does your source file actually include those quotation marks Comment : I cannot piece together enough concrete details from this . Please use full sentences with full words capital letters verbatim code.. . Your code and compilation commands are all about C but you tagged the question C++ . What is going on here Comment : Duplicate Dev C in Windows 8 : gcc Internal Error http : stackoverflow.com questions 12811762 dev-c-in-windows-8-gcc-internal-error Comment : Can you try to do it manually and tell me what the error is gcc -o hello hello.c or whatever your file is named .. . Answer : I was facing the same issue as described above . It can be resolved by creating a new project and creating a new file in that project . Save the file and then try to build and run . Hope that helps . :", "Question : I just installed Dev C++ and I am learning C programming . the code i used was .. . .. . I saved it as a .c file . When I compile it works fine but when I compile and run it says source file not compiled . So I googled buncha things and came across this video on youtube which shows you how to fix it . I also saw other forums on google which suggest the same thing.. . However after doing whats asked Now I can t even compile my code . I get this error .. . .. . I have also used what is asked on this link and still no luck. . http : learntogeek.com miscellaneous solved-source-file-not-compiled-error-in-dev-cpp .. . .. . I am using windows-8 Comment : Does your source file actually include those quotation marks Comment : I cannot piece together enough concrete details from this . Please use full sentences with full words capital letters verbatim code.. . Your code and compilation commands are all about C but you tagged the question C++ . What is going on here Comment : Duplicate Dev C in Windows 8 : gcc Internal Error http : stackoverflow.com questions 12811762 dev-c-in-windows-8-gcc-internal-error Comment : Can you try to do it manually and tell me what the error is gcc -o hello hello.c or whatever your file is named .. . Answer : you must use return 0 when you use int main in devc++ . Comment : -1 : While it is true for C89 the default mode for gcc this doesn t answer the question . maybe it should be a comment instead", "Question : I m trying to do a example of exponent en DEV C++ compilator and I can t get the output .. . .. . this is the code : .. . .. . and i get this : .. . .. . exponent http : i.stack.imgur.com BQ4Ps.png .. . .. . what could be the problem Sincerilly NIN . Comment : Likely not this but some compilers with printf do not like the l . Try printf .1f .1f .21f base exponent result I suspect the problem is using the wrong .h files Comment : I don t see any error in your code and it compiles well with gcc . Your error message seems to indicate that you have a problem with your platform . It points to a line in one of your C library headers it seems . Comment : It looks like there s a problem with your compiler setup somehow . Comment : Chux . That doesn t work . It was math.h is not found in DEV C++ Comment : Jens and immibis . You all are quite right . I download GCC and it work perfectly . Thank you . .. . Answer : It s important to remember that I m using DEV c++ which have lot of errors and libraries which doesn t work . I download GCC and MinGW for windows . I compile the same source code in MS-Dos and it worked . I guess finally I going to use just GCC and I ll forget DEV C++ .", "Question : From where does DEV C++ compiler includes header-files in the source code like stdio.h file.h time.h Where is the folder which contains header-files or these headers are included with different file extension .. . Answer : It depends on where you installed your dev-c++ . In my system this is the path", "Question : I am using Dev C++ https : en.wikipedia.org wiki Dev-C 2B 2B for programming and I can create a new file but not a project . If I try to create a project then this error occurs : .. . .. . Could not change to the Templates Directory . . .. . .. . How can I fix this problem .. . Answer : A problem like this sometimes is solved in the easiest way by just not solving it at all . Try to update Dev-C++ and then restart it and see if that works . If it doesn t then uninstall it and download it directly from Blookshed.net or SourceForge then reinstall it .", "Question : Well I ve been using Dev-C++ for a while for learning the language c++ and some stuff wouldn t work properly like global and local-variables . Then I decided to download Microsoft Visual C++ to see how it compared and it was absolutely great especially with its aesthetics . One thing that has bothered me though is that since I need to make lots of small source files to test out things I ve learned I have to make a large project file each and every time which take up 18mb of space . I have tried to just make a source C++ file but it never works since the compile and run buttons don t highlight without a project file and pressing f5 yields no result as well . But with Dev-C++ I could just open it up control+n and write the program quickly compile and it d show up no need for a project file . So is there a way to to compile single-source files in Microsoft Visual C++ without needing to make a project file to include it in Comment : Not easily . The IDEs are probably a bit heavy for your needs . For single-source files you can even just use a syntax-highlighting indenting code editor like Notepad++ and a command-line compiler . The IDEs are probably too much for this until you get into multi-source file projects . Comment : possible duplicate of Running small C++ programs in Visual Studio without creating projects http : stackoverflow.com questions 880803 running-small-c-programs-in-visual-studio-without-creating-projects Comment : Whoops didn t notice that Michael . Thanks for the heads up it seems to answer my question . .. . Answer : For simple program you can easily compile from command-line .. . .. . Star menu- Visual Studio- Visual Studio Tools- Command Line Comment : Wot is command-line Are you trying to sell me drugs Although I would say you have the best answer here most people don t know how to use them anymore....if they ve even seen one . Most seem to think that the command-line is that window that their non-gui programs pop-up in ." ] }
[ "yes-answer-long", "yes-answer-short" ]
ide
UNK_RELATION
c++14@c++@35
c++ 14 -- c++ 14 is the name of the @placeholder standard approved in 2014 .
{ "confidence": [ 43.24681091308594, 41.907623291015625, 40.668487548828125, 40.26013946533203, 40.26013946533203, 39.70793151855469, 39.31266784667969, 39.31266784667969, 39.25267028808594, 39.15794372558594, 39.15794372558594, 39.15794372558594, 39.112709045410156, 39.112709045410156, 38.76018524169922, 38.42987823486328, 38.42987823486328, 38.32918167114258, 38.32918167114258, 38.08382034301758, 38.01631164550781, 38.01631164550781, 38.01631164550781, 38.01631164550781, 37.47734832763672, 37.42919921875, 37.33124542236328, 37.035552978515625, 36.94218826293945, 36.94218826293945, 36.94218826293945, 36.94218826293945, 36.94218826293945, 36.87144470214844, 36.6771240234375, 36.6771240234375, 36.6771240234375, 36.6771240234375, 36.6660270690918, 36.6660270690918, 36.335716247558594, 36.335716247558594, 36.335716247558594, 36.335716247558594, 36.335716247558594, 36.335716247558594, 36.172821044921875, 36.172821044921875, 36.172821044921875, 36.172821044921875, 35.84752655029297, 35.60300064086914, 35.60300064086914, 35.33504104614258, 35.33504104614258, 35.33504104614258, 35.326839447021484, 35.326839447021484, 35.326839447021484, 35.22029113769531, 35.22029113769531, 35.22029113769531, 35.22029113769531, 35.168914794921875, 35.16532897949219, 35.16532897949219, 34.99652862548828, 34.99652862548828, 34.99652862548828, 34.61971664428711, 34.374359130859375, 34.07865905761719, 34.07865905761719, 34.07865905761719, 34.07865905761719, 34.07865905761719, 34.07865905761719, 34.07865905761719, 34.07865905761719, 34.07865905761719, 34.07865905761719, 34.07865905761719, 34.07865905761719, 34.02369689941406, 34.02369689941406, 34.02369689941406, 34.02369689941406, 34.02369689941406, 34.02369689941406, 33.995853424072266, 33.798336029052734, 33.660640716552734, 33.423431396484375, 33.2805290222168, 33.2805290222168, 33.115516662597656, 32.79411697387695, 32.787437438964844 ], "content": [ "-std c++14 is standard compliant .", "Is there a fix underway for the C++14 Standard", "@cplusplusrat : Code for the standard specified in the question C++14 in this case or the current version of the standard if not specified C++14 presently .", "Is this C++14", "c++14", "C++14 was published without the fix and then it was accepted as a defect in November 2014 .", "To run it as C++ 14 we need to add -std c++14 in terminal .", "If it turns out to be a C++14 defect then gcc s behavior is correct for C++14 .", "C++11 C++14 .", "in c++14 it is an aggregate .", "Not a part of c++14 .", "A C++14 solution is acceptable .", ".. . .. . .. . this is pretty much the same in the draft C++14 standard .", "N3937 is the C++14 DIS Draft International Standard .", ".. . .. . Note : preferred standard is C++14 although later versions would be acceptable .", "The class won t be ready for C++14 .", "Yes I m using c++14 .", "Is the following code legal by C++11 and or C++14 standard s", "Is the code below valid C++ with respect to the C++14 standard", "It was fine in C++11 then broken in C++14 .", "We are using C++14 .", "Yes they are in C++14 .", "Try CONFIG + C++14", "Note that these are new for c++14 .", "So is this a feature available in C++14", "Following is correct per C++14 as far as I know MSVC does not fully support C++14 :", "@Mikhail My use of 2011 2014 rather than C++11 C++14 is intentional .", "Edit : oops it didn t make it into C++14.. . Changed the title from C++14 to C++1z .", "Why was this changed from C++11 to C++14", "-std c++1y was the pre-release of C++14 .", "I have C++11 and C++14 .", "NB : Tried with -std C++14 and C++1y .", "This changed between C++11 and C++14 .", "libc++ supported pretty much all of C++11 when it was first shipped and all of C++14 in version 3.5 the first version that shipped after C++14 was approved", "Is it likely to appear in C++14", "Answer below is for C++14 .", "Is this a new C++14 feature", "5.1.3 is not in C++14 .", "If you use C++14 have you checked the standard header ratio", "I don t see anything in C++14 standard that bans this .", "@cdmh Concepts Lite is not in C++14", "Simple -std c++14 is enough .", "Is it a C++11 14 17 draft", "std : : enable-if t is c++14 btw .", "+1 for a c++14 tuple generation .", "The C++14 generalized lambda captures", "Note that in the end neither where added in C++14 .", "std : : dynarray was intended to go with c++14 at first .", "@JameyD You are using gcc with C++14 .", "In C++14 you do not need decltype at all .", "Because GCC 4.9 was released in april 2014 before the C++14 standard finalization.. . so the support for a not yet released standard is experimental .", "Is it only safe to do that in C++11 and C++14", ": you mean c++14 not c++11 right", ".. . .. . I tried using clang++ -std c++14 and g++ -std c++14 .", "As Praetorian notes the proposal recommends this is a C++14 defect : .. . .. . Direction from EWG is that we consider this a defect in C++14 .", "gcc 4.9.3 supports C++14 but the correct compiler flag is -std c++14", "In the C++14 standard it seems pretty clear that initialization is required .", "I thought this to be a feature which did not make it to the official C++14 standard .", "My recollection is that draft N3936 was what became the C++14 standard .", "C++14 will allow the creation of variables that are templated .", "maybe there is a better one using C++14 .", "So why was this change made in C++14", "Generic lambdas were introduced in C++14 .", "The C++14 proposal maybe", "They re not part of C++14 which is what C++1y became .", "Fixed to C++14 originally used C++11 in question", "It s not part of the C++14 mainline .", "However this is only valid in C++14 .", "And then there are also post-C++14 DRs.. .", "Your passage from 14.5.7 3 is not present in the C++14 or C++11 standard .", "You can check that g++ --std c++14 defines cplusplus as : .. . .. . For clang++ --std c++14 : .. . .. . So a safer check should probably be : .. . .. . As specified in the comment this could mean partial C++14 support .", "The new wording of draft C++14 solves this .", "c++ 11 and or 14 .. . .. . Edit : Thanks for all the answers .", "I am trying to use C++14 features .", "@B It is called variable template added in C++14 .", "C++14 doesn t have runtime sized arrays .", "Also in C++14 variable-templates are provided .", "Works only for C++14 or later of course .", "c++14 is also available if there is something I search for .", "C++14 n4140 14.8.2.1 3 emphasis mine : .. . .. . .. .", "With g++ -std c++14 there s no warning .", "Thus the committee abolished this regex search overload in C++14 .", "The answer itself is presented in terms of C++14 only .", "C++11 support is great but I d really like to use C++14 .", "@erip what are differences betwen -std c++14 and -std c++1y", "Is there a good resource which lists what C++11 C++14 etc .", "There is some ambiguity as to whether this is considered a C++14 defect or a C++1z proposal .", "@RSahu That s a C++14 vs . C++11 issue .", "C++ Style .. . .. . There is no generally acceptable C++14 style yet .", "C++14 is okay I should have tagged it c++14 I ll update tags .", "BTW C++14 is out so you should use -std c++14 and upgrade if your compiler doesn t have that switch .", "Possible duplicate of Why aren t C++14 standard-defined literals in the global namespace by default", "Try compiling with -std gnu++14 instead of -std c++14 and change pclose to pclose or pclose .", "Relevant standard entries are dcl.fct.def.default 4 in C++11 5 in C++14 and dcl.init.aggr 1", "If it s not part of the C++11 standard are there any plans on including it on later releases e.g . C++14 or later", "So why does C++14 need them both", "Quoting from the GCC page on C++14 support https : gcc.gnu.org projects cxx1y.html .. . .. . Important : Because the final ISO C++14 standard was only recently published GCC s support is experimental .", "For some weird reason this is what Qt does : If the compiler is gcc or mingw CONFIG+ C++14 is transformed to a compiler flag -std c++14 that what you expect .. . .. . If it s another compiler like clang CONFIG C++14 is stupidly transformed to -std c++11 sic" ] }
{ "confidence": [ 41.577884674072266, 37.92241668701172, 37.91145706176758, 37.36491394042969, 37.07211685180664, 36.87393569946289, 36.818458557128906, 36.245460510253906, 36.12689208984375, 36.0245475769043, 35.846107482910156, 35.542930603027344, 35.10699462890625, 35.02239990234375, 34.04292678833008, 33.73243713378906, 33.61442565917969, 33.45484161376953, 33.18480682373047, 33.14949035644531 ], "content": [ "Question : https : isocpp.org std the-standard states that the working draft N4296 http : www.open-std.org jtc1 sc22 wg21 docs papers 2014 n4296.pdf .. . .. . contains the C++14 standard plus minor editorial changes . I noted that N4296 5.1.3 contains a specification of Fold expressions . I thought this to be a feature which did not make it to the official C++14 standard . Are fold expressions part of C++14 or is this addition in N4296 one of those minor editorial changes Comment : c++17 but you ll find them supported in clang with -std c++1z and supported with a warning with -std c++14 Comment : 5.1.3 is not in C++14 . My recollection is that draft N3936 was what became the C++14 standard . Comment : The addition of fold expressions does seem like quite a bit more than an editorial change especially a minor one . .. . Answer : N3937 is the C++14 DIS Draft International Standard . N3936 no longer publicly available but can be dug out from the github repo is N3937 with a different cover . N4141 is the C++14 IS it s the DIS plus some editorial changes . It s not publicly available . N4140 https : github.com cplusplus draft blob master papers n4140.pdf is the pre-Urbana working draft it s N4141 plus more editorial changes . N4296 is the post-Urbana working draft . It includes C++17 features voted in at the committee s Urbana meeting . Fold expressions is a C++17 feature . Comment : Why N4141 isn t publicly available Comment : The numbers are confusing . N4140 is N4141 plus more editorial changes 4140 4141 Not like N39 something + editorial changes Comment : @jotik N3936 N3937 ignoring cover page . N4140 N3936 + many editorial changes . N4141 N3937 + a much smaller subset of those editorial changes . Comment : Fold expressions seems to originate from N4191 http : www.open-std.org jtc1 sc22 wg21 docs papers 2014 n4191.html dated 2014-10-07 so it clearly didn t make the standard on which the final ballot period closed in August 2014 . Comment : @Destructor Because they don t want to have the exact text of an international standard freely available . In practice it doesn t matter I don t think simply use whatever draft immediately predates the IS .", "Question : The directive : .. . .. . The command-line : g++ -Wall -Wextra -std c++14 -c -o header.o header.hpp .. . .. . My g++ version : g++ tdm-1 4.9.2 .. . .. . The error C++14 is required is generated even when I added -std c++14 I don t know why . Please tell me how to fix this . Comment : Some compilers would treat -std c++14 as a request to enable whatever C++14 features were implemented while 201402L would imply complete support for that standard so it s not necessarily simply an error bug with GCC . Go read the GCC docs if you want to understand what it s doing... . .. . Answer : According to the GCC CPP manual version 4.9.2 https : gcc.gnu.org onlinedocs gcc-4.9.2 cpp Standard-Predefined-Macros.html Standard-Predefined-Macros and 5.1.0 https : gcc.gnu.org onlinedocs gcc-5.1.0 cpp Standard-Predefined-Macros.html Standard-Predefined-Macros : .. . .. . cplusplus This macro is defined when the C++ compiler is in use . You can use cplusplus to test whether a header is compiled by a C compiler or a C++ compiler . This macro is similar to STDC VERSION in that it expands to a version number . Depending on the language standard selected the value of the macro is 199711L as mandated by the 1998 C++ standard 201103L per the 2011 C++ standard an unspecified value strictly larger than 201103L for the experimental languages enabled by -std c++1y and -std gnu++1y . You can check that g++ --std c++14 defines cplusplus as : .. . .. . For clang++ --std c++14 : .. . .. . So a safer check should probably be : .. . .. . As specified in the comment this could mean partial C++14 support . To check for a specific feature you could also try Boost Config http : www.boost.org doc libs 1 58 0 libs config doc html index.html especially Macros that describe C++14 features not supported http : www.boost.org doc libs 1 58 0 libs config doc html boost config boost macro reference.html boost config.boost macro reference.macros that describe c 14 features not supported .", "Question : Using Clang 3.5 3.6 or 3.7 with the flag std c++1y the following code does not compile : .. . .. . The error given is : .. . .. . error : auto not allowed in function prototype .. . .. . I do not have errors using g++ 4.9 . Is this error produced because Clang has not yet implemented this functionnality yet or is it because I am not allowed to do that and GCC somehow permits it Comment : I think you should not do that since you use it out of scope . Comment : auto function parameters of ordinary non-lambda functions are an extension from the Concepts TS . They re not part of C++14 which is what C++1y became . Comment : Btw there s a n inofficial clang branch https : github.com faisalv clang tree enhanced-auto-c 2B 2B1z that supports it . Some discussion can be found on the std-discussion mailing list https : groups.google.com a isocpp.org d topic std-discussion PaKP8EIIlEU discussion . I don t know what s the current status of that branch though . Comment : BTW C++14 is out so you should use -std c++14 and upgrade if your compiler doesn t have that switch . The next version is tentatively called c++1z . Comment : gcc 4.9.x may be built with concepts which is probably why you are seeing it . .. . Answer : As we see from the ISO C++ discussion mailing : decltype auto parameters vs . perfect-forwarding http : comments.gmane.org gmane.comp.lang.c 2B 2B.isocpp.general 2438 auto parameters of non-lambdas is part of concepts lite http : www.open-std.org jtc1 sc22 wg21 docs papers 2014 n3889.pdf and therefore not in C++14 : .. . .. . clang is correct in the sense that we don t yet have auto parameters . Concepts lite may bring those but C++14 doesn t have them . If we use the -pedantic https : gcc.gnu.org onlinedocs gcc Standards.html flag with gcc we receive the following warning : .. . .. . So this looks like an extension . As dyp pointed out polymorphic lambdas https : isocpp.org blog 2013 04 n3649-generic-polymorphic-lambda-expressions-r3 did make it into C++14 and do allow auto parameters an example taken from the paper : .. . .. . Which is incidentally the same functionality you want to implement in your example . Comment : Thank you for pointing out the discussion and the extra pedantic flag Comment : @coincoin I added a link-to the gcc documentation -pedantic forces the compiler to issue warnings for extensions basically anything not allowed by the standard . Comment : @ShafikYaghmour I think they not make it standard due to function-overloading issue mean with the auto keyword function-overloading can be ambiguous Comment : @UnKnown as I said it is part of the concepts-lite proposal and so will come in with those changes .", "Question : The following code compiles successfully with clang 3.5.0 and g++ 4.9.0 with -Wall -Wextra -pedantic-errors flags under C++03 flag -std C++03 http : coliru.stacked-crooked.com a ed5542c3bacbc936 C++11 flag -std C++11 http : coliru.stacked-crooked.com a 5906c44aadfaa3a3 and C++14 flag -std C++14 http : coliru.stacked-crooked.com a 7aeaac50c6c04736 : .. . .. . Is it valid to add extra typename keyword before a non-type template parameter declaration .. . .. . .. . .. . Note that the following code doesn t compile as C++03 http : coliru.stacked-crooked.com a 0092df757c74ca72 C++11 http : coliru.stacked-crooked.com a a2a95005e85182c1 and C++14 http : coliru.stacked-crooked.com a a49f96cc87377e55 code : .. . .. . But the following one compiles fine again C++03 http : coliru.stacked-crooked.com a 08f4b661cd7379cb C++11 http : coliru.stacked-crooked.com a cb166fe85447926a and C++14 http : coliru.stacked-crooked.com a 069a32bb1ca79559 : Comment : I suspect that typename N : : T gets parsed as a type-parameter unrelated to the actual type N : : T . The name of that is strange however . Comment : @dyp And what should follow from your quote Comment : @leemes Yes I think so too . And it is very strange . Comment : @Constructor Oops sorry I was confused . I read the nested-name-specifier instead of the qualified-id . Comment : @dyp Nothing wrong . : .. . Answer : It is allowed but only with qualified names : .. . .. . typename-specifier : .. . typename nested-name-specifier identifier .. . typename nested-name-specifier template opt simple-template-id .. . .. . So typename E is wrong according to the grammar . typename N : : E is not since the name is qualified . The third case typename : : E is fine since : : is a valid nested-name-specifier . The C++03 standard specifies in temp.res 5 that .. . .. . The keyword typename shall be applied only to qualified names but those names need not be dependent . The C++11 standard states this nowhere explicitly but inside a note in temp.names 5 : .. . .. . Note : As is the case with the typename prefix the template prefix is allowed in cases where it is not strictly necessary i.e . when the nested-name-specifier or the expression on the left of the - or . is not dependent on a template-parameter or the use does not appear in the scope of a template . end note .. . .. . The same note exists in the exact same place in the C++14 standard . Comment : So if the name is not dependent then typename is superfluous Comment : @0x499602D2 Yes . typename is for disambiguation if there s no need for disambiguation then typename is not required Comment : @0x499602D2 Certainly . Comment : @dyp : Not required but is it permitted and e.g . silently ignored Comment : @ildjarn Yes see the note quoted in the answer and CWG DR 382 http : open-std.org JTC1 SC22 WG21 docs cwg defects.html 382", "Question : I m currently using C++11 features in my Qt applications . However I d like to use some of the new C++14 features in my applications . To enable C++11 in a Qt application one only needs to add one line in the qmake project file namely : .. . .. . or this for earlier versions : .. . .. . I already tried to do the same with C++14 but it didn t work . I changed the above mentioned line of the qmake project like this : .. . .. . or this for earlier versions : .. . .. . After that lots of compilation errors that did not exist before appear when trying to build the project . The project compiles fine however if I try to use any C++14 features I get a compilation error . This is an example : .. . .. . This is the corresponding error : .. . .. . How to enable C++14 features when using a qmake project in QtCreator I am using Qt 5.3.2 Qt Creator 3.2.1 and MinGW 4.8.2 32-bit . Comment : Also I edited the question a bit to make it clearer what you are asking . If I understood wrong please don t hesitate to roll-back . Comment : Maybe worth a read too : woboq.com blog cpp14-in-qt.html http : woboq.com blog cpp14-in-qt.html Comment : @guruz : oh I have just submitted an answer before seeing your comment indeed .. . Answer : This is now supported properly from Qt 5.4 http : woboq.com blog cpp14-in-qt.html . You just type this into your qmake project file : .. . .. . The necessary code change went in the middle of 2014 by Thiago : .. . .. . Add support for CONFIG + c++14 https : codereview.qt-project.org c 87831 .. . .. . I have just created the necessary documentation change : .. . .. . Mention the c++14 CONFIG option in the qmake variable reference https : codereview.qt-project.org c 102054 .. . .. . Please note that variable-templates are only supported from gcc 5.0 but then your code works just fine . This can be used for testing C++14 with older gcc : .. . .. . main.cpp .. . .. . main.pro .. . .. . Build and Run .. . .. . Output Comment : Just tried this on a Mac with the about box info below and looking at the compiler command-line oddly it s actually missing the -stdlib libc++ flag It looks like redacted : clang++ -c -pipe -g -isysroot Applications Xcode.app .. . -mmacosx-version-min 10.7 -std c++1y -Wall -W -fPIE Qt Creator 3.3.0 opensource Based on Qt 5.4.0 Clang 6.0 Apple 64 bit Built on Dec 8 2014 at 15 : 34 : 58 From revision d36c4d87db Any ideas what s wrong I added the flag as a QMAKE CXXFLAGS and everything works just fine . yay make unique", "Question : Which is the correct behaviour for the following program When I compile it in my Linux RHEL 6.6 workstation I obtain the following results : .. . .. . but .. . .. . and Comment : @0x499602D2 : That makes no sense . The whole point of a language standard is to unambiguously define program semantics . Comment : @LightnessRacesinOrbit : While I agree that it is not the case here you statement is not true in general : For one you have - especially in C and C++ - UB and IB in which case ANY behavior is correct for IB it just has to be documented . Then you have optional behavior e.g . copy-elision and finally even an international standard can contain errors which might result in ambiguous situations . Comment : @MikeMB : Feel free to show me an example of when IB leads to compiler error in one implementation but not another . And UB doesn t count by definition . Comment : @Lightness : On the contrary : As long as the standard doesn t say the program is ill formed UB means that any behavior is correct according to the standard . So if two compilers compile the same program that contains UB and they behave differently then both compilers are right . Even if it is ill formed there are the cases of ill formed - no diagnostics required . As far as IB is concerned : I m not sure but as far as I remember there is an implementation defined maximum template recursion depth . Oh and what about Conditionally-Supported Behavior Anyway its not the case here . Comment : This program specifies that p is of type whatever we need to initialize from a std : : shared-ptr Foo . That may or may not be a std : : shared-ptr Foo the standard neither requires it to be nor prohibits it from being . So you may or may not be able to do p- Bar . The standard does not say which . .. . Answer : Tl DR .. . .. . This behavior is subject to a proposal and an Evolution Working Group issue . There is some ambiguity as to whether this is considered a C++14 defect or a C++1z proposal . If it turns out to be a C++14 defect then gcc s behavior is correct for C++14 . On the other hand if this is really a C++1z proposal then clang and icpc are exhibiting correct behavior . Details .. . .. . It looks like this case is covered by N3681 http : open-std.org JTC1 SC22 WG21 docs papers 2013 n3681.html which says : .. . .. . Auto and braced initializers cause a teachability problem we want to teach people to use uniform-initialization but we need to specifically tell programmers to avoid braces with auto . In C++14 we now have more cases where auto and braces are problematic return-type deduction for functions partially avoids the problem since returning a braced-list won t work as it s not an expression . However returning an auto variable initialized from a braced initializer still returns an initializer-list inviting undefined behaviour . Lambda init captures have the same problem . This paper proposes to change a brace-initialized auto to not deduce to an initializer-list and to ban brace-initialized auto for cases where the braced-initializer has more than one element . and provides the following examples : .. . .. . .. . auto x foo copy-initialization .. . auto x foo direct-initialization initializes an initializer-list .. . int x foo copy-initialization .. . int x foo direct-initialization .. . .. . .. . s So I think clang is currently correct s the latest version of clang provides this warning : .. . .. . warning : direct list-initialization of a variable with a deduced type will-change meaning in a future version of Clang insert an to avoid a change in behavior -Wfuture-compat .. . .. . From EWG issue 161 http : www.open-std.org jtc1 sc22 wg21 docs papers 2015 n4422.html 161 that N3922 http : www.open-std.org jtc1 sc22 wg21 docs papers 2014 n3922.html was adopted for this . As Praetorian notes the proposal recommends this is a C++14 defect : .. . .. . Direction from EWG is that we consider this a defect in C++14 . but clang s C++1z implementation status notes http : clang.llvm.org cxx status.html this as a C++1z proposal which is not implemented . So if this is a C++14 defect that would make gcc correct but it is not clear to me if this is really a defect or a proposal . T.C . points out in a comment here http : stackoverflow.com questions 33500320 why-this-variable-isnt-deduced-as-initializer-list-in-g-in-c14 comment54798222 33500320 that it seems like the clang developers http : lists.llvm.org pipermail cfe-commits Week-of-Mon-20150209 123102.html do intended to back-port this . It has not happened and it is not clear why . Comment : Scoot Myers Talks about this here https : channel9.msdn.com Events CPP C-PP-Con-2014 Type-Deduction-and-Why-You-Care at about 30 minutes in . Comment : What s interesting is N3922 calls this a C++14 defect which is what I thought it was too but clang claims http : clang.llvm.org cxx status.html it s a C++1z change search for N3922 on that page . gcc-5.1 accepts the example in the OP in C++11 mode also . Comment : @Praetorian good point I was wondering about that I modified my answer to mention that . Comment : @Escualo depending on whether this is considered a C++14 defect or not then gcc may actually be correct . Comment : @hvd I posted my comment before the clarification was added --- I will not be filing a GCC bug .", "Question : Quoting from the GCC page on C++14 support https : gcc.gnu.org projects cxx1y.html .. . .. . Important : Because the final ISO C++14 standard was only recently published GCC s support is experimental . No attempt will be made to maintain backward compatibility with implementations of C++14 features that do not reflect the final standard . I could not find the official GCC definition of experimental . Does it only apply to backward compatibility wrt non-standard features as the last sentence mentions Or does it also indicate stability or lack thereof An earlier sentence on the same page says .. . .. . C++14 features are available as part of the mainline GCC compiler in the trunk of GCC s Subversion repository and in GCC 4.8 and later . To me this suggests stability . Is this the case In particular my question is about GCC 4.9 since that is the earliest version with full C++14 support according to the aforementioned page . Comment : Why do you care The GCC folks are trying to do their reasonable best without warranties Comment : @BasileStarynkevitch : I don t see how GCC doing their best equates to not needing to care about stability . Comment : 4.9 does NOT support all C++14 language features . 5.0 will IIRC . .. . Answer : There is no official GCC definition only the official English definition . The passage means that where GCC previously implemented experimental prototypes of then-upcoming C++14 features before C++14 was published future versions will not bother to try to maintain backward compatibility with those experiments . Backward compatibility between two versions is only maintained with respect to features that were in an International Standard at the time that they were included in those versions . This is because prior to standard publication the specification of new C++ features can change rather dramatically . It would be madness to guarantee that early experiments in support for them would be forwards compatible with the final true feature as eventually published in a standard . In short : use experimental features at your own risk and do not expect them to work the same way in the next version of GCC . Comment : Thanks Yes not promising backward compatibility with non-standard features in completely expected - this is clear from the quote and would be crazy to expect otherwise . My question is if this is the only caveat intended . Comment : And I just noticed that their C++11 support page https : gcc.gnu.org projects cxx0x.html says almost the same thing - Important : GCC s support for C++11 is still experimental . Some features were implemented based on early proposals and no attempt will be made to maintain backward compatibility when they are updated to match the final C++11 standard . Comment : @Pradhan : Well I didn t just make it up : Comment : Er.. . sorry if I am being dense but I didn t get that . Comment : C++11 support in GCC 5 should be non-experimental and maybe C++14 support too .", "Question : I know that we can compile program as C++ using g++ compiler . But g++ compiler defaults to 98 version . To run it as C++ 14 we need to add -std c++14 in terminal . Sublime Text is considered a valuable editor for competitive programming due to its light weight and features . In these competitions time is important and thus the time is wasted in copying in text file and then running from terminal . C++ 14 features a rich library and other important features in comparison to 98 . Thus one would desire to be able to compile the code on sublime text and as C++ 14 . But how can I make sure that when I compile the code within Sublime Text 3 it compiles as default to C++14 After some fiddling around I came up the following solution - .. . .. . 1 . Go to packages and extract C++.sublime-package .. . 2 . Open C++ Single File.sublime-build .. . 3 . Change .. . .. . shell cmd : g++ file -o file path file base name file path file base name .. . .. . .. . to .. . .. . shell cmd : g++ -std c++14 file -o file path file base name file path file base name .. . .. . .. . Added -std c++14 in both build and run .. . .. . 4 . Save it and overwrite package originally in Sublime Text 3 .. . .. . .. . .. . Is this the right way to do so It is named as single file - Is this something to worry about if I want to use multiple-files .. . Answer : Usually it s bad to edit default files . Just create a new build-system Pallet - Build : New Build System add your changes there and save it as you want to . Then when you want to use it just select Build With : new build-system name If you also want the Build - Run option use this code instead : .. . .. . .. . .. . -std c++1y is the same as -std c++14 : Comment : -std c++1y is the same as -std c++14 No it s not . Comment : What about compiling multiple-files - such as packages . Should I worry about it as the filename suggests it would only be for single file Comment : @erip what are differences betwen -std c++14 and -std c++1y Comment : -std c++14 is standard compliant . -std c++1y was the pre-release of C++14 . Comment : You can change it if you want.. .", "Question : I am currently in the process of compiling graph-tool v1.13 from the Git version . I have managed to generate the configure file from autogen.sh but am now running into trouble . Running . configure I receive the message : .. . .. . I have checked gcc -v and g++ -v and receive the response gcc version 4.9.3 Ubuntu 4.9.3-8ubuntu2 14.04 . To my knowledge this should support C++14 so where am I going wrong I am running Ubuntu 14.04 . Comment : Just install a newer version of GCC http : gcc.gnu.org perhaps by compiling GCC 5.3 the latest version of GCC in febr.2016 from its source code . Comment : Installing GCC 5.x would probably work agreed but I wonder why the current version does not work when it looks to me like it should.. . Comment : Because GCC 4.9 was released in april 2014 before the C++14 standard finalization.. . so the support for a not yet released standard is experimental . You should upgrade to GCC 5 Comment : I have installed them using sudo apt-get install gcc-5 g++-5 but gcc -v still returns gcc version 4.9.3 Ubuntu 4.9.3-8ubuntu2 14.04 . What am I missing Comment : The flag may be c++1y or gnu++1y for GCC 4.9 .. . Answer : gcc 4.9.3 supports C++14 but the correct compiler flag is -std c++14", "Question : gcc 4.9 allows the following code but gcc 4.8 and clang 3.5.0 reject it . I get warning : ISO C++ forbids use of auto in parameter declaration -Wpedantic in 4.9 but in 4.8 and clang I get error : parameter declared auto . Comment : With gcc 4.9.1 g++ -std c++11 gives me warning : use of auto in parameter declaration only available with -std c++1y or -std gnu++1y . With g++ -std c++14 there s no warning . Comment : @KeithThompson Weird it s definitely not part of C++14 lambdas yes but not other functions . Comment : @chris : Playing around with gcc 4.9.1 here s an example http : codepad.org mm1jRI4X . The compiler used by codepad.org doesn t handle it but I get 4 lines of output with the expected size and value on each line . Apparently foo acts like a template . .. . Answer : Yes this is an extension . It s likely to be added to C++17 as part of the concepts proposal I believe . Comment : It s likely to be added to C++17 as part of the concepts proposal I believe . Indeed known as generic functions http : www.open-std.org jtc1 sc22 wg21 docs papers 2014 n4040.pdf dcl.fct . Comment : @user657267 The wording used for this in the Concepts Technical Specification http : www.open-std.org jtc1 sc22 wg21 docs papers 2014 n4333.pdf seems to be Abbreviated Function Templates . Comment : @JonathanMee Good to know I guess generic function was too...generic . Comment : @bolov As I understand it the difference between the standard modes and the gnu modes is that only non-conforming extensions are disabled in the standard modes . Conforming extensions that is extensions which modify the behavior of only programs which are ill-formed or have undefined-behavior under the C++ spec are still enabled . auto parameters on normal functions is ill-formed under the current spec so this extension is still enabled in the standard mode . To disable all extensions as much as gcc allows use -Werror pedantic . Comment : A year and a half later concepts won t be in C++17 so generic functions won t be either .", "Question : null .. . Answer : Is there a good resource which lists what C++11 C++14 etc . constructs are supported in each version of the standard libraries for major vendors I know of the following pages for gcc https : gcc.gnu.org projects cxx0x.html clang http : clang.llvm.org cxx status.html cxx0x and icc https : software.intel.com en-us articles c0x-features-supported-by-intel-c-compiler as well as this overview http : en.cppreference.com w cpp compiler support but they apparently only list syntax-related changes e.g . changes to the compiler proper rather than library support . Are there equivalent pages for libstdc++ and libc++ listing which library version first supported each feature of the standard I m aware of this page https : gcc.gnu.org onlinedocs libstdc++ manual status.html in the libstdc++ manual but that is only relevant for the most recent development version .. . to the extent that even the archived versions https : gcc.gnu.org onlinedocs gcc-4.6.4 libstdc++ manual manual status.html status.iso.200x of the manual apparently have the current version of the table rather than the table as it was when the version was originally released . The reason I ask is that to-date we have avoided C++11 and newer constructs in order to support older compilers . We re looking to modernize things but in planning it would be nice to know if putting std : : shared-ptr or std : : regex into our code might cause our user s compilers to choke or if we set non-bleeding-edge minimum versions which constructs should we avoid to support that version . Support for user compilation is mainly on Mac and Linux systems with gcc clang and some icc . We also build for Windows but that s primarily under our control so older version support is less critical . Comment : if cplusplus 201103L works for C++11 features if compiler authors don t lie GCC has lied in the past about ISO support . Comment : @Jeff The problem is cplusplus is all-or-nothing when different versions have support for some C++11 features but not others . Also it means you either lose features if C++11 isn t supported or have parallel implementations for C++98 which somewhat defeats the purpose of modernizing . Wrapping everything in an if block is not appreciably more useful that just saying if it doesn t compile update your compiler . Finally I believe that cplusplus is defined by the compiler rather than the standard-library - the compiler can be C++11 conformant when the library is not . Comment : libc++ supported pretty much all of C++11 when it was first shipped and all of C++14 in version 3.5 the first version that shipped after C++14 was approved", "Question : Consider this code : .. . .. . According to the C++14 standard 8.5.1 7 .. . .. . If there are fewer initializer-clauses in the list than there are members in the aggregate then each member not explicitly initialized shall be initialized from its brace-or-equal-initializer or if there is no brace-or-equal- initializer from an empty initializer-list 8.5.4 . the code should be perfectly valid . However g++ 4.9.2 rejects the code compiled with -std c++14 .. . .. . clang++ on the other hand compiles it . Is this a known issue for g++ Comment : gcc 5.0 works http : melpon.org wandbox permlink u87I6PIXszy1sw1K .. . likely a bug that is now fixed Comment : @ShafikYaghmour thanks Comment : S is not an aggregate until C++14 in C++11 aggregates cannot have NSDMIs . If you look at the GCC C++14 feature table https : gcc.gnu.org projects cxx1y.html you ll see that this feature isn t implemented until GCC 5 . Comment : @T.C . thanks for the link should have checked before.. . .. . Answer : You are correct this is valid C++14 however in C++11 a class with in class member initializers was not an aggregate http : stackoverflow.com q 27118535 1708801 and so this is not valid in C++11 . The issue as I noted in my answer to the above question and I realized later after I made my initial comment is that gcc did not support this change until 5.0 https : gcc.gnu.org gcc-5 changes.html see it live http : melpon.org wandbox permlink u87I6PIXszy1sw1K : .. . .. . G++ now supports C++14 aggregates with non-static data member initializers . .. . .. . struct A int i j i .. . A a 42 a.j is also 42 .. .", "Question : The naive optimistic and oh. . so wrong view of the c++11 uniform-initialization syntax .. . .. . I thought that since C++11 user-defined type objects should be constructed with the new .. . syntax instead of the old .. . syntax except for constructor overloaded for std : : initializer-list and similar parameters e.g . std : : vector : size ctor vs 1 elem init list ctor . The benefits are : no narrow implicit conversions no problem with the most-vexing-parse consistency . I saw no problem as I thought they are the same except the example given . But they are not . A tale of pure madness .. . .. . The calls the default constructor . .. . Except when : .. . .. . the default constructor is deleted and .. . there are no other constructors defined . Then it looks like it it rather value initializes the object .. . Even if the object has deleted default constructor the can create an object . Doesn t this beat the whole purpose of a deleted constructor ...Except when : .. . .. . the object has a deleted default constructor and .. . other constructor s defined . Then it fails with call to deleted constructor . ...Except when : .. . .. . the object has a deleted constructor and .. . no other constructor defined and .. . at least a non-static data member . Then it fails with missing field initializers . But then you can use value to construct the object . Ok maybe this is the same as the first exception value init the object .. . .. . ...Except when : .. . .. . the class has a deleted constructor .. . and at least one data-members in-class default initialized . Then nor nor value can create an object . I am sure I missed a few . The irony is that it is called uniform-initialization syntax . I say again : UNIFORM initialization syntax . What is this madness Scenario A .. . .. . Deleted default constructor : .. . .. . Scenario B .. . .. . Deleted default constructor other constructors deleted .. . .. . Scenario C .. . .. . Deleted default constructor other constructors defined .. . .. . Scenario D .. . .. . Deleted default constructor no other constructors defined data member .. . .. . Scenario E .. . .. . Deleted default constructor deleted T constructor T data member .. . .. . Scenario F .. . .. . Deleted default constructor in-class data member initializers .. . .. . Comment : this stackoverflow.com questions 23882409 http : stackoverflow.com questions 23882409 c14-value-initialization-with-deleted-constructor answers half the question . The most important one but still doesn t answer what happens with in-class data member initializes and non-default constructors . Comment : Sorry I was too hasty . Here aggregate initialization is performed precisely because the constructor is defined as deleted on its first declaration . .. . Answer : What s messing you up is aggregate initialization . As you say there are benefits and drawbacks to using list-initialization . The term uniform-initialization is not used by the C++ Standard . One of the drawbacks is that list-initialization behaves differently for aggregates than non-aggregates . Also the definition of aggregate changes slightly with each Standard . .. . .. . Aggregates are not created via a constructor . Technically they actually might be but this is a good way to think of it . Instead when creating an aggregate memory is allocated and then each member is initialized in order according to what s in the list initializer . Non-aggregates are created via constructors and in that case the members of the list initializer are constructor arguments . There is actually a design flaw in the above : if we have T t1 T t2 t1 then the intent is to perform copy-construction . However prior to C++14 if T is an aggregate then aggregate initialization happens instead and t2 s first member is initialized with t1 . This flaw was fixed in a defect report http : www.open-std.org jtc1 sc22 wg21 docs cwg defects.html 1467 which modified C++14 so from now on copy-construction is checked for before we move onto aggregate initialization . .. . .. . The definition of aggregate from C++14 is : .. . .. . An aggregate is an array or a class Clause 9 with no user-provided constructors 12.1 no private or protected non-static data-members Clause 11 no base classes Clause 10 and no virtual-functions 10.3 . In C++11 a default-value for a non-static member meant a class was not an aggregate however that was changed for C++14 . User-provided means user-declared but not default or delete . .. . .. . If you want to make sure that your constructor call never accidentally performs aggregate initialization then you have to use rather than and avoid MVPs in other ways . Comment : IMHO this area of the standard needs improved . It d be nice if classes could formally be marked as aggregate or non-aggregate and perhaps also if the aggregate-constructor were formalized . Comment : Or maybe get rid of aggregate classes altogether i.e . treat all classes according to the non-aggregate rules . Comment : I think the defect report was filed against C++11 so it could be fixed in C++14 . Comment : @5gon12eder see CWG 1467 http : www.open-std.org jtc1 sc22 wg21 docs cwg defects.html 1467 . C++14 was published without the fix and then it was accepted as a defect in November 2014 . I m not sure whether this means that it is considered to apply back to C++11 or not possibly moot as officially C++14 wholly replaces C++11 although compilers would have to decide what to do in -std c++11 mode Comment : If we have T t2 t1 then the intent is to perform copy-construction . Unless T is std : : vector boost : : any in which case the intent is to initialize t2 with an initializer-list whose single element is a copy of t1 . This is the subject of Core Issue 2137 http : www.open-std.org jtc1 sc22 wg21 docs cwg active.html 2137 which might get re-fixed in C++17 if we re lucky . It was fine in C++11 then broken in C++14 . If you literally must have copy-construction the syntax for that is auto t2 t1 .", "Question : Item 13 from Scott Mayers Effective Modern C++ states to prefer const iterators over iterators . I agree but I also want to use non-member functions rather than member-functions . According to the book there should be a non-member function std : : cbegin and std : : cend in C++14 . To make use of this functions I just installed gcc version 4.9.2 and compiled with the flag -std c++14 . It seems to compile until I try to use std : : cbegin . I start searching for the support for this function but couldn t find anything about it . For example at gnu onlinedocs status https : gcc.gnu.org onlinedocs libstdc++ manual status.html the function isn t even mentioned . My question is will std : : cbegin and std : : cend really be supported in c++14 or is this a mistake in the book If it will be a C++14 feature are there compilers which already support these functions and when will gcc support it There are many questions at SO about begin but these questions are about the member-functions or about the constexpr-ness and not about the support of the non-member variant . .. . Answer : Yes they are cppreference describes them along begin http : en.cppreference.com w cpp iterator begin end http : en.cppreference.com w cpp iterator end . And the standard defines it in section 24.7 - Range access . I m not citing it because it s a bunch of template function definitions which agree with the above links . The draft which should be very close to the final version I can t remember the number for the final draft sorry : http : www.open-std.org jtc1 sc22 wg21 docs papers 2014 n4296.pdf .. . .. . As a matter of fact you can play with embedded examples on the cppreference and change begin and end calls to cbegin cend and try to run them . gcc 4.9 complains though gcc 5.1 already works as well as clang 3.6 . So it s just a matter of compiler support .", "Question : How does generic-lambda work auto keyword as an argument type in C++14 standard Is it based on C++ templates where for each different argument type compiler generates a new function with the same body but replaced types compile-time polymorphism or is it more similar to Java s generics type-erasure Code example : Comment : Fixed to C++14 originally used C++11 in question .. . Answer : Generic lambdas were introduced in C++14 . Simply the closure type defined by the lambda expression will have a templated call operator rather than the regular non-template call operator of C++11 s lambdas of course when auto appears at least once in the parameter list . So your example : .. . .. . Will make glambda an instance of this type : .. . .. . Paragraph 5.1.2 5 of the C++14 Standard Draft n3690 specifies how the call operator of the closure type of a given lambda expression is defined : .. . .. . The closure type for a non-generic lambda-expression has a public inline function-call operator 13.5.4 whose parameters and return-type are described by the lambda-expression s parameter-declaration-clause and trailing-return-type respectively . For a generic-lambda the closure type has a public inline function-call operator member template 14.5.2 whose template-parameter-list consists of one invented type template-parameter for each occurrence of auto in the lambda s parameter-declaration-clause in order of appearance . The invented type template-parameter is a parameter pack if the corresponding parameter-declaration declares a function-parameter pack 8.3.5 . The return-type and function parameters of the function-call operator template are derived from the lambda-expression s trailing-return-type and parameter-declarationclause by replacing each occurrence of auto in the decl-specifiers of the parameter-declaration-clause with the name of the corresponding invented template-parameter . Finally : .. . .. . Is it similar to templates where for each different argument type compiler generates functions with the same body but changed types or is it more similar to Java s generics As the above paragraph explains generic lambdas are just syntactic-sugar for unique unnamed functors with a templated call operator . That should answer your question : Comment : However they also allow a locally defined class with a template method . Which is new . Comment : @Yakk : Wasn t the restriction for function-local templates dropped altogether with C++11 already Comment : @phresnel : Nope that restriction has not been lifted Comment : @AndyProwl : I realise my mistake . What was lifted indeed was using local types as template arguments as in int main struct X std : : vector X x Comment : @phresnel : Right that has changed indeed", "Question : How does generic-lambda work auto keyword as an argument type in C++14 standard Is it based on C++ templates where for each different argument type compiler generates a new function with the same body but replaced types compile-time polymorphism or is it more similar to Java s generics type-erasure Code example : Comment : Fixed to C++14 originally used C++11 in question .. . Answer : It s a proposed C++14 feature not in C++11 similar or even equivalent to templates . For instance N3559 http : www.open-std.org JTC1 SC22 WG21 docs papers 2013 n3559.pdf provides this example : .. . .. . For example this generic lambda-expression containing statement : .. . .. . .. . auto L const auto x auto y return x + y .. . .. . .. . might result in the creation of a closure type and object that behaves similar to the struct below : .. . .. . .. . struct anonymous .. . .. . template typename T typename U .. . auto operator const T x U y const N3386 Return type deduction .. . return x + y .. . L .. .", "Question : Here is the MCVE : .. . .. . It compiles fine with : .. . .. . clang++ -std c++11 main.cpp .. . .. . but not with : .. . .. . clang++ -std c++14 main.cpp .. . .. . Error message in the later case with -std c++14 : .. . .. . Compiler version information : .. . .. . So what s wrong Comment : Interesting to note that gcc libstdc++ has this failing in both C++11 and C++14 which seems like a good thing since this is basically undefined-behavior . Comment : You know I was almost sure I had seen this issue before see : Visual Studio regex iterator Bug http : stackoverflow.com q 29895747 1708801 although this is with regex iterator regex token iterator . .. . Answer : This not a bug but expected behaviour . The reason is that s returns a temporary string regex search makes use of regex match and consequently if a temporary string was utilized match results would contain iterators to a string that no longer exists . This would have been undefined behaviour . Thus the committee abolished this regex search overload in C++14 . You can also confirm in the standard 28.4 Header synopsis re.syn : .. . .. . As you can see the overload that takes a rvalue to a basic string is marked deleted .", "Question : In the latest template constraints paper a new toolset to constrain template arguments is presented . Also in C++14 variable-templates are provided . Variable templates allow the definition of type parameterized constants among other things . There is no mention of how these feature could interact . Using the canonical example of pi we could have this : .. . .. . This would enforce the C C++ numeric conversion from integral to double . It would also prevent instantiation with totally irrelevant types . Looking at this we might want to replace Floating point with something that requires a floating-point ctor in order to support complex . Did I miss something in one of the papers or is this in the works Maybe it comes for free and is not worth mentioning Comment : Retagged c++1y http : stackoverflow.com questions tagged c 2b 2b1y in accordance with this meta discussion http : meta.stackexchange.com questions 177625 c14-or-c1y . Comment : In the first example you don t use the Integral template type and double isn t an integral anyway . It looks like you re trying to specialise a constexpr template . Is that what you want How does this relate to constraints Do you mean Concepts Concepts Lite is in C++14 but agains this doesn t relate to your example . Comment : I was trying to specialize the variable template for integral types to promote to double this is what math functions in the library do . Maybe I messed up the syntax . I wanted Integral to dispatch to this specialization - not to use it . Comment : @cdmh Concepts Lite is not in C++14 Comment : @JonathanWakely really Thanks for clarifying I thought they made it . .. . Answer : In the latest version of the proposal N4040 http : www.open-std.org jtc1 sc22 wg21 docs papers 2014 n4040.pdf dated May 2014 the answer would be NO : .. . .. . 5 A variable template has the following restrictions : .. . .. . The template must be unconstrained . .. . The declared type must be bool . .. . The declaration must have an initializer . .. . The initializer shall be a constraint-expression . .. . Example : .. . .. . end example Comment : @emsr is this answer in its current form acceptable or do i need to address some issues with it", "Question : I m currently using C++11 features in my Qt applications . However I d like to use some of the new C++14 features in my applications . To enable C++11 in a Qt application one only needs to add one line in the qmake project file namely : .. . .. . or this for earlier versions : .. . .. . I already tried to do the same with C++14 but it didn t work . I changed the above mentioned line of the qmake project like this : .. . .. . or this for earlier versions : .. . .. . After that lots of compilation errors that did not exist before appear when trying to build the project . The project compiles fine however if I try to use any C++14 features I get a compilation error . This is an example : .. . .. . This is the corresponding error : .. . .. . How to enable C++14 features when using a qmake project in QtCreator I am using Qt 5.3.2 Qt Creator 3.2.1 and MinGW 4.8.2 32-bit . Comment : Also I edited the question a bit to make it clearer what you are asking . If I understood wrong please don t hesitate to roll-back . Comment : Maybe worth a read too : woboq.com blog cpp14-in-qt.html http : woboq.com blog cpp14-in-qt.html Comment : @guruz : oh I have just submitted an answer before seeing your comment indeed .. . Answer : For some weird reason this is what Qt does : If the compiler is gcc or mingw CONFIG+ C++14 is transformed to a compiler flag -std c++14 that what you expect .. . .. . If it s another compiler like clang CONFIG C++14 is stupidly transformed to -std c++11 sic so you will get errors about unsupported features even if your clang version correctly supports C++14 . To fix it specify the flag explicitly : .. . .. . This way you re sure that your compiler g++ mingw or clang will receive the correct flags . Comment : Nice find Exactly my issue compiling for android it was forcing over to C++11 which doesn t have make unique . Thanks", "Question : AFAIK C++11 14 does not allow in-place definition of a new return-type while defining a lambda . However it seems a C++14 lambda capture expression essentially creates an anonymous type with one or more members and an operator . So why is that the compiler does not allow access to the captured members from outside the lambda . My feeble mind cannot handle the complexities of C++ but does it sound like a reasonable language extension to you Here is an example . Comment : AFAIK C++11 14 does not allow in-place definition of a new type while defining a lambda . What do you mean Inside the lambda-capture or inside the lambda-body Comment : I mean to say more like a new return-type . Comment : AFAIK there are anonymous local classes in C++ vector string words Stack Overflow struct decltype words w l words cout l.w 0 Live example http : coliru.stacked-crooked.com a 95fc5770a6a0036d Comment : @Live example : The issue is that the anonymous local classes can t be used in an expression . For instance right when calling a function . Comment : You can pass them to function-templates . Lambdas have the same restriction : Each lambda-expression is of a unique type i.e auto x return 42 auto y return 42 -- x and y have different types . .. . Answer : The status quo .. . .. . This was discussed when lambda init-captures were added to the language . The current working draft of the standard N3797 says in expr.prim.lambda p11 : .. . .. . For every init-capture a non-static data member named by the identifier of the init-capture is declared in the closure type . The standard does not specify the access of that member making it unclear whether this is valid : .. . .. . This and some other specification problems with init-captures led to national body comment GB3 on the standard draft which is handled by the C++ core working group as core issue 1760 http : www.open-std.org jtc1 sc22 wg21 docs cwg active.html 1760 . In discussion of that issue the core working group decided that the lambda s init-captures should not be accessible members of the closure object . The resolution for issue 1760 which is approved by CWG but not yet by the full committee changes the specification to instead say : .. . .. . An init-capture behaves as-if it declares and explicitly captures a variable of the form auto init-capture whose declarative region is the lambda-expression s compound-statement .. . .. . .. . This new wording makes it clear that the init-capture does not add a nameable member of the closure object and it instead acts like any other lambda capture . As a language extension .. . .. . Making init-captures be accessible members of the closure type is certainly possible and my initial implementation of init-captures in clang did that before I implemented the resolution of issue 1760 . It also seems like a useful feature but it would also allow violation of the encapsulation of lambda-expressions in the common case where the init-captures should not be visible ." ] }
[ "yes-answer-long", "yes-answer-short" ]
c++
UNK_RELATION
getopt-long@command-line@37
getopt-long -- getopt : : long is a @placeholder switch parsing library for perl.for c-programming : the getopt and getopt-long functions automate some of the chore involved in parsing typical unix command-line options .
{ "confidence": [ 88.0128402709961, 83.3260498046875, 81.06829833984375, 77.31427001953125, 66.71073913574219, 66.71073913574219, 66.63650512695312, 66.23047637939453, 63.84670639038086, 62.14110565185547, 61.713111877441406, 60.741554260253906, 57.79518127441406, 50.01694107055664, 48.469688415527344, 45.811302185058594, 44.954227447509766, 43.16944122314453, 42.26854705810547, 41.10455322265625, 40.42312240600586, 37.197654724121094, 32.66197204589844, 28.409034729003906, 26.429624557495117, 26.237590789794922, 24.531835556030273, 23.16832733154297, 21.46759605407715, 21.28591537475586, 21.154705047607422, 20.80057716369629, 19.36770248413086, 19.36770248413086, 18.740013122558594, 18.63275146484375, 18.63275146484375, 18.63275146484375, 18.63275146484375, 18.63275146484375, 18.63275146484375, 18.63275146484375, 18.63275146484375, 18.63275146484375, 18.63275146484375, 18.63275146484375, 18.63275146484375, 18.63275146484375, 18.63275146484375, 18.63275146484375, 18.63275146484375, 18.63275146484375, 18.63275146484375, 18.63275146484375, 18.63275146484375, 18.63275146484375, 18.63275146484375, 18.63275146484375, 18.63275146484375, 18.63275146484375, 18.63275146484375, 18.63275146484375, 18.63275146484375, 18.63275146484375, 18.095041275024414, 18.057422637939453, 16.750341415405273, 16.750341415405273, 16.750341415405273, 16.750341415405273, 14.494220733642578, 14.494220733642578, 14.494220733642578, 14.494220733642578, 14.494220733642578, 14.494220733642578, 14.494220733642578, 14.494220733642578, 14.494220733642578, 14.494220733642578, 14.494220733642578, 14.494220733642578, 14.494220733642578, 14.494220733642578, 14.494220733642578, 14.494220733642578, 14.494220733642578, 14.494220733642578, 14.494220733642578, 14.494220733642578, 14.494220733642578, 14.494220733642578, 14.494220733642578, 14.494220733642578, 14.494220733642578, 14.494220733642578, 14.494220733642578, 14.494220733642578, 14.494220733642578 ], "content": [ "For the sake of parsing I am using getopt http : man7.org linux man-pages man3 getopt.3.html .. . .. . How to achieve this using getopt", ".. . .. . so you have to do : .. . .. . .. . .. . Quoting from the documentation of getopt : .. . .. . Note .. . .. . The getopt module is a parser for command-line options whose API is designed to be familiar to users of the C getopt function .", "According to getopt man page getopt uses next argument .", "Note that Perl s Getopt : : Long module does NOT have the same requirement .", "Just ran into this but this is mentioned in man getopt now .", ".. . If there are no more option characters getopt returns -1 .", "Although not mentioned in glibc documentation or getopt man page optional arguments to long style command-line parameters require equals sign .", "The getopt http : pubs.opengroup.org onlinepubs 9699919799 functions getopt.html function doesn t support double-dashes for options at all .", "@EvanCarroll I keep a skeleton script that has all the boilerplate code including GetOpt : : Long so I don t have to remember .", "I want to use getopt to get input from command-line argument with long option only .. . .. . Example : . script --empid 123 .. . .. . I am getting the error getopt.GetoptError : option --empid not recognised error with the above code .", "You ve specified s http : perldoc.perl.org Getopt Long.html Options-with-hash-values - defining an option that specifies hash entries .", "getopt sets the optind variable to indicate the position of the next argument .", "I m making a small program in C that deals with a lot of command-line-arguments so I decided to use getopt to sort them for me .", "Briefly : you re supposed to do something like the following though this may be a little over-pedantic : .. . .. . From among the comments preceding getopt internal : .. . .. . .. . .. . .. . If getopt finds another option character it returns that character updating optind and nextchar so that the next call to getopt can resume the scan with the following option character or ARGV-element .", "Users who are unfamiliar with the C getopt function or who would like to write less code and get better help and error messages should consider using the argparse https : docs.python.org dev library argparse.html module instead . .. . .. . Example of usage of argparse : .. . .. . This module is much more flexible advanced and at the same time easier to use than getopt .", "If an option is required you check from program logic if an option is optional then you need not do anything because at getopt level all options are optional they are not mandatory so there is no use-case of optional argument .", "getopt is intended for implementing programs which conform to the POSIX Utility Syntax Guidelines http : pubs.opengroup.org onlinepubs 9699919799 basedefs V1 chap12.html tag 12 02 where -- has a special meaning of causing all subsequent arguments to be treated as non-options even if they have the form of options e.g .", "To accept only long options options should be an empty string .", "I ran into the same problem with regular getopt and when using an optstring a : : optarg would only be set if you have ZERO space between the option and the argument such as -afoo", "Long options which require an argument should be followed by an equal sign .", "You could try checking whether argv optind-1 is -- after getopt finishes but this would give false positives in cases where the -- was the argument to an option that takes an argument something like -f -- where -f needs an argument which you might need to work around .", ".. . .. . .. . long options if specified must be a list of strings with the names of the long options which should be supported .", "you didn t read the documentation for getopt.getopt https : docs.python.org 2 library getopt.html getopt.getopt : .. . .. . getopt.getopt args options long options .. . .. . Parses command-line options and parameter list .", "In C getopt-long does not parse the optional arguments to command-line parameters parameters .", "A little silly that I have to force continued parsing by micro-managing a global variable but it gets the job done", "long options is the third parameter of getopt.getopt https : docs.python.org 2 library getopt.html getopt.getopt : .. . .. . The first line should be :", "Perhaps use s@ instead to ingest a set of simple options", "I want to be able to send it a custom argument on the command-line so I ve created an argument --ftp-args .. . .. . This is what it looks like .. . .. . However whenever I try to call it I get an error .. . .. . Is it possible to get around this and make this possible", "I also want to be able to have the non-options either before or after the options so how would that be handled", "I have a simple script where I want the user to be able to specify the separator : .. . .. . But if I don t seem to find the way to pass t and be evaluated as a tab in the script : .. . .. . Neither produces my desired output which is the values separated by tabs in the command-line result .", "It is common to require that options come before arguments .", "Add code similar to this after the options loop : .. . .. . Edit : .. . .. . If you want to allow options after regular arguments you can do something similar to this :", "The ARGV-elements have been permuted so that those that are not options now come last .", "ps : for the above example i think the correct options are --praise --praise-name name --blame --blame-name name", "At least for my short options like -a or -a 300 I needed to add an if optarg 0 memmove optarg optarg+1 strlen optarg to strip away the .", "I ve got a client-side script I m making that communicates with GNU-FTP .", "That implies a form key-value for each argument to the option .", "But you ve only specified -E .", "The error message is about the missing value part not the leading - .", "Or give an empty value using -E if you need to separate the keys and values before passing them to ftp .", "I didn t want the at all simple s .", "Damn so much for copy-and-pasting code I ve used a thousand times without looking it up .", "I have to restrict when the user gives -- as an option .", "For example : .. . .. . should thrown an error .", "Can you please try to add more text http : stackoverflow.com posts 23738016 edit", "I find it very hard to understand your question .", "Or are you meaning the option terminator sequence", "Please edit your question to clarify .", "I will try hinting about getopt-long but it might not be what the questioner wanted to know about .", "@JoachimPileborg : Yes it does .", "-- marks the end of option arguments even if the next subsequent argument looks like it would be an option .", "rm -- -f to remove a file named -f .", "There s no explicit way to suppress this behavior .", "If you really want argument handling that does not conform to the Utility Syntax Guidelines you might be better off rolling your own from scratch .", "What might have gone wrong", "The leading -- characters should not be included in the option name .", "Optional arguments are not supported .", "Thanks for you help .", "How can I miss out the most important sentence.. .", "Thanks for your help. . Its working now", "If I define .. . .. . can I store two values in the optarg", "This is the code what I want to use : .. . .. . and I would like to store two values Tommy and 123-123-123 by using --add once .", "I m afraid you can t .", "So you can : .. . .. . either use . a.out --add Tommy 123-123-123 and the quotes makes the shell take Tommy 123-123-123 as a single argument .. . or program by hand your own option parser", "Yeah I know but for example with the ssh command the -p flag can come either before or after the mandatory username@server argument .", ".. . .. . .. . .. . .. . though you have to do some reading between the lines .", "Have you tried an actual tab character", "E.g .", "-sep echo -e t .", "this is really a shell question as you are calling the perl script from a shell .. . .. . In bash this works .. . .. . Also using ctrl v followed by pressing tab and putting that in double quotes works", "When I run the program the optional argument is not recognized like the example run below .", "Here is the test code .", "I m documenting this here with the answer so other people does not need to bang their head against the wall .", "Space separating the optional argument from the parameter does not work .", "An example run with the test code : .. . .. . .. . . respond --praise John .. . Kudos to John .. . . respond --praise John .. . Kudos to John .. . . respond --blame John .. . You suck", ". respond --blame John .. . You suck John", "Boost.Program options does .", "Wow this sucks .", "Otherwise I would always have had 300 in optarg .", "Or I would have needed to call it like this : -a300 - which is quite ugly I think .", "Thanks for your answer anyway it helped me a lot", "In this case it s better not to use optional arguments .", "Is this a bug or a feature", "Now I have an urge to . respond --blame glibc .", "The man page certainly doesn t document it very well but the source code helps a little .", "Then optind is the index in ARGV of the first ARGV-element that is not an option .", "-- a note from me : if the 3rd argument to getopt-long starts with a dash argv will not be permuted .. . .. . .. . .. . .. . If a char in OPTSTRING is followed by a colon that means it wants an arg so the following text in the same ARGV-element or the text of the following ARGV-element is returned in optarg .", "Two colons mean an option that wants an optional arg if there is text in the current ARGV-element it is returned in optarg otherwise optarg is set to zero .", "The following does what you want :", "I also ran into the same problem and came here .", "Then I realised this .", "You don t have much of a use-case of optional argument .", "Hope this helps .", "However I want two non-option arguments source and destination files to be mandatory so you have to have them as arguments while calling the program even if there s no flags or other arguments .", "Here s a simplified version of what I have to handle the arguments with flags : .. . .. . How do I edit this so that non-option arguments are also handled", "OK but my loop will exit if the mandatory arguments come before the optional ones so only the mandatory ones will be processed and not the optional ones .", "How do i fix this", "Just specify it in the man page .", "I just wanna know how to do that" ] }
{ "confidence": [ 111.03479766845703, 95.34341430664062, 90.96233367919922, 88.04993438720703, 86.82157135009766, 77.6929702758789, 76.46785736083984, 75.14996337890625, 69.05165100097656, 22.431461334228516 ], "content": [ "Question : I want to use getopt to get input from command-line argument with long option only .. . .. . Example : . script --empid 123 .. . .. . I am getting the error getopt.GetoptError : option --empid not recognised error with the above code . What might have gone wrong .. . Answer : you didn t read the documentation for getopt.getopt https : docs.python.org 2 library getopt.html getopt.getopt : .. . .. . getopt.getopt args options long options .. . .. . Parses command-line options and parameter list . .. . .. . .. . long options if specified must be a list of strings with the names of the long options which should be supported . The leading -- characters should not be included in the option name . Long options which require an argument should be followed by an equal sign . Optional arguments are not supported . To accept only long options options should be an empty string . .. . .. . so you have to do : .. . .. . .. . .. . Quoting from the documentation of getopt : .. . .. . Note .. . .. . The getopt module is a parser for command-line options whose API is designed to be familiar to users of the C getopt function . Users who are unfamiliar with the C getopt function or who would like to write less code and get better help and error messages should consider using the argparse https : docs.python.org dev library argparse.html module instead . .. . .. . Example of usage of argparse : .. . .. . This module is much more flexible advanced and at the same time easier to use than getopt . Comment : Thanks for you help . How can I miss out the most important sentence.. .", "Question : I have to restrict when the user gives -- as an option . For example : .. . .. . should thrown an error . For the sake of parsing I am using getopt http : man7.org linux man-pages man3 getopt.3.html .. . .. . How to achieve this using getopt Comment : Can you please try to add more text http : stackoverflow.com posts 23738016 edit I find it very hard to understand your question . Comment : The getopt http : pubs.opengroup.org onlinepubs 9699919799 functions getopt.html function doesn t support double-dashes for options at all . Or are you meaning the option terminator sequence Please edit your question to clarify . Comment : I will try hinting about getopt-long but it might not be what the questioner wanted to know about . Comment : @JoachimPileborg : Yes it does . -- marks the end of option arguments even if the next subsequent argument looks like it would be an option . .. . Answer : getopt is intended for implementing programs which conform to the POSIX Utility Syntax Guidelines http : pubs.opengroup.org onlinepubs 9699919799 basedefs V1 chap12.html tag 12 02 where -- has a special meaning of causing all subsequent arguments to be treated as non-options even if they have the form of options e.g . rm -- -f to remove a file named -f . There s no explicit way to suppress this behavior . You could try checking whether argv optind-1 is -- after getopt finishes but this would give false positives in cases where the -- was the argument to an option that takes an argument something like -f -- where -f needs an argument which you might need to work around . If you really want argument handling that does not conform to the Utility Syntax Guidelines you might be better off rolling your own from scratch .", "Question : In C getopt-long does not parse the optional arguments to command-line parameters parameters . When I run the program the optional argument is not recognized like the example run below . Here is the test code . Comment : I m documenting this here with the answer so other people does not need to bang their head against the wall . .. . Answer : Although not mentioned in glibc documentation or getopt man page optional arguments to long style command-line parameters require equals sign . Space separating the optional argument from the parameter does not work . An example run with the test code : .. . .. . .. . . respond --praise John .. . Kudos to John .. . . respond --praise John .. . Kudos to John .. . . respond --blame John .. . You suck . respond --blame John .. . You suck John Comment : Note that Perl s Getopt : : Long module does NOT have the same requirement . Boost.Program options does . Comment : Wow this sucks . I ran into the same problem with regular getopt and when using an optstring a : : optarg would only be set if you have ZERO space between the option and the argument such as -afoo Comment : Just ran into this but this is mentioned in man getopt now . Comment : At least for my short options like -a or -a 300 I needed to add an if optarg 0 memmove optarg optarg+1 strlen optarg to strip away the . Otherwise I would always have had 300 in optarg . Or I would have needed to call it like this : -a300 - which is quite ugly I think . Thanks for your answer anyway it helped me a lot Comment : In this case it s better not to use optional arguments . Is this a bug or a feature Now I have an urge to . respond --blame glibc .", "Question : I want to use getopt to get input from command-line argument with long option only .. . .. . Example : . script --empid 123 .. . .. . I am getting the error getopt.GetoptError : option --empid not recognised error with the above code . What might have gone wrong .. . Answer : long options is the third parameter of getopt.getopt https : docs.python.org 2 library getopt.html getopt.getopt : .. . .. . The first line should be : Comment : Thanks for your help. . Its working now", "Question : I ve got a client-side script I m making that communicates with GNU-FTP . I want to be able to send it a custom argument on the command-line so I ve created an argument --ftp-args .. . .. . This is what it looks like .. . .. . However whenever I try to call it I get an error .. . .. . Is it possible to get around this and make this possible .. . Answer : You ve specified s http : perldoc.perl.org Getopt Long.html Options-with-hash-values - defining an option that specifies hash entries . That implies a form key-value for each argument to the option . But you ve only specified -E . The error message is about the missing value part not the leading - . Perhaps use s@ instead to ingest a set of simple options Or give an empty value using -E if you need to separate the keys and values before passing them to ftp . Comment : I didn t want the at all simple s . Damn so much for copy-and-pasting code I ve used a thousand times without looking it up . Comment : @EvanCarroll I keep a skeleton script that has all the boilerplate code including GetOpt : : Long so I don t have to remember .", "Question : I m making a small program in C that deals with a lot of command-line-arguments so I decided to use getopt to sort them for me . However I want two non-option arguments source and destination files to be mandatory so you have to have them as arguments while calling the program even if there s no flags or other arguments . Here s a simplified version of what I have to handle the arguments with flags : .. . .. . How do I edit this so that non-option arguments are also handled I also want to be able to have the non-options either before or after the options so how would that be handled .. . Answer : getopt sets the optind variable to indicate the position of the next argument . Add code similar to this after the options loop : .. . .. . Edit : .. . .. . If you want to allow options after regular arguments you can do something similar to this : Comment : OK but my loop will exit if the mandatory arguments come before the optional ones so only the mandatory ones will be processed and not the optional ones . How do i fix this Comment : It is common to require that options come before arguments . Just specify it in the man page . Comment : Yeah I know but for example with the ssh command the -p flag can come either before or after the mandatory username@server argument . I just wanna know how to do that Comment : @Conor I ve added an outline on how to do it see the edit above . Comment : Your edit code was very helpful thanks . A little silly that I have to force continued parsing by micro-managing a global variable but it gets the job done", "Question : If I define .. . .. . can I store two values in the optarg This is the code what I want to use : .. . .. . and I would like to store two values Tommy and 123-123-123 by using --add once . .. . Answer : I m afraid you can t . According to getopt man page getopt uses next argument . So you can : .. . .. . either use . a.out --add Tommy 123-123-123 and the quotes makes the shell take Tommy 123-123-123 as a single argument .. . or program by hand your own option parser", "Question : In C getopt-long does not parse the optional arguments to command-line parameters parameters . When I run the program the optional argument is not recognized like the example run below . Here is the test code . Comment : I m documenting this here with the answer so other people does not need to bang their head against the wall . .. . Answer : The man page certainly doesn t document it very well but the source code helps a little . Briefly : you re supposed to do something like the following though this may be a little over-pedantic : .. . .. . From among the comments preceding getopt internal : .. . .. . .. . .. . .. . If getopt finds another option character it returns that character updating optind and nextchar so that the next call to getopt can resume the scan with the following option character or ARGV-element . .. . If there are no more option characters getopt returns -1 . Then optind is the index in ARGV of the first ARGV-element that is not an option . The ARGV-elements have been permuted so that those that are not options now come last . -- a note from me : if the 3rd argument to getopt-long starts with a dash argv will not be permuted .. . .. . .. . .. . .. . If a char in OPTSTRING is followed by a colon that means it wants an arg so the following text in the same ARGV-element or the text of the following ARGV-element is returned in optarg . Two colons mean an option that wants an optional arg if there is text in the current ARGV-element it is returned in optarg otherwise optarg is set to zero . .. . .. . .. . .. . .. . though you have to do some reading between the lines . The following does what you want :", "Question : In C getopt-long does not parse the optional arguments to command-line parameters parameters . When I run the program the optional argument is not recognized like the example run below . Here is the test code . Comment : I m documenting this here with the answer so other people does not need to bang their head against the wall . .. . Answer : I also ran into the same problem and came here . Then I realised this . You don t have much of a use-case of optional argument . If an option is required you check from program logic if an option is optional then you need not do anything because at getopt level all options are optional they are not mandatory so there is no use-case of optional argument . Hope this helps . ps : for the above example i think the correct options are --praise --praise-name name --blame --blame-name name", "Question : I have a simple script where I want the user to be able to specify the separator : .. . .. . But if I don t seem to find the way to pass t and be evaluated as a tab in the script : .. . .. . Neither produces my desired output which is the values separated by tabs in the command-line result . Comment : Have you tried an actual tab character E.g . -sep echo -e t . .. . Answer : this is really a shell question as you are calling the perl script from a shell .. . .. . In bash this works .. . .. . Also using ctrl v followed by pressing tab and putting that in double quotes works" ] }
[ "yes-answer-long", "yes-answer-short" ]
command-line
UNK_RELATION
kernel-mode@operating-system@131
kernel-mode -- kernel-mode also referred to as system mode is one of the two distinct modes of operation of the cpu in which core @placeholder components including device drivers execute .
{ "confidence": [ 55.8574104309082, 54.764991760253906, 53.42511749267578, 52.45676040649414, 51.81924057006836, 51.60372543334961, 51.36124801635742, 51.15183639526367, 50.50510025024414, 50.21623229980469, 50.21623229980469, 49.79825973510742, 49.54595947265625, 49.43867492675781, 49.43867492675781, 49.43867492675781, 48.567562103271484, 48.536373138427734, 48.232242584228516, 48.09880065917969, 48.09880065917969, 47.440643310546875, 47.24489212036133, 46.921043395996094, 46.492923736572266, 46.492923736572266, 46.492923736572266, 46.492923736572266, 46.248844146728516, 46.248844146728516, 46.09159469604492, 46.09159469604492, 46.09159469604492, 45.303165435791016, 45.303165435791016, 45.24478530883789, 44.877784729003906, 44.7517204284668, 44.7517204284668, 44.609153747558594, 44.09339904785156, 43.96329116821289, 43.75251007080078, 43.608497619628906, 43.56916809082031, 43.4393196105957, 43.145843505859375, 43.145843505859375, 43.145843505859375, 42.68572998046875, 42.56322479248047, 42.35741424560547, 42.35741424560547, 42.35741424560547, 42.35741424560547, 42.35741424560547, 42.35741424560547, 42.35741424560547, 42.180816650390625, 41.56861877441406, 41.26207733154297, 41.26207733154297, 41.223350524902344, 40.98637771606445, 40.98637771606445, 40.47364807128906, 40.12295913696289, 39.93553161621094, 39.73265838623047, 39.73265838623047, 39.73265838623047, 39.73265838623047, 39.61747360229492, 39.61747360229492, 39.443641662597656, 39.34712219238281, 38.78270721435547, 38.392784118652344, 38.392784118652344, 38.392784118652344, 38.392784118652344, 38.392784118652344, 38.392784118652344, 37.573734283447266, 37.543479919433594, 37.379215240478516, 36.786903381347656, 36.786903381347656, 36.786903381347656, 36.786903381347656, 36.786903381347656, 36.786903381347656, 36.786903381347656, 36.786903381347656, 36.786903381347656, 36.786903381347656, 36.786903381347656, 36.323387145996094, 35.97992706298828, 35.474979400634766 ], "content": [ "Is there an equivalent function for windows kernel-mode drivers", "It runs in kernel-mode .", "returns from kernel-mode .", "They can occur in user-mode and kernel-mode .", "There is no MSVCR90.DLL in kernel-mode .", "Memory management in kernel-mode drivers is a lot more complicated than in user-mode applications .", "This read request reaches to Device Driver routine which is running in Kernel mode .", "Or is that still not allowed even in kernel-mode", "I m developing a kernel-mode driver for an Anti Virus program but I ve a problem in Drivers section .. . .. . I want to send a string value For example String from Kernel-mode driver to user-mode application .", "First : What is user mode synchronization and kernel-mode synchronization", "Then by some mechanism it goes into the kernel-mode from the user mode to do such operations .", "Possible duplicate of Threads in User and kernel-mode http : stackoverflow.com questions 17515676 threads-in-user-and-kernel-mode", "I have a minifilter kernel-mode .", "I have an array in my kernel-mode driver .", "Right but there will be a reason for the BSOD - such as divide-by-zero in kernel-mode .", "During kernel-mode debugging things are complex .", "The idea of separating user mode from kernel-mode is so whatever runs in user mode can t interfere with the rest of the system hence the requirement for lesser privileges .", "I figured the user interacts with registers memory by using systems calls which in a sense change from user mode system calls to kernel-mode routines .", "I want to go user mode to execute objdump and go back to kernel-mode .", "You cannot use Win32 API in kernel-mode .", "Why are you fiddling with ACLs in kernel-mode", "A system call is the way you transition between the application user mode and the kernel .", "Kernel mode debug I understand provides access to other drivers and kernel processes that need full access to multiple resources .. . .. . Correct .", "A device-driver routine running in kernel-mode starts the read operation and returns control to its caller .", "I am developing a filter driver Kernel Mode .", "I have a Kernel mode filter driver project .", "Now my question is : Is there a kernel-mode callback for LdrLoadDll", "Kernel mode address translation is very hardware dependent .", "This raises the question for me : is there a time when both options of debug mode are available that it makes sense to choose user mode over a more robust kernel-mode", "This raises the question for me : is there a time when both options of debug mode are available that it makes sense to choose user mode over a more robust kernel-mode", "From this I get to thinking that kernel-mode debugging seems more robust than user mode debugging .", "From this I get to thinking that kernel-mode debugging seems more robust than user mode debugging .", "Thanks Mats. . And how to send data from kernel-mode driver back to user mode applicaction. .", "Well you really can blow up everything in kernel-mode .", "There are a few different ways that you can access a kernel-mode driver .", "Since Windows 10 there is the need to use EV for kernel-mode drivers but libusb already ships the .sys and .dll with valid signature .", "then returns at which point the data is available in the user-application via some magical functions that copy kernel-mode data to user-mode in the lpOutBuffer .", "I have 2 questions about user mode synchronization and kernel-mode synchronization .", "Second : What is differences between user-mode synchronization and kernel-mode synchronization in Linux and Windows", "The kernel on the other hand runs in Privileged Mode .", "They are not in kernel-mode Ring 0 - they have no extra privileges as far as the CPU hardware is concerned .", "Is there a way to add an ACE to the DACL of a file directory from kernel-mode in windows", "Therefore the adding of one register value to another could be called by a non-privileged user but in the end the kernel is doing the work and is in kernel privileged mode .", "The problem is actually quite simple to formulate : I need to know current CPU and memory consumption of the whole system from kernel-mode driver under Windows .", "how can I obtain runtime information about which version of kernel is running from inside linux-kernel module code kernel-mode", "I tried enabling local kernel debugging with WinDbg but while in kernel-mode cannot switch to a thread context with the .thread command .", "And how to specify a driver as kernel-mode driver or user mode driver while creating a driver project in visual-studio", "Will a user-mode application be sufficient enough to read at the required speed or will I have to write a kernel-mode driver", "Can you name some well-known RTOSes that does not have user mode kernel-mode separation", "While transitioning from user mode to kernel-mode the processor makes a switch between the per-process-user-stack and the per-process-kernel-stack .", "I am developing a kernel-mode filter driver I want this driver to send a UNICODE String to an exe running in user mode .", "In Linux kernel-mode I want to use objdump to disassembly the ELF file .", "Making std : : classes work in Windows kernel-mode is extremely difficult if not impossible .", "For that how do I list the files of a Directory in Kernel Mode", "I found my answer I use kernel-mode callbacks .", "Does a code that runs on kernel-mode uses Physical Addresses or Virtual Addresses", "The answer is that kernel-mode code uses a mixture of virtual logical and physical addressing .", "Does any of these bindings allow to communicate with kernel-mode sw", "Kernel mode debug I understand provides access to other drivers and kernel processes that need full access to multiple resources in addition to the original process address space .", "By usual methods its not possible to delete the file from kernel-mode i.e from device-driver .", "Trap Frame during a transition from user mode to kernel-mode http : i.stack.imgur.com wDALp.png", "User programs are in Unprivileged Mode userspace while the kernel runs in Privileged Mode kernelspace .", "Personally I would presume that User Mode allows the restricted access so nothing could be changed that shouldn t be hence the Kernel mode .", "so how do i start that user mode program from kernel in windows operating-system", "AFAIK kernel-mode sw can open named-pipes in the Local System security context .", "I m a bit confused about the understanding of a mode switch in Unix kernel .", "With additional security features baked into the silicon the kernel can also restrict what kind of instructions tasks are allowed to execute and in combination with the MMU implement proper separation between kernel and user mode space .", "The problem is that the hang occurs inside step 1 in kernel-mode but I don t know how to include kernel data for e.g . in a .dump command .", "If you write incorrect values somewhere in kernel-mode the PC crashes with a blue screen .", "IMHO kernel-mode debugging is not more robust it s more fragile - you can really break everything at the lowest level .", "And of course Security Specialists and Crackers want kernel-mode debugging because they want privileges .", "This encryption checker must implemented in Kernel mode and worse than that it has to write in Win XP .", "I want to know where exactly a kernel-mode driver and a user mode driver resides in the main memory Portion of main memory .", "In the same time I heard from some other people that it is not true and RTOSes such as VxWorks or Integrity have separated user mode kernel-mode .", "The interrupt is handled by kernel-mode driver routines running on this arbitrary thread which belongs-to an arbitrary process .", "From msdn : .. . .. . Drivers that run in kernel-mode must be very careful about directly reading from or writing to addresses in user space .", "Second module is an executable user-mode code which generates data for the simulator and transports it to the simulator via calls to DeviceIOControl under windows API .. . .. . My need is this : I want to be able to execute the user-mode executable from within the kernel-mode .", "For example you wouldn t want a user mode application being able to write to another process or the kernel .", "to start a user mode process in the guest and control it via kernel debugger in the host use ntsd -d app from the guest", "I carefully examined almost all Kernel-Mode Driver Reference in MSDN searching for similar functions and did not succeed .", "So does anyone know how to get same information from kernel-mode driver under Windows", "stackoverflow.com questions 17515676 https : stackoverflow.com questions 17515676 threads-in-user-and-kernel-mode", "Due to the current architecture of the program improve the rights from kernel-mode is the easiest way .", "Some special registers may be privileged those controlling things like descriptor tables or protection levels with which user-mode code could bypass system-mode protections but general-purpose-registers can be changed freely without a kernel getting involved .", "I want to delete a file with specific path Device HarddiskVolume1 file.txt or C : file.txt from kernel-mode .. . .. . Is there any way to do that", "User mode debugging .. . .. . User mode debugging is the default that any IDE will do .", "kernel-mode print driver issue All computers are in a workgroup and withing the same network range. .", "I hook execve in kernel-mode change system call table entry NR execve to my function .", "Sam Protsenko I hook execve in kernel-mode change system call table entry NR execve to my function .", "So my next question is how can I get the value in kernel-mode", "Note : We are aware of the security risks involved in invoking user-mode code from the kernel-space .", "I have a driver kernel-mode KMDF and i have a user preferences form .", "To communicate in kernel-mode and user space I am using this C program http : people.ee.ethz.ch arkeller linux code sysctl.c .", "Delete redirect file name http : stackoverflow.com questions 28212998 how-to-delete-a-file-from-kernel-mode .", "This API is quite similar to its NtXxx analogues and you can use both API set in the kernel-mode .", "@HansPassant Yes you re right But PG only prevent rootkits and kernel-mode malware and isn t for user land defense .", "Yes you should be able to use the Named Pipes Binding in WCF to communicate with the Kernel Mode Software .", "There is so much giong on in kernel-mode and in order to not break it you need to have really professional comprehension of all those topics .", "since I O instructions are privileged instructions that require mode switch from user to kernel is printf also considered a privileged instruction", "I m trying to make an exe profiler and now want to trace log all Dlls that load use in an exe by hooking LdrLoadDll in kernel-mode driver I created the user-mode in the past ." ] }
{ "confidence": [ 66.62588500976562, 65.25385284423828, 64.62337493896484, 60.44771194458008, 60.22615432739258, 59.28506851196289, 55.88044357299805, 55.35535430908203, 55.274505615234375, 54.736656188964844, 54.051673889160156, 53.6259651184082, 53.398983001708984, 53.325706481933594, 53.098079681396484, 53.08979034423828, 52.04255294799805, 52.04255294799805, 51.791534423828125, 51.77942657470703 ], "content": [ "Question : The problem is actually quite simple to formulate : I need to know current CPU and memory consumption of the whole system from kernel-mode driver under Windows . Of course I have watched related question http : stackoverflow.com questions 63166 how-to-determine-cpu-and-memory-consumption-from-inside-a-process and tried this code . Results are not good : environment of Visual Studio 2013 for developing drivers does not know any headers from mentioned samples . E.g . : .. . .. . The code above is not compiling . I carefully examined almost all Kernel-Mode Driver Reference in MSDN searching for similar functions and did not succeed . So does anyone know how to get same information from kernel-mode driver under Windows Or this is impossible This is quite strange if true . Comment : You cannot use Win32 API in kernel-mode . You have to use kernel API functions . Check WDK documentation . Comment : The documented WDK functions focus on things that drivers should do . Which is not creating an operating-system inside an operating-system . NtQueryInformation perhaps it is undocumented and likely to be different across different Windows versions . Comment : It finally appeared that implementing service process in userspace is the easiest solution : it periodically provides driver data about CPU and memory consumption . .. . Answer : Those APIs aren t available to drivers so it s not surprising that your attempt didn t build . Memory management in kernel-mode drivers is a lot more complicated than in user-mode applications . You should investigate pool tracking http : msdn.microsoft.com en-us library windows hardware ff550491 28v vs.85 29.aspx to see if there s a way to use the that to give you the info you want .", "Question : I have 2 questions about user mode synchronization and kernel-mode synchronization . First : What is user mode synchronization and kernel-mode synchronization Second : What is differences between user-mode synchronization and kernel-mode synchronization in Linux and Windows Thanks : - Comment : Possible duplicate of Threads in User and kernel-mode http : stackoverflow.com questions 17515676 threads-in-user-and-kernel-mode Comment : stackoverflow.com questions 17515676 https : stackoverflow.com questions 17515676 threads-in-user-and-kernel-mode .. . Answer : Programs are written to solve problems . To execute a program the operating-system creates a process for that program . A process executes a program . By default a process executes in the user mode . A process may need to use resources like the hard disk or the network connection that are shared by all the processes in the system . Or it might need to do some privileged operation like change its priority . In other words it needs help from someone who has overall access for the system . Then by some mechanism it goes into the kernel-mode from the user mode to do such operations . One such operation is synchronization - both for processes and threads . Synchronization is done using semaphores . For more details refer to the link Semaphore Basics http : www.softprayog.in programming semaphore-basics .", "Question : From msdn : .. . .. . Drivers that run in kernel-mode must be very careful about directly reading from or writing to addresses in user space . This scenario illustrates why . .. . 1 . A user-mode program initiates a request to read some data from a device . The program supplies the starting address of a buffer to receive the data . 2 . A device-driver routine running in kernel-mode starts the read operation and returns control to its caller . 3 . Later the device interrupts whatever thread is currently running to say that the read operation is complete . The interrupt is handled by kernel-mode driver routines running on this arbitrary thread which belongs-to an arbitrary process . 4 . At this point the driver must not write the data to the starting address that the user-mode program supplied in Step 1 . This address is in the virtual-address-space of the process that initiated the request which is most likely not the same as the current process . Can anybody explain this in other words Points 2 3 4 are not very clear . Thanks . .. . Answer : Each process has its own context of execution which includes Data structures page-tables used in Virtual to Physical address translation . At any point of time Virtual Address to Physical address mapping depends on the currently executing process at that time . Take the following scenario : .. . .. . 1 . A user-mode program say Process-A with a single thread initiates a read request and passes a User-space buffer address . 2 . This read request reaches to Device Driver routine which is running in Kernel mode . Now most likely the actual read operation from Device hardware will take some time to complete . In this case the Driver routine may not wait for the completion of operation . Instead it will just start the read operation from the Device and return immedietly . In this activity the Operating System will also get notified that the read opeartion has started but not completed yet . The OS will put the Process-A in waiting state and schedule some other Process thread in execution . 3 . Later when the Device completes the reading operation it will raise an Interrupt to notify this . At this time any arbitrary process say Process-B will be in execution . That is the Page tables will be reflecting Virtual to Physical address space mapping for Process-B . The Driver routine called for servicing this interrupt will be running in Context of Process-B . 4 . At this point accessing the virtual address provided by user-mode program at step-1 will access the Virtual Address corresponding to Process-B and not that of Process-A . See the Methods for Accessing Data Buffers http : msdn.microsoft.com en-us library windows hardware ff554436 28v vs.85 29.aspx for different approches to transfer data to user-space from Kernel-mode routines .", "Question : From what I understand on a high level user mode debugging provides you with access to the private virtual address for a process . A debug session is limited to that process and it cannot overwrite or tamper w other process virtual-address-space data . Kernel mode debug I understand provides access to other drivers and kernel processes that need full access to multiple resources in addition to the original process address space . From this I get to thinking that kernel-mode debugging seems more robust than user mode debugging . This raises the question for me : is there a time when both options of debug mode are available that it makes sense to choose user mode over a more robust kernel-mode .. . .. . I m still fairly new to the concept so perhaps I am thinking of the two modes incorrectly . I d appreciate any insight there as well to better understand anything I may be missing . I just seem to notice that a lot of people seem to try to avoid kernel debugging . I m not entirely sure why as it seems more robust . .. . Answer : The following is mainly from a Windows background but I guess it should be fine for Linux too . The concepts are not so different . Some inline answers first .. . .. . From what I understand on a high level user mode debugging provides you with access to the private virtual address for a process . Correct . A debug session is limited to that process .. . .. . No . You can attach to several processes at the same time e.g . with WinDbg s .tlist .attach command . and it cannot overwrite or tamper w other process virtual-address-space data . No . You can modify the memory e.g . with WinDbg s ed command . Kernel mode debug I understand provides access to other drivers and kernel processes that need full access to multiple resources .. . .. . Correct . in addition to the original process address space . As far as I know you have access to physical RAM only . Some of the virtual-address-space may be swapped so not the full address space is available . From this I get to thinking that kernel-mode debugging seems more robust than user mode debugging . I think the opposite . If you write incorrect values somewhere in kernel-mode the PC crashes with a blue screen . If you do that in user mode it s only the application that crashes . This raises the question for me : is there a time when both options of debug mode are available that it makes sense to choose user mode over a more robust kernel-mode If you debug an application only and no drivers are involved I prefer user mode debugging . IMHO kernel-mode debugging is not more robust it s more fragile - you can really break everything at the lowest level . User mode debugging provides the typical protection against crashes of the OS . I just seem to notice that a lot of people seem to try to avoid kernel debugging .. . .. . I observe the same . And usually it s not so difficult once they try it . In my debugging workshops I explain processes and threads from kernel point of view and do it live in the kernel . And once people try kernel debugging it s not such a mystery any more . I m not entirely sure why as it seems more robust . Well you really can blow up everything in kernel-mode . User mode debugging .. . .. . User mode debugging is the default that any IDE will do . The integration is usually good in some IDEs it feels quite native . During user mode debugging things are easy . If you access memory that is paged out to disk the OS is still running and will simply page it in so you can read and write it . You have access to everything that you know from application development . There are threads and you can suspend or resume them . The knowledge you have from application development will be sufficient to operate the debugger . You can set breakpoints and inspect variables as long as you have correct symbols . Some kinds of debugging is only available in user mode . E.g . the SOS extension for WinDbg to debug .NET application only works in user mode . Kernel debugging .. . .. . Kernel debugging is quite complex . Typically you can t simply do local kernel debugging - if you stop somewhere in the kernel how do you control the debugger The system will just freeze . So for kernel debugging you need 2 PCs or virtual PCs . During kernel-mode debugging things are complex . While you are just inside an application a millisecond later some interrupt occurs and does something completely different . You don t only have threads you also need to deal with call stacks that are outside your application you ll see CPU register content instruction pointers etc . That s all stuff a normal app developer does not want to care about . You don t only have access to everything that you implemented . You also have access to everything that Microsoft Intel NVidia and lots of other companies developed . You cannot simply access all memory because some memory that is paged out to the swap file will first generate a page-fault then involve some disk driver to fetch the data potentially page out some other data etc . There is so much giong on in kernel-mode and in order to not break it you need to have really professional comprehension of all those topics . Conclusion .. . .. . Most developers just want to care about their source code . So if they are writing programs aka . applications scripts tools games they just want user mode debugging . If their code is driver code of course they want kernel debugging . And of course Security Specialists and Crackers want kernel-mode debugging because they want privileges . Comment : Beautifully laid out . Thank you . Comment : @mattkgross : you re welcome", "Question : I finished homework for a graduate course in operating systems . I got a great score and I only missed one tiny point of a question . It asked which were privileged instructions and which were not . I answered all correctly except one : Adding one register value to another .. . .. . I answered it was privileged but apparently it s not How can this be I figured the user interacts with registers memory by using systems calls which in a sense change from user mode system calls to kernel-mode routines . Therefore the adding of one register value to another could be called by a non-privileged user but in the end the kernel is doing the work and is in kernel privileged mode . Therefore it s privileged A user can t do it by themselves . Am I wrong Why Thanks .. . Answer : I m not sure why you would think that changing a register would require kernel intervention . Some special registers may be privileged those controlling things like descriptor tables or protection levels with which user-mode code could bypass system-mode protections but general-purpose-registers can be changed freely without a kernel getting involved . When your code is running the vast majority of instructions would be things like : .. . .. . As an aside I m just imagining how slow my code would run if it required a system call to the kernel every time I incremented a counter or called a function : - .. . .. . The only thing I can think of would be if you thought your execution thread wasn t allowed to change registers arbitrarily since that may affect those registers for other threads . But the kernel would take care of that when switching threads - all your registers would be packed away somewhere for later and the ones for the next thread would be loaded in . .. . .. . Based on your comments you seem to think that the time of adding is when the CPU protection mechanism should step in . In fact it can t at that point because it has no idea what you re going to use the register for . You may just be using it as a counter . However if you do use it as an address to access memory and that memory is invalid somehow outside of your address space or swapped to disk the kernel will step in at that point to rectify the situation toss your application out on its ear or bring in the swapped-out memory . However even that is not a privileged instruction it s just the CPU handling page faults . A privileged instruction is something that you re not allowed to do at all like change the interrupt descriptor table location registers or deactivate interrupts . Comment : So let me get this straight . There are special purpose registers which require privileged instructions but general registers do not require privileged instructions . Does this mean if you add two addresses it does so without any system calls How does this happen Comment : I did think there must be some kind of protection set up by the kernel say if process A s register value tries to add to process B s register value . I guess that would result in a trap and the routine handler would take care of it Comment : You add them . That s it really . You execute an instruction like add eax ebx . The CPU takes the value in eax and adds that to ebx . The protection on addresses is done at dereferencing time . If you use that modified ebx to try and access memory outside of your address space that s the time at which the protection mechanism will step in . Up until then the CPU doesn t know that you re going to use ebx to access memory . Clarifying in answer . Comment : Thanks this all makes perfect sense . Thanks a lot", "Question : Personally I would presume that User Mode allows the restricted access so nothing could be changed that shouldn t be hence the Kernel mode . Although presuming isn t good enough . Does anyone know why or how they provide protection from a user . .. . Answer : The idea of separating user mode from kernel-mode is so whatever runs in user mode can t interfere with the rest of the system hence the requirement for lesser privileges . For example you wouldn t want a user mode application being able to write to another process or the kernel . The protection is done via hardware . Often processors have privilege modes an MMU and access-control options . In x86 you have the privilege rings in ARM you have user mode vs supervisor mode .", "Question : I m developing a kernel-mode driver for an Anti Virus program but I ve a problem in Drivers section .. . .. . I want to send a string value For example String from Kernel-mode driver to user-mode application . can anyone help me to do this .. . Answer : This question was asked a long ago and I hope you have found the solution . I am posting this solution as there was none . It depends on how you want to send the string to the user mode client application . One way is IOCTL command . You issue a simple IOCTL command with METHOD BUFFERED assuming that string is little data and voila you are done . Other way is to make client wait for an event and make driver fire an event when that string is available to kernel driver . Then as the wait in the user mode application is over you will get the data . of course if wait didn t timed out or many other things", "Question : All other windows-8 pcs can use shared printer via another desktop and its a hp printer . Except one windows-8.1 pc . kernel-mode print driver issue All computers are in a workgroup and withing the same network range. . I can access the printer shared desktop using given credentials and I made sure its the same credential used to map this printer to other windows-8 8.1 in the work group. . But for one pc with windows-8.1 im getting below error When I try to connect. . cant install drives via network share. . But I know the drivers are compatible since other windows pcs can install this shared printer without any issue. . I tried disabling Disallow installation of printers using kernel-mode drivers via group policy yet its not working after reboot as well. . Any suggestion how to fix this .. . Answer : Found the solution and fixed it . . apart from Disallow installation of printers using kernel-mode drivers policy I had to change Point and printer Restrictions to enable and could fix it . . Followed the suggested solutions through this http : www.windowstechinfo.com 2015 06 solved-windows-cant-install-the-kernel-mode-print-driver.html and it worked.. . Fixed", "Question : I have a minifilter kernel-mode . I want to delete a file with specific path Device HarddiskVolume1 file.txt or C : file.txt from kernel-mode .. . .. . Is there any way to do that UPDATE : 20150130 .. . .. . I try to use ZwDeleteFile routine https : msdn.microsoft.com en-us library windows hardware ff566435 28v vs.85 29.aspx as Harry Johnston http : stackoverflow.com questions 28212998 how-to-delete-a-file-from-kernel-mode 28225210 28225210 said . These are my codes : .. . .. . But it crash my system . Is there anything wrong with my codes fixed This is answer .. . .. . Thanks Comment : The string is missing a backslash though I wouldn t expect that to cause a crash . Why is pObjectAttribute a pointer Normally it would be a local variable . Is this a file system minifilter driver I m not sure whether it is legal to call ZwDeleteFile in that context . Also check the documented requirements regarding IRQL and special kernel APCs . Comment : That is OK . Thanks for your help @HarryJohnston .. . Answer : By usual methods its not possible to delete the file from kernel-mode i.e from device-driver . This kind of practice or idea is highly discouraged .", "Question : I hook execve in kernel-mode change system call table entry NR execve to my function . I want to check the ELF s assembly code . If it harmful I ll return directly without executing it . I am writing a linux module . In Linux kernel-mode I want to use objdump to disassembly the ELF file . I want to go user mode to execute objdump and go back to kernel-mode . Is this possible Thank you . Comment : Sounds strange . What do you need this for Maybe it can be done in another way without running user-space application from kernel . So please explain us the whole task so perhaps we can come up with some more appropriate and elegant solution . Comment : Sam Protsenko I hook execve in kernel-mode change system call table entry NR execve to my function . I want to check the ELF s assembly code . If it harmful I ll return directly without executing it . Do you have any other idea to do this Comment : It would be much more better if you can do the same in user-space . Just doesn t sound like kernel task to me . But I may be mistaken . Comment : How to hijack execve in user space LD PRELOAD doesn t work . Comment : See my answer below . .. . Answer : Maybe you can split your project into two parts : kernel module and user-space application . So you can hook execve in kernel then tell your application about hook triggered then do disassembling and checking in your application send computed result back to kernel module and then either continue or break execve execution . If you still want to run objdump from kernel -- check out call usermodhelper https : www.kernel.org doc htmldocs kernel-api API-call-usermodehelper.html . See also this http : stackoverflow.com questions 21668727 execute-invoke-user-space-program-and-get-its-pid-from-a-kernel-module related question . Comment : Thank you very much Sam Protsenko . This is very helpful . I want to use call usermodhelper . I m going to write a user space script or C program to check assembly code and then send the result 0 or 1 back to kernel . So my next question is how can I get the value in kernel-mode write to a file Comment : You can just run your user-space app as a daemon and don t use call usermodhelper . Regarding interaction between kernel and user-space : there are a lot of options here . The easiest perhaps is to utilize character device-driver capabilities to exchange some data between kernel and user-space . The other possible and easy option -- is to create some sysfs file files in your kernel module and read-write to them from user-space app . Comment : Sam Protsenko could you give me an example of transfer data from user space to kernel space Thank you very much . Comment : The thing is there is a lot of options how you can implement such a transfer . Ideally you should choose it for your particular case . If you don t have much of experience in kernel development -- I d recommend you to look into miscellaneous character device API Next particular function can be useful : misc register misc deregister simple read from buffer simple write to buffer . Once you registered misc char device and implemented read-write file operations in kernel you will be able to read-write to corresponding file in dev directory to talk with your kernel module . Comment : Look here http : www.linuxvoice.com be-a-kernel-hacker and here https : github.com svijaykr eudyptula blob master task06 hello-world.c for examples I just googled by misc register simple read from buffer and chose what I liked most .", "Question : I am developing a kernel-mode filter driver I want this driver to send a UNICODE String to an exe running in user mode . Kindly provide an example for this as i am a beginner in driver development . Below is the code of my driver From where I want to send UNICODE string .. . .. . I want to send pFileObject- FileName UNICODE String from the above code to an executable in the user mode . Suppose that executable will just print this string on console . Below is my exe code in user mode .. . Answer : There are a few different ways that you can access a kernel-mode driver . The most obvious in this case would be to use the ioctl interface . Unfortunately I can t provide you with an example because to achieve that would require me to install the Windows DDK on my virtual-machine along with actually writing the code for it . There is however an article here http : support.microsoft.com kb 262305 which explains how ioctls in filter drivers work . From your application you need to use DeviceIoControl http : msdn.microsoft.com en-gb library windows desktop aa363216 28v vs.85 29.aspx . Comment : Thanks Mats. . And how to send data from kernel-mode driver back to user mode applicaction. . Comment : The IOCTL call is synchronous so you pass a buffer to be filled in and the IOCTL handling code fills in the buffer beware of overflows then returns at which point the data is available in the user-application via some magical functions that copy kernel-mode data to user-mode in the lpOutBuffer . You may find this useful : codeproject.com Articles 9575 http : www.codeproject.com Articles 9575 Driver-Development-Part-2-Introduction-to-Implemen Comment : Thanks Alot Mats", "Question : Let s say I want to write an application or driver that runs in Windows NT Native mode ie uses nothing but NTDLL.DLL functions and runs when ntoskrnl.exe starts . Would this application have access to x86 interrupts IE could I write code like this : .. . .. . And have it return back to the boot menu Or is that still not allowed even in kernel-mode .. . Answer : No . There are a few things wrong with what you re asking . First of all Native Applications those linked only with NTDLL.dll are still user mode Ring 3 applications . They are not in kernel-mode Ring 0 - they have no extra privileges as far as the CPU hardware is concerned . Secondly what you re asking about e.g . int 19h - Bootstrap loader http : www.ctyme.com intr int-19.htm are 16-bit BIOS calls not just general x86 interrupts . Since the system is running in Protected Mode not even the kernel can call these . At some point in the boot process when switching to protected-mode the kernel installs its own Interrupt Vector Table IVT which essentially overrides the one that the BIOS provided earlier for BIOS calls . The only entries in this table that are useful to user-mode process are int 3 for breakpoints and the one whose number escapes me for old-style system calls on Linux it s int 80h . Read : .. . .. . Native API http : en.wikipedia.org wiki Native API", "Question : Does a code that runs on kernel-mode uses Physical Addresses or Virtual Addresses If it is virtual which translation tables does it use are they updated differently with comparison to user-mode tables Thanks Comment : The first question is answered here : stackoverflow.com questions 15851225 http : stackoverflow.com questions 15851225 difference-between-physical-logical-virtual-memory-address . As for translation tables mechanism is determined by the architecture so it is same for user and kernel memory . But content for user space and kernel space tables differs of course . .. . Answer : The answer is that kernel-mode code uses a mixture of virtual logical and physical addressing . How much of each is used depends upon the underlying hardware and operating-system . There has to be some physical addressing in the kernel . Otherwise there would be the chicken and egg problem of how does one set up logical addressing without knowing physical addresses to map to . The ideal would be for the system to only use physical addresses for system registers . The logical virtual address distinction is important as well . It is possible for some parts of the kernel address space to be pageable virtual-memory . Others parts could be nonpageable logical memory only . Kernel mode address translation is very hardware dependent . Some systems make user mode page-tables pageable themselves . In such systems there is two levels of address translation virtual addresses for the page table and virtual addresses using the page table . The underlying hardware defines specific addresses ranges as kernel addresses . Other systems allow the system kernel address space to be defined entirely in software . In such systems kernel and user address translation is pretty much the same . Comment : As well bus addresses .", "Question : A system call is how a program requests a service from an operating-system s kernel . They can occur in user-mode and kernel-mode . What are differences For example : .. . .. . Overhead .. . System time .. . Answer : A system call is the way you transition between the application user mode and the kernel . Syscalls are slower than normal function-calls but newer x86 chips from Intel and AMD have a special sysenter syscall opcode to make it take just a hundred nanoseconds or so give or take . Comment : Could you elaborate on how system calls vary when made from within kernel space For better understanding of the Linux kernel which is written in C and assembly .", "Question : When we compile a C program it just generates some machine-understandable code . This code can directly run on the hardware telling from this question http : stackoverflow.com questions 23338684 does-a-c-c-program-run-the-cpu-or-on-the-kernel . So my questions are : .. . .. . 1 . If a C program can directly run on the hardware how can the kernel handle the resource allocation for this program 2 . If the executable generated from the compiler is in pure machine-understandable form then how do the privileged and non-privileged modes work 3 . How does the kernel manage the permission of hardware resources if a program can directly run on the hardware not through the kernel Comment : No . Assuming a non-trivial OS it cannot even get loaded into memory without kernel calls never mind obtain execution . Comment : When we compile the C program it just generates the machine understandable code . This code can directly run on the hardware . - This machine understandable code does system calls to the kernel to allocate resources . If you want to go bare metal your application will be loaded on boot and then yeah you can do whatever you want . Except for that you re in line with whatever the kernel allow . .. . Answer : So my first question is if a C program can directly run on the hardware how can kernel handle the resource allocation to this program . CPUs carry a notion of privileges when executing code . For example on x86 there is a Real Mode where code is allowed to access any resource and a Protected Mode where code executes in distinct security rings https : en.wikipedia.org wiki Protection ring . Most Operating Systems will switch to Protected Mode where numerically lower rings imply higher privileges . The kernel typically executes in Ring 0 which gives direct access to the hardware while user programs run in Ring 3 which restricts access . When the user program needs to access a privileged resource the CPU calls into the Operating System which is privileged either implicitly or directly through a system call instruction e.g . syscall in x86-64 assembly . If the executable generated from the gcc is in pure machine understandable form then how do the privileged and non-privileged mode work Again things like memory access are checked by the CPU . So for example if a program tries to access a virtual address https : en.wikipedia.org wiki Virtual address space that it doesn t have permission for the Operating System catches the invalid page access and generally signals the process i.e . SIGSEGV . How does the kernel manage the permission of hardware resources when a program can directly run on hardware not through the kernel The CPU has to interact directly with the Operating System through specific control registers https : en.wikipedia.org wiki Control register Control registers in x86 series and tables . For example the address of the virtual address page table is stored in the CR3 register for x86 .", "Question : When we compile a C program it just generates some machine-understandable code . This code can directly run on the hardware telling from this question http : stackoverflow.com questions 23338684 does-a-c-c-program-run-the-cpu-or-on-the-kernel . So my questions are : .. . .. . 1 . If a C program can directly run on the hardware how can the kernel handle the resource allocation for this program 2 . If the executable generated from the compiler is in pure machine-understandable form then how do the privileged and non-privileged modes work 3 . How does the kernel manage the permission of hardware resources if a program can directly run on the hardware not through the kernel Comment : No . Assuming a non-trivial OS it cannot even get loaded into memory without kernel calls never mind obtain execution . Comment : When we compile the C program it just generates the machine understandable code . This code can directly run on the hardware . - This machine understandable code does system calls to the kernel to allocate resources . If you want to go bare metal your application will be loaded on boot and then yeah you can do whatever you want . Except for that you re in line with whatever the kernel allow . .. . Answer : how can kernel handle the resource allocation to this program .. . .. . The kernel provides functions and mechanisms to allocate memory do I O write to the screen interact with the network sound card etc . called system calls to user programs . These system calls are the interface between kernel and user programs alas between the hardware and user programs . how do the privileged and non-privileged mode work User programs are in Unprivileged Mode userspace while the kernel runs in Privileged Mode kernelspace . The user can t be trusted so if he messes up accesses higher-privileged memory or dereferences a null-pointer for example he s prevented from it by a segmentation-fault and the following termination of the program for example . The kernel on the other hand runs in Privileged Mode . It can do whatever it wants : write to userspace programs steal data like passwords from user programs write to the processor s firmware - everything . Furthermore there are different kinds of kernels : monolithic kernels and microkernels are the heaviliest does that word exist at all used ones . Linux initiated by Linus Torvalds is an example for a monolithic kernel . Here the kernel is one big system where every piece of kernel code has ultimate access to the system . Minix initiated by Andrew S . Tanenbaum is an example for a microkernel . The part which can access everything is rather small . It contains only the functionality that has to be privileged managing the MMU accessing hardware etc . Other functionality like filesystems run in the Unprivileged Mode where they are protected from possible bugs by the usual protection mechanisms employed in userspace Unprivileged Mode like Segmentation Faults . An interesting read concerning the benefits drawbacks of monolithic kernels and microkernels is the debate http : www.oreilly.com openbook opensources book appa.html between Linus Torvalds at that time some guy who created an OS and Andrew S . Tanenbaum at that time an established professor for CS has written some amazing books BTW . a program can directly run on hardware not through the kernel .. . .. . It indeed runs directly on the hardware executed by the CPU . It cannot access certain resources directly though like memory and in order to access these resources is required to interact with the kernel . That s one of the major improvements next to maybe virtual processors that is processes over earlier OSes like DOS : userspace programs cannot run directly on the hardware . If they could they possibly could mess up the whole machine with irreparable causes intentionally - like viruses or unintentionally . Instead as mentioned in the beginning of this answer system calls are used . In DOS you had the option to use routines provided by the OS commonly a trap at IV Interrupt Vector the offset and physical memory-address into the Real Mode IDT Interrupt Descriptor Table 0x21 invoked via int 0x21 int 21h while ax contained a function number identifying the call to the system1 . Roughly the same mechanisms as nowadays where available but not strictly enforced . One could overwrite the whole OS replace it with one s own program and destroy the machine load random values into CMOS registers for example . One could also just use the BIOS-provided routines bypassing the OS . .. . .. . 1 I use call to the system instead of system call intentionally here . Here system calls only denote the requests from userspace to kernelspace to do something for it . As DOS i.e . Real Mode didn t provide a real distinction between userspace and kernelspace it doesn t really have system calls . Comment : good answer Note that there s actually further rings of protection https : events.ccc.de congress 2014 Fahrplan events 6129.html against firmware updates that not even a privileged process can t do . But that s totally irrelevant for anyone but hardware designers and really frightening attackers . Comment : I don t really agree with the it doesn t run on the actual hardware bottom line though : Of course the program is actually run by the actual CPU it s not being instrumentalized e.g . like in an emulator but the execution is severely restricted . Comment : @MarcusM ller : I think you ve missed the point . The fact that the physical CPU executes the code is not the issue . He s clearly talking about the different modes under which a program can execute . The fact remains that a program cannot directly mess around with hardware resources and stuff in the context of the distinction between usermode kernelmode . Comment : @ray : Ok can we agree on this : The bottom line is that whilst the program does directly run on the CPU it s limited privilege inhibits direct access to hardware and physical memory in general . Comment : @MarcusM ller : We can indeed . The distinction should be fairly easy for the OP to get .", "Question : I have a minifilter kernel-mode . I want to delete a file with specific path Device HarddiskVolume1 file.txt or C : file.txt from kernel-mode .. . .. . Is there any way to do that UPDATE : 20150130 .. . .. . I try to use ZwDeleteFile routine https : msdn.microsoft.com en-us library windows hardware ff566435 28v vs.85 29.aspx as Harry Johnston http : stackoverflow.com questions 28212998 how-to-delete-a-file-from-kernel-mode 28225210 28225210 said . These are my codes : .. . .. . But it crash my system . Is there anything wrong with my codes fixed This is answer .. . .. . Thanks Comment : The string is missing a backslash though I wouldn t expect that to cause a crash . Why is pObjectAttribute a pointer Normally it would be a local variable . Is this a file system minifilter driver I m not sure whether it is legal to call ZwDeleteFile in that context . Also check the documented requirements regarding IRQL and special kernel APCs . Comment : That is OK . Thanks for your help @HarryJohnston .. . Answer : The ZwDeleteFile routine https : msdn.microsoft.com en-us library windows hardware ff566435 28v vs.85 29.aspx : .. . .. . The ZwDeleteFile routine deletes the specified file .", "Question : I have a minifilter kernel-mode . I want to delete a file with specific path Device HarddiskVolume1 file.txt or C : file.txt from kernel-mode .. . .. . Is there any way to do that UPDATE : 20150130 .. . .. . I try to use ZwDeleteFile routine https : msdn.microsoft.com en-us library windows hardware ff566435 28v vs.85 29.aspx as Harry Johnston http : stackoverflow.com questions 28212998 how-to-delete-a-file-from-kernel-mode 28225210 28225210 said . These are my codes : .. . .. . But it crash my system . Is there anything wrong with my codes fixed This is answer .. . .. . Thanks Comment : The string is missing a backslash though I wouldn t expect that to cause a crash . Why is pObjectAttribute a pointer Normally it would be a local variable . Is this a file system minifilter driver I m not sure whether it is legal to call ZwDeleteFile in that context . Also check the documented requirements regarding IRQL and special kernel APCs . Comment : That is OK . Thanks for your help @HarryJohnston .. . Answer : Use FltSetInformationFile https : msdn.microsoft.com en-us library windows hardware ff544516 28v vs.85 29.aspx function with FileDispositionInformation class . Comment : I delete file from a specific string not in file object .", "Question : I m building a HW-simulator for our driver team . Now the simulator is devided in to 2 modules : First module runs inside the driver in kernel-mode and that s where the main interface between the driver and the HW-Simulator . Second module is an executable user-mode code which generates data for the simulator and transports it to the simulator via calls to DeviceIOControl under windows API .. . .. . My need is this : I want to be able to execute the user-mode executable from within the kernel-mode . And I need to be able to do this in a relatively portable way . Currently I m only running on Windows but that should change soon . Further more I need to be able to communicate with the user-mode code via it s stdin pipe in order to reconfigure it and eventually close it . I found this : Executing a user-space function from the kernel space http : stackoverflow.com questions 5246636 executing-a-user-space-function-from-the-kernel-space .. . .. . but it s only relevant for the linux-kernel . Is there a more portable alternative Or a windows alternative Can I do this in Windows by simply using the ShellExecute RunAs API functions Note : We are aware of the security risks involved in invoking user-mode code from the kernel-space . But as this is only meant to be used as a test-environment and will not ever reach our release code then we are not concerned . Comment : I doubt that you will find a portable way of doing kernel-level stuff . Comment : @casablanca : fair enough . How do I accomplish this in windows then Comment : Oh I don t know the answer myself that was just a comment . : .. . Answer : Really there is no documented way to do it without triggering process creation from user-mode . But there is one undocumented tricky way if You don t want to create user-mode application : .. . .. . To create a valid win32 process the driver must communicate with CSRSS what is undocumented . You can enqueue a user-mode APC allocate some virtual-memory for the APC code in the context of any existing process . This code should simply call CreateProcess and anything else You want .", "Question : null .. . Answer : Is there a way to add an ACE to the DACL of a file directory from kernel-mode in windows I m found a reference about ZwQuerySecurityObject ZwSetSecurityObject routines but it is not defined in WINDDK headers . I would appreciate any information of this question . Comment : Why are you fiddling with ACLs in kernel-mode Describe your scenario please Comment : It s a long story.. . There is a software product that allows you to mount network disks via iSCSI and FiberChannel protocols . If you mount the network volume under Windows XP and format it then do not add permissions to the group Authenticated Users . If the volume is then mounted under Windows 7 it prohibits any write operation to these discs . Due to the current architecture of the program improve the rights from kernel-mode is the easiest way . Comment : Are you sure that the ACL you need to modify is on a file directory presumably the root directory as opposed to say the disk or volume device object The behaviour you describe seems odd . Comment : ZwQuerySecurityObject and ZwSetSecurityObject are both defined in ntifs.h in the version of WinDDK that I currently have installed 7600.16385.1 . What version are you using Comment : Harry i need to modify the ACL for mounted volume root directory ." ] }
[ "yes-answer-long", "yes-answer-short" ]
operating-system
UNK_RELATION
htc-hero@android@52
htc-hero -- htc-hero is a smart phone that runs on @placeholder .
{ "confidence": [ 77.0399398803711, 55.35277557373047, 52.89893341064453, 51.064117431640625, 45.66210174560547, 44.94499969482422, 44.94499969482422, 44.277587890625, 44.277587890625, 44.277587890625, 44.21358871459961, 42.239139556884766, 41.34245681762695, 40.791080474853516, 40.791080474853516, 39.56463623046875, 38.89722442626953, 35.96209716796875, 33.67254638671875, 29.816341400146484, 29.816341400146484, 29.816341400146484, 26.486644744873047, 24.223798751831055, 24.223798751831055, 24.223798751831055, 24.223798751831055, 24.223798751831055, 24.223798751831055, 24.223798751831055, 24.223798751831055, 24.223798751831055, 24.223798751831055, 24.223798751831055, 24.223798751831055, 24.223798751831055, 24.223798751831055, 24.223798751831055, 24.223798751831055, 24.223798751831055, 24.223798751831055, 24.223798751831055, 24.223798751831055, 24.223798751831055, 24.223798751831055, 24.223798751831055, 24.223798751831055, 24.223798751831055, 24.223798751831055, 24.223798751831055, 24.223798751831055, 24.223798751831055, 24.223798751831055, 24.223798751831055, 24.223798751831055, 24.223798751831055, 24.223798751831055, 24.223798751831055, 24.223798751831055, 24.223798751831055, 18.84343719482422, 18.84343719482422, 18.84343719482422, 18.84343719482422, 18.84343719482422, 18.84343719482422, 18.84343719482422, 18.84343719482422, 18.84343719482422, 18.84343719482422, 18.84343719482422, 18.84343719482422, 18.84343719482422, 18.84343719482422, 18.84343719482422, 18.84343719482422, 18.84343719482422, 18.84343719482422, 18.84343719482422, 18.84343719482422, 18.84343719482422, 18.84343719482422, 18.84343719482422, 18.84343719482422, 18.84343719482422, 18.84343719482422, 18.84343719482422 ], "content": [ "Would not recommend the HTC Hero .", "I was thinking about HTC Hero because : .. . .. . as HTC device it is a reference model for Android ecosystem .. . it will run system version 2.0 .. . it has fair features price ratio .", "The official dev phone is the HTC Magic http : www.androidcentral.com android-dev-phone-2-mytouch-3g-htc-magic-google-ion supposedly .", "Are there any arguments against Hero", "Thomas : HTC Dream was the first model and only for a while and I believe HTC devices yet outsells all other brands added together .", "I would not go with the Hero since it has a custom firmware and Sense .", "Regarding Hero : the reviews I read didn t look impressive .", "It gives impression of a prototype before HTC releases something final .", "I develop on an HTC as well Dream and the problem is that it has a 320x480 resolution .", "So your programs will look nice on the HTC and horrible on the high-res phones .", "What build number is on your Hero", "The default Mail app on the hero works fine .", "The question was : are there any arguments against Hero as excercise handset among currently available Android devices .", "I don t see how HTC devices are reference models for the Android ecosystem...could you explain that", "Two likely candidates would be the HTC Magic and the Motorola Milestone assuming the latter is presently available not quite certain about that .", "How can I make this code works with Gmail app on Hero", "It seems that there are differents between HTC sense devices permissions and the emulator permissions .", "But I have no attach when I am receiving a mail which I ve sent from my Hero using a Gmail app .", "If you are stuck having to buy all of the same handset I agree with nportelli -- all else being equal I would try to stick to plain Google Experience devices instead of those with heavy customizations HTC Sense MOTOBLUR .", "I suggest going with a high res phone where you have the benefit of switching resolutions .", "If I were going to be debugging things on it I d think I d prefer a phone with a physical keyboard like the Samsung Moment .", "Then again probably the smartest thing to do would be to find out what the instructor is using and get the same phone .", "But my only question is - is the image then stored somewhere on the phone", "Next year there will be Android programming classes on Wroclaw University Poland but handsets for excersises needs to be choosen now .", "Or maybe there is another handset more suitable for programming classes", "So it s popularity makes him refernce model even if not officially .", "Why specifically do you need the handsets over just using the emulator for the course", "The handsets will eventually get outdated if students are buying them let them choose then you will get real world experience working w multiple devices .", "If not I would say use the emulator .", "This question appears to be off-topic because it is not within the bounds of discussion as described in the help center .", "Should stick with a vanilla version of Android .", "Or just use the emulator .", "The ADP1 and ADP2 such as the version of the Magic you link-to above are primarily for firmware development .", "They are not particularly er magical for application development .", "One advantage of the ADP1 2 is that you can easily buy them without a contract and they won t have provider branding all over them .", "That might be true of other phones as well but it s definitely true of these two phones .", "I am not certain it makes sense for an Android course to have each student have a device...and have them all be the same device .", "For the same cost you could get an array of devices of different characteristics and use that to help demonstrate techniques for dealing with multiple screen sizes multiple Android API versions devices that have Google Maps versus devices that do not etc .", "Given that such variations in devices are part of the core fabric of the Android ecosystem it would seem prudent to make varying devices be part of the curriculum if possible .", "BTW I am tentatively scheduled to be in Wroclaw the week of 7 December to teach Android application development for a local firm .", "What s the best place in Wroclaw for pierogi", ": -", "Thanks for input .", "I think one semester course won t include dealing with multiple resolutions so it s better to have unified device experience among students hardware service warranty is also an issue .", "It will be told how to design resolution-independent GUI on lecture .", "Ask your students for pierogi I m sure they will order you best takeaway from neighbourhood .", "And enjoy your stay in Wroc aw : -", "Handsets get updated every 4-6 months so whatever you buy now you will regret it later in the next year .", "When you really need it then go and get one .", "No need to do it a year in advance .", "Lack of videocall cam is one disadvantage I see right now .", "Sadly you didn t read my question .", "I think perhaps the OP is the professor or instructor wanting to develop course materials rather than a student trying to choose a handset for the course .", "By itself its not bad but the users have among others Motorola Droids .", "The resolution there is up to 480 x 854 .", "Knowing how to develop UI for different resolutions and or pixel-density is very important .", "By the way : The Android simulator that comes with the SDK does not truly represent the font sizes of the real devices when dealing with high density .", "It has to be tested on a real device or it s a mess .", "Droid would be cool but it s too expensive and not yet available in Poland .", "That way you can be fairly sure you won t get any compatability issues that nobody running the course has ever seen .", "On the Emulator with a default mail-app all works fine .", "You can see the code below .", "in Logs I see the following : .. . .. . Thank you for the answer .", "I have come across several issues where HTC s sense overlay have broken Android functionality not recieving an OUT GOING CALL intent in some cases is one this may be another if you have there latest build", "I have build 2.73.411.17 and software version 1.0.0.A6288", "For me the problem was solved with the following lines-of-code : .. . .. . The key thing is that I m saving the screen-shot to the media library and then it can successfully send a file from there .", "Yes I solved the problem this way .", "It helps me too..thnks. .", "@Aleks N . this is a nice approach meaning it works well - I tried it out .", "Or is this temporary storage", "Any way to delete the file afterwards", "By the way this requires android.permission.WRITE EXTERNAL STORAGE", "getFileStreamPath or openFileOutput will create files in a private directory that is inaccessible to other apps i.e .", "Gmail .", "Use external storage to create publicly-accessible files : .. . .. . This will not work when the external storage is unavailable like when it is mounted as a USB drive .", "See the Storage API Guide http : developer.android.com guide topics data data-storage.html filesExternal for more about detecting whether external storage is available .", "If your minimum API level is 8 or above you can use Context.getExternalCacheDir or Environment.getExternalStoragePublicDirectory Environment.DIRECTORY PICTURES as the parent directory .", "Unless you end up using getExternalCacheDir make sure you use a unique filename to prevent one of the users files from accidentally getting overwritten .", "Finally you can override onActivityResult to delete the file after the share operation completes :", "Thanks a lot for the tip .", "This is the simplest way to do the job .", "In my case Context.getExternalCacheDir does not work but Environment.getExternalStoragePublicDirectory Environment.DIRECTORY DOWNLOADS works perfectly .", "I had the same symptoms .", "In my case it was because I was initially saving the attachment with the permissions MODE PRIVATE .", "As soon as I changed it to MODE WORLD READABLE it seems Gmail was then able to access the file and send the attachment properly .", "Although I see in your code snippet you were using MODE WORLD READABLE .. . weird .", "http : developer.android.com reference android content Context.html MODE WORLD READABLE" ] }
{ "confidence": [ 75.33670043945312, 74.34745788574219, 71.47622680664062, 70.50128936767578, 64.1785888671875, 62.83843231201172, 44.1209716796875, 42.024253845214844 ], "content": [ "Question : Next year there will be Android programming classes on Wroclaw University Poland but handsets for excersises needs to be choosen now . I was thinking about HTC Hero because : .. . .. . as HTC device it is a reference model for Android ecosystem .. . it will run system version 2.0 .. . it has fair features price ratio . Are there any arguments against Hero Or maybe there is another handset more suitable for programming classes Comment : I don t see how HTC devices are reference models for the Android ecosystem...could you explain that Comment : Thomas : HTC Dream was the first model and only for a while and I believe HTC devices yet outsells all other brands added together . So it s popularity makes him refernce model even if not officially . Comment : Why specifically do you need the handsets over just using the emulator for the course The handsets will eventually get outdated if students are buying them let them choose then you will get real world experience working w multiple devices . If not I would say use the emulator . Comment : This question appears to be off-topic because it is not within the bounds of discussion as described in the help center . .. . Answer : The official dev phone is the HTC Magic http : www.androidcentral.com android-dev-phone-2-mytouch-3g-htc-magic-google-ion supposedly . I would not go with the Hero since it has a custom firmware and Sense . Should stick with a vanilla version of Android . Or just use the emulator . Comment : The ADP1 and ADP2 such as the version of the Magic you link-to above are primarily for firmware development . They are not particularly er magical for application development . Comment : One advantage of the ADP1 2 is that you can easily buy them without a contract and they won t have provider branding all over them . That might be true of other phones as well but it s definitely true of these two phones .", "Question : Next year there will be Android programming classes on Wroclaw University Poland but handsets for excersises needs to be choosen now . I was thinking about HTC Hero because : .. . .. . as HTC device it is a reference model for Android ecosystem .. . it will run system version 2.0 .. . it has fair features price ratio . Are there any arguments against Hero Or maybe there is another handset more suitable for programming classes Comment : I don t see how HTC devices are reference models for the Android ecosystem...could you explain that Comment : Thomas : HTC Dream was the first model and only for a while and I believe HTC devices yet outsells all other brands added together . So it s popularity makes him refernce model even if not officially . Comment : Why specifically do you need the handsets over just using the emulator for the course The handsets will eventually get outdated if students are buying them let them choose then you will get real world experience working w multiple devices . If not I would say use the emulator . Comment : This question appears to be off-topic because it is not within the bounds of discussion as described in the help center . .. . Answer : Would not recommend the HTC Hero . I develop on an HTC as well Dream and the problem is that it has a 320x480 resolution . By itself its not bad but the users have among others Motorola Droids . The resolution there is up to 480 x 854 . So your programs will look nice on the HTC and horrible on the high-res phones . I suggest going with a high res phone where you have the benefit of switching resolutions . Knowing how to develop UI for different resolutions and or pixel-density is very important . By the way : The Android simulator that comes with the SDK does not truly represent the font sizes of the real devices when dealing with high density . It has to be tested on a real device or it s a mess . Comment : Droid would be cool but it s too expensive and not yet available in Poland .", "Question : Next year there will be Android programming classes on Wroclaw University Poland but handsets for excersises needs to be choosen now . I was thinking about HTC Hero because : .. . .. . as HTC device it is a reference model for Android ecosystem .. . it will run system version 2.0 .. . it has fair features price ratio . Are there any arguments against Hero Or maybe there is another handset more suitable for programming classes Comment : I don t see how HTC devices are reference models for the Android ecosystem...could you explain that Comment : Thomas : HTC Dream was the first model and only for a while and I believe HTC devices yet outsells all other brands added together . So it s popularity makes him refernce model even if not officially . Comment : Why specifically do you need the handsets over just using the emulator for the course The handsets will eventually get outdated if students are buying them let them choose then you will get real world experience working w multiple devices . If not I would say use the emulator . Comment : This question appears to be off-topic because it is not within the bounds of discussion as described in the help center . .. . Answer : Handsets get updated every 4-6 months so whatever you buy now you will regret it later in the next year . When you really need it then go and get one . No need to do it a year in advance . Regarding Hero : the reviews I read didn t look impressive . It gives impression of a prototype before HTC releases something final . Lack of videocall cam is one disadvantage I see right now . Comment : Sadly you didn t read my question . The question was : are there any arguments against Hero as excercise handset among currently available Android devices . Comment : I think perhaps the OP is the professor or instructor wanting to develop course materials rather than a student trying to choose a handset for the course .", "Question : Next year there will be Android programming classes on Wroclaw University Poland but handsets for excersises needs to be choosen now . I was thinking about HTC Hero because : .. . .. . as HTC device it is a reference model for Android ecosystem .. . it will run system version 2.0 .. . it has fair features price ratio . Are there any arguments against Hero Or maybe there is another handset more suitable for programming classes Comment : I don t see how HTC devices are reference models for the Android ecosystem...could you explain that Comment : Thomas : HTC Dream was the first model and only for a while and I believe HTC devices yet outsells all other brands added together . So it s popularity makes him refernce model even if not officially . Comment : Why specifically do you need the handsets over just using the emulator for the course The handsets will eventually get outdated if students are buying them let them choose then you will get real world experience working w multiple devices . If not I would say use the emulator . Comment : This question appears to be off-topic because it is not within the bounds of discussion as described in the help center . .. . Answer : If I were going to be debugging things on it I d think I d prefer a phone with a physical keyboard like the Samsung Moment . Then again probably the smartest thing to do would be to find out what the instructor is using and get the same phone . That way you can be fairly sure you won t get any compatability issues that nobody running the course has ever seen .", "Question : Next year there will be Android programming classes on Wroclaw University Poland but handsets for excersises needs to be choosen now . I was thinking about HTC Hero because : .. . .. . as HTC device it is a reference model for Android ecosystem .. . it will run system version 2.0 .. . it has fair features price ratio . Are there any arguments against Hero Or maybe there is another handset more suitable for programming classes Comment : I don t see how HTC devices are reference models for the Android ecosystem...could you explain that Comment : Thomas : HTC Dream was the first model and only for a while and I believe HTC devices yet outsells all other brands added together . So it s popularity makes him refernce model even if not officially . Comment : Why specifically do you need the handsets over just using the emulator for the course The handsets will eventually get outdated if students are buying them let them choose then you will get real world experience working w multiple devices . If not I would say use the emulator . Comment : This question appears to be off-topic because it is not within the bounds of discussion as described in the help center . .. . Answer : I am not certain it makes sense for an Android course to have each student have a device...and have them all be the same device . For the same cost you could get an array of devices of different characteristics and use that to help demonstrate techniques for dealing with multiple screen sizes multiple Android API versions devices that have Google Maps versus devices that do not etc . Given that such variations in devices are part of the core fabric of the Android ecosystem it would seem prudent to make varying devices be part of the curriculum if possible . If you are stuck having to buy all of the same handset I agree with nportelli -- all else being equal I would try to stick to plain Google Experience devices instead of those with heavy customizations HTC Sense MOTOBLUR . Two likely candidates would be the HTC Magic and the Motorola Milestone assuming the latter is presently available not quite certain about that . BTW I am tentatively scheduled to be in Wroclaw the week of 7 December to teach Android application development for a local firm . What s the best place in Wroclaw for pierogi : - Comment : Thanks for input . I think one semester course won t include dealing with multiple resolutions so it s better to have unified device experience among students hardware service warranty is also an issue . It will be told how to design resolution-independent GUI on lecture . Ask your students for pierogi I m sure they will order you best takeaway from neighbourhood . And enjoy your stay in Wroc aw : -", "Question : On the Emulator with a default mail-app all works fine . But I have no attach when I am receiving a mail which I ve sent from my Hero using a Gmail app . The default Mail app on the hero works fine . How can I make this code works with Gmail app on Hero You can see the code below . in Logs I see the following : .. . .. . Thank you for the answer . Comment : What build number is on your Hero I have come across several issues where HTC s sense overlay have broken Android functionality not recieving an OUT GOING CALL intent in some cases is one this may be another if you have there latest build Comment : I have build 2.73.411.17 and software version 1.0.0.A6288 .. . Answer : For me the problem was solved with the following lines-of-code : .. . .. . The key thing is that I m saving the screen-shot to the media library and then it can successfully send a file from there . Comment : Yes I solved the problem this way . It seems that there are differents between HTC sense devices permissions and the emulator permissions . Comment : It helps me too..thnks. . Comment : @Aleks N . this is a nice approach meaning it works well - I tried it out . But my only question is - is the image then stored somewhere on the phone Or is this temporary storage Comment : Any way to delete the file afterwards Comment : By the way this requires android.permission.WRITE EXTERNAL STORAGE", "Question : On the Emulator with a default mail-app all works fine . But I have no attach when I am receiving a mail which I ve sent from my Hero using a Gmail app . The default Mail app on the hero works fine . How can I make this code works with Gmail app on Hero You can see the code below . in Logs I see the following : .. . .. . Thank you for the answer . Comment : What build number is on your Hero I have come across several issues where HTC s sense overlay have broken Android functionality not recieving an OUT GOING CALL intent in some cases is one this may be another if you have there latest build Comment : I have build 2.73.411.17 and software version 1.0.0.A6288 .. . Answer : I had the same symptoms . In my case it was because I was initially saving the attachment with the permissions MODE PRIVATE . As soon as I changed it to MODE WORLD READABLE it seems Gmail was then able to access the file and send the attachment properly . Although I see in your code snippet you were using MODE WORLD READABLE .. . weird . http : developer.android.com reference android content Context.html MODE WORLD READABLE", "Question : On the Emulator with a default mail-app all works fine . But I have no attach when I am receiving a mail which I ve sent from my Hero using a Gmail app . The default Mail app on the hero works fine . How can I make this code works with Gmail app on Hero You can see the code below . in Logs I see the following : .. . .. . Thank you for the answer . Comment : What build number is on your Hero I have come across several issues where HTC s sense overlay have broken Android functionality not recieving an OUT GOING CALL intent in some cases is one this may be another if you have there latest build Comment : I have build 2.73.411.17 and software version 1.0.0.A6288 .. . Answer : getFileStreamPath or openFileOutput will create files in a private directory that is inaccessible to other apps i.e . Gmail . Use external storage to create publicly-accessible files : .. . .. . This will not work when the external storage is unavailable like when it is mounted as a USB drive . See the Storage API Guide http : developer.android.com guide topics data data-storage.html filesExternal for more about detecting whether external storage is available . If your minimum API level is 8 or above you can use Context.getExternalCacheDir or Environment.getExternalStoragePublicDirectory Environment.DIRECTORY PICTURES as the parent directory . Unless you end up using getExternalCacheDir make sure you use a unique filename to prevent one of the users files from accidentally getting overwritten . Finally you can override onActivityResult to delete the file after the share operation completes : Comment : Thanks a lot for the tip . This is the simplest way to do the job . In my case Context.getExternalCacheDir does not work but Environment.getExternalStoragePublicDirectory Environment.DIRECTORY DOWNLOADS works perfectly ." ] }
[ "yes-answer-long", "yes-answer-short" ]
android
UNK_RELATION
xcode@ide@62
xcode -- xcode is apple s integrated development-environment @placeholder .
{ "confidence": [ 34.05080795288086, 32.63488006591797, 32.57868957519531, 31.316640853881836, 30.355844497680664, 30.141979217529297, 30.020408630371094, 29.67982292175293, 29.576431274414062, 29.576431274414062, 29.495494842529297, 29.163848876953125, 29.04604721069336, 29.03451919555664, 28.879657745361328, 28.879657745361328, 28.879657745361328, 28.879657745361328, 28.8355712890625, 28.806900024414062, 28.758394241333008, 28.750411987304688, 28.729394912719727, 28.42156982421875, 28.41692352294922, 28.268712997436523, 28.128379821777344, 28.088415145874023, 28.088415145874023, 28.088415145874023, 27.768848419189453, 27.63067626953125, 27.563501358032227, 27.563501358032227, 27.563501358032227, 27.538562774658203, 27.533559799194336, 27.453411102294922, 27.453411102294922, 27.453411102294922, 27.453411102294922, 27.30780792236328, 27.267532348632812, 27.208980560302734, 27.12686538696289, 27.043794631958008, 26.934377670288086, 26.934377670288086, 26.934377670288086, 26.934377670288086, 26.934377670288086, 26.934377670288086, 26.934377670288086, 26.928497314453125, 26.928497314453125, 26.928497314453125, 26.87125015258789, 26.863801956176758, 26.773536682128906, 26.773536682128906, 26.696075439453125, 26.696075439453125, 26.696075439453125, 26.626819610595703, 26.612701416015625, 26.601951599121094, 26.601951599121094, 26.601951599121094, 26.485801696777344, 26.299373626708984, 26.262662887573242, 26.231443405151367, 26.196386337280273, 26.196386337280273, 26.190187454223633, 26.171161651611328, 26.171161651611328, 26.13873291015625, 26.048585891723633, 26.017810821533203, 25.842329025268555, 25.790739059448242, 25.790739059448242, 25.778358459472656, 25.70652961730957, 25.675861358642578, 25.630451202392578, 25.630451202392578, 25.630451202392578, 25.588869094848633, 25.561382293701172, 25.542037963867188, 25.542037963867188, 25.50693702697754, 25.50693702697754, 25.471420288085938, 25.471420288085938, 25.471420288085938, 25.471420288085938 ], "content": [ "not integrated to xCode .", "In this way git is integrated into Xcode", "I read here http : en.wikipedia.org wiki Xcode Major features that .. . .. . As of Xcode 3.0 Apple dropped WebObjects development inside Xcode WOLips should be used instead .", "Apple engineers recommends 8Gb minimum for comfortable Xcode development", ".. . .. . Environment : Xcode 5.0 5A1412 .", "This worked for me in Xcode 6 but Apple removed that button for Xcode 7 . : -", "Apple remove it from xcode 5 .", "Let s hope Apple put more focus on this in the next version s of XCode .", "we are using Xcode for development .", "Is the Mini configured for development with Xcode", "does this xcode is some apple garbage", "Add your Apple ID in Xcode .. . .. . Go to XCode Preferences Accounts tab Add button + Add Apple ID .", "It also contains the static analyzer that is now integrated into Xcode .", "the firemonkey-ios.dmg file which is provided in the delphi directory can not be installed with Xcode 4.6 . it requires Xcode 4.1 which is no longer available in apple development downloads .", "Download and use Xcode 6.2 from Apple .", "After updating my xcode it revealed the apple documentation .", "That s why apple made clear UI for xcode .", "Xcode is the worst piece of software ever written by Apple .", "sudo xcode-select -s Applications Xcode-beta.app sets the Xcode to be used to the beta .", "I use Xcode for iOS Development .", "Would it work better if the Ada compiler FSF GCC 4.6.0 not from Apple was integrated with Xcode", "Each year Apple proudly announces how wonderful its latest bodge of Xcode is but it still produces the most unuseful messages of any development-environment .", "But if you use Xcode 4 s integrated unit-testing running application tests in the simulator those won t work in Xcode 3 .", "I recently updated my development-environment from XCode v5.1 to XCode v6.1 and found a lot of elements in the new storyboard in individual screens as out of place .", "Something that can be integrated in Xcode would be great .", "Also Xcode is Xcode and not xCode .", "It compiles perfecly in XCode with Apple LLVM .", "Make sure you ve added Apple ID to Xcode .", "Apple is not returning it with the Download dSYMs option in Xcode .", "Delete Xcode and reinstall it using the new Apple ID .", "I m not yet a fan of integrated development environments but I m trying to overcome my prejudices and learn Xcode .", "Has anyone integrated the new Xcode UI Tests XCUITest with Xcode Bots yet", "or just Apple wants me to update my Xcode .", "You ll have to wait until Apple updates Xcode .", "Update : Apple DTS suggests reinstalling Xcode .", "I have not found any apple documentation for creating Xcode project templates so that mean apple stoped supporting to create Xcode custom project templates", "I am using Xcode 6 on a development-machine running 10.10.5 but on my test machine I don t have Xcode .", "Newbie is blind : Where is Development Distribution in Xcode 6", "Does XCode not make use of storyboards for Mac development", "Is there another way to request a development certificate outside of Xcode", "I m pretty new to development using Xcode and a Mac .", "A simple approach would be to copy the XCode 5 s Empty Application template to XCode s templates directory .", "@Steve I don t currently use Xcode but is there a downside to setting this environment variable and forgetting I did and later using Xcode for say iOS development", "According to the Apple documentation I am supposed to first request a development certificate in Xcode using the following steps : .. . .. . 1 .", ".. . .. . Environment is Xcode 7.2 and xctool version 0.2.8 .", "I suggest filing a radar to bring the necessary attention to Apple . s .. . .. . Xcode 7.1 has fixed this issue .", "Apple fixed the bug with xCode Version 6.2", "Xcode 4.5.2 is definitely not supported by Apple on new OS .", "Apple should really improve the overall Xcode experience .", "Apple should ship it with Xcode instead of SenTestingKit IMHO .", "Is Xcode using the symbolicatecrash tool to symbolicate the Apple report", "Add your Apple ID to Accounts preferences in Xcode .", "Previously my Xcode was running good with the Apple credentials .", "I am super new to XCode and App development .", "and message This will open Xcode and enable this device for development .", ".. . Choose Xcode Preferences on your development Mac .", "My Xcode can t start Apple Watch Extension I file a bug with Apple and want to get Xcode log and attach it to the report .", "This helped me run sudo xcode-select -s Applications Xcode-beta.app Contents Developer to use the beta-version of xcode for example .", "After calling Apple they thought it was a bug with Xcode 7.0.1 and Server running on Yosemite .", "Update 6 10 2014 : As expected Apple keeps improving Storyboards and Xcode .", "Its preferable to use Xcode 5 as its an update by apple but compiling with xcode 5 make UI Changes to the application .", "I expected that Apple would make it available for download through Xcode 7.3 or bundle it with an updated version of Xcode .", "In XCode the Apple TV target does not have the Enable Bitcode setting so assuming that XCode will always turn bitcode on .", "The first thing to be aware of is that OCUnit aka SenTestingKit.framework are integrated with Xcode but not really a part of Xcode proper .", "I tried restarting Xcode and both server and development Macs it doesn t help .", "Environment : Mac OS X 10.9.2 Xcode 5.1 .", "I am new to Xcode and Mac environment .", "This environment variable is not being set in Xcode 7.3.1", "Xcode-beta is xcode 8 .", "I have Xcode 4.2 for iOS development .", "I ve posted the same question in the Apple forums and they just said Xcode 4.6 .", "Set the value of Development in Document Versioning to Xcode 4.2 my default-value is Default Version Xcode 4.1 .", "Is this an issue on XCode that may be known to the Apple developers", "I am using Xcode 6.2 + Apple Swift", "Developer Library Xcode PrivatePlugIns IDECodeSnippetLibrary.ideplugin Contents Resources SystemCodeSnippets.codesnippets contains XCode 4 s library of built-in code-snippets .", "Hard to believe how unstable XCode 5.1.1 is let s see what new bugs Apple introduces with XCode 6 Beta", "The only solution I found is to download xcode 4.2.1 from Apple developer center and install it side-by-side with xcode 4.3.2 .", "I suggest filing a bug report with Apple if this has broken in Xcode 7.2 .", "Update XCode 7.1 Download https : developer.apple.com xcode download to version 7.1 via App Store or Apple Developer website .. . .. . The problem was an outdated XCode version", "Xcode 7.3.1 with an obvious eye towards Xcode 8", "I have done Xcode server integration with Xcode in order to achieve CI environment .", "Xcode 4.2 s SVN is well and truly broken .", "See R31n4ld0 s answer below for xcode 4", "You can deploy it on your s device s using XCode though .", "Before doing any type of iOS 5.0 development using Xcode 4.2 Xcode has provided a MainWindow.xib in templates .", "After that you can put it on your iPhone directly in Xcode - if and only if you ve paid your 99 to Apple to get a development certificate .", "I am using Xcode 7.0 and integrated latest Parse API .", "Added a second answer since there are now integrated features in Xcode 4.2 .", "I m not aware of an integrated tool into Xcode that can specifically solve this problem .", ".. . .. . Integration Into Xcode .. . .. . Integration into Xcode is dependent upon the version of Xcode that is installed .", "The devices are added to the development program via Xcode .", "Also make sure you have your Apple ID connected to Xcode it can be added in the accounts section of Xcode preferences .", "I m encountering a problem with hybrid-type Apple maps on the Xcode simulator after I upgraded to Xcode 7 .", "Xcode bots are stored in a database in Xcode Server .", "works in xcode 4 not tested in xcode 3 .", "I removed apple-id from Xcode - Preferences - Account and then added again .", "Also it works if you do not use Xcode with an Apple ID", "Apple is requiring a Built by latest Xcode 5 and b optimized for iOS 7 .", "After that make sure that you download the apple provisions in xcode ." ] }
{ "confidence": [ 36.021995544433594, 35.346431732177734, 34.70109176635742, 33.799110412597656, 33.67301940917969, 33.189659118652344, 33.03707504272461, 32.876495361328125, 32.81719970703125, 32.80951690673828, 32.7426872253418, 32.64595031738281, 32.59455871582031, 32.494075775146484, 32.11391830444336, 32.00806427001953, 31.973865509033203, 31.900671005249023, 31.893081665039062, 31.826099395751953 ], "content": [ "Question : We are working as a team and my partner had made changes to support iOS 7 and Xcode 5 . Now the problem is I have installed Xcode 4.6 in my system . His code is not supported in my Xcode . So I am not able to run this project in my system . I don t want to move to Xcode 5 . Is there any other way that I can still run this project in Xcode 4.6 Let me know if you need to know anything else . Comment : Why you don t want to move to Xcode 5 Comment : No You can t run the iOS7 project in Xcode 4.6 use Xcode 5 instead . Comment : @Virussmca Because I am in the middle of some other work and I fear it might break something while updating it and I have to import certificates and configure all the things from scratch . So it s be best If I can run this in 4.6 . Comment : If you do not have xib files then I think you should able to run the app on older version of xcode as well . Comment : No I don t have a xib files . I am only using storyboards . Still not able to run . : .. . Answer : According to Apple .. . .. . Starting February 1 new apps and app updates submitted to the App Store must be built with the latest version of Xcode 5 and must be optimized for iOS 7 . Learn more about preparing your apps by reviewing the iOS Human Interface Guidelines . Apple Announcement https : developer.apple.com news index.php id 12172013a .. . .. . So anyhow you have to change your development to Xcode5 . Better start now to change you development-environment to Xcode5 . Apple suggests developers to develop with the latest environment . Tats why apple announces the Betas to test our app early when a new OS comes . Comment : Please read question carefully . It supports iOS7 and it will be submitted from Xcode 5 .", "Question : I am using the new open-source Swift Package Manager and am able to download the files . I want the manager to create a development-environment Through Xcode based on the packages it retrieved . Has anybody dealt with this Comment : Reading the documentation overview https : swift.org package-manager conceptual-overview shows that what you are asking for is not a feature of the Package Manager . There s nothing about it either in the Community Proposal https : github.com apple swift-package-manager blob master Documentation PackageManagerCommunityProposal.md . Comment : What you mean development-environment Comment : @EricD : As of recently it now is a feature of the SPM o .. . Answer : The Swift Package Manger SPM is cross-platform It works on Mac and Linux . The Xcode is Mac OS only so I don t think SPM will be hard integrate to work with Xcode . SPM can do 2 things : .. . .. . Build swift source code into modules Executable and Library .. . Fetch dependencies from git or local path .. . .. . The SPM work only with Source code folders and files . It doesn t know anything about Xcode . Also it is mentioned that in the future Apple plans to add support for other languages not only Swift and Objc . My answer : SPM will not ingrate with Xcode . But because it s open-source anyone can just make its own fork and add custom feature that would generate Xcode specific files .", "Question : I am using the new open-source Swift Package Manager and am able to download the files . I want the manager to create a development-environment Through Xcode based on the packages it retrieved . Has anybody dealt with this Comment : Reading the documentation overview https : swift.org package-manager conceptual-overview shows that what you are asking for is not a feature of the Package Manager . There s nothing about it either in the Community Proposal https : github.com apple swift-package-manager blob master Documentation PackageManagerCommunityProposal.md . Comment : What you mean development-environment Comment : @EricD : As of recently it now is a feature of the SPM o .. . Answer : As of PR 174 https : github.com apple swift-package-manager pull 174 on the swift-package-manager https : github.com apple swift-package-manager project there exists an option for generating an Xcode project file in root directory of the package : .. . .. . Note : Earlier builds used : .. . .. . It will officially be part of Swift s 3.0 release . But it is already available with Xcode Swift DEVELOPMENT Snapshot 2016-03-24 https : swift.org download snapshots or later Comment : The correct command is swift package generate-xcodeproj Comment : @RyanCollins : thanks updated . There s really no need to downvote correct yet newly outdated answers . Just write a comment as you did asking for an update edit .", "Question : I wonder whether I should start development of a new iOS project in Xcode 4 or 3.2 - on one hand I know 3.2 a little there is lots of info about it out there and it s stable and proven . On the other hand Xcode 4 brings some improvements as well . Are the newer previews of Xcode 4 ready for prime time or are they still too buggy I m especially interested in issues with and recommendations of externally hosted repositories as I was not very happy with how Xcode 3.2 played with the Subversion repository in my last project . Which one to choose and which preferably free and externally hosted repository to match Comment : I swear I saw the same question just last week.. . Comment : Yes I am sorry . Searching for Xcode 4 Xcode 4 and +Xcode +4 either turned up too much noise or came up empty . I only thought of trying Xcode4 after posting my question . Comment : There I edited the question to be more specific . .. . Answer : Today 3rd Feb 2011 Apple released the GM-Seed of xcode4 . It s now ready for usage and you can compile your apps and release to the app-store . So if you are new with xcode I would suggest using xcode4 . Why 1 . The new compiler has a lot of optimizations done . The compiler as far as I can see the results generates faster code . It s big fun 2 . The new Userinterface is more reliable . It makes your development a lot faster 2a . Interface builder is now integrated . You can drag-and-drop your userinterface Item using the ctrl -key into your code and xcode creates the source for you This accelerates creation of userinterfaces a lot 3 . git support has been added to sourcecontrol which makes development in teams easier .. . .. . 4 . The new LLVM compiler shows errors immediately while coding . And it displays errors which xcode3 never mentioned .. . .. . In xcode4 Apple changed a lot So if you start with xcode3 you will have a new learning curve with xcode 4 . For newbs I suggest : Download the xcode4 goldmaster and get startet with xcode4 Comment : Now that the final is out I think for a new project the choice is obvious : Xcode 4 is the first version of the future of Xcode .", "Question : Have I missed something obvious or is it not possible to zoom freely in and out of an open nib file within the integrated Interface Builder of Xcode 4 .. . Answer : EDIT : This is not an answer but a suggestion to at least zoom in and have better pixel level control . I am unaware of a way to zoom in out within xcode but with a mac you can zoom in using the accessibility controls . On my MacBook I hold command and scroll with two fingers on the touchpad to enable this feature . Comment : I think I know what you are referring to - on the iMac I have here it s Ctrl + mouse zoom but as you have described this only zooms into the screen and not out further than the size of the display . Comment : This is not possible with an external display . Using Xcode on an 11 air is maddening without an external display . Accessibility zoom controls don t work with external monitors It s inconceivable that Apple wouldn t value this functionality for development .", "Question : When I tried to export an IPA for enterprise distribution on XCode 7 I cannot select the correct development team . enter image description here http : i.stack.imgur.com i8q9x.png enter image description here http : i.stack.imgur.com hND9L.png .. . .. . 1 . All teams are showing under XCode Preference Profiles .. . 2 . I can see all the teams when I select a export method rather than Enterprise Distribution enter image description here http : i.stack.imgur.com aqPc6.png .. . .. . 3 . I have tried to remove and add the team again .. . .. . 4 . I have checked that my developer account is not expired and there is no agreement pending for approval . 5 . I have tried to restart XCode and my Mac still no luck .. . .. . Any kind of help would be greatly appreciated . Comment : have you solved .. . Answer : I think there is a bug in Xcode . I have also faced this issue . Try to to remove and re-add your Apple account within Xcode and refresh . also trying to create a new Apple profile if you have not already done so as their may be a conflict with current account . You can find more info in this link also .. . .. . apple-account-not-have-any-development-teams http : stackoverflow.com questions 29227604 apple-account-not-have-any-development-teams", "Question : I ve read Where does xcode take application s Identifier from http : stackoverflow.com questions 3728800 where-does-xcode-take-applications-identifier-from XCode bundle-identifier formatting from PRODUCT NAME http : stackoverflow.com questions 2309821 xcode-bundle-identifier-formatting-from-product-name and loads more but.. . I m trying to get push notifications going and getting the dreaded .. . .. . Error Domain NSCocoaErrorDomain Code 3000 no valid aps-environment entitlement string found for application UserInfo 0x15b200 NSLocalizedDescription no valid aps-environment entitlement string found for application error . I m fairly certain I ve followed all the steps correctly including : .. . .. . made the push certificate well in advance of the provisioning cert .. . made a Entitlements.plist .. . added a get-task-allow boolean and set it to true ad-hoc release .. . .. . The only think I can t quite get my head around is the Bundle Identifier .. . .. . The push certificate is for .. . .. . The Bundle Indentifier in PwCNewUK-Info.plist is for .. . .. . If I manually change it to .. . .. . I get a UDID mismatch error as the app is seen as PwCNewsUK .. . .. . When I ve Googled this there seems to be some confusion over the matter but it seems they have to match QUESTION : .. . .. . What should the Bundle Indentifer be to match the push certificate of .. . XXXXXXXXXX.com.julianbaker.pwcnewsuk QUESTION : .. . .. . Do I need to add a aps-environment entitlement to the provisioning-profile and if so where and how See http : www.airplaysdk.com node 3174 amongst others .. . .. . Loving iPhone development but sheesh it can be a headbanger at times Comment : Digging a little deeper I found the ANSWER to the second question.. . apple should include the aps-environment pair in the mobileprovision file the value should be development or distribution . There is apparently a bug where this pair is sometimes omitted when generating the certificate . Check by opening the file in a text-editor Comment : And it appears that the app Bundle Identifier is case sensitive Indentifier field in the Properties pane of the Target Info window Comment : THIS PROBLEM MAKES ME WANT TO CRY .. . Answer : I had this problem the scenario was : .. . .. . I had setup an app-id without push notifications support . I m using Xcode 5.1 + iOS 7.1 .. . .. . Later edited the app-id to add push notifications in development and production . Created the APNs certificates for both . When you test PN using your device attached to Xcode everything works ok . The problem appears when you release the app to production you keep getting : .. . .. . The solution that worked for me was : .. . .. . 1 . Delete provisioning profiles for development and distribution Xcode and Developer portal . 2 . Delete your app ID Developer portal . 3 . Create a new App ID with Push Notifications Support for Development and Production . 4 . Create new provisioning profiles using the NEW App ID . 5 . Install them on Xcode . 6 . Test on development and distribution release .", "Question : I am able to download the current versions of Xcode and other resources from the Apple Developer Center s but where can I download older versions Specifically I am looking for Xcode 3.1.4 . Comment : Have you tried working with Xcode 3.2.6 to see if works for your specific needs Why are you looking for an earlier version Comment : @mopsled will it still work fine on a leopard 10.5.8 osx I am going to a workshop for ruby-on-rails and those are the instructions they gave us beforehand . Comment : Try downloading see if it works.. . I know it takes a while but I think that is the best way to find out . Comment : @deceze Marina : No - it won t work . Latest version requires Lion . Comment : @vcsjones She does not want the latest version . .. . Answer : I found it Go to IOS Development center IOS gives you xcode plus the iPhone tools if Im correct Mac Development Center will probably work too . https : developer.apple.com devcenter ios index.action .. . .. . Scroll down to DOWNLOADS Xcode 4.4.1 You will see : Looking for an older version of Xcode Download .. . .. . Click that . I found it on page 3 - way at the bottom of the list .", "Question : null .. . Answer : I m using Delphi XE2- firemonkey for iOS app development . the firemonkey-ios.dmg file which is provided in the delphi directory can not be installed with Xcode 4.6 . it requires Xcode 4.1 which is no longer available in apple development downloads . trust me i looked for it for like a million times anybody can help me find a proper firemonkey for Xcode 4.6 or at least a link-to download Xcode 4.1 please i m using MacOS lion . Cheers", "Question : I ve read Where does xcode take application s Identifier from http : stackoverflow.com questions 3728800 where-does-xcode-take-applications-identifier-from XCode bundle-identifier formatting from PRODUCT NAME http : stackoverflow.com questions 2309821 xcode-bundle-identifier-formatting-from-product-name and loads more but.. . I m trying to get push notifications going and getting the dreaded .. . .. . Error Domain NSCocoaErrorDomain Code 3000 no valid aps-environment entitlement string found for application UserInfo 0x15b200 NSLocalizedDescription no valid aps-environment entitlement string found for application error . I m fairly certain I ve followed all the steps correctly including : .. . .. . made the push certificate well in advance of the provisioning cert .. . made a Entitlements.plist .. . added a get-task-allow boolean and set it to true ad-hoc release .. . .. . The only think I can t quite get my head around is the Bundle Identifier .. . .. . The push certificate is for .. . .. . The Bundle Indentifier in PwCNewUK-Info.plist is for .. . .. . If I manually change it to .. . .. . I get a UDID mismatch error as the app is seen as PwCNewsUK .. . .. . When I ve Googled this there seems to be some confusion over the matter but it seems they have to match QUESTION : .. . .. . What should the Bundle Indentifer be to match the push certificate of .. . XXXXXXXXXX.com.julianbaker.pwcnewsuk QUESTION : .. . .. . Do I need to add a aps-environment entitlement to the provisioning-profile and if so where and how See http : www.airplaysdk.com node 3174 amongst others .. . .. . Loving iPhone development but sheesh it can be a headbanger at times Comment : Digging a little deeper I found the ANSWER to the second question.. . apple should include the aps-environment pair in the mobileprovision file the value should be development or distribution . There is apparently a bug where this pair is sometimes omitted when generating the certificate . Check by opening the file in a text-editor Comment : And it appears that the app Bundle Identifier is case sensitive Indentifier field in the Properties pane of the Target Info window Comment : THIS PROBLEM MAKES ME WANT TO CRY .. . Answer : Actually your provisional profile deleted from apple developer site . you get error for", "Question : I ve read Where does xcode take application s Identifier from http : stackoverflow.com questions 3728800 where-does-xcode-take-applications-identifier-from XCode bundle-identifier formatting from PRODUCT NAME http : stackoverflow.com questions 2309821 xcode-bundle-identifier-formatting-from-product-name and loads more but.. . I m trying to get push notifications going and getting the dreaded .. . .. . Error Domain NSCocoaErrorDomain Code 3000 no valid aps-environment entitlement string found for application UserInfo 0x15b200 NSLocalizedDescription no valid aps-environment entitlement string found for application error . I m fairly certain I ve followed all the steps correctly including : .. . .. . made the push certificate well in advance of the provisioning cert .. . made a Entitlements.plist .. . added a get-task-allow boolean and set it to true ad-hoc release .. . .. . The only think I can t quite get my head around is the Bundle Identifier .. . .. . The push certificate is for .. . .. . The Bundle Indentifier in PwCNewUK-Info.plist is for .. . .. . If I manually change it to .. . .. . I get a UDID mismatch error as the app is seen as PwCNewsUK .. . .. . When I ve Googled this there seems to be some confusion over the matter but it seems they have to match QUESTION : .. . .. . What should the Bundle Indentifer be to match the push certificate of .. . XXXXXXXXXX.com.julianbaker.pwcnewsuk QUESTION : .. . .. . Do I need to add a aps-environment entitlement to the provisioning-profile and if so where and how See http : www.airplaysdk.com node 3174 amongst others .. . .. . Loving iPhone development but sheesh it can be a headbanger at times Comment : Digging a little deeper I found the ANSWER to the second question.. . apple should include the aps-environment pair in the mobileprovision file the value should be development or distribution . There is apparently a bug where this pair is sometimes omitted when generating the certificate . Check by opening the file in a text-editor Comment : And it appears that the app Bundle Identifier is case sensitive Indentifier field in the Properties pane of the Target Info window Comment : THIS PROBLEM MAKES ME WANT TO CRY .. . Answer : My solution was to remove and create again Development Provisioning Profile . It was listed as Invalid - not expired and also renew failed Xcode 4.3.2 and iOS 5.1", "Question : I read here http : en.wikipedia.org wiki Xcode Major features that .. . .. . As of Xcode 3.0 Apple dropped WebObjects development inside Xcode WOLips should be used instead . Xcode 3 still includes the WebObjects frameworks . Can somebody tell me if the WebObjects frameworks are included with Xcode 4 Or are there other reasons why I should use Xcode 3 instead of Xcode 4 for the maintenance of my old WO project And if you have some info on the use of WOLips then I d like to know . My Mac is running OSX 10.6.7 . .. . Answer : WOLips is a plugin for the Eclipse Java IDE . You don t use Xcode at all . Apple doesn t either . EVERYONE uses Eclipse with the WOLips plugin as far as I know at least . No it s not as polished as Apple products but it has lots of Java goodies and WOLips is extremely well supported as is Project Wonder and the whole community . Follow the link-to the wiki that Pascal provided and you ll find lots of information . There are also webobjects mailing lists such as webobjects-dev . If it was yesterday I would have said to get even MORE information go to WOWODC next weekend in Montreal and get to know many of the people behind all this . But I think registration ended yesterday . Good luck", "Question : I ve read Where does xcode take application s Identifier from http : stackoverflow.com questions 3728800 where-does-xcode-take-applications-identifier-from XCode bundle-identifier formatting from PRODUCT NAME http : stackoverflow.com questions 2309821 xcode-bundle-identifier-formatting-from-product-name and loads more but.. . I m trying to get push notifications going and getting the dreaded .. . .. . Error Domain NSCocoaErrorDomain Code 3000 no valid aps-environment entitlement string found for application UserInfo 0x15b200 NSLocalizedDescription no valid aps-environment entitlement string found for application error . I m fairly certain I ve followed all the steps correctly including : .. . .. . made the push certificate well in advance of the provisioning cert .. . made a Entitlements.plist .. . added a get-task-allow boolean and set it to true ad-hoc release .. . .. . The only think I can t quite get my head around is the Bundle Identifier .. . .. . The push certificate is for .. . .. . The Bundle Indentifier in PwCNewUK-Info.plist is for .. . .. . If I manually change it to .. . .. . I get a UDID mismatch error as the app is seen as PwCNewsUK .. . .. . When I ve Googled this there seems to be some confusion over the matter but it seems they have to match QUESTION : .. . .. . What should the Bundle Indentifer be to match the push certificate of .. . XXXXXXXXXX.com.julianbaker.pwcnewsuk QUESTION : .. . .. . Do I need to add a aps-environment entitlement to the provisioning-profile and if so where and how See http : www.airplaysdk.com node 3174 amongst others .. . .. . Loving iPhone development but sheesh it can be a headbanger at times Comment : Digging a little deeper I found the ANSWER to the second question.. . apple should include the aps-environment pair in the mobileprovision file the value should be development or distribution . There is apparently a bug where this pair is sometimes omitted when generating the certificate . Check by opening the file in a text-editor Comment : And it appears that the app Bundle Identifier is case sensitive Indentifier field in the Properties pane of the Target Info window Comment : THIS PROBLEM MAKES ME WANT TO CRY .. . Answer : the solution for 10.8 Xcode 4.4 is to open the appname.entitlements file .. . .. . and if the DataProtectionClass key has the value NSFileProtectionComplete delete it Deleting this key allows me to test apps from Xcode on devices it wasn t affecting simulation .", "Question : Does Apple s Xcode development-environment provide any tools for memory leak detection I am especially interested in tools that apply to the iPhone SDK . Currently my favourite platform for hobby programming projects .. . .. . Documentations tutorials for said tools would be very helpful . .. . Answer : Does Apple s Xcode development-environment provide any tools for memory leak detection .. . I am especially interested in tools that apply to the iPhone SDK . Yes . Apple calls them Instruments there s more than just memory tools . See Apple s Introduction to Instruments User Guide https : developer.apple.com library mac documentation DeveloperTools Conceptual InstrumentsUserGuide Introduction Introduction.html . In particular see Locating Memory Issues in Your App https : developer.apple.com library mac documentation DeveloperTools Conceptual InstrumentsUserGuide MemoryManagementforYourApp MemoryManagementforYourApp.html apple ref doc uid TP40004652-CH11-SW1 . It provides examples of how to use the memory-oriented trace templates .", "Question : I read here http : en.wikipedia.org wiki Xcode Major features that .. . .. . As of Xcode 3.0 Apple dropped WebObjects development inside Xcode WOLips should be used instead . Xcode 3 still includes the WebObjects frameworks . Can somebody tell me if the WebObjects frameworks are included with Xcode 4 Or are there other reasons why I should use Xcode 3 instead of Xcode 4 for the maintenance of my old WO project And if you have some info on the use of WOLips then I d like to know . My Mac is running OSX 10.6.7 . .. . Answer : The WebObjects frameworks are not installed with Xcode 4 or Xcode 3 for that matter . You really should switch to WOLips . Yes Eclipse is ugly but it s a far better Java IDE than Xcode . Check the WOCommunity wiki for details : .. . .. . http : wiki.objectstyle.org confluence display WO WO+5.4+Getting+Started", "Question : When creating a new project with unit tests Xcode sets the build configuration to Debug for the Test scheme same for the Run scheme . Should I differentiate between Run Command-R Test Command-U schemes I.e . should I create a new Build Configuration called Test add a preprocessor macro TEST 1 to it and use it as the build configuration for the Test scheme instead Or should I just keep Run Test both as Debug I come from a Ruby Rails background where you usually have test development and production environments . It seems to me that Debug is like development and Release is like production but we re missing a test which is why I m thinking it might make sense to add Test . Comments Opinions Suggestions I m specifically asking this because I want to compile something for Test with : .. . .. . I don t think it matters if I also compile this for Debug . So I really could just do : .. . .. . But I m really only intending to do it for tests for now . So that s why I m thinking I should differentiate between debug test but am wondering why Xcode doesn t do that for you by default Does Apple think you shouldn t differentiate between them Comment : This doesn t seem to have anything to do with Scheme the programming language . bad tag Comment : @ryanc yeah I meant schemes in Xcode . .. . Answer : Preprocessor macros will not work you need to check the environment at runtime . Updated for Xcode 7.3 Comment : blog post link is broken Comment : This environment variable is not being set in Xcode 7.3.1 Comment : @AyushGoel - Thanks for the heads up . Best thing to do is to check the the contents of the environment dictionary . Seems like you can look for the XCInjectBundleInto key . Ill update this shortly . Comment : Swift version for fast copy-paste : func isRunningTests - Bool let env : String : String NSProcessInfo.processInfo .environment return env XCInjectBundleInto nil", "Question : After update Xcode from 7.2 to 7.2.1 XcodeServer is unable to run Xcode Service . When I choose updated Xcode then alert with message : Enable Accessibility access for UI Testing .. . appear . After tap on Request Access s button of this alert XcodeServer give me an alert with message You must agree to the terms of the Xcode software license agreement . Launch Xcode again and agree to the software license agreement or choose a different version of Xcode . . Of course I done this few times and also the Xcode and Xcode Helper are on the list of allowed app in Accessibility section of Privacy in System Preferences . Does anyone can help Or has anyone the same issue I was tring commands lines : .. . .. . and : .. . .. . After instal previous version 7.2 everything works as usual . Edited : .. . .. . After instal previous version 7.2 I can not see any of my bot I have created before . but this is probably result-of xcrun xcscontrol --reset . Comment : You re not the only one it seems Apple broke it : forums.developer.apple.com thread 34683 https : forums.developer.apple.com thread 34683 .. . Answer : As Eimantas Vaiciunas post at Apple Developer Forums https : forums.developer.apple.com thread 34683 109132 : .. . .. . Since checkFirstLaunchStatus with sudo returned 69 I launched Xcode with sudo too : .. . sudo Applications Xcode.app Contents MacOS Xcode .. . This launched Xcode with license agreement prompt and after agreeing everything went fine . Comment : Was able to get things xcode-server running after trying some of the above tips - But repositories are not showing up . So not real great . Comment : You can check if Your repository exist in Library Developer XcodeServer HostedRepositories . But if You used the xcrun xcscontrol --reset s command it probably removed all Your content from Xcode Server . Comment : Thanks for solving what happened to my repositories - I was wondering if I had a disk going bad .", "Question : I ve read Where does xcode take application s Identifier from http : stackoverflow.com questions 3728800 where-does-xcode-take-applications-identifier-from XCode bundle-identifier formatting from PRODUCT NAME http : stackoverflow.com questions 2309821 xcode-bundle-identifier-formatting-from-product-name and loads more but.. . I m trying to get push notifications going and getting the dreaded .. . .. . Error Domain NSCocoaErrorDomain Code 3000 no valid aps-environment entitlement string found for application UserInfo 0x15b200 NSLocalizedDescription no valid aps-environment entitlement string found for application error . I m fairly certain I ve followed all the steps correctly including : .. . .. . made the push certificate well in advance of the provisioning cert .. . made a Entitlements.plist .. . added a get-task-allow boolean and set it to true ad-hoc release .. . .. . The only think I can t quite get my head around is the Bundle Identifier .. . .. . The push certificate is for .. . .. . The Bundle Indentifier in PwCNewUK-Info.plist is for .. . .. . If I manually change it to .. . .. . I get a UDID mismatch error as the app is seen as PwCNewsUK .. . .. . When I ve Googled this there seems to be some confusion over the matter but it seems they have to match QUESTION : .. . .. . What should the Bundle Indentifer be to match the push certificate of .. . XXXXXXXXXX.com.julianbaker.pwcnewsuk QUESTION : .. . .. . Do I need to add a aps-environment entitlement to the provisioning-profile and if so where and how See http : www.airplaysdk.com node 3174 amongst others .. . .. . Loving iPhone development but sheesh it can be a headbanger at times Comment : Digging a little deeper I found the ANSWER to the second question.. . apple should include the aps-environment pair in the mobileprovision file the value should be development or distribution . There is apparently a bug where this pair is sometimes omitted when generating the certificate . Check by opening the file in a text-editor Comment : And it appears that the app Bundle Identifier is case sensitive Indentifier field in the Properties pane of the Target Info window Comment : THIS PROBLEM MAKES ME WANT TO CRY .. . Answer : None of the above worked for me 1 . Delete all Provisioning Profiles in Xcode Organizer .. . 2 . Delete all Developers certificates in Keychain .. . 3 . Delete all Provisioning Profiles in iPhone device .. . 4 . In iOS Provisioning Portal delete Development Provisioning Profile which was created automatically by Xcode .. . 5 . Create a new Provisioning Profile by assigning the correct Certificate AppID Device combination .. . 6 . Download the new Provisioning Profile .. . 7 . Import the new Provisioning Profile into Xcode Organizer .. . 8 . CMD + Option + Shift + K .. . 9 . CMD + Shift + K .. . 10 . CMD + R .. . 11 . Hooray :", "Question : I installed Xcode a long time ago . Apparently I didn t check back then the UNIX Development Support checkbox . Now I want to have them but when I click on the installation this is what appears : .. . .. . disabled http : img203.imageshack.us img203 2242 capturadepantalla201004u.png .. . .. . The UNIX Development Support check box is disabled .. . .. . Q . How can I install the UNIX Development Support Is there a way to run some script that creates all the needed links from Developer to usr bin EDIT Note this is for old Xcode 3 . Screens and tool names differ for Xcode 4 Unix Command Line Tool Comment : You can also download it here : developer.apple.com downloads index.action https : developer.apple.com downloads index.action .. . Answer : With Xcode 4.3 from Apple App Store you can enable Unix Command Line Tools via the Xcode Menu : Preferences - Download - Components", "Question : I want to verify if an element is visible or not depending on its .hidden property but I don t find a valid way to do that using the new Xcode 7 UI test stuff . I ve tried with myelement.exists and myelement.hittable but they doesn t seems to work as I expected . I suppose they work on conjunction with the hidden property . An hidden element shouldn t exists and is not hittable.. . but this is not the current behaviour I can understand the exists behaviour.. . but a hidden element should be not hittable IMO . Is there another way to verify the hidden property value .. . Answer : s As of Xcode 7.1 Beta 3 UI Testing does not currently support validating the visibility of an element . I suggest filing a radar to bring the necessary attention to Apple . s .. . .. . Xcode 7.1 has fixed this issue . hittable now checks to see if the element is correct . Comment : This is not working for me on Xcode 7.1 . I update some controls to hidden dynamically and test afterwards and this always returns true even if the control is obviously hidden . Comment : Xcode 7.2 hittable test is not working properly for hidden elements either Comment : Xcode 7.2.1 hittable test is not working properly for hidden elements Comment : I suggest filing a bug report with Apple if this has broken in Xcode 7.2 . Comment : With Xcode 7.3 this works fine on real devices ." ] }
[ "yes-answer-long", "yes-answer-short" ]
ide
UNK_RELATION
django-forms@django@62
django-forms -- specific questions related to forms with the @placeholder web framework .
{ "confidence": [ 38.32227325439453, 37.63431167602539, 36.87541198730469, 36.87541198730469, 36.30518341064453, 36.30518341064453, 35.77156066894531, 35.325035095214844, 34.89607238769531, 34.89607238769531, 34.89607238769531, 34.74599838256836, 34.74599838256836, 34.69627380371094, 34.61821746826172, 34.442230224609375, 33.998844146728516, 33.981651306152344, 33.79222106933594, 33.79222106933594, 33.79222106933594, 33.79222106933594, 33.56694412231445, 33.42151641845703, 33.19406509399414, 33.18017578125, 33.065673828125, 32.94019317626953, 32.81292724609375, 32.616573333740234, 32.46923065185547, 32.46923065185547, 32.46923065185547, 32.463096618652344, 32.323463439941406, 32.28757858276367, 32.28064727783203, 32.19981002807617, 32.19981002807617, 32.155941009521484, 32.10981750488281, 31.84012222290039, 31.809261322021484, 31.48378562927246, 31.2032413482666, 31.178363800048828, 31.14010238647461, 31.095958709716797, 31.052093505859375, 31.052093505859375, 31.052093505859375, 31.052093505859375, 31.052093505859375, 31.052093505859375, 31.052093505859375, 30.917295455932617, 30.917295455932617, 30.725940704345703, 30.706512451171875, 30.705108642578125, 30.59140396118164, 30.39069366455078, 30.10860824584961, 30.038249969482422, 30.019393920898438, 29.97711944580078, 29.959903717041016, 29.87773323059082, 29.87773323059082, 29.846975326538086, 29.779293060302734, 29.745166778564453, 29.72909927368164, 29.72909927368164, 29.72909927368164, 29.72909927368164, 29.72909927368164, 29.72909927368164, 29.579715728759766, 29.49132537841797, 29.49132537841797, 29.49132537841797, 29.49132537841797, 29.466835021972656, 29.35409927368164, 29.343124389648438, 29.205406188964844, 28.907630920410156, 28.785614013671875, 28.785614013671875, 28.785614013671875, 28.710582733154297, 28.64440155029297, 28.615245819091797, 28.566314697265625, 28.55088233947754, 28.49332046508789, 28.49332046508789 ], "content": [ "I will rebuild it and embrace forms in django .", "I m using Django Formsets to have multiple forms .", "possible duplicate of Django forms : how to dynamically create ModelChoiceField labels http : stackoverflow.com questions 2958792 django-forms-how-to-dynamically-create-modelchoicefield-labels", "Possible duplicate of Django : multiple models in one template using forms http : stackoverflow.com questions 569468 django-multiple-models-in-one-template-using-forms", "This was fixed in Django 1.9 with form kwargs https : docs.djangoproject.com en 1.9 topics forms formsets passing-custom-parameters-to-formset-forms .", "Django 1.9 : .. . .. . https : docs.djangoproject.com en 1.9 topics forms formsets passing-custom-parameters-to-formset-forms", "Possible duplicate of Paginating the results of a Django forms POST request http : stackoverflow.com questions 2266554 paginating-the-results-of-a-django-forms-post-request", "see this link-to know more on mutiple forms Proper way to handle multiple forms on one page in Django http : stackoverflow.com questions 1395807 proper-way-to-handle-multiple-forms-on-one-page-in-django", "This is used by Django to manage the forms within the formset .", "How to make all forms in django formset required", "Django doesn t really do mutating forms .", "I m new to Django and I am trying to style forms with crispy forms .", "It works perfectly fine in Django Admin forms but does not work in normal forms .", "https : github.com django django blob 1.9.7 django-forms forms.py L64", "Is the problem only related to crispy-forms", "The BaseModelFrom https : github.com django django blob master django-forms models.py L305 class inherits BaseForm https : github.com django django blob master django-forms forms.py L109 class .", "Formsets pass empty permitted True to all extra forms https : github.com django django blob 1.4.3 django-forms formsets.py L132 and a form with empty permitted that hasn t been modified should always pass validation https : github.com django django blob 1.4.3 django-forms forms.py L268 .", "Is there a way to have inline forms functionality with crispy-forms bootstrap like django-admin forms have", "And how to change this to the list of radio buttons in Django forms", "Some pertinent definitions occur in django-forms forms.py .", "How did you install django-crispy-forms", "I didn t find it on the django doc for forms .", "In this case you shouldn t need it but if you re going to be using forms with the same field names look into the prefix kwarg for django-forms .", ".. . .. . Perhaps the most djangonic way is demonstrated by lazerscience as an answer to the similar question Django forms : how to dynamically create ModelChoiceField labels http : stackoverflow.com questions 2958792 django-forms-how-to-dynamically-create-modelchoicefield-labels .", "django-crispy-forms does work with ModelForms the same way as with simple forms .", "could it be related to floppy forms", "Django forms take a prefix https : docs.djangoproject.com en dev ref forms api prefixes-for-forms argument that you can use instead of the hidden-field .", "For that I m using django-crispy-forms .", "You should try to define an array of forms in views : .. . .. . And display all forms in template : .. . .. . If you want more details : .. . .. . self.instance in Django ModelForm http : stackoverflow.com questions 18265023 self-instance-in-django-modelform .. . .. . django submit two different forms with one submit button http : stackoverflow.com questions 18489393 django-submit-two-different-forms-with-one-submit-button", "The great world wide web does seem to have quite a lack of tutorials regarding editing objects with forms in Django .", "I am fairly new to forms in django .", "I am using Django and Crispy Forms .", "The inline forms you refer to are known in Django as Formsets .", "Django is validating your formset to only accept the number of forms specified hence dropping all of your other formset forms .", "Django Inline Formsets https : docs.djangoproject.com en dev topics forms modelforms inline-formsets are the Django way of doing it .", "I m using Django 1.7 django-webtest 1.7.8 WebTest 2.0.18 and django-crispy-forms 1.4.0 .", "enter image description here http : i.stack.imgur.com ttBRR.png .. . .. . What is the best way to replicate this add related record functionality using the existing django-forms framework", "I answered a question about it here http : stackoverflow.com questions 2374224 django-working-with-multiple-forms 2374240 2374240 .", "But also there is a similar question in here http : stackoverflow.com questions 871037 django-overloading-init-for-custom-forms", "Django forms aren t responsible for outputting the form element itself .", "You can enforce server level validation on django-forms : https : docs.djangoproject.com en dev ref forms validation cleaning-and-validating-fields-that-depend-on-each-other .. . .. . From the docs for django-1.8 :", "I have been using django-crispyforms for now to create my forms .", "Also I have django-rest-framework default urls : .. . .. . Is there any way to use it with django default forms", "That s why I said that your problem was Django related not crispy-forms related .", "The solution I came up with was the closure solution and it is a solution I ve used before with Django model forms .", "I m trying to display forms for these two above related to logged in user .", "See Django forms documentation https : docs.djangoproject.com en 1.9 topics forms for details .", "http : stackoverflow.com questions 25065469 proper-way-to-handle-multiple-django-forms-in-one-page-with-two-views", "Do You know how to change this list of checkboxes code : .. . .. . to the django-forms", "I have many django-forms in which I pass the request as kwarg .", "Django documentation just seems to be lacking when it comes to model forms .", "Django forms don t have a concept of fieldsets they belong to the ModelAdmin class .", "The test form is part of a formset rendered with Django crispy forms .", "How can I apply bootstrap styles to django-forms", "Django forms have a clean function what s wrong with using it", "I am working on a Django project with crispy forms .", "I m the lead developer of django-crispy-forms .", "Note that the django contrib.auth app comes with a UserCreationForm https : docs.djangoproject.com en dev ref forms api prefixes-for-forms view-source https : github.com django django blob 1.4 django-contrib auth forms.py L56 .", "Also I m using django-crispy-forms https : github.com maraujop django-crispy-forms so I d prefer to solve this in my forms.py and not in the template with html tweaks in order to keep it DRY .", "Then you can fool around with multiple partially related forms on a single web page .", "How can I use django-forms in the django-cms page", "If you want to add delete form in django dynamically you need django formset : docs.djangoproject.com en 1.8 topics forms formsets https : docs.djangoproject.com en 1.8 topics forms formsets .", "How to Save 2 forms in one view with Django .. . .. . In your GET you initialize your forms with prefixes : .. . .. . Then in your POST : .. . .. . and there you go .", "Create a custom widget for this you can get inspired by SelectDateWidget here https : github.com django django blob master django-forms extras widgets.py .", "I don t see anything like that listed here http : docs.djangoproject.com en dev ref forms widgets ref-forms-widgets .", "From the docs http : docs.djangoproject.com en dev topics forms media : .. . .. . The Django Admin application defines a number of customized widgets for calendars filtered selections and so on .", "Should I be using forms and some kind of sub forms", "Forms don t really belong in models.py .", "The forms that are filled by the user have no errors .", "I had a typo forms instead of form... .", "You can sublcass forms docs.djangoproject.com en 1.9 ref forms api subclassing-forms https : docs.djangoproject.com en 1.9 ref forms api subclassing-forms", "They are not model forms .", "The way to provide an initial value for unbound forms in Django is the initial argument .", "I m having a small but annoying problem with django-forms right now .", "Rename your file to forms.py which is the normal practice in django for forms .", "As of Django 1.7 forms use OrderedDict which does not support the append operator .", "It sounds as-if your django instance can t find the static files for crispy forms .", "I m using curl to test one of my Django forms .", "References read ModelFrom s save method https : docs.djangoproject.com en 1.6 topics forms modelforms the-save-method .. . .. . Note : .. . 1 ModelFrom https : github.com django django blob master django-forms models.py L466 class inherits BaseModelFrom https : github.com django django blob master django-forms models.py L305 class .", "This works well for normal forms .", "Cuz ther are three forms .", "Forms are for collecting data not displaying it .", "This will make all the forms required .", "I m using cripsy forms for better look of forms .", "If you re using forms framework for example in the Django admin the validation of the input will be done on the application level .", "I find that you lose a lot of the convenience of the django-forms framework once you start any not trivial overriding of methods and functionality .", "Read again the docs about the bound unbound https : docs.djangoproject.com en 1.9 ref forms api bound-and-unbound-forms forms", "I would suggest implementing it as described in Django documentation https : docs.djangoproject.com en 1.9 ref forms validation cleaning-a-specific-field-attribute", "Django forms automatically takes care of saving new entries into the database if the forms are valid assuming you are using a correct model and ModelForms .", "I m using crispy-forms layout in my Form class and I m wondering if is there any easy way to force a field to be rendered with default django-forms", "If you want to know more about formsets you can find them in the Django forms documentation https : docs.djangoproject.com en dev topics forms formsets .", "This is a continuation of my previous post http : stackoverflow.com questions 35228665 django-multiple-forms-one-submit where I attempted to submit multiple forms at once using one submit button .", "But that will always display all values selected because I ve removed if option value in selected choices : github.com django django blob master django-forms https : github.com django django blob master django-forms widgets.py L525 so maybe you should do this by js or switch to default widget SelectMultiple in updateview", "I m trying to create a HTML form in Django and I m using Django modelforms https : docs.djangoproject.com en 1.9 topics forms modelforms to do this .", "Your form will need a constructor that accepts the choices directly : .. . .. . And your formset will need to override a method to run the querysets and pass them into the forms as they re constructed : .. . .. . see the Django source https : github.com django django blob master django-forms formsets.py to look into how this would work", "If you are looking for examples best is still to check out django source code https : github.com django django blob master django-forms widgets.py .", "Should I review Django just Django not DRF Forms and re-use serializer as validation .. .", "Maybe it would be helpful for someone it works at least for django-crispy-forms 1.5.2 Django 1.6 :" ] }
{ "confidence": [ 38.27482604980469, 38.233253479003906, 38.15862274169922, 38.107208251953125, 37.82071304321289, 37.548004150390625, 37.034934997558594, 36.87434387207031, 36.872589111328125, 36.6881103515625, 36.572879791259766, 36.481204986572266, 36.43327331542969, 36.43327331542969, 36.396217346191406, 36.25798416137695, 36.18060302734375, 36.117279052734375, 36.07240295410156, 35.988426208496094 ], "content": [ "Question : Is it possible to have multiple models included in a single ModelForm in django I am trying to create a profile edit form . So I need to include some fields from the User model and the UserProfile model . Currently I am using 2 forms like this .. . .. . Is there a way to consolidate these into one form or do I just need to create a form and handle the db loading and saving myself Comment : Possible duplicate of Django : multiple models in one template using forms http : stackoverflow.com questions 569468 django-multiple-models-in-one-template-using-forms .. . Answer : You can just show both forms in the template inside of one form html element . Then just process the forms separately in the view . You ll still be able to use form.save and not have to process db loading and saving yourself . In this case you shouldn t need it but if you re going to be using forms with the same field names look into the prefix kwarg for django-forms . I answered a question about it here http : stackoverflow.com questions 2374224 django-working-with-multiple-forms 2374240 2374240 . Comment : This is a good piece of advice but there are cases this is not applicable eg . custom model form-for a formset . Comment : What would be a straightforward way to make a class based view capable of showing more than one form and a template that then combines them into the same form element", "Question : This was fixed in Django 1.9 with form kwargs https : docs.djangoproject.com en 1.9 topics forms formsets passing-custom-parameters-to-formset-forms . I have a Django Form that looks like this : .. . .. . I call this form with something like this : .. . .. . Where request.affiliate is the logged in user . This works as intended . My problem is that I now want to turn this single form into a formset . What I can t figure out is how I can pass the affiliate information to the individual forms when creating the formset . According to the docs to make a formset out of this I need to do something like this : .. . .. . And then I need to create it like this : .. . .. . Now how can I pass affiliate request.affiliate to the individual forms this way .. . Answer : Django 1.9 : .. . .. . https : docs.djangoproject.com en 1.9 topics forms formsets passing-custom-parameters-to-formset-forms", "Question : I m trying to adopt crispy-forms and bootstrap and use as much of their functionality as possible instead of inventing something over and over again . Is there a way to have inline forms functionality with crispy-forms bootstrap like django-admin forms have Here is an example : .. . .. . it will display a decent form : .. . .. . example of single form rendered with crispy-forms http : i.stack.imgur.com yTX13.png .. . .. . How do I go about adding a form that basically represents this model : .. . .. . So there will be a project and name url links and way to add many like same thing is done in django-admin where you are able to add extra rows with data related to your main model . On the sreenshot below you are able to fill out data for Question object and below that you are able to add data for QuestionOption objects -you are able to click the + icon to add as many QuestionOptions as you want . I m not looking for a way to get the forms auto-generated from models that s nice but not the most important - is there a way to construct a form that will let you add rows of data like django-admin does screenshot of django-admin http : i.stack.imgur.com ipSEB.png .. . Answer : The inline forms you refer to are known in Django as Formsets . If you want to know more about formsets you can find them in the Django forms documentation https : docs.djangoproject.com en dev topics forms formsets . Crispy supports rendering inline formsets as described in the section Rendering Formsets http : django-crispy-forms.readthedocs.org en d-0 tags.html rendering-formsets .. . .. . Please note that formsets by default show 3 extra inline forms allowing you to add three more objects . After saving you again get three extra inline formsets to add even more . If you want an add more button like in the Django Admin you will need to use some Javascript to dynamically add those rows . Comment : This question goes into more detail about dynamic add more buttons : stackoverflow.com questions 501719 http : stackoverflow.com questions 501719 dynamically-adding-a-form-to-a-django-formset-with-ajax", "Question : I saw that you could use the screen to record several forms together in my example I would like to respond to several questions in the same time . I choose my questions and I answer my valid but it does not record that whenever the last form .. . How can I do to make it records all the information in the same time It registers in my database only the last form every time .. . .. . .. . So i have a forms like that : .. . .. . a views.py : .. . .. . And for finish my template : .. . .. . What I forget to put it records all my forms at the same time .. . Answer : I ll try to give you a correct approach to do that I won t test the code I give you . You should try to define an array of forms in views : .. . .. . And display all forms in template : .. . .. . If you want more details : .. . .. . self.instance in Django ModelForm http : stackoverflow.com questions 18265023 self-instance-in-django-modelform .. . .. . django submit two different forms with one submit button http : stackoverflow.com questions 18489393 django-submit-two-different-forms-with-one-submit-button Comment : There is no error with your code but it does not record anything Comment : Sorry.. . Good luck for solving :", "Question : This was fixed in Django 1.9 with form kwargs https : docs.djangoproject.com en 1.9 topics forms formsets passing-custom-parameters-to-formset-forms . I have a Django Form that looks like this : .. . .. . I call this form with something like this : .. . .. . Where request.affiliate is the logged in user . This works as intended . My problem is that I now want to turn this single form into a formset . What I can t figure out is how I can pass the affiliate information to the individual forms when creating the formset . According to the docs to make a formset out of this I need to do something like this : .. . .. . And then I need to create it like this : .. . .. . Now how can I pass affiliate request.affiliate to the individual forms this way .. . Answer : This is what worked for me Django 1.7 : .. . .. . Hope it helps someone took me long enough to figure it out Comment : nvm.. . I had a typo forms instead of form... .", "Question : Is it possible to have multiple models included in a single ModelForm in django I am trying to create a profile edit form . So I need to include some fields from the User model and the UserProfile model . Currently I am using 2 forms like this .. . .. . Is there a way to consolidate these into one form or do I just need to create a form and handle the db loading and saving myself Comment : Possible duplicate of Django : multiple models in one template using forms http : stackoverflow.com questions 569468 django-multiple-models-in-one-template-using-forms .. . Answer : You probably should take a look at Inline formsets http : docs.djangoproject.com en dev topics forms modelforms inline-formsets . Inline formsets are used when your models are related by a foreign key . Comment : Inline formsets are used when you need to work with a one-to-many relationship . Such as a company where you add employees . I am trying combine 2 tables into one single form . It is a one-to-one relationship . Comment : The use of an Inline formset would work but would likely by less than ideal . You could also create a Model that handles the relation for you and then use a single form . Just having a single page with 2 forms as suggested in stackoverflow.com questions 2770810 http : stackoverflow.com questions 2770810 muliple-models-in-a-single-django-modelform 2774732 2774732 would work .", "Question : I have the following form : .. . .. . This is driven by the following view : .. . .. . I just wondered the best way to check if the the user has selected the same team twice from the drop down lists and return the relevant HttpResponse as you can see above . Any advice to point me in the right direction is appreciated . Many thanks Alan . Comment : docs.djangoproject.com en 1.8 ref forms validation https : docs.djangoproject.com en 1.8 ref forms validation cleaning-and-validating-fields-that-depend-on-each-other Comment : I am not using Django to create the form itself . Is this a big no no in the first place Comment : Forms are a powerful tool so it is better to use them where you can . To create a select from a model or a queryset you can use docs.djangoproject.com en 1.8 ref forms fields https : docs.djangoproject.com en 1.8 ref forms fields django.forms.ModelChoiceField Comment : I will rebuild it and embrace forms in django . Will keep you updated : Thanks for the help . Comment : Can you put your comment as an answer so I may accept it : .. . Answer : You can enforce server level validation on django-forms : https : docs.djangoproject.com en dev ref forms validation cleaning-and-validating-fields-that-depend-on-each-other .. . .. . From the docs for django-1.8 :", "Question : Is it possible to have multiple models included in a single ModelForm in django I am trying to create a profile edit form . So I need to include some fields from the User model and the UserProfile model . Currently I am using 2 forms like this .. . .. . Is there a way to consolidate these into one form or do I just need to create a form and handle the db loading and saving myself Comment : Possible duplicate of Django : multiple models in one template using forms http : stackoverflow.com questions 569468 django-multiple-models-in-one-template-using-forms .. . Answer : You can check my answer here http : stackoverflow.com questions 2601487 django-registration-django-profile-using-your-own-custom-form 3298481 3298481 for a similar problem . It talks about how to combine registration and user-profile into one form but it can be generalized to any ModelForm combination .", "Question : in my Django 1.2 project I want to prepopulate a field in a modelform but my new value is ignored . This is the snippet : .. . .. . I also tried with self.base fields but no effect : there is always the database-value displaying in the form . Any ideas .. . Answer : Old question but adding a descriptive answer as I believe it would be helpful for some new developer . I also tried with self . base fields but no effect : there is always the database-value displaying in the form . Any ideas If a form is initialized form either : - .. . .. . 1 . using initial argument eg . YourModelFrom initial filed1 : variable generally the case-when you want to pass dynamically calculated initial values for some fields . Reference Setting Initial Values http : www.djangobook.com en 2.0 chapter07.html .. . .. . or .. . .. . 2 . using instance argument eg . YourModelFrom instance model object usually the case-when you wants to update an existing model instance object . References read ModelFrom s save method https : docs.djangoproject.com en 1.6 topics forms modelforms the-save-method .. . .. . Note : .. . 1 ModelFrom https : github.com django django blob master django-forms models.py L466 class inherits BaseModelFrom https : github.com django django blob master django-forms models.py L305 class . The BaseModelFrom https : github.com django django blob master django-forms models.py L305 class inherits BaseForm https : github.com django django blob master django-forms forms.py L109 class . 2 The argument instance is added in BaseModelFrom https : github.com django django blob master django-forms models.py L305 class constructor when we assign a model class instance object to instance argument hence instance is not None then BaseModelFrom https : github.com django django blob master django-forms models.py L305 constructor calls model to dict and updates initial argument before to call super class constructor . Check def init https : github.com django django blob master django-forms models.py L306 in BaseModelFrom class .. . .. . Then assigning initial value to a field explicitly as shown in OP s code in question don t effect this is due to the way clean fields https : github.com django django blob master django-forms forms.py L384 method is written in BaseFrom class . Code Snip : .. . .. . According to code line initial self.initial.get name field.initial if initial value for field is given in initial dict then value assigned to field.initial is not used . ANSWER : .. . .. . Although @Daniel answer is perfectly correct but one can also like another way to achieve same effect is using self.initial : .. . .. . Give it a try self.initial is nothing but it the dict we pass in argument . Check code init https : github.com django django blob master django-forms forms.py L122 in BaseForm : .. . .. . Note : I didn t find any documentation related to use initial attribute I just explored the base code and used it . Edit : the behavior reported in Question is also documented in Django Model .. . .. . Dynamic initial values https : docs.djangoproject.com en 1.6 ref forms api dynamic-initial-values .. . .. . Form.initial .. . .. . Note that if a Field defines initial and you include initial when instantiating the Form then the latter initial will have precedence . In this example initial is provided both at the field level and at the form instance level and the latter gets precedence : .. . .. . .. . from django import forms .. . class CommentForm forms.Form : .. . .. . name forms.CharField initial class .. . .. . url forms.URLField .. . .. . comment forms.CharField .. . f CommentForm initial name : instance auto id False .. . print f .. . tr th Name : th td input type text name name value instance .. . tr th Url : th td input type url name url td tr .. . tr th Comment : th td input type text name comment td tr .. . .. . .. . PS : Btw point 2 in my answers tell difference between initial and instance argument . Their is one more key-value argument data - values in that triggers form validations . read this Difference between Django Form initial and bound data http : stackoverflow.com q 7920128 1673391 . Comment : Note : In bound form-data the query dict will have precedence over initialized field s value . Check code : def value self https : github.com django django blob master django-forms forms.py L610 and method def bound data self data initial https : github.com django django blob master django-forms fields.py L165 -- this will help you if you have a value for a field os dynamically calculated and the filed is disabled http : stackoverflow.com a 1424453 1673391 . Let me know if anyone need help on this I will update this answer", "Question : I am using django-webtest to create automated functional tests for my application . As I have multiple forms on a single web page I m currently using a hard-coded index to select the form of interest . For instance : .. . .. . I would like to use the form id instead of a hard-coded index to select the form of interest so that the code is maintainable . But when I print school form.id in my code the value is None . Template is : .. . .. . I couldn t locate in the Django documentation how to assign the form id not the form field id to a ModelForm . Could someone help me with this I m using Django 1.7 django-webtest 1.7.8 WebTest 2.0.18 and django-crispy-forms 1.4.0 . .. . Answer : Django forms aren t responsible for outputting the form element itself . So there is nothing to be done at the form declaration level . You can always pass an attribute from the view and use it in your template : Comment : How would I use it in this template with two forms Added the template in the main edit . Comment : I don t really understand . You only have one form in that template it contains fields from two Django forms but that s irrelevant from the point of view of the HTML . Comment : Thank you . I get it now . I was confusing the unit of granularity - there are two Django forms but on the HTML page they are merged into a single one . I tried out your suggestion and it works now : -", "Question : I ve been running into crispy form http : django-crispy-forms.readthedocs.org en latest index.html and seems to do exactly what i want : render forms with bootstrap layout . Now the example talk about using forms.Form . This is ok i can create mine by writing the code . like this .. . .. . But how to do the update because if i put this in the view : .. . .. . it does not work because instance is only for ModelForm . .. . .. . now can i substitute the model.Form with ModelForm and use crispy form-for ModelForm i did this .. . .. . Here i added the Meta class . Now : it works but is it correct to use it like this The update works as well in this way . What s the correct way to use forms for doing the update ciao .. . Answer : I m the lead developer of django-crispy-forms . I m not sure I follow your question as it s a bit poorly formatted . What exactly are you trying to do django-crispy-forms does work with ModelForms the same way as with simple forms . It sits on top of Django so it doesn t mess with it . It only controls your form rendering but doesn t change how validation works how to create form instances and so on . EDIT : .. . .. . I m adding an example on how to do a ModelForm with crispy-forms . I believe your first problem is that you were subclassing forms.Form instead of forms.ModelForm . That s why I said that your problem was Django related not crispy-forms related . Later in your view : .. . .. . In your template : Comment : What do i ve to do to use it with ModelForm Comment : I ve edited the answer . Comment : @maraujop : Please take a look at this question : stackoverflow.com questions 16581057 http : stackoverflow.com questions 16581057 formhelper-object-has-no-attribute-append-while-using-crispy-forms-in-django This problem came when I was doing what was said here .", "Question : null .. . Answer : I have tried to installed django-crispy-forms however i got this error : ImportError : No module named crispy forms .. . .. . Ps . i needed to install with -sudo. . .. . .. . thank you Comment : Are you using virtualenv How did you install django-crispy-forms Comment : Yes i installed in virtualenv . Comment : Why did you need sudo Did you activate the virtualenv before installing Comment : Yes it was activated . It tried to install with sudo because i was getting permission-denied messages . Comment : Is the problem only related to crispy-forms Do other modules work Is crispy forms in your virtualenv site-packages", "Question : This was fixed in Django 1.9 with form kwargs https : docs.djangoproject.com en 1.9 topics forms formsets passing-custom-parameters-to-formset-forms . I have a Django Form that looks like this : .. . .. . I call this form with something like this : .. . .. . Where request.affiliate is the logged in user . This works as intended . My problem is that I now want to turn this single form into a formset . What I can t figure out is how I can pass the affiliate information to the individual forms when creating the formset . According to the docs to make a formset out of this I need to do something like this : .. . .. . And then I need to create it like this : .. . .. . Now how can I pass affiliate request.affiliate to the individual forms this way .. . Answer : I had to do a similar thing . This is similar to the curry solution :", "Question : This was fixed in Django 1.9 with form kwargs https : docs.djangoproject.com en 1.9 topics forms formsets passing-custom-parameters-to-formset-forms . I have a Django Form that looks like this : .. . .. . I call this form with something like this : .. . .. . Where request.affiliate is the logged in user . This works as intended . My problem is that I now want to turn this single form into a formset . What I can t figure out is how I can pass the affiliate information to the individual forms when creating the formset . According to the docs to make a formset out of this I need to do something like this : .. . .. . And then I need to create it like this : .. . .. . Now how can I pass affiliate request.affiliate to the individual forms this way .. . Answer : I m a newbie here so I can t add comment . I hope this code will work too : .. . .. . as for adding additional parameters to the formset s BaseFormSet instead of form .", "Question : If think my question is pretty obvious and almost every developer working with UserProfile should be able to answer it . However I could not find any help on the django documentation or in the Django Book . When you want to do a UserProfile form in with Django Forms you d like to modify the profile fields as well as some User field . But there is no forms.UserProfileForm yet How do you do that .. . Answer : I take it normal that you don t find any information in the docs as you merge two models into a single form . Alternatively and maybe very obviously you can : Create two modelforms one for the user and the other for the userprofile . Set the userprofile modelform to display only firstname and lastname . Put both forms in the same template within a single form tag . When it is submitted call the save methods of each form . Comment : Yes but it is not really straight forward to use two forms for actually one .. . With this solution you cannot order the fields as you want and continuing to use the form . with the solution I provided you can do whatever you want continuing to use the form framework . Comment : I just don t like the idea of merging two models in a modelform . Apart from my subjective opinion I have no concrete objections against your solution and it seems that both solutions have their pros and cons . Use at will Comment : I agree with you but it is regarding the point of view that you look for this specific problem . UserProfile and User model are intimately related . For me UserProfile model is just a way of adding some missing fields to the User model . And when you want to update your profile you want to update all those fields regardless to if they are in the UserProfile or the User model since they are combined together to stock properties about the user .", "Question : I m trying to adopt crispy-forms and bootstrap and use as much of their functionality as possible instead of inventing something over and over again . Is there a way to have inline forms functionality with crispy-forms bootstrap like django-admin forms have Here is an example : .. . .. . it will display a decent form : .. . .. . example of single form rendered with crispy-forms http : i.stack.imgur.com yTX13.png .. . .. . How do I go about adding a form that basically represents this model : .. . .. . So there will be a project and name url links and way to add many like same thing is done in django-admin where you are able to add extra rows with data related to your main model . On the sreenshot below you are able to fill out data for Question object and below that you are able to add data for QuestionOption objects -you are able to click the + icon to add as many QuestionOptions as you want . I m not looking for a way to get the forms auto-generated from models that s nice but not the most important - is there a way to construct a form that will let you add rows of data like django-admin does screenshot of django-admin http : i.stack.imgur.com ipSEB.png .. . Answer : If using class based views you can use django-extra-views https : github.com AndrewIngram django-extra-views .", "Question : I can see how to add an error message to a field when using forms but what about model form This is my test model .. . .. . My model form .. . .. . The error message on the fields : first name and last name is This field is required . How do I change that in a model form .. . Answer : New in Django 1.6 https : docs.djangoproject.com en dev releases 1.6 : .. . .. . ModelForm accepts several new Meta options . .. . Fields included in the localized fields list will be localized by setting localize on the form field . The labels help texts and error messages options may be used to customize the default fields see Overriding the default fields https : docs.djangoproject.com en dev topics forms modelforms modelforms-overriding-default-fields for details . From that : .. . .. . Related : Django s ModelForm - where is the list of Meta options http : stackoverflow.com questions 15348007 djangos-modelform-where-is-the-list-of-meta-options Comment : i don t understand the surrounding the custom error message text so i took that out . but this is the first snippet that worked for me . i m on django-1.6 . thank you sir Comment : You re welcome If you re curious the underscore function is a common shortcut for an internationalization utility : stackoverflow.com questions 2964244 http : stackoverflow.com questions 2964244 django-meaning-of-leading-underscore-in-list-of-tuples-used-to-define-choice-fi", "Question : The Django admin site makes use of a really cool widget : .. . .. . enter image description here http : i.stack.imgur.com ybe24.png .. . .. . How can I make use of this widget in my own applications I don t see anything like that listed here http : docs.djangoproject.com en dev ref forms widgets ref-forms-widgets . .. . Answer : From the docs http : docs.djangoproject.com en dev topics forms media : .. . .. . The Django Admin application defines a number of customized widgets for calendars filtered selections and so on . These widgets define media requirements and the Django Admin uses the custom widgets in-place of the Django defaults . The Admin templates will only include those media files that are required to render the widgets on any given page . .. . If you like the widgets that the Django Admin application uses feel free to use them in your own application They re all stored in django.contrib.admin.widgets . In this case you want the FilteredSelectMultiple widget . To use it apply the widget on a form field like so : .. . .. . Make sure to include the forms media in the template as it needs to include a few JS files . Comment : Hrm.. . doesn t want to work for some reason . All the JS is there but it isn t converting the selectbox for some reason . 7src.com mnb2 a3 access http : 7src.com mnb2 a3 access Comment : Can you paste some code to dpaste.com http : dpaste.com Comment : This is a wild guess but try setting your second argument for the is stacked variable to False . Looking at the code it looks like that may affect the display of two boxes or not . Unfortunately I can t test it myself right now so I m just looking through code hehe : Comment : Nevermind . Found the problem . It needs script type text javascript src mnb2 a3 admin jsi18n script as well which isn t included by form.media . Comment : Oh I should also mention that you need to be logged in as a superuser just to access that file I recommend saving the file out and including that instead .", "Question : I have a model that references a ForeignKey User field . When a user selects an item on his form I would like them to be able to see the get full name instead of just the username . Comment : Always name your model class in singular write Book instead of Books . Comment : possible duplicate of Django forms : how to dynamically create ModelChoiceField labels http : stackoverflow.com questions 2958792 django-forms-how-to-dynamically-create-modelchoicefield-labels .. . Answer : This can be done several ways . Create a proxy subclass of User and override its unicode method to return user s full name . Now in your model form use UserFullName to retrieve users . .. . .. . Another way is to dynamically populate choices in form s constructor . .. . .. . Perhaps the most djangonic way is demonstrated by lazerscience as an answer to the similar question Django forms : how to dynamically create ModelChoiceField labels http : stackoverflow.com questions 2958792 django-forms-how-to-dynamically-create-modelchoicefield-labels . It subclasses ModelChoiceField and overrides its label from instance method that is intended to provide choice labels . Comment : Thanks the last option most djangonic way seems the cleanest and worked fine . Don t forget a from django.utils.encoding import smart unicode .", "Question : This was fixed in Django 1.9 with form kwargs https : docs.djangoproject.com en 1.9 topics forms formsets passing-custom-parameters-to-formset-forms . I have a Django Form that looks like this : .. . .. . I call this form with something like this : .. . .. . Where request.affiliate is the logged in user . This works as intended . My problem is that I now want to turn this single form into a formset . What I can t figure out is how I can pass the affiliate information to the individual forms when creating the formset . According to the docs to make a formset out of this I need to do something like this : .. . .. . And then I need to create it like this : .. . .. . Now how can I pass affiliate request.affiliate to the individual forms this way .. . Answer : I wanted to place this as a comment to Carl Meyers answer but since that requires points I just placed it here . This took me 2 hours to figure out so I hope it will help someone . A note about using the inlineformset factory . I used that solution my self and it worked perfect until I tried it with the inlineformset factory . I was running Django 1.0.2 and got some strange KeyError exception . I upgraded to latest trunk and it worked direct . I can now use it similar to this : Comment : Same thing goes for modelformset factory . Thanks for this answer" ] }
[ "yes-answer-long", "yes-answer-short" ]
django
UNK_RELATION
createelement@html@80
createelement -- createelement is a web-api that creates creates the specified @placeholder element in html in a xul document creates the specified xul element in other documents it creates an element with a null namespaceuri .
{ "confidence": [ 50.14649200439453, 46.455013275146484, 44.77027893066406, 41.90378952026367, 39.791603088378906, 38.87586212158203, 38.0031852722168, 38.0031852722168, 37.64089584350586, 37.60370635986328, 34.856971740722656, 34.796478271484375, 33.798095703125, 33.47455596923828, 32.93803787231445, 32.807861328125, 32.78250503540039, 32.42425537109375, 32.42425537109375, 32.01683807373047, 31.878440856933594, 31.748987197875977, 31.213233947753906, 30.728473663330078, 30.706409454345703, 30.706409454345703, 30.706409454345703, 30.619033813476562, 30.008544921875, 30.008544921875, 30.008544921875, 30.008544921875, 29.550479888916016, 29.49188995361328, 29.437896728515625, 29.13235855102539, 29.13235855102539, 29.13235855102539, 29.13235855102539, 29.13235855102539, 29.13235855102539, 29.079727172851562, 29.079727172851562, 29.079727172851562, 28.94967269897461, 28.94967269897461, 28.596336364746094, 28.378448486328125, 28.291072845458984, 28.291072845458984, 28.272682189941406, 28.140701293945312, 28.02532958984375, 27.680583953857422, 27.35092544555664, 27.11838722229004, 27.028827667236328, 27.000221252441406, 27.000221252441406, 27.000221252441406, 27.000221252441406, 27.000221252441406, 27.000221252441406, 27.000221252441406, 27.000221252441406, 27.000221252441406, 27.000221252441406, 27.000221252441406, 27.000221252441406, 27.000221252441406, 26.804397583007812, 26.804397583007812, 26.711437225341797, 26.672061920166016, 26.344005584716797, 26.332794189453125, 25.944721221923828, 25.941347122192383, 25.941347122192383, 25.941347122192383, 25.72435760498047, 25.72435760498047, 25.405536651611328, 25.199176788330078, 25.178138732910156, 25.120281219482422, 25.120281219482422, 25.120281219482422, 24.672260284423828, 24.672260284423828, 24.672260284423828, 24.12824058532715, 24.12824058532715, 24.12824058532715, 24.12824058532715, 24.12824058532715, 24.12824058532715, 24.12824058532715, 24.12824058532715, 24.12824058532715 ], "content": [ "Also if a function statement were to appear after createElement referring to the element created it would create a closure around the element .", "jQuery : .. . .. . I tried with .detach .. . .. . This creates a new element but don t insert input inside .", "Second createElement should be called under document object .", "This is the code : .. . .. . It only creates the list elements it doesn t put the text nodes anywhere in the html document .", "Create the node using Document methods like createElement or createTextNode .. . 2 .", "the answer do.but there is standards .see developer.mozilla.org en docs Web HTML Element ol https : developer.mozilla.org en docs Web HTML Element ol .", "Try this : .. . .. . if you want to do it using createElement br .", "I then tried using createElement both for an object or an applet .", "You can discard it with element null .", "var element document.createElement div .. . .. . console.log element The div .. . .. . console.log element.parentNode null .. . .. . element.parentNode.removeChild element Cannot read property removeChild of null", "How can i add an createElement br before and after the table", "divcont is assigned to the element before attempting to insert HTML to it .", "The only issue I guess with this is the tag createElement .. . that needs to be placed .", "I create an element e.g .", "Had the element been added to the document then in the case of IE there would be another reference added to the element so when the reference in createdElement is removed the element object would still have a non-zero reference count and continue to exist .", "I m trying to use document.createElement circle to work with svgs but Chrome creates a end tag to circle giving .. . .. . which results of an error .", "Here is the code : .. . .. . The problem is that the Element is created just right but the element class is not implemented .", "applet https : developer.mozilla.org en-US docs Web HTML Element applet has been obsoleted for a while ago .. .", "read standards for UL tag here https : developer.mozilla.org en docs Web HTML Element ol .", "With innerHTML you can add anything to that element including HTML-Tags .", "It will just click the anchor element .", "Please look at the following code : .. . .. . This code creates a list of two names and displays a button and an input line .", "Did you try to add the a element to w1 s document instead o the parent window s document", "when I create this element I insert it into an iframe .", "Why it doesn t insert new element", "You can not add an element twice .", "No there s no requirement to have an id on an element .", "It will vary from browser to browser however the javascript delete keyword has nothing to do with the DOM s createElement method .", "http : stackoverflow.com questions 1804991 remove-dom-element-without-knowing-its-parent because their element does have a parentNode .", "I know how to remove an element through its parentNode but if I create a new element it doesn t have a parentNode at all .", "Instead of adding the ls element you ve created on the first row to the list element you re creating a new empty one and adding it .", "I want to get rid of the previous element that was appended before another element is added .", "to insert the new element to the DOM .", "In the case of other browsers where the elements themselves are garbage collected the element wouldn t be collected since the collector would see it in the graph of objects connected to the document .", "In modern browsers you could use Mutation Observer https : developer.mozilla.org en-US docs Web API MutationObserver to detect changes in an element head in this case .", "So .. . a How can I remove this element", "Why this - element.parentNode.removeChild element instead of just element.remove", "Also you can t use the result-of insertAdjacentHTML as an element .", "Assign new element to variable e.g new p .", "How can I create an element without an ending that", "I am trying to create element using jquery .", "As long as the element is not attached to any document it s basically little more than a plain JS object .", "I am using innerHTML to add the data to the element and then using appendChild to add the tag to the document .", "Garbage collection of the element would then become dependent on the function itself being garbage collected with or without insertion into the document .", "What you need to do here is append the author details to the author element and not the root element .", "Thanks for the help but now how do you put the author element inside the book element", "So this actually appends the text node into the errorMessage element but will not generate the p tag .", "I see only one element .", "Works fine for me even in IE7.0 which was the worst when i tried with the createelement method .", "Also there s no need to use createElement or appendChild because that s handled by using innerHTML .", "So how does it treat it if I try to insert the same element at several different spots in html", "I would like to append an li element after another li inside a ul element using javascript This is the code I have so far. .", "yes but this was the closest I got something to actually try to run . . tried as createElement object and never even got as far as trying to load the class .. .", "I want to replace contents of a clicked td element with input data and a button element .", "I am familiar with appendChild .. . .. . However this appends the new element inside the other and not after .", "I imagine the page is reloading because your button element is a submit button inside a form - when no type attribute is specified for a button it becomes a submit button by default .", "If i just want to format elements with CSS - i dont want to use other features - is the document.createElement nav DOM element create enough to scam IE and make a plain HTML document", "@Vlad - it moves the element from wherever it was to the last place you tried to insert it .", "This is different from Remove dom element without knowing its parent", "Since you didn t append it at all it is just .. . .. . if you log this element .", "I have problem with dynamic creation of element in javascript with innerHTML .", "I m trying to get the value of an input and create an element with the value text in it .", "I build a small function appending an element with an id and styles .", "With innerText you can only apply plain Strings without formatting to an element .", "I am trying to build a path and then create a script-element using JavaScript .", "Use textContent function to set text content to your element .", "You re applying absolute positioning for every div element in the page", "Does inspect element on the created div point to where the margin is coming from", "What will happen is that the reference to the element currently held in the createdElement will get garbage collected .", "How can I append the new element after the existing one", "Should this point to the input element in your example", "So yes the this would be the element that initiated the call .", "My code has two main functions one that creates the scripts a bunch of them loading data from .js files and another that calls the functions in those scripts in a sequence determined by their names using the eval function .", "I m not sure I understand what you are trying to achieve but if you want to simply set the HTML of the errorMessage element to some HTML why not just using the innerHTML property", "I also have other codes that needs this kind of solution - The CSS is applied to every element matching the selector O.o The color will be changed for every table row in the document .", "or it just inserts it at the first spot specified", "the second approach simply sets the innerHTML property of the element to a string which happens to be HTML and is more error prone and less flexible .", "It happens for a very short period of time and then the new element in the list disappears .", "Having the element you can assign it the id using the code :", "You are just changing what element you append the child to .", "I want to create and append an element without having to define it in a variable it seems like such a waste to me and is unnecessary .", "How can I store created elements using my Add New Element button even my page was refreshed .", "According to the jQuery official documentation http : api.jquery.com jquery jQuery-html-ownerDocument .. . .. . To create a HTML element div or div div is preferred .", "However my CSS contains some styling for the : : after element which isn t written when I append the html through JavaScript since appending elements to the html through JavaScript puts every element directly behind the previous one whilst you re leaving whitespace when you write plain html .. . .. . Relevant css : .. . .. . relevant self written html : .. . .. . javascript : .. . .. . The result is as you can see next Own html :", "Whilst the element hasn t been added to the DOM it s no different to any other Javascript object and will be garbage collected as soon as the last reference is gone .", "I want to create the code : .. . .. . However you cannot use DOMNode : : createElement to add node text to a br as you would with a paragraph : .. . .. . I ve also tried creating a text node then adding the break to it .", "How the applet tag looks hardcoded : .. . .. . closest I have gotten it to work via createElement : .. . .. . This at least tries to load the applet on Firefox 38.2.1 but fails with ClassNotFoundException . . again think it has something to do with the codebase and or archive specification .", "End tags are never optional unless you are using self-closing tag syntax for XML elements and noting will generate an end tag when you use createElement .", "It seems that many event handlers will need to have parameters specific for the attached element .", "So my thought was that the handler would need to be passed the element that created the event .", "The caller the browser sets this to the element that the event was registered on when calling your handler .", "I was able to get this to work by adding an ID to the script then in the JS manually firing the load event on that DOM element .", "Presumably what ever you are using to create the chart isn t running on the newly created element .", "Useful in a dynamic function if you don t want that the text inside an element gets formatted .", "In this case it s because you didn t append the 2nd element to the body like you did in the first version .", "The third version isn t creating an element it uses an existing one therefore you don t need to append it .", "Is that perhaps the problem you ve created an anchor element but not defined the onclick event handler before calling it", "Write the function to transform a particular employee s data into a p element : .. . .. . With these pieces in-place we need only to write :", "Result : .. . .. . This code working half correctly because it inserts input to new element but with copy all input from page .", "When i click on a link i want to create an element p give it some text and then put it in one of my divs ." ] }
{ "confidence": [ 65.38268280029297, 65.38268280029297, 59.10744857788086, 55.184722900390625, 54.26670837402344, 53.11843490600586, 50.8007926940918, 47.074493408203125, 45.064151763916016, 44.59120559692383, 44.265384674072266, 41.4831428527832, 40.80280303955078, 38.66044616699219, 38.59782409667969, 38.29615020751953, 37.66383743286133, 37.15363693237305, 36.81820297241211, 35.70883560180664 ], "content": [ "Question : I m trying to use document.createElement circle to work with svgs but Chrome creates a end tag to circle giving .. . .. . which results of an error . How can I create an element without an ending that Comment : Why don t you want an end tag Comment : Because the end tag causes chrome to not display the circle.. . Comment : End tags are never optional unless you are using self-closing tag syntax for XML elements and noting will generate an end tag when you use createElement . The parser turns an XML document into a DOM where there are only nodes not tags . You can manipulate it all you like . If you turn it back into an XML document then you get tags . .. . Answer : try using document.createElementNS :", "Question : I m trying to use document.createElement circle to work with svgs but Chrome creates a end tag to circle giving .. . .. . which results of an error . How can I create an element without an ending that Comment : Why don t you want an end tag Comment : Because the end tag causes chrome to not display the circle.. . Comment : End tags are never optional unless you are using self-closing tag syntax for XML elements and noting will generate an end tag when you use createElement . The parser turns an XML document into a DOM where there are only nodes not tags . You can manipulate it all you like . If you turn it back into an XML document then you get tags . .. . Answer : Try to use :", "Question : I m trying to use document.createElement circle to work with svgs but Chrome creates a end tag to circle giving .. . .. . which results of an error . How can I create an element without an ending that Comment : Why don t you want an end tag Comment : Because the end tag causes chrome to not display the circle.. . Comment : End tags are never optional unless you are using self-closing tag syntax for XML elements and noting will generate an end tag when you use createElement . The parser turns an XML document into a DOM where there are only nodes not tags . You can manipulate it all you like . If you turn it back into an XML document then you get tags . .. . Answer : You might want to take a look at this article .. . .. . SVG Scripting with JavaScript Part 1 : Simple Circle http : blazingcloud.net 2010 09 17 svg-scripting-with-javascript-part-1-simple-circle .. . .. . The method you re looking for is : .. . .. . Edit : Credit where credit is due .. . .. . Stackoverflow : Creating SVG graphics using javascript http : stackoverflow.com questions 1034712 creating-svg-graphics-using-javascript", "Question : If you create a element within a function like : .. . .. . And you do not append it anywhere in the DOM i.e . via .appendChild functions does it still remain in memory So would you have to do .. . .. . I m just curious : Comment : It should be cleaned up with any other variables in the function s scope . Comment : @Rob - that should be an answer : .. . Answer : It will vary from browser to browser however the javascript delete keyword has nothing to do with the DOM s createElement method . There is no need to use delete . What will happen is that the reference to the element currently held in the createdElement will get garbage collected . Now in the case of IE that will mean that the element will have its reference count dropped to 0 so it will destroy itself and release its memory . Other browsers do things differently typically the elements in the DOM are themselves garbage collected objects and will be removed during the same or perhaps a DOM specific GC cycle . Had the element been added to the document then in the case of IE there would be another reference added to the element so when the reference in createdElement is removed the element object would still have a non-zero reference count and continue to exist . In the case of other browsers where the elements themselves are garbage collected the element wouldn t be collected since the collector would see it in the graph of objects connected to the document . Comment : Also if a function statement were to appear after createElement referring to the element created it would create a closure around the element . Garbage collection of the element would then become dependent on the function itself being garbage collected with or without insertion into the document . Comment : @Cresent : Well a reference to the function would have to be placed somewhere outside the currently executing context before a closure would be formed . However the function wouldn t even have to reference the variable containing the element for a circular-reference to exist the very fact that both the variable and the function exist in the same execution context is enough to do that . Comment : If someone does : function makeDomElement var DOMifier document.createElement div DOMifier.innerHTML div onClick foo div Will the listener attach and keep this in memory . I have a method that takes in any string which could contain html and uses the built-in DOM parser to identify just text nodes . However I don t need to keep the parsed DOM objects . I m afraid if any string can attach itself back to the DOM then I ll have a leak .", "Question : So i am making this program where i need to create an ordered list with lots of list elements inside . This is the code : .. . .. . It only creates the list elements it doesn t put the text nodes anywhere in the html document . : .. . .. . Does anyone know why this happens and how to fix it Would really help me out . .. . Answer : Instead of adding the ls element you ve created on the first row to the list element you re creating a new empty one and adding it . Change it to :", "Question : null .. . Answer : Trying to take an existing tag and instead display the applet using javascript to render the markup instead of having it hardcoded on the page . I first tried just using document.writeln to write out the applet tag instead but that didn t seem to work at all . I then tried using createElement both for an object or an applet . The closest I have come to getting it working is below where the java tries to load the applet but can t find the class to load so I think its something to do with the codebase and or archive parameters . How the applet tag looks hardcoded : .. . .. . closest I have gotten it to work via createElement : .. . .. . This at least tries to load the applet on Firefox 38.2.1 but fails with ClassNotFoundException . . again think it has something to do with the codebase and or archive specification . I tried .setAttribute name value instead of applet.name value but that didn t fix it and in fact didn t even get the message about applet loading . Also I can t use any external code to render this so can t embed js code from another site . I can also display the applet via the object tag as seen below but again couldn t even get it to try to load the class creating the element as an object : Comment : applet https : developer.mozilla.org en-US docs Web HTML Element applet has been obsoleted for a while ago .. . Comment : yes but this was the closest I got something to actually try to run . . tried as createElement object and never even got as far as trying to load the class .. . Comment : found out if I got rid of applet.codebase and instead prepended applets to each of the archives . . it now works . .", "Question : Please look at the following code : .. . .. . This code creates a list of two names and displays a button and an input line . Once the user enters a new name in the input line and clicks the button the new name is supposed to be added to the list . It happens for a very short period of time and then the new element in the list disappears . Do you know what can I change in the code so the new element in the list will stay permanently .. . Answer : I imagine the page is reloading because your button element is a submit button inside a form - when no type attribute is specified for a button it becomes a submit button by default . Your form doesn t have an action specified so submitting reloads the current page . Add type button to the button . That will mean that the button has no default behaviour and does only what the JS does explicitly . Comment : That solved the problem . But what is the meaning of writing type button inside button tag Do I actually have to tell the browser that a button is a button Comment : As I said by default a button element in a form is a submit button so yes you have to explicitly tell the browser when you don t want that . I ve added an extra note about that to the end of my answer .", "Question : Please look at the following code : .. . .. . This code creates a list of two names and displays a button and an input line . Once the user enters a new name in the input line and clicks the button the new name is supposed to be added to the list . It happens for a very short period of time and then the new element in the list disappears . Do you know what can I change in the code so the new element in the list will stay permanently .. . Answer : I think it s because your form is submited and page is reload .. . .. . add a type button at your button .. . .. . Working Example .. . .. . .. . function add item user input .. . var new li document.createElement li .. . var new text document.createTextNode user input .. . new li.appendChild new text .. . document.getElementById mylist .appendChild new li .. . .. . .. . .. . form .. . input type text name user input br .. . button type button onclick add item user input.value add item button .. . form .. . ul id mylist ul .. . .. . button element have 3 type : .. . .. . submit : default type if no type are specified who submit a form .. . reset : who reset clear input in a form .. . button : no specific action Comment : That solved the problem . But what is the meaning of writing type button inside button tag Do I actually have to tell the browser that a button is a button Comment : @CrazySynthax Because default type of button in a form are submit button . So when you don t specify the type it send the form .", "Question : I am trying to accomplish the following : .. . .. . The part i cant get to work is de author element in between . But i cant go futher then is ive tried a lot of things but it seems to only give me blanco pages . What i have now : .. . Answer : Addding nodes to the DOM requires 3 Steps .. . .. . 1 . Create the node using Document methods like createElement or createTextNode .. . 2 . Configure the node and append child nodes .. . 3 . Append the node to its parent node .. . .. . Step 2 and 3 are exchangeable . You can configure a node after you appended it or before . appendChild returns the append node . I indented the calls depending on the level in the result xml : Comment : Thanks for the help i understand everything now", "Question : I am trying to accomplish the following : .. . .. . The part i cant get to work is de author element in between . But i cant go futher then is ive tried a lot of things but it seems to only give me blanco pages . What i have now : .. . Answer : What you need to do here is append the author details to the author element and not the root element . So something like this would work : .. . .. . Also note that you can save some space creating text nodes by adding the text inside createElement though that may not suffice in cetain circumstances as the value is not escaped ref : php.net http : php.net manual en domdocument.createelement.php - I just used it here for quickness . Sample output : Comment : Thanks for the help but now how do you put the author element inside the book element Comment : It s done much in the same way . I have updated my code example . You are just changing what element you append the child to . Comment : Thanks this helped me so much", "Question : For example I have code : .. . .. . HTML : .. . .. . And I would like get this input I can have more inputs and insert in to new created element e.g div in the same place . Result : .. . .. . This code working half correctly because it inserts input to new element but with copy all input from page . jQuery : .. . .. . I tried with .detach .. . .. . This creates a new element but don t insert input inside . I haven t idea how resolve my problem . .. . Answer : Just use wrap : .. . .. . .. . input .wrap div class inpt cont div .. . .. . .. . div .. . border : 1px solid 000 .. . margin : 0.2em .. . padding : 0.2em .. . .. . .. . .. . script src https : ajax.googleapis.com ajax libs jquery 2.1.1 jquery.min.js script .. . input .. . input .. . input .. . input .. . .. . If you want to wrap all elements matched by the same selector with the same element : .. . .. . .. . input .wrapAll div class inpt cont div .. . .. . .. . div .. . border : 1px solid 000 .. . margin : 0.2em .. . padding : 0.2em .. . .. . .. . .. . script src https : ajax.googleapis.com ajax libs jquery 2.1.1 jquery.min.js script .. . input .. . input .. . input .. . input .. . .. . References : .. . .. . wrap http : api.jquery.com wrap . wrapAll http : api.jquery.com wrapAll . Comment : Very good resolve . Thank You .", "Question : I would like to append an li element after another li inside a ul element using javascript This is the code I have so far. . I am familiar with appendChild .. . .. . However this appends the new element inside the other and not after . How can I append the new element after the existing one Thanks . Comment : Show some html. . is the parent a ul or li .. . Answer : You can use : .. . .. . .. . .. . But as Pavel pointed out the referenceElement can be null undefined and if so insertBefore https : developer.mozilla.org docs Web API Node.insertBefore behaves just like appendChild https : developer.mozilla.org docs Web API Node.appendChild . So the following is equivalent to the above : Comment : Yes this works perfectly . Comment : if-else is unnecessary : the second arg of insertBefore can be null or undefined", "Question : JSFiddle https : jsfiddle.net uk0rwfd9 .. . .. . I am trying to make a list of monsters and be able to give them values such as stats and resources upon being slain . I thought the easiest way to do it would be with an object maker but I m not sure how to properly implement the monsters into my html . How can I make it so that each new Monster object created will add itself to the select in the html .. . Answer : First your method called implement is never executed . Second createElement should be called under document object . See code modified below and find here a working JSFiddle https : jsfiddle.net uk0rwfd9 1 : Comment : Thank you I just changed the innerText to be the monsters name but other than that your answer is perfect I ve never really understood .append but I haven t really researched it either", "Question : Do you know any method to optimize this HTML Code to IE6 or 7 or 8 without adding any HTML elements or the IE is skipping all the HTML5 elements If i just want to format elements with CSS - i dont want to use other features - is the document.createElement nav DOM element create enough to scam IE and make a plain HTML document Thank you . More info about DOM create elements in IE6 IE7 and IE8 with html5 enabling script here http : remysharp.com 2009 01 07 html5-enabling-script .. . Answer : strike This code should work fine with IE6 . Though you may want to define your elements in your stylesheet to give them the properties you are looking for . Something like this : strike .. . .. . EDIT : Oops . I am wrong about this . Shouldn t have posted so quickly . Reading this which you probably just read as well : http : blog.whatwg.org supporting-new-elements-in-ie .. . .. . It appears that the Javascript hack you indicated above may be the only way to get these elements to render properly . This script looks to be pretty handy and may solve your problem nicely though I have not tested it : http : remysharp.com 2009 01 07 html5-enabling-script Comment : Works fine for me even in IE7.0 which was the worst when i tried with the createelement method . Passed the test thank you .", "Question : I want to replace contents of a clicked td element with input data and a button element . When I click the td containing plain text I want to swap the plain text with input from elsewhere and a button . When the button is clicked the input and button should be replaced with the plaintext of the input . Here is the link : https : jsfiddle.net a2y9s424 1 .. . .. . Note : I need to do that just using JAVASCRIPT not jQuery .. . Answer : Here s a different approach . .. . .. . onclick .. . .. . .. . .. . event.target https : developer.mozilla.org en-US docs Web API Event target .. . .. . .. . .. . td .. . .. . Note that element.tagName is always in uppercase . .. . .. . td innerHTML innerHTML input save cancel input .. . .. . Note that I assigned classes save and cancel to the buttons . .. . .. . table .. . .. . .. . .. . .. . .. . Note that there are no local-variables . Also there s no need to use createElement or appendChild because that s handled by using innerHTML . Working Fiddle https : jsfiddle.net dqb9zdaq Comment : idk but this works fine with plunker here http : plnkr.co edit Lkq6RFqcyjSNS57DdcUx p info Comment : I think he wants the Save and Cancel buttons to disappear when clicked and to change or not change the table content . Comment : yea i know the solution you gave is totally perfect but still i am wondering why this code works on plunker instead on Jsfiddle . Comment : Gotcha . You can t have inline JavaScript in JSFiddle unless you use the No wrap - in head or No wrap - in body options . It works here : jsfiddle.net xyrLLtup https : jsfiddle.net xyrLLtup Comment : ahh thanks : i hope next time i ll be more cautious .", "Question : How can i add an createElement br before and after the table I tried it with doc.body.appendChild p at the end but nothing happens . i don t know where i have to write the appendchild Comment : You mean like this http : jsfiddle.net amullins Laznwndc 1 Comment : If you re doing this for spacing out elements then you re definitely taking the wrong approach . You should look at adding margin with CSS to achieve this . br s should be a thing of the past . Also with this amount of DOM manipulation I would also try looking at a templating library like Handlebars . handlebarsjs.com http : handlebarsjs.com Comment : That said if you look at the comments in the code they re targeting IE5 which is itself a thing of the past . .. . Answer : Should be here : .. . .. . Notice that the second one is a clone . When it s not . Only the second one will be added . You can not add an element twice . You can also add two different objects of course . Or withoud variables : Comment : I tried on the beginnig of myParent and at the end . But the two br will add at the end why myParent document.getElementById frame .contentWindow.document.body myParent.appendChild p2 And at the end the same myParent.appendChild p Comment : You do append a br before appending the table Have you checked that p and p2 are actually set Comment : yes i checked it Comment : Do you have it somewhere online", "Question : This is far simpler than I m making it I m sure . I want to create the code : .. . .. . However you cannot use DOMNode : : createElement to add node text to a br as you would with a paragraph : .. . .. . I ve also tried creating a text node then adding the break to it . This doesn t work : .. . .. . Can anyone advise on the correct method for adding a line with a br tag after it Comment : perhaps use a document fragment and append to that .. . Answer : Comment : Thank you . This does indeed solve the problem . Many thanks Comment : Welcome glad it helped . Consider accepting the answer so that others know the question has an answer - but up to you .", "Question : I have searched prior SO posts here http : stackoverflow.com questions 1628826 how-to-add-an-onchange-event-to-a-select-box-via-javascript here http : stackoverflow.com questions 15341512 createelement-in-javascript-to-set-onchange-attribute and here http : stackoverflow.com questions 1144724 dynamically-added-select-element-does-not-fire-onchange-event-in-internet-explor and couldn t an answer that made sense to me . This should be a basic question but I m not understanding the posts I find . They don t seem to address using a this parameter . I want to programatically add an input with an onchange event such that the final result is this : .. . .. . I am working on a project that is using an embedded IE6 browser inside a old Delphi application so I have to have a solution that is IE6 compatible yes IE6 is horrible but there are reasons I am stuck with it for now . My initial attempt was this : .. . .. . I then read that the .onchange should be assigned an object not a string and one should use this instead : .. . .. . But it seem to me that this will result in this element notice the missing this parameter .. . .. . If I use the line below instead won t this make a closure and the this will refer to the event at the time the object is assigned to the .onchange property instead of being the event at the time of the change event I m a relatively new web programmer but long time Delphi programmer . Closures still make my head hurt . I appreciate any help in this . Also I read here http : stackoverflow.com questions 20160216 addeventlistener-doesnt-work-in-ie-tested-in-ie8 about using addEventListener and the problems with older versions of IE and the last post on the page provides a work around . But I don t understand how it works . EDIT -- And what about passing other parameters It seems that many event handlers will need to have parameters specific for the attached element . It seems that it is just not possible to add a listener with any parameters . Comment : Should this point to the input element in your example Comment : I want to be able to have multiple elements use the same javascript handler . So my thought was that the handler would need to be passed the element that created the event . So yes the this would be the element that initiated the call . Comment : In your last code comment question this refers to the global window object if called from global js context . Also in that code line you re assigning the property the return-value of the function not the function itself . You are calling the function there . Comment : MonthSelect.onchange handleDayChange this or DaySelect.onchange handleDayChange this Comment : @JuanMendes You are correct . That was a bug that was confusing me . I caught it just before I read your post . I should have checked back sooner . Thanks .. . Answer : A simple closure if you are creating the elements in JS as you show : .. . .. . Since the function is created inside the scope that you create the element in the same variables will be available to it . EDIT : .. . .. . Additional parameters can be passed with this method for example the anonymous function we create and attach as the handler will still have the event object sent to it : .. . .. . function e handleDayChange DaySelect e .. . .. . In the event object you will have access to the event target but in your example the event target and this are not the same element so there would be no way for the handler to know about the DaySelect element . jQuery makes a lot of event-handling much simpler which is one of the reasons many people use it it also normalizes it s methods between various browsers so you don t have to write multiple versions of the same code in most cases Comment : I ll try this and post back . As an aside is the this object available to the called handler if I don t explicitly pass it I.e . is it somehow globally-scoped Comment : thanks this works great Comment : The caller the browser sets this to the element that the event was registered on when calling your handler . Kind of like : myDiv.handler.call myDiv event", "Question : This is different from Remove dom element without knowing its parent http : stackoverflow.com questions 1804991 remove-dom-element-without-knowing-its-parent because their element does have a parentNode . I know how to remove an element through its parentNode but if I create a new element it doesn t have a parentNode at all . So .. . a How can I remove this element .. . b Do I even need to Or is it cleaned up as soon as the last reference to it is gone The context : I m trying to write some automated-tests for my JavaScript code . I m using Mocha from the browser and I want to test if child elements are inserted into a given parent . I create the parent on the fly before each test but thought I shouldn t have to add it to the document . But I want to make sure that I got no big list of unreferenced nodes hanging around . var element document.createElement div .. . .. . console.log element The div .. . .. . console.log element.parentNode null .. . .. . element.parentNode.removeChild element Cannot read property removeChild of null Comment : As long as the element is not attached to any document it s basically little more than a plain JS object . You can discard it with element null . Comment : there should be a batman function for that Comment : @Boldewyn That s what I suspected but I couldn t find proof . I thought maybe because it was created through document.CreateElement that it was also added somewhere in a list of elements of the document . Comment : Why this - element.parentNode.removeChild element instead of just element.remove Comment : @Al.G . Browser support on element.remove is quite poor atm . .. . Answer : Whilst the element hasn t been added to the DOM it s no different to any other Javascript object and will be garbage collected as soon as the last reference is gone . Either overwrite the reference or just wait for it to go out of scope .", "Question : This is different from Remove dom element without knowing its parent http : stackoverflow.com questions 1804991 remove-dom-element-without-knowing-its-parent because their element does have a parentNode . I know how to remove an element through its parentNode but if I create a new element it doesn t have a parentNode at all . So .. . a How can I remove this element .. . b Do I even need to Or is it cleaned up as soon as the last reference to it is gone The context : I m trying to write some automated-tests for my JavaScript code . I m using Mocha from the browser and I want to test if child elements are inserted into a given parent . I create the parent on the fly before each test but thought I shouldn t have to add it to the document . But I want to make sure that I got no big list of unreferenced nodes hanging around . var element document.createElement div .. . .. . console.log element The div .. . .. . console.log element.parentNode null .. . .. . element.parentNode.removeChild element Cannot read property removeChild of null Comment : As long as the element is not attached to any document it s basically little more than a plain JS object . You can discard it with element null . Comment : there should be a batman function for that Comment : @Boldewyn That s what I suspected but I couldn t find proof . I thought maybe because it was created through document.CreateElement that it was also added somewhere in a list of elements of the document . Comment : Why this - element.parentNode.removeChild element instead of just element.remove Comment : @Al.G . Browser support on element.remove is quite poor atm . .. . Answer : what did you mean by remove it . When it has a parent node that means you append it in DOM . You remove it means you remove it from DOM . Since you didn t append it at all it is just .. . .. . if you log this element . All you have to do is : .. . .. . or not do anything ." ] }
[ "yes-answer-long", "yes-answer-short" ]
html
UNK_RELATION
reportmanager@reporting-services@110
reportmanager -- report manager is a browser-based report access and management tool for use with sql-server @placeholder .
{ "confidence": [ 40.19472122192383, 38.3613166809082, 36.55996322631836, 35.68954849243164, 35.523109436035156, 35.38778305053711, 34.877620697021484, 34.76617431640625, 34.112266540527344, 33.74848937988281, 33.723087310791016, 33.48987579345703, 33.48987579345703, 32.944313049316406, 32.943992614746094, 32.64584732055664, 32.54970169067383, 32.5174560546875, 32.37846374511719, 32.37846374511719, 32.18592834472656, 31.755935668945312, 31.517078399658203, 31.50658416748047, 31.262453079223633, 31.262453079223633, 31.046409606933594, 31.046409606933594, 31.0268611907959, 31.0268611907959, 31.0268611907959, 31.0268611907959, 30.969722747802734, 30.91905403137207, 30.91905403137207, 30.91905403137207, 30.91905403137207, 30.71051788330078, 30.540306091308594, 30.322481155395508, 29.93122100830078, 29.807641983032227, 29.807641983032227, 29.694805145263672, 29.694805145263672, 29.669403076171875, 29.599105834960938, 28.79724884033203, 28.520973205566406, 28.4755859375, 28.4755859375, 28.457420349121094, 28.457420349121094, 28.457420349121094, 28.457420349121094, 28.457420349121094, 28.349578857421875, 28.09442901611328, 28.038454055786133, 27.912012100219727, 27.635334014892578, 27.55919075012207, 27.48775291442871, 27.45616912841797, 27.45616912841797, 27.45616912841797, 27.420766830444336, 27.35746192932129, 27.322555541992188, 27.26328468322754, 27.201730728149414, 26.913021087646484, 26.913021087646484, 26.913021087646484, 26.424924850463867, 26.424924850463867, 26.376182556152344, 26.344757080078125, 26.344757080078125, 26.344757080078125, 26.344757080078125, 26.314834594726562, 26.314834594726562, 26.314834594726562, 26.18743896484375, 26.016124725341797, 25.99382781982422, 25.99382781982422, 25.925188064575195, 25.8519287109375, 25.8519287109375, 25.51337432861328, 25.422510147094727, 25.422510147094727, 25.41373634338379, 25.28899574279785, 25.27838897705078, 25.252756118774414, 25.203323364257812, 25.0127010345459 ], "content": [ "I m trying to pass a parameter serial-number to the SQL Server Report Manager and generate a report called Report Top Level .", "I am trying to use report manager to deploy report .", "Also you must have the rights to access the report server For that open IE in admin mode and go to Report manager- site settings and assign a role to the user .", "but no file copied on report-manager", "The above is also true for rendering the report using report manager .", "I try to configure the report manager .", "Opening the Report Server in the browser gives the following error message- .. . .. . Reporting Services Error The report server cannot open a connection to the report server database .", "Microsoft s Report Manager documentation here : .. . .. . http : msdn.microsoft.com en-us library ms157147 v sql.105 .aspx http : msdn.microsoft.com en-us library ms157147 28v sql.105 29.aspx .. . .. . states to start Report Manager : .. . .. . 2.In the address-bar of the Web browser type the Report Manager URL .", "I can see the SSRS reports via the Report Manager in the browser .", "Is there some way I can access all of my Report Manager report Subscriptions from SSMS", "I get a permission error when trying to access the Report Manager URL in the browser if UAC is enabled .", "My report Manager http : i.stack.imgur.com cKyTD.png", "Googled Report Manager http : i.stack.imgur.com xKyex.jpg .. . .. .", "There is no separate account just for Report Manager .", "Using SQL Server 2012 reporting-services and the report manager URL I clicked down arrow next to a report item in Home .", "Is the Report Manager web application configured to use Windows authentication in IIS", "I want to alloiw my partners open Report Manager from their browser .", "After installing SSRS on to a Window 2012 R2 server I was able to open the report browser from the server but I was not able to open the report browser from a remote machine .. .", "It takes so long to open a Report Manager url .", "Situation : I am in the Report Manager website .", "MSDN acts as-if the settings in Report Manager are all that you need to set for the user report to have access to the data source .", "I am developing SQL Server Reporting Services SSRS reports on SQL Server 2008 R2 and using Report Manager as a method to demonstrate and test reports .", "Then security to the report is controlled through Report Manager as you describe above .", "How do you enable a dedicated account to be used by Report Manager on the SQL Server DB", "Deploy the report to the reporting server .. . 2 .", "I m having an issue with Report Server .", "As Jamie says customization of Report Manager is not very easy .", "Do not mess with the subscription jobs created by Report Manager .", "Hi all .. . I want to upload report files via c application to the report manager .", "mean Like simple Upload select a report file and then upload selected file into report manager .", "Here we delete the existing the report from report manager and upload new file from local .", "It s not the report deployment location that s the problem it s the URL s within the Report Manager .", "I am working on a Microsoft SQL Server Report Builder report and I am running into a problem I cannot seem to overcome .", "When i opened report manager URL i see something like this .", "Eric Report manager 2005 has those two tabs .", "So how you enter subscription on report manager 2008", "Instead of localhost try opening the report manager by the machine name and it should work .", "It is sql2008r2 report service running on server 2013 .", "When I go to this such address : .. . .. . I can see Report Manager but they can t see Report Manager .", "2 By default the BUILTIN Administrators group is a Content Manager for the whole site so if the user is a member of the local Administrators group on the server then they will access to everything in Report Manager .", "I was trying to open the report manager on my local system with the url http : localhost reports but the dropdown was not coming to view delete subscribe the reports on clicking the report .", "But I need to display the name on the home page of report manager .", "What is the best way to auto start Report Manager URL", "The report has worked before from the Report Manager via Internet Explorer IE and only recently started to fail .", "You can manage who can see the base report on Report Manager with permissions .", "Anyways for accessing Report Manager for the very first time you may need to run the browser as Administrator and then proceed with the URL .", "Therefore timeout issue occurs on Report Server .", "I don t have a sharepoint Domain authentication so I am using a custom web app .. . .. . My Challenges .. . .. . After deploying the reports to the report server If I try to access the Report Manager Url from my client system I receive an prompt requesting for the Windows Login Credentials of my Reporting Server .", "Stylesheets are at Program Files Microsoft SQL Server MSRS10 50.MSSQLSERVER Reporting Services ReportManager Styles in a default 2008 R2 install .", "You can download these RDL files through Report Manager .", "I have inherited several reports which are on Report Manager .", "As for the report server I m not the DBA so I m not familiar with the rs.config files .", "Since then they have been able to stabilize the server but now the report does not render .", "I experienced the same issue on our 2008 report server .", "I can open the drop-down box on other computers But not on the report Server .", "First off have you properly configured the report server", "Users had the datareader role assigned in Sql Server and a Custom Role on Reports Manager who has permissions only to View Report .", "See Download Export RDL files from Report Server http : sql-articles.com blogs download-export-rdl-files-from-report-server for more explicit details .", "There is no problem to pull the report .", "My question is when the report manager is updated with new version of report do I loose all these subscriptions or is there any way that the subscriptions use default-value of environment", "There are some reports with parameters that are hidden when the report is accessed through normal URL using ReportViewer.asx .. . .. . The thing is that these hidden parameters need to be visible when the report is accessed using SSRS Report Manager .", "See Report Server Database http : technet.microsoft.com en-us library ms156016 28v sql.105 29.aspx in Books Online : .. . .. . The report server database is a SQL Server database that stores the following content : .. . .. . Items managed by a report server reports and linked reports shared data sources report models folders resources and all of the properties and security settings that are associated with those items .", "I understand I can modify each of these reports and their subscriptions one at a time through Report Manager by clicking the report going to Manage Subscriptions etc .", "You might get more complete and accurate answers in the Report Manager user group on Yahoo : http : tech.groups.yahoo.com group reportman", "Go to the const section of the offending file and add this : .. . .. . That should do it now you are the proud owner of Report Manager 3.0", "The drop-down menus would not load on our SSRS 2008 R2 report manager .", "I have a virtual-directory with the same name as specified for Report Manager in Reporting Services Configuration Manager .", "I suspect that the use of Report Manager as a percentage of total SSRS users is far beyond what was originally imagined for the product .", "Even though it s hosted on the new server www.newwebsite.com reports all the URL s within the Report Manager are still pointed to the old instance www.oldwebsite.com reports .", "The Steps I followed to add the user via SQL Server Management Studio : under Security I create a new login enter the name select SQL Server authentication and enter a simple password that matches Report Manager set Default database to master or the datasourceDB tried both .", "When I open the Report Manager URL I get it from the Reporting Services Configuration Manager in a browser it shows me a SQL Server Reporting Services page with a folder icon on top left and links with text Home My subscriptions Help on top right .", "If User 1 runs FireFox the Report Manager website runs fast .", "2 How I can get similar layout as in Report Manager", "I want to have different layout than Report Manager has .", "Is is possible co to configure Reporting services 2008 Authentication method this way that i ll be able to access the report manager not from build-in computer user", "If UAC is enabled you can launch IE with the Run as Administrator context menu option and you then you can access Report Manager on the local machine .", "My purpose is connecting to report manager with admin rights from another computer with a custom user and password - like connecting to Database Engine with SQL SERVER authentication method .", "But when we try to open report manager it goes to the URL of our previous SSRS instance instead of the new one i.e .", "Is there a way to display name of a user that is currently logged into Report Manager http : myserver.com reports", "Here is the answer I got from msdn forum : .. . .. . You can only show the name within reports not in the report manager .", "I am new at SSRS and currently working on managing reports and dashboards in TFS and Report Manager with my team .", "If you move a report copy-paste the report credentials have to be re-entered .", "You can leave the parameters visible in the report and point a linked report to it .", "Hide any parameters in the linked report and point ReportViewer to the linked report .", "Now I am able to make reports using BIDS I am also able to login windows-authentication to report server using SSMS but when i try to access report manager URL it asks me for Username passowrd .", "You can click on report then check the very top of the Internet Explorer page the place that shows Home in hyperlink then you would see the path of your report + your report name in hyperlink .", "There are few subscriptions on the old version of report .", "My report is a list of college classes .", "enter image description here http : i.stack.imgur.com NHMxD.png .. . .. . However when I deploy it to Report Manager the layout of my report corrupts as shown below : - .. . .. .", "Note : The Report Service Web Service is working .", "There is a second parameter in the report but it is dependent on the serial no value and hidden .", "I add the virtual-directory reports with C : Program Files Microsoft SQL Server MSRS10 50.MSSQLSERVER Reporting Services ReportManager in physical path under default web site .", "I know for a fact that the first time this error came about the server was reset and the report was produced without error .", "Try adding your report server URL to your list of compatibility view sites .", "@ErenRavenHeart You may have another Reportmanager version than Remy has .", "I am looking for a way to allow users of the same domain to connect to the Report Manager and run reports via a browser not SharePoint without letting the user have too much access to the data source .", "on the website or on the report .", "Also as you may know you could use ReportManager with D2010 without having the native components at all .", "The 2 endpoints deployed by SSRS 2008 R2 are localhost ReportServer and localhost Reports - reports is the Report Manager endpoint although I suppose you could rename it in the configuration manager .", "You can mess around a little bit with the SSRS stylesheets but no customization of Report Manager is not supported ." ] }
{ "confidence": [ 54.77799987792969, 54.270912170410156, 53.7840690612793, 52.77814865112305, 52.667320251464844, 51.57962417602539, 50.16569900512695, 47.78538131713867, 46.13002014160156, 45.16520690917969, 45.061767578125, 44.12782669067383, 42.524261474609375, 42.44438934326172, 41.78871536254883, 41.19633865356445, 40.6630744934082, 40.467864990234375, 39.318641662597656, 39.13808059692383 ], "content": [ "Question : I try to configure the report manager . It is sql2008r2 report service running on server 2013 . There is no problem to pull the report . But I can not open the drop-down arrow besides the report to add subscription . I add the virtual-directory reports with C : Program Files Microsoft SQL Server MSRS10 50.MSSQLSERVER Reporting Services ReportManager in physical path under default web site . does anyone know how to solve this problem Thanks .. . Answer : Try adding your report server URL to your list of compatibility view sites . I experienced the same issue on our 2008 report server . Comment : The drop-down menus would not load on our SSRS 2008 R2 report manager . Adding the server to the compatibility view sites immediately fixed the problem . Thanks Comment : agsci.psu.edu it how-to http : agsci.psu.edu it how-to add-sites-to-internet-explorer-8-ie-8-compatibility-view Comment : Thanks man this worked perfectly Comment : THANK YOU Helped a lot Comment : Obviously a native Microsoft browser-required product is not going to be compatible with Microsoft s only web browser Internet Explorer.How is this not obvious to you all actually this all relates to a 6.0 bug that MSFT exploits to render Chrome and Mozilla useless . This kind of practice HAS TO STOP", "Question : I try to configure the report manager . It is sql2008r2 report service running on server 2013 . There is no problem to pull the report . But I can not open the drop-down arrow besides the report to add subscription . I add the virtual-directory reports with C : Program Files Microsoft SQL Server MSRS10 50.MSSQLSERVER Reporting Services ReportManager in physical path under default web site . does anyone know how to solve this problem Thanks .. . Answer : I too was facing this issue . This was because of some authentication issue . I was trying to open the report manager on my local system with the url http : localhost reports but the dropdown was not coming to view delete subscribe the reports on clicking the report . I tried opening the internet-explorer in admin mode also and still there was the same issue . Then i changed the url i was opening to http : machine name reports and the dropdown menu started displaying . Instead of localhost try opening the report manager by the machine name and it should work . Also you must have the rights to access the report server For that open IE in admin mode and go to Report manager- site settings and assign a role to the user .", "Question : I try to configure the report manager . It is sql2008r2 report service running on server 2013 . There is no problem to pull the report . But I can not open the drop-down arrow besides the report to add subscription . I add the virtual-directory reports with C : Program Files Microsoft SQL Server MSRS10 50.MSSQLSERVER Reporting Services ReportManager in physical path under default web site . does anyone know how to solve this problem Thanks .. . Answer : I had the same issue changing the localhost into the machine name solved it for me too . But only in Internet Explorer . In Firefox and other browser the dropdown still won t pop-up . But there are more configuration-issues with the combination ReportServer - not IE browsers . Comment : This should be a comment . This is not an answer to the OP .", "Question : I try to configure the report manager . It is sql2008r2 report service running on server 2013 . There is no problem to pull the report . But I can not open the drop-down arrow besides the report to add subscription . I add the virtual-directory reports with C : Program Files Microsoft SQL Server MSRS10 50.MSSQLSERVER Reporting Services ReportManager in physical path under default web site . does anyone know how to solve this problem Thanks .. . Answer : As far as I know there is no such server as server 2013 - but I doubt that s particularly important . The 2 endpoints deployed by SSRS 2008 R2 are localhost ReportServer and localhost Reports - reports is the Report Manager endpoint although I suppose you could rename it in the configuration manager . There is NO setup in IIS for these endpoints - SSRS takes care of that directly so there s no node for either endpoint in IIS to configure . I am looking at my install of ReportManager and I don t see any tabs for Contents or Properties - why do you think they should exist I know we re not supposed to seek clarification of questions but I don t know how to answer your question as asked . Comment : Eric Report manager 2005 has those two tabs . So how you enter subscription on report manager 2008 Comment : OK - just re-read your original question and realize this is where you re having the problem . Unfortunately I haven t run into the situation where I couldn t open the menu as follows : Navigate to the report click the down-arrow on the right side of the report and pick Subscribe - dl.dropbox.com u 472206 ssrssubscribe.png https : dl.dropbox.com u 472206 ssrssubscribe.png Comment : Here is the update . I can open the drop-down box on other computers But not on the report Server . Someone has same experience", "Question : I try to configure the report manager . It is sql2008r2 report service running on server 2013 . There is no problem to pull the report . But I can not open the drop-down arrow besides the report to add subscription . I add the virtual-directory reports with C : Program Files Microsoft SQL Server MSRS10 50.MSSQLSERVER Reporting Services ReportManager in physical path under default web site . does anyone know how to solve this problem Thanks .. . Answer : Go to right corner in internet-explorer Then choose the Page icon . check compatibility view", "Question : I try to configure the report manager . It is sql2008r2 report service running on server 2013 . There is no problem to pull the report . But I can not open the drop-down arrow besides the report to add subscription . I add the virtual-directory reports with C : Program Files Microsoft SQL Server MSRS10 50.MSSQLSERVER Reporting Services ReportManager in physical path under default web site . does anyone know how to solve this problem Thanks .. . Answer : You can click on report then check the very top of the Internet Explorer page the place that shows Home in hyperlink then you would see the path of your report + your report name in hyperlink . Click on your report name which is hyperlink and then it will open the manage page which includes subscriptions . Click on the subscription and now you can have your new subscription added .", "Question : I try to configure the report manager . It is sql2008r2 report service running on server 2013 . There is no problem to pull the report . But I can not open the drop-down arrow besides the report to add subscription . I add the virtual-directory reports with C : Program Files Microsoft SQL Server MSRS10 50.MSSQLSERVER Reporting Services ReportManager in physical path under default web site . does anyone know how to solve this problem Thanks .. . Answer : This drop-down issue is an issue with the compatibility setting . Go to : Tools Compatibility View Settings and enter localhost and or whatever your is do both . Fixes things up . BUT since there s two issues here do note that you ll still need to open IE as run as admin .", "Question : I am developing SQL Server Reporting Services SSRS reports on SQL Server 2008 R2 and using Report Manager as a method to demonstrate and test reports . I am looking for a way to allow users of the same domain to connect to the Report Manager and run reports via a browser not SharePoint without letting the user have too much access to the data source . I currently have each user listed as db owner for the database that the datasets and data source are associated with . I would like to limit this access and I have tried db datareader but this level does not allow the user to run the reports and gives the user this error : Cannot create a connection to data source DBname . rsErrorOpeningConnection . My method of adding a user to The Report Manager site : I select the Security tab under Site Settings and then select New Role Assignment adding the user as a System User . I then select Folder Settings on the toolbar and again select New Role Assignment adding the user as a Browser . I have tried adding a user as a Content Manager but they still have the same error when it comes to the data source . My method of adding a user to the data source : select new login from the Security tab for the server add domain username to Login name : use Windows authentication and change the default database from master to the database that is the reports data source . I then select User Mapping and put a check next to the database that is the data source . In the Database role membership for : DBname section I choose db owner and public is already selected . I have included screenshots below . My question is what Database role membership can I use for SSRS and Report Manager that would not be as broad as db owner and would have the best security I have tried db datareader but then the user cannot connect to the data source when they run the report . I have researched this question but I have not found any details accept for adding the user as a db owner as I described . MSDN acts as-if the settings in Report Manager are all that you need to set for the user report to have access to the data source . I have tried only using the Report Manager settings with both settings for a data source shared and imbedded with no luck . Thank you in advance .. . Answer : Typically the data sources in SSRS will be set to use a fixed account either a Windows account or SQL authentication . This account should be given minimal privileges to the database : db datareader is common . Then security to the report is controlled through Report Manager as you describe above . this avoids the need for changing security on the database itself with changes in user-permissions . But the approach you describe above should work as well . The error you see when the user has db datareader access is surprising if your query is a standard SQL query selecting from tables . If you are using Stored Procedures you need to grant access to those as well . Use a test user account that is set to db datareader see if you can connect and execute your query through SQL Server Management Studio . Depending on your security requirements I would use a dedicated account for database access from the reports say ReportReader . Develop and test your reports accessing the databases as this user and make sure the user has minimal access read-only and or limited to only the tables or procedures they need to execute . The credentials used to access the database are set in the properties of the datasource . This is one reason that Shared datasources are often used and the reports are linked to the shared datasources : Data source properties http : i.stack.imgur.com 2M7rX.png .. . .. . The screenshot shows a SQL server authenticated account in use . This could just as easily be a fixed Active Directory account check the Use as Windows credentials when.. . in that case . Comment : How do you enable a dedicated account to be used by Report Manager on the SQL Server DB I do have stored-procedures for each report and based on your information here I have changed user access level from db owner to db executor for the data source but this still gives the user too much access not to mention the hassle of adding each user to the data source . Comment : Edited with data source details . Comment : Your information is great but I m still having difficulties . Most notable with having the ReportReader user pass the Test Connection . The Steps I followed to add the user via SQL Server Management Studio : under Security I create a new login enter the name select SQL Server authentication and enter a simple password that matches Report Manager set Default database to master or the datasourceDB tried both . Under User mapping : I mapped the user to the datasourceDB ReportDB and ReportDBTemp I have tried different combos of db datareader db owner and db executor . I m not sure what s wrong . Comment : I m having the same problem . No matter what I do short of making a user db owner he is unable to get past Test Connection while adding an SSRS data source . Comment : I m not a huge fan of the Test Connection button . I ve seen a few cases where it will fail but the data source is fine . I believe a better test is to use SSMS and login as that user if using SQL Server Authentication .", "Question : Is there anyway to have more control over Report Manager is seems bizzare for such a sophisticated product to allow next to no control over the report manager section other than rename folders and place reports and report parts in these folders as far as im aware I cannot even move them around and place them in any sort of order . It would be nice if I could change the colour of folders and move them around freely . Does anyone have any customization tips or control suggestions I may have missed for giving more control over this area to developers enter image description here http : i.stack.imgur.com 0YQ2n.jpg Comment : You need to click Details View on the right . Comment : All that does is show me any report parts that I have se to hidden Comment : but you are dealing with the portal have you for reporting-services . You can easily use reporting-services object-model and wrap the reports in your own user-interface . The manager is basically a web based way to add remove rename the reports or the data sources . Its like having your windows UI to get to your folders . My suggestion is if you want something very customized to probably write up your own container and then place the reports in the container . Comment : +1 for good response .. . Answer : You can mess around a little bit with the SSRS stylesheets but no customization of Report Manager is not supported . SSRS is about the reports . Any sophisticated control or UI of the reports is beyond the scope of the SSRS product . On the other hand there are some sophisticated JQuery techniques that could work for this sort of page manipulation if you want to dive into the Report Manager page structure . Stylesheets are at Program Files Microsoft SQL Server MSRS10 50.MSSQLSERVER Reporting Services ReportManager Styles in a default 2008 R2 install . Customization is not supported . I suspect that the use of Report Manager as a percentage of total SSRS users is far beyond what was originally imagined for the product . It is called the Report Manager after all . Consuming the web service in .NET or using URL report access are straightforward methods to deliver the reports through any interface you can build .", "Question : I am implementing an SSRS project but I have issues with the deployment phase . My requirements .. . .. . 1 . Deploy the report to the reporting server .. . 2 . Allow Users to access the reports from a custom web application . 3 . Users should access the reports with any browser .. . 4 . I don t have a sharepoint Domain authentication so I am using a custom web app .. . .. . My Challenges .. . .. . After deploying the reports to the report server If I try to access the Report Manager Url from my client system I receive an prompt requesting for the Windows Login Credentials of my Reporting Server . I want disable this prompt . Please I need your help . Thanks .. . Answer : You need to edit the data source of that report or of the shared data source if it uses one and choose the option Credentials stored securely in the report server adding the credentials appropriate to the data source there . The problem you re having is that the default data source authentication as with SQL Server itself is Windows integrated authentication and that s why you re getting prompted for credentials from a browser connection . See here http : technet.microsoft.com en-us library ms159736.aspx for an overview on how to store credentials with the data source . Comment : I have changed the data source to properties to Credentials Stored securely on the datasource I also check the Impersonate the authenticated user after the connection . But still the problem persist . Anytime I try to open the report manager url from another computer on my network I am prompted with a windows login screen . Comment : Is the Report Manager web application configured to use Windows authentication in IIS Have a look in the IIS Manager 2012 or Internet Services Manager 2008 . Check the Reports webapp while you re in there .", "Question : does reportmanager http : sourceforge.net projects reportman http : sourceforge.net projects reportman support delphi-2010 Thanks Alejandro Jourdan .. . Answer : It looks like the most recent download on SourceForge only has premade projects to compile native components up through Delphi 2009 . I expect it should be easy enough to revise the D2009 project to compile under D2010 . Also as you may know you could use ReportManager with D2010 without having the native components at all . You might get more complete and accurate answers in the Report Manager user group on Yahoo : http : tech.groups.yahoo.com group reportman Comment : Thank you very much", "Question : I have SQL Server 2008 Developer Edition and I m facing the following issues with the Reporting Services . 1 . When I open the Report Manager URL I get it from the Reporting Services Configuration Manager in a browser it shows me a SQL Server Reporting Services page with a folder icon on top left and links with text Home My subscriptions Help on top right . That s it I don t get to see anything else . I have a virtual-directory with the same name as specified for Report Manager in Reporting Services Configuration Manager . 2 . Opening the Report Server in the browser gives the following error message- .. . .. . Reporting Services Error The report server cannot open a connection to the report server database . A connection to the database is required for all requests and processing . rsReportServerDatabaseUnavailable Get Online Help A network-related or instance-specific error occurred while establishing a connection to SQL Server . The server was not found or was not accessible . Verify that the instance name is correct and that SQL Server is configured to allow remote connections . provider : Shared Memory Provider error : 40 - Could not open a connection to SQL Server .. . .. . I tried the following at the command-prompt in order to resolve it- .. . .. . but I got another error saying Report Server WMI Provider error : Invalid namespace .. . .. . I would really appreciate any help on this . cheers .. . Answer : 1 Open Start - SQL Server 20xx - find Reporting Services Configuration Manager in subfolders - go to Database tab - check if sql-server name and Database Name are selected correctly . It is the database which reporting-services stores reports in it . 2 if it was OK check if you have more the one sql instances . If you have more than one instances on your machine decide which one you want to use . for example sql-server-2008 or sql-server-2012 . Maybe you are using the URL of the reporting-services 2008 that is not using a correct database in its Reporting Services Configuration Manager", "Question : I have SQL Server 2008 Developer Edition and I m facing the following issues with the Reporting Services . 1 . When I open the Report Manager URL I get it from the Reporting Services Configuration Manager in a browser it shows me a SQL Server Reporting Services page with a folder icon on top left and links with text Home My subscriptions Help on top right . That s it I don t get to see anything else . I have a virtual-directory with the same name as specified for Report Manager in Reporting Services Configuration Manager . 2 . Opening the Report Server in the browser gives the following error message- .. . .. . Reporting Services Error The report server cannot open a connection to the report server database . A connection to the database is required for all requests and processing . rsReportServerDatabaseUnavailable Get Online Help A network-related or instance-specific error occurred while establishing a connection to SQL Server . The server was not found or was not accessible . Verify that the instance name is correct and that SQL Server is configured to allow remote connections . provider : Shared Memory Provider error : 40 - Could not open a connection to SQL Server .. . .. . I tried the following at the command-prompt in order to resolve it- .. . .. . but I got another error saying Report Server WMI Provider error : Invalid namespace .. . .. . I would really appreciate any help on this . cheers .. . Answer : I was finally able to get through both the problems by opening a port in Windows firewall for the Report Server . For Windows 2003 and Vista the steps are mentioned here http : msdn.microsoft.com en-us library bb934283.aspx .. . .. . cheers", "Question : I can see the SSRS reports via the Report Manager in the browser . I know what database server it s pointing to . How do I find where the source .rdl files are kept .. . Answer : The source file is stored in the ReportServer database of the SSRS instance you re looking at . See Report Server Database http : technet.microsoft.com en-us library ms156016 28v sql.105 29.aspx in Books Online : .. . .. . The report server database is a SQL Server database that stores the following content : .. . .. . Items managed by a report server reports and linked reports shared data sources report models folders resources and all of the properties and security settings that are associated with those items . You can download these RDL files through Report Manager . In SSRS 2008 you will need to go to the report Properties and choose Edit - Report Definition . For SSRS 2008R2 you can just choose Download from the report s dropdown . See Download Export RDL files from Report Server http : sql-articles.com blogs download-export-rdl-files-from-report-server for more explicit details . Comment : I cannot download at aIl . I am getting this error LinkedReport is not allowed for this item type .", "Question : I have SQL Server 2008 with BIDS I have installed sql-server myself and i am administrator of machine . Now I am able to make reports using BIDS I am also able to login windows-authentication to report server using SSMS but when i try to access report manager URL it asks me for Username passowrd . I am not sure what to give there as till now from SSMS i could manage with windows-authentication for database engine . Comment : Are you getting the authentication screen while accessing through browser other than IE Comment : @praveen It asks me for credential in IE Chrome both Comment : Go to the RSReportServer.config file and add basic Authentication .The file will be stored in the location Installation directory Reporting Services ReportServer . for detailed explanation go the link msdn.microsoft.com en-us library ms155866 http : msdn.microsoft.com en-us library ms155866 Comment : In my system the report server config file is present in the location C : Program Files Microsoft SQL Server MSSQL.1 ReportingService ReportServer folder and to change the config file refer this link msdn.microsoft.com en-us library cc281309.aspx http : msdn.microsoft.com en-us library cc281309.aspx .. . Answer : SSRS always uses Windows authentication so your user name and password that you re seeing is your Windows login . There is no separate account just for Report Manager . If you re seeing a prompt you might have UAC enabled and it s prompting you because of that . Or your browser is not enabled for Windows integrated security . You can add the Report Manager URL to trusted-sites or Intranet sites if you re using IE .", "Question : I happen to be setting up a reporting server at work from scrach . Having very little almost no experience of sql-server administration I am finding it really difficult to configure the security settings for the Reports Manager . I do understand all the users who will be accessing Reports Manager will need permissions on Two Levels .. . .. . .. . 1 Permission to Access Data from sql-server . for which after some research I have decided to make use of datareader role . .. . 2- Permission to Access Reports Manager for which I have choice to choose from Reports Manager Roles such as Browser Content Manager etc etc . .. . For reports manager I have created a new Role with only permissions to View Reports . Problem .. . .. . .. . With all these Security Filters in-place yet when I added a Domain User Account to Reports Manager The user can navigate anywhere on the Reports Manager Can access folders DataSources and reports they don t have permissions on . I do not want Users to view Data Sources or any other folders or Reports that they don t have permissions on . What I have Tried So Far .. . .. . .. . 1- Added a user to One folder on the reports Manager Yet they can navigate to any other Folder on Reports Manager . .. . 2- Added a user to just one report again they can navigate to any other Folder on Reports Manager . .. . 3- I was using a virtual account for SSRS Service Account Removed that and tried on all other 3 built-in accounts for service account LocalService LocalNetwork LocalSystem . Not sure if this would have made difference . All these efforts in vain as whenever a user is added to any one report or folder they can navigate to all the other folders and reports and can actually execute reports . Users had the datareader role assigned in Sql Server and a Custom Role on Reports Manager who has permissions only to View Report . I have set the reporting-services to use the default windows-authentication . It is Sql .. . .. . Server 2008 R2 Reporting Services . Data Centre Edition . Please any advice or any direction would be a great help . I have been reading BOL but nothing has helped as yet . Comment : Cross-posted as dba.stackexchange.com questions 54145 http : dba.stackexchange.com questions 54145 ssrs-reports-manager-security-configuration . Comment : I m voting to close this question as off-topic because it was cross-posted on DBA . .. . Answer : If the Report Manager permissions are correctly set up then a user should not be able to access any folders or items that they have not been granted permissions on . Without seeing your setup it s hard to say exactly what is causing the issue you re seeing but here s a few things you should check : .. . .. . 1 Report Manager permissions are cumulative i.e . if the user is in a Windows Group that has been granted wider permissions then they will inherit those permissions just like folders on disk . 2 By default the BUILTIN Administrators group is a Content Manager for the whole site so if the user is a member of the local Administrators group on the server then they will access to everything in Report Manager . 3 By default all folders inherit permissions from the Home folder e.g . the http : myreportserver reports homepage so if you add a user to a role such as Browser or Content Manager on that page then the user will have the same permissions on all subfolders and items unless you explicitly set up different security on those folders or items . Comment : Thank you for your feed back Nathan thats the reason I created a custom role on reports manager who has only permission to veiw reports and nothing else . The default role Browser has permission to view Data sources and subscribe to reports so I havent used that . And I understand that If a user has permission on a folder they will be able to access any sub-folder and any reports and other objects thats why I tried adding a user only to one report and nothing else and yet they can navigate to all the other folder and reports on reports manager . Comment : Do you reckon it could be something to do with the users permission on their domain accounts or the service account Comment : A couple of things : 1 if you create a custom role with only the View Reports permission then any users with that role will be unable to view any folders or browse the folder hierarchy - they will only be able to access folders directly via a URL . 2 Report Manager security works the same way as file folder permissions on disk which means if your user can access a folder it is because they are somehow inheriting permission to do so either because it has been granted directly or through membership of a group . Comment : thanks for your response pal and this is something I have already tried Created a custom Role with only permission to View Reports but when I sent the URL for that report they can click on home tab and from there anywhere on reports manager .", "Question : I get a permission error when trying to access the Report Manager URL in the browser if UAC is enabled . I know from reading other posts that UAC needs to be disabled to allow this to work and that works for me as well . My concern now is when I install SQL Server with Reporting Services on the user computer I will also have to disable UAC . Is there any way to get it to work and also have UAC enabled at the same time .. . Answer : If UAC is enabled you can launch IE with the Run as Administrator context menu option and you then you can access Report Manager on the local machine . Right click on IE in the start menu select Run as administrator . Then you will need to approve the UAC prompt as IE launches . Comment : That worked . Thanks for the help .", "Question : I am implementing an SSRS project but I have issues with the deployment phase . My requirements .. . .. . 1 . Deploy the report to the reporting server .. . 2 . Allow Users to access the reports from a custom web application . 3 . Users should access the reports with any browser .. . 4 . I don t have a sharepoint Domain authentication so I am using a custom web app .. . .. . My Challenges .. . .. . After deploying the reports to the report server If I try to access the Report Manager Url from my client system I receive an prompt requesting for the Windows Login Credentials of my Reporting Server . I want disable this prompt . Please I need your help . Thanks .. . Answer : In your web application s web.config add identity impersonate true and SSRS 2012 does not use IIS .", "Question : null .. . Answer : Is is possible co to configure Reporting services 2008 Authentication method this way that i ll be able to access the report manager not from build-in computer user My purpose is connecting to report manager with admin rights from another computer with a custom user and password - like connecting to Database Engine with SQL SERVER authentication method . i have no Active directory of domain . thank you Eddie Comment : I don t think you can do this .", "Question : I created a thread and it works good when Preview false but when I set Preview true then I always get an error system error-code 5 access denied . I want to thread the report because it takes more than 10 seconds to generate . Can somebody explain what is going on .. . Answer : If you look at the source code for TVCLReport its Execute method displays a VCL-based UI when Preview True : .. . .. . TRpPreviewControl is derived from TScrollBox . ShowPreview is a helper function that places the TRpPreviewControl object onto a custom TForm object TFRpPreview that is displayed with ShowModal . VCL-based UIs are not thread-safe and cannot be use outside of the context of the main UI thread . As you can see TVCLReport.Execute does not provide you any opportunity to synchronize with the main UI thread so Preview True is NOT safe to use in a worker thread . If you want to call TVCLReport.Execute in a worker thread but display its preview in a thread-safe manner one possible solution would be to be alter the source code for TVCLReport to expose the preview functionality in a way that allows you to call it using TThread.Synchronize eg : .. . .. . Although if your report really does take a long time to generate then chances are that the preview will also take a long time to generate . If so this solution will not gain you anything useful . It might be easier to simply leave the TVCLReport in the main UI thread and display a message to the user while it is busy generating the report . You will just have to try it and see what happens . Comment : Thank you so much for your effort and ideas . I appreciate it . I will give it a try and let you know if it works . Comment : I can t figure it out.. . dm.rmvFarm.DisplayPreview dm.rmvFarm.OnPreview are undeclared. . Comment : @ErenRavenHeart You may have another Reportmanager version than Remy has . Or you have not included the proper source files in your Uses clause . Use the documentation . Comment : I think you missed the point of my answer . You would have to ALTER THE SOURCE CODE for TVCLReport to add the new functionality I mentioned . It dos not already exist . As for the version I do not have TVCLReport but I looked at the latest source code available on the ReportManager SourceForge Project http : sourceforge.net projects reportman ." ] }
[ "yes-answer-long", "yes-answer-short" ]
reporting-services
UNK_RELATION
firefox@cross-platform@46
firefox -- firefox is a free open-source and @placeholder web browser created by mozilla .
{ "confidence": [ 44.35700225830078, 38.227256774902344, 38.090660095214844, 37.76688766479492, 37.63032531738281, 36.906944274902344, 36.80582046508789, 36.60236740112305, 36.52842330932617, 36.49734115600586, 36.32127380371094, 36.21715545654297, 35.64066696166992, 35.42843246459961, 35.02471160888672, 34.938446044921875, 34.30381393432617, 34.06535720825195, 33.96672821044922, 33.96385955810547, 33.83552169799805, 33.510498046875, 33.420536041259766, 33.37146759033203, 33.367820739746094, 33.078208923339844, 33.078208923339844, 33.047996520996094, 32.97740936279297, 32.82215118408203, 32.76465606689453, 32.730682373046875, 32.70425033569336, 32.165504455566406, 31.974102020263672, 31.97292709350586, 31.92131805419922, 31.910934448242188, 31.910934448242188, 31.910934448242188, 31.910934448242188, 31.602203369140625, 31.511356353759766, 31.4786434173584, 31.3179931640625, 31.266111373901367, 31.266111373901367, 31.266111373901367, 31.108821868896484, 31.104480743408203, 31.004369735717773, 30.92376708984375, 30.870929718017578, 30.690418243408203, 30.59221076965332, 30.59221076965332, 30.493274688720703, 30.493274688720703, 30.46078109741211, 30.410219192504883, 30.350765228271484, 30.32927894592285, 30.32927894592285, 30.175159454345703, 30.104019165039062, 30.104019165039062, 30.104019165039062, 30.104019165039062, 30.060983657836914, 30.04558753967285, 30.033050537109375, 29.96463394165039, 29.96463394165039, 29.951980590820312, 29.857454299926758, 29.826786041259766, 29.812397003173828, 29.812397003173828, 29.812397003173828, 29.657474517822266, 29.627113342285156, 29.58670997619629, 29.58670997619629, 29.578266143798828, 29.578266143798828, 29.5339412689209, 29.459196090698242, 29.459196090698242, 29.424880981445312, 29.41766357421875, 29.396635055541992, 29.39495277404785, 29.371919631958008, 29.307157516479492, 29.307157516479492, 29.270912170410156, 29.229877471923828, 29.229877471923828, 29.208961486816406, 29.14828109741211 ], "content": [ "open mozilla firefox then drag the .xpi file and drop it in mozilla firefox window .", "As I understand the Firefox browser is written in XUL and the code is open-source .", "Restart Mozilla Firefox browser to activate the addon .", "But when I change the language to translate the content browser Mozilla Firefox crashes this happens only in case of Mozilla Firefox .", "How to clipboard is working in Mozilla Firefox browser .", "So if Vendor mozilla and Name firefox it will actually go into HOME .mozilla firefox .. .", "Firefox indexedDB location on Ubuntu is : .. . .. . .mozilla firefox .default storage persistent .. . .. . or .. . .. . .mozilla firefox-trunk .default storage persistent", "I have Mozilla Firefox browser 35.0.1 with App Manager tool in the browser .", "The Firefox browser is already open and .. . 2 .", "My firefox version is Mozilla Firefox 45.2.0", "I have implemented sample mozilla firefox extension to display firefox icon action-button on toolbar and it will open http : www.mozilla.org .", "The SDK you are looking for is probably the Firefox OS Simulator Addon https : addons.mozilla.org hu firefox-addon firefox-os-simulator for the Mozilla Firefox browser .", "The Firefox browser that comes with Firefox OS is still an infant .", "Like wise Is there any API in Mozilla Firefox to get the stream of the tab in Firefox browser .", "which is Mozilla Firefox .", "There are the following Firefox channels repositories : .. . .. . Release mozilla-release The official release of Firefox .", "Possible duplicate of Can t open browser with selenium after firefox update http : stackoverflow.com questions 37761668 cant-open-browser-with-selenium-after-firefox-update", "i Use Mozilla Firefox 45.0", "The source of the library used by Firefox Reader View is on GitHub at github.com mozilla readability https : github.com mozilla readability if that helps.. .", "As webp format is not compatible with mozilla firefox So what is the possible best technique to decode an display webp image on firefox browser .", "I m working on a snippet for check if the browser is Firefox Firefox OS Firefox for Android .", "I am new to development of Mozilla-Firefox extension .", "I try this approach for the mozilla firefox .", "This is the way the new Web Console in Firefox 4 is created .", "I am trying to build it from mozilla firefox source code .", "The firefox browser version is 47+ .", "This works on firefox browser on Linux .", "I m currently working on a Mozilla Firefox addon .", "When i first open TestComplete Firefox shows as a browser in the object browser .", "Download Firebug for Mozilla Firefox open it click on Net and refresh your website .", "Open a Firefox browser load Tamper Data .. . 2 .", "I have a Mozilla Firefox addon and wanna test it .", "Possible duplicate of Can t open browser with Selenium after Firefox update http : stackoverflow.com questions 37761668 cant-open-browser-with-selenium-after-firefox-update", "Does WebIDL play different rules in Firefox browser and b2g Firefox OS", "My extension s Mozilla Firefox layout http : i.stack.imgur.com fwgZA.png .. . .. . How I can inspect the layout of the content my extension has created in Firefox", "I created a Firefox add-on .", "I am thinking of employing some of the functionality that is already present in the Mozilla Firefox browser .", "I want to change the webIDE theme in Mozilla Firefox .", "I m primarily talking about Mozilla Firefox .", "Something like this : .. . .. . The bug only reproduces in mozilla firefox", "avoid all and any mozilla firefox-os phones .", "jQuery is meant for cross-browser scripting and ease for the web pages not for the Firefox scope .", "I have created a XPCOM add-on for firefox by the name Sample Mozilla AddOn from XPCOM C++ SDK .", "My browser is Firefox 14.0.1 .", "I ve been browsing through Firefox 4 bugs and there are comments about Mozilla dropping support for XUL in the browser .", "The generic case and Mozilla documentation are about Firefox .", "It works in google-chrome but in mozilla firefox didn t .", "On Mozilla firefox play was displayed on the screen but no sound was played .", "Open this web-page from Firefox : https : addons.mozilla.org en-US firefox-addon tiddlyfox src search .. . .. . 2 .", "The open-source Firefox ActiveX version seems to be a dead project development wise and based on an old Firefox version .", "I don t think you want to open firefox but the user s browser .", "I m creating an extension for the Firefox browser .", "Firefox doesn t have a built-in DRM engine nor does any other open-source browser .", "And there are plenty of default Firefox OS apps gaia https : github.com mozilla-b2g gaia such as gallery browser using IndexDB .", "Firefox Mozilla has four different types of extensions : .. . .. . 1 .", "While Mozilla is claiming that this API is the future of Firefox extensions this API is still in development .", "Yes the CSP blocks bookmarklets in Mozilla Firefox .", "Mozilla Firefox will not display tooltips of disabled controls .", "Just update your browser using the about Firefox .", "You might be able to use one of the Firefox modules that implement Web Push mxr.mozilla.org mozilla-central source dom push http : mxr.mozilla.org mozilla-central source dom push .", "Restart Firefox just to be sure that the scratchpad is in the browser context .", "Open Firefox .. . 2 .", "I tested it with Firefox open .", "Firefox OS is simple web activity .", "That is not Firefox or any other browser feature .", "I use the Firefox browser by the way .", "No Firefox browser i am using", "I have a problem with the Firefox browser .", "But not on the Firefox OS browser .", "Give a look to the GeckoFX http : code.google.com p geckofx Project an open-source component for embedding Mozilla Gecko Firefox in .NET applications .", "Inside of the style editor for Mozilla Firefox web dev I have my Keybindings set to Vim preferred .", "I m migrating to Firefox since it has better support and is actively maintained by Mozilla .", "Perfect in Mozilla Firefox 30 under Ubuntu GNU Linux .", "I have installed bluefish-2.2.7 in win7 my firefox is installed C : Program Files x86 Mozilla Firefox firefox.exe .", "FirefoxDriver is working again with Firefox 47.0.1 as browser .", "I looked into how firefox makes the browser the default app it uses shell service try investigating here : mxr.mozilla.org mozilla-release source browser components http : mxr.mozilla.org mozilla-release source browser components preferences advanced.js 905", "Is it possible for a c++ application to comunicate with a js extension plugged in with mozilla firefox", "I m using the developer edition of Mozilla Firefox Waterfox win64 .", "I m develop some extension for Mozilla FireFox using Addon SDK .", "All of the proxy settings for Firefox on my machine are stored in C : DOCUME 1 BRUCEX 1 APPLIC 1 Mozilla Firefox Profiles licga1pg.default prefs.js .", "Open Firefox Tools Options Applications .. . .. .", "To open a new tab in the existing Firefox browser using Selenium WebDriver", "Is that anyway to Modify firefox or other browser element with Watin VB.Net after it open", "Firefox assigns a defaultGroupId using this source code http : mxr.mozilla.org mozilla-central source widget windows WinTaskbar.cpp 265 in C++ .", "And the Firefox source that checks http : mxr.mozilla.org mozilla-beta source dom base nsJSEnvironment.cpp 316 .", "This is what s in the C : Program Files Mozilla Firefox browser searchplugins google.xml file but it doesn t work for a custom search .", "It works perfectly in every browser but Firefox .", "why is firefox the only browser to do this", "I created a new Firefox profile by running firefox -ProfileManager .", "I have ZTE Open with Firefox OS .", "If there a way to list all open Mozilla Firefox tabs in a MozillaWindowClass having its HWND via XPCOM and C++", "How to change my firefox browser language", "It would be difficult to write a separate desktop application to modify the HTML code of a site within the Firefox browser and only within Firefox .", "You will find your windows firefox profile directory at APPDATA Mozilla Firefox Profiles .", "My Firefox 31 keeps it in AppData Mozilla Firefox Profiles PROFILE NAME storage persistent ORIGIN idb", "Source : http : www.firefoxanswer.com firefox 672-firefoxanswer.html Archived Version http : web.archive.org web 20100428053932 http : www.firefoxanswer.com firefox 672-firefoxanswer.html", "I just downloaded the IndexedDB Browser add-on for Firefox .", "A browser crash is a Firefox issue not a Firebug issue .", "Firefox does this itself here : .. . .. . http : mxr.mozilla.org mozilla-central source mobile android chrome content browser.js 5445", "Firefox offerer DataChannel establishment with another Firefox answerer browser does not work ." ] }
{ "confidence": [ 44.38371658325195, 41.98965835571289, 41.58155822753906, 40.922969818115234, 40.07613754272461, 39.780250549316406, 39.67431640625, 39.519683837890625, 39.18656539916992, 39.06584930419922, 38.81218338012695, 38.754913330078125, 38.7148323059082, 38.33372497558594, 38.29471969604492, 38.29471969604492, 38.21881103515625, 37.91630554199219, 37.73617172241211, 37.678321838378906 ], "content": [ "Question : Google Cloud Messaging GCM is a service that enables developers to send data from servers to both Android applications or Chrome apps and extensions . I am developing a chrome and a firefox extension add-on . I am using the Web Extension APIs for Firefox extension . Now Web Extension APIs don t support chrome.gcm . APIs yet . Essentially a firefox extension cannot talk to GCM . Is there something else like GCM to which a firefox extension can talk to Something provided by the Firefox just like GCM provided by Google for its browser Chrome If not can someone please explain how to achieve this in a Firefox Extension Update : Even for web apps firefox doesn t use something similar to GCM . They use service workers . Can Firefox Browser Extensions interact with service workers .. . Answer : Firefox extensions currently can t use service workers directly according to an implementor who worked on service-workers support in Firefox http : logs.glob.uno c freenode 23whatwg s 1 20Feb 202016 e 1 20Feb 202016 c983254 . Is there something else like GCM to which a firefox extension can talk to Something provided by the Firefox just like GCM provided by Google for its browser Chrome Yes there s a Firefox equivalent of GCM . All Web apps a Firefox user accesses that receive push notifications get them from a server given by the dom.push.serverURL user preference . If you check dom.push.serverURL in about : config you ll see wss : push.services.mozilla.com which is the Mozilla Push Service https : mozilla-push-service.readthedocs.org en latest essentially Mozilla s equivalent of GCM . The backend of that runs AutoPush a Python-based open-source Push Server software project https : autopush.readthedocs.org en latest and the client-side of it is as noted in the question exposed to Web apps through service workers . So while there may be an alternative way Firefox extensions can connect with Mozilla Push Service the only publicly-documented way is through the standard Web Push API https : developer.mozilla.org en-US docs Web API Push API Using the Push API that relies on service workers which are not available yet for use in Firefox extensions . Comment : So do you know of any alternatives using which Firefox extensions can connect with Mozilla Push Service Comment : You might be able to use one of the Firefox modules that implement Web Push mxr.mozilla.org mozilla-central source dom push http : mxr.mozilla.org mozilla-central source dom push . Comment : @Marco How I think this also is for web apps only . Comment : @ankitG those modules are internal they can t be used by web content but can be used by addons . I m not sure about the how you have to investigate by looking at their source code . Comment : There s also something else that you could do . Create a web page that uses service workers and the standard Push API and somehow communicate data between the addon and the web page .", "Question : Developing an addon for Firefox I find that I need to be able to launch a download as-if the user requested it that is either showing the normal file save dialog or saving the file to wherever the user prefers as it could be configured under preferences content . Every single post or documentation regarding downloads seem to only take in consideration the scenario where I know where to download the file but that is not what I need in this case in this case in needs to be as-if the user started the download . How can this be accomplished preferably via the methods of the SDK Comment : Nice q . I m also interested in the answer downloads are not something im too good with . Comment : I would think you d need to dig into Download.jsm https : developer.mozilla.org en-US docs Mozilla JavaScript code modules Downloads.jsm and see how that gets triggered in the Firefox UI . Upvoted because good question . : .. . Answer : Well you could just initiate an actual save . Initiating a save link from your code : .. . In the context menu the oncommand value is gContextMenu.saveLink . saveLink is defined in : chrome : browser content nsContextMenu.js http : dxr.mozilla.org mozilla-central source browser base content nsContextMenu.js 1284 . It does some housekeeping and then calls saveHelper which is defined in the same file http : mxr.mozilla.org mozilla-central source browser base content nsContextMenu.js 1150 . You could just call saveHelper with appropriate arguments . It is included in panels from chrome : browser content web-panels.xul http : dxr.mozilla.org mozilla-central source browser base content web-panels.xul 26 with : .. . .. . .. . Then the gContextMenu variable declared in chrome : browser content browser.js http : dxr.mozilla.org mozilla-central source browser base content browser.js 45 as null is assigned : .. . gContextMenu new nsContextMenu this event.shiftKey http : dxr.mozilla.org mozilla-central source browser base content web-panels.xul 53 .. . in the onpopupshowing event handler for context menus . It is returned to : .. . gContextMenu null http : dxr.mozilla.org mozilla-central source browser base content web-panels.xul 60 .. . in the onpopuphiding event handler . If you want to use it in your own code you can do : .. . .. . Alternative to using loadSubScript to load nsContextMenu.js : .. . My preference is to use loadSubScript to load the saveHelper code from nsContextMenu.js . This keeps the code up to-date with any changes which are made in future Firefox releases . However it introduces the dependency that you are using a function from a non-official API . Thus it might change in some way in future Firefox release and require changes in your add-on . The alternative is to duplicate the saveHelper code in your extension . It is defined as the following : Comment : How to determine linkText Comment : @ I m not quite sure what you are asking . Exactly how you determine the text of the link depends on the information you already have . This question does not specify the source of the link-to be downloaded . Thus there is not much context from which I can work to provide you an answer . If it is that you already have the A element then you can probably accomplish what you desire with Node.textContent https : developer.mozilla.org en-US docs Web API Node textContent . I would suggest that you ask a new question and provide a bit more detail as to what you want to know . How to Ask http : stackoverflow.com questions how-to-ask", "Question : I am writing a Firefox Add-on that is supposed to add new bookmarks . I am thinking of employing some of the functionality that is already present in the Mozilla Firefox browser . As I understand the Firefox browser is written in XUL and the code is open-source . How can I find the code that performs any specific action like in this case-when I click the context menu item Bookmark this link a window appears New Bookmark how can I find the code that opens this window Thank you .. . Answer : See Viewing and searching Mozilla source code online https : developer.mozilla.org en-US docs Mozilla Tech Viewing and searching Mozilla source code online - there currently are two online tools for searching through the Mozilla s code : DXR and MXR . The former is newer and more advanced the latter is simpler and more mature . Using any of these : .. . .. . 1 . Search for the label you re looking for : Bookmark this link https : dxr.mozilla.org mozilla-central search q Bookmark+this+link 22 redirect false case false .. . 2 . Find a localization file usually .dtd or .properties which maps an internal name to the human-readable label in this case : browser locales en-US chrome browser browser.dtd https : dxr.mozilla.org mozilla-central rev d9b1a9829c8ee2862955043f28183efa07de3d2b browser locales en-US chrome browser browser.dtd 497 : .. . .. . ENTITY bookmarkThisLinkCmd.label Bookmark This Link .. . .. . .. . 3 . Search for the internal name you found : bookmarkThisLinkCmd.label https : dxr.mozilla.org mozilla-central search tree mozilla-central q bookmarkThisLinkCmd.label redirect true .. . .. . 4 . Find the code that displays it in the UI usually .xul or .js in this case browser base content browser-context.inc https : dxr.mozilla.org mozilla-central rev d9b1a9829c8ee2862955043f28183efa07de3d2b browser base content browser-context.inc 93 - a file that s included in a number of XUL files via preprocessor . Note that DXR also shows you a bunch of results under obj-x86 64-pc-linux-gnu - these are results generated during the build and not the original source code and should usually be ignored . menuitem id context-bookmarklink .. . label bookmarkThisLinkCmd.label .. . accesskey bookmarkThisLinkCmd.accesskey .. . oncommand gContextMenu.bookmarkLink .. . .. . .. . 5 . Find the definition of gContextMenu : regexp : gContextMenu A-Za-z . https : dxr.mozilla.org mozilla-central search q regexp 3AgContextMenu 5B 5EA-Za-z . 5D redirect true case true - there s a bunch of hits all of them doing .. . .. . gContextMenu new nsContextMenu this event.shiftKey .. . .. . .. . 6 . Finally find the definition of .bookmarkLink : browser base content nsContextMenu.js 1690 https : dxr.mozilla.org mozilla-central rev d9b1a9829c8ee2862955043f28183efa07de3d2b browser base content nsContextMenu.js 1690 Comment : Thanks a lot Nickolay That s an amazing answer . It would take me ages to figure it out on my own .", "Question : How do you disable the default action for .torrent files content-type application x-bittorrent eg open with dialog or run program and instead handle the data in a extension Comment : I looked into it but I m not sure . I looked into how firefox makes the browser the default app it uses shell service try investigating here : mxr.mozilla.org mozilla-release source browser components http : mxr.mozilla.org mozilla-release source browser components preferences advanced.js 905 Comment : I thought about this . If you want say a user clicks a file from the OS file explorer then you ll have to do some per OS stuff . But if you want when a user clicks a link in firefox that has some certain extension then you can handle that via add-on . Not with the shell method in my comment prior . I gotta sit down and work on this though too tired right now 335am Comment : Yeah I want to override firefox default action when a link is clicked . I ve found some old code that uses observers and filter through all requests and responses and then inlines file-attachments when it s a torrent to disable the popup dialog but it doesn t seem to work anymore . Surely there must be a way to simply register a handle for the mime-type itself Comment : Ok so Firefox has a handler for mime type in the options . So you gotta mess around with it I looked into it but I can t figure out how to set it to extension . heres the source on mxr for setting handlers for mime-types : MXR : : mozilla-release http : mxr.mozilla.org mozilla-release source browser components preferences applications.js 284 and Image of Firefox mime type to hanlder options menu http : prntscr.com 3zk5gf .. . Answer : There are multiple ways that all boil down to nsIMimeService nsIHandlerService and nsIMimeInfo and setting the appropriate nsIHandlerInfo . E.g . see PDF.js making itself the handler for PDF files http : hg.mozilla.org mozilla-central file 717cd9d89a80 browser extensions pdfjs content PdfJs.jsm l160 by effectively disabling all handler or plugins and implementing a stream converter or my answer on how to register a web protocol-handler http : stackoverflow.com a 24910047 484441 not mime related but protocol related but the handler info stuff still applies . Depending on how you d like to handle things you may use the nsIHandlerApp http : hg.mozilla.org mozilla-central file 717cd9d89a80 netwerk mime nsIMIMEInfo.idl l212 -ervied interfaces e.g . to pass the uri protocols or file mime directly to some local or web application or implement a full blown stream converter like PDF.js . In theory it would be also possible to implement new kinds of nsIHandlerApp -derived interfaces implementing in particular launchWithURI protocols or launchWithFile mime content types and file extensions downloads . However this is a bit tricky as nsIHandlerService only handles the built-in interfaces . Comment : Thanks man for this awesome post . It wasn t a spoon feed solution and it took me week or so but I got it down . Made this simple add-on out of it for average users to install webmamil clients as mailto handlers . AMO : : MailtoWebmails https : addons.mozilla.org en-US firefox-addon mailtowebmails . I credited you for Protocol XPCOM Education : P", "Question : I am curious to know as when you install mozilla firefox and they open a website to let you tour the features of the browsers and from the click to call actions they are able to highlight options like the hamburger-menu on the top right they even open it the pad lock icon near the navigation bar . Is that something they do using JS If yes then how As far as I know the browser does not gives you control via JS outside the window or viewport . Check out this url in firefox you will know what I am referring to https : www.mozilla.org en-US firefox 46.0.1 tracking-protection start step 1 .. . Answer : The code is at the bottom of the page you linked to at https : www.mozilla.org media js tracking-protection-tour-bundle.07309334b48d.js which utilizes the Mozilla UITour JavaScript library http : bedrock.readthedocs.io en latest uitour.html and https : github.com mozilla bedrock blob master docs uitour.rst .. . .. . From the docs : .. . .. . Mozilla.UITour is a JS library that exposes an event-based Web API for communicating with the Firefox browser chrome . It can be used for tasks such as opening menu panels and highlighting the position of buttons in the toolbar . It is supported in Firefox 29 onward . Comment : Thanks does similar thing is there for chrome as well", "Question : I m trying to debug a Firefox extension using Firefox 28.0 . I have set up the dev environment as suggested in https : developer.mozilla.org en-US Add-ons Setting up extension development-environment actually I just took the lazy way out and installed the DevPrefs extension to set all the necessary about : configs .. . .. . I then open Firefox and go into the debugging environment Tools Web Developer Browser Toolbox . I then go to the Debugger tab . However under the Sources pane under my extension e.g . chrome : myextension I only see some of the JS and XUL files that are contained in my extension XPI . How can I manually load files in the debugger so that I can set a breakpoint and trace the runtime of my extension .. . Answer : The debugger doesn t have any functionality that would allow loading files manually instead it will show you every file that is currently loaded by the JavaScript engine . If you dig into details this means that whenever the JavaScript engine compiles a new script the debugger is notified and adds the corresponding file to its list . So normally all you need to do is open a page or dialog that uses that script and it will become visible in the debugger . I say normally because in my tests this didn t seem to work reliably - there appears to be some bug which makes the debugger miss out some scripts maybe that s what prompted your question . Now of course you can consider faking the notification to force the debugger to load a particular file - e.g . if you want to set breakpoints before the file actually loads . I tried it and it is indeed possible but it requires you to mess with Firefox internals and it relies on a number of implementation details that might change in future Firefox versions . In particular you need to get the DebuggerServer instance used to communicate with the debugger . While the in-process debugger always uses the same instance which is trivial to get a new instance is created for each remote debugger . From what I can tell getting to that instance is only possible with the changes implemented in bug 993029 https : bugzilla.mozilla.org show bug.cgi id 993029 which means that it will only work with Firefox 32 currently available from the Firefox Aurora channel https : www.mozilla.org firefox channel aurora and above . The problem is that the DebuggerServer instance is being created by the BrowserToolboxProcess class declared in ToolboxProcess.jsm http : hg.mozilla.org mozilla-central file a74600665875 browser devtools framework ToolboxProcess.jsm . Before the changes introduced by bug 993029 a BrowserToolboxProcess object would be created and no reference to it kept - meaning that it would be impossible to access it and the corresponding connection after the fact . Starting with Firefox 32 all created BrowserToolboxProcess objects are stored in the processes set https : developer.mozilla.org en-US docs Web JavaScript Reference Global Objects Set and can be enumerated . This code can be used to fake a Debugger.onNewScript call https : developer.mozilla.org en-US docs Mozilla Projects SpiderMonkey JS Debugger API Reference Debugger onNewScript 28 29 that will be forwarded to the remote debugger : .. . .. . As mentioned above this code should only work starting with Firefox 32 I tested it on Firefox 33.0a1 . You can run it from Scratchpad make sure to switch environment to Browser https : developer.mozilla.org en docs Tools Scratchpad Running Scratchpad in the browser context . There is no guarantee whatsoever that it will continue working in future Firefox versions there are several implementation details used here that can change at any time . Comment : not the definite answer that I d hoped for but does tell me the technical details that I need to know and why the debugger behaves in that way . And I think it deserves the bounty .", "Question : Has anyone ever embedded the firefox web browser technology in their own unmanaged C C++ GUI application in the same way that IE can be embedded as a COM object I would like to do this on Linux not Windows . Are there better alternatives to firefox I m open to anything as long as I can use it with non-GPL code . My needs are fairly basic I only need fundamental HTML parsing and display of static local files but I d take advantage of more sophisticated technology if I can get it . I d like to be able to use JavaScript but I can get by without it . .. . Answer : Check out webkitgtk http : www.webkitgtk.org . It s not Gecko but Webkit based . It basically provides a web browser widget that can be used in GTK+ applications . If you want to embed mozilla there are things in the mercurial repositories for Mozilla repository that let you do it but it didn t seem heavily supported last I checked . Comment : This is probably worth a separate answer but you could also look into XUL Runner which is what Firefox is essentially built on top of . You can write your UI in XML JS and CSS . There is also a C++ interface for the components .", "Question : I am using Silk4J tool for automating a web application.I have recorded actions from IE browser and I want to execute the generated script in Mozilla Firefox browser but not able to execute the same.Firefox browser gets opened but no further actions are performed and hence the script is failing.Can anybody help me in this scenario Comment : What error does Silk4J show Does it open the base URL Does it fail to recognize any object What are the results if you run the same test on IE Comment : What version of Firefox and SIlk4J are you using Silk4J only got support for Firefox 35 and later as of Silk Test 16 Hotfix 2 . Comment : @Johnbo- Thanks for the reply . When I played back the script then Mozilla Firefox browser get opened but no further actions were played back which were recorded and when I run the same tests on IE browser then those were executed successfully.The error was displayed that your browser version is not supported so I have downgraded the FF version to 35 but still it was not executed . Comment : @Andy - Hi i am using FF version 35 and Silk4J version is 16.0 Comment : @Johnbo- Error : Time out expired after launching application . The requested object BrowserApplication @browsertype Firefox was not found within the timeout of 30 seconds this error is displayed .. . Answer : Upgrade to Silk Test 16 HF2 . Older versions of Silk Test don t support FF35+ . Comment : Also note that this update will make your Firefox browser to ask you to install SilkTestAddOn 16.0.2 extension . You must accept the installation so any further version of Firefox is correctly recognized by Silk Test .", "Question : I have created a XPCOM add-on for firefox by the name Sample Mozilla AddOn from XPCOM C++ SDK . I have created an XPI file which is an add-on installer in Firefox . When i try to install this XPI to install my XPCOM component i get an error Sample Mozilla AddOn could not be installed because it has a high risk of causing stability or security problems .. . .. . I tried looking out on internet and MDN but could not found any concrete information . Kindly Help .. . .. . Thanks and Regards Uday Gupta Comment : It is often due to the code methods that has been used . Once such example is innerHTML . have you used it FF object to its use and there are reasons for it . Comment : I am not accessing using DOM methods . The dll contains a Class that has 2 methods one returning string and the other one returning long value . nothing complex Comment : Then someone has to check the code . I am not familiar with SDK at all . Comment : Where is the source code Comment : I thought of another thing . Pack 1 file only in a xpi and Validate Add-on https : addons.mozilla.org en-US developers addon validate . Do it for each file in your addon and see which ones the validator complains about . That would help narrow it down . .. . Answer : open mozilla firefox then drag the .xpi file and drop it in mozilla firefox window . Then click install restart firefox . Just try it.. .", "Question : If my own sidebar is left open when Firefox is closed it is shown again on startup . I find this undesirable and would rather it remain hidden until opened manually . Is it possible to stop this happening .. . .. . I tried adding this bit of code to my extension s initialisation function in order to close the sidebar if it does appear : .. . .. . This doesn t seem too work too consistently - it seems to ignore the false parameter and just toggles the sidebar When it does work correctly it has unwanted side effects - I need to open and close the sidebar once before it will show any content . Weird but I assume part of Firefox s view as to the sidebar s visibility has got out of sync . It seems others are having the same trouble on the MozillaZine forums http : forums.mozillazine.org viewtopic.php f 19 t 1215785 . .. . Answer : toggleSidebar mySidebar false doesn t work because the second param means forceOpen not an open close flag . As someone answered on Mozillazine this is because Firefox just preserves sidebar state across sessions . Are you sure you need to be different here Here s the code in Firefox that opens the sidebar on startup : .. . .. . http : mxr.mozilla.org mozilla-central source browser base content browser.js 999 the lines may be off when you access this later - it s the link-to the latest version of the source .. . .. . And here s where the sidebarcommand attribute gets persisted : .. . .. . http : mxr.mozilla.org mozilla-central source browser base content browser.js 1422 .. . .. . I suggest trying this : .. . If current window is the last one and your sidebar is open .. . .. . either close the sidebar before BrowserShutdown it s registered as an unload handler for the window http : mxr.mozilla.org mozilla-central search string BrowserShutdown find findi hitlimit tree mozilla-central .. . trick the BrowserShutdown to persist the right attributes corresponding to the sidebar not opened case .. . or after BrowserShutdown overwrite the persisted values with the ones you need . If you come up with the working solution please share it with others preferably on MDC : https : developer.mozilla.org En Code snippets Sidebar Comment : Cool . I had thoughts about the forceOpen flag not being open close but that s confirmed it . Presume passing false is going to do me no harm . I feel I need to be different because my sidebar only makes sense when there s a valid URL in the URL bar . I could just display a generic sidebar in that case I guess . I ll give some of those ideas a go . Thanks .", "Question : I m making a custom Firefox build . I would like to integrate my add-on Add-on SDK into the build . I would prefer this rather than directly integrating with the Firefox code . What is the best way to achieve this I m thinking about placing it into the browser extensions directory . If this is a good idea then please explain to me why or point to appropriate docs files . There is a very similar question about this : How to integrate add-ons .xpi into my custom Firefox build http : stackoverflow.com questions 35788485 how-to-integrate-add-ons-xpi-into-my-custom-firefox-build Unfortunately there is no answer . Edit : I think I ve found a way to do this however this method is not documented and might not work in every case . I renamed the .xpi file to ADDON ID.xpi and placed it in browser extensions directory in source code . Than I added : .. . .. . to browser extensions moz.build file . After building the browser addon was placed in browser features directory in application files . Addon integrated like this is hidden from user and is not copied into user-profile folder . Note : I don t use Mozilla update services in my custom build so I can t confirm that there is no problems while updating the application . .. . Answer : The documented way to do this https : developer.mozilla.org en-US docs Mozilla Developer guide Customizing Firefox Including extensions with your distribution of Firefox is to include the .xpi file with the distribution in the directory : .. . Firefox install directory distribution extensions .. . The add-on will then be installed in copied to each profile upon the first use of that version of Firefox with the profile . The copy of the extension in each profile will be automatically updated using the normal auto-updating procedure . Effectively the add-on will be treated as-if separately installed in each profile . The user will not be asked to confirm installation of the add-on . For more information see : .. . .. . Customizing Firefox : Including extensions with your distribution of Firefox https : developer.mozilla.org en-US docs Mozilla Developer guide Customizing Firefox Including extensions with your distribution of Firefox MDN documentation .. . Installing extensions https : developer.mozilla.org en-US Add-ons Installing extensions MDN documentation .. . Auto update of bundled Firefox extensions http : stackoverflow.com questions 37682010 auto-update-of-bundled-firefox-extensions 37759686 37759686 Stackoverflow question .. . Install WebExtensions on Firefox from the command-line http : stackoverflow.com questions 37728865 install-webextensions-on-firefox-from-the-command-line 37739112 37739112 Stackoverflow question Comment : Well this is not exactly what I am looking for - I want to integrate extensions while building the application . I found a way to do it and I will describe it in near future .", "Question : I have implemented sample mozilla firefox extension to display firefox icon action-button on toolbar and it will open http : www.mozilla.org . It is working fine in jpm run then I have created package of that using jpm xpi and created xpi file . Then I have installed it in my firefox browser and successfully installed but did not work . It couldn t add firefox icon action-button on toolbar There is no error in console . Below is the code . index.js .. . .. . .. . var buttons require sdk ui button action .. . var tabs require sdk tabs .. . .. . var button buttons.ActionButton .. . id : mozilla-link .. . label : Visit Mozilla .. . icon : .. . 16 : . icon-16.png .. . 32 : . icon-32.png .. . 64 : . icon-64.png .. . .. . onClick : handleClick .. . .. . .. . function handleClick state .. . tabs.open http : www.mozilla.org .. . .. . .. . package.json .. . .. . .. . .. . title : Sample .. . name : sample .. . version : 0.0.1 .. . description : Sample AddOn .. . main : index.js .. . author : Sample .. . engines : .. . firefox : 30.0a1 .. . fennec : 30.0a1 .. . .. . license : MIT .. . .. . .. . I have implemented that using - https : developer.mozilla.org en-US Add-ons SDK Tutorials Getting Started 28jpm 29 .. . .. . Please Help . Thanks .. . Answer : You missed one of item in this lesson.. . You need to create data directory in your extension root dir and all of content you have to put in this folder . In my Example I use it like this : .. . .. . and my structure looks like : MyExtensionName data icon .png .ico .. . .. . But you can also use internal links of your extension : .. . .. . resource : extensionname .. .", "Question : In Google Chrome I can right-click on extension content and select Inspect to inspect the content created by an extension . For example Chrome layout with right-click menu displayed : .. . .. . Chrome layout with right-click menu displayed http : i.stack.imgur.com GVte0.png .. . .. . Mozilla Firefox layout : My extension s Mozilla Firefox layout http : i.stack.imgur.com fwgZA.png .. . .. . How I can inspect the layout of the content my extension has created in Firefox .. . Answer : You can inspect the Firefox UI using the Browser Toolbox https : developer.mozilla.org en-US docs Tools Browser Toolbox . Note that you can currently only inspect elements by first enabling the inspector and then clicking the element . There is currently no right-click option to inspect an element . This is requested in bug 972404 https : bugzilla.mozilla.org show bug.cgi id 972404 .", "Question : null .. . Answer : I am using Linux 32-bit Page nextstep.tcs.com is not-responding in firefox . But working well in chromium web browser . Is there any setting which is to be toggled in firefox so that nextstep.tcs.com start working . My firefox version is Mozilla Firefox 45.2.0 Comment : nextstep.tcs.com isn t even loading - so good luck - I take it 45.2 is a ESR of firefox try 45.3 the current ESR", "Question : I AM Using Flex Builder 4 for flex Web application In which I create one flex Web Application . Now i am trying to run my application on web browser at that time builder shows some error like Cannot run program C : Program Files Mozilla Firefox firefox.exe : CreateProcess error 5 Access is denied . This error shows me from last one day . So will anyone can give me answer that why i got such error . In preferences Default System Web browser is selected . which is Mozilla Firefox . Thanks Comment : Can you manually launch firefox and is it working Comment : Yes manually it is working Comment : try in admin mode .. . Answer : Rigth click on the flashbuilder shortcut - run as administrator", "Question : I AM Using Flex Builder 4 for flex Web application In which I create one flex Web Application . Now i am trying to run my application on web browser at that time builder shows some error like Cannot run program C : Program Files Mozilla Firefox firefox.exe : CreateProcess error 5 Access is denied . This error shows me from last one day . So will anyone can give me answer that why i got such error . In preferences Default System Web browser is selected . which is Mozilla Firefox . Thanks Comment : Can you manually launch firefox and is it working Comment : Yes manually it is working Comment : try in admin mode .. . Answer : I just clean and close flash-builder project . And then close flash-builder and restart my system and then relaunch flash-builder then it will works now . Thanks to all .", "Question : In Google Chrome I can right-click on extension content and select Inspect to inspect the content created by an extension . For example Chrome layout with right-click menu displayed : .. . .. . Chrome layout with right-click menu displayed http : i.stack.imgur.com GVte0.png .. . .. . Mozilla Firefox layout : My extension s Mozilla Firefox layout http : i.stack.imgur.com fwgZA.png .. . .. . How I can inspect the layout of the content my extension has created in Firefox .. . Answer : Non-Webpage content extension pop-ups extension windows Firefox UI or anything else : .. . To inspect the content created outside of a webpage by an extension or anything within Firefox you can use the add-on https : addons.mozilla.org en-US firefox-addon dom-inspector-6622 DOM Inspector https : developer.mozilla.org en-US docs Tools Add-ons DOM Inspector . I also installed the Element Inspector https : addons.mozilla.org en-US firefox-addon element-inspector extension which enables you to open the DOM Inspector on any element with a Shift + right-click . You can also open the DOM Inspector from the Menu Bar- Tools- Web Developer- DOM Inspector . The DOM Inspector : DOM Inspector http : i.stack.imgur.com ircKo.png Inspecting a window created by an extension : http : i.stack.imgur.com Lj4io.png .. . .. . From the DOM Inspector menu bar you can select which open Content Document or Chrome Document you desire to inspect . However Element Inspector makes it easy to directly open DOM Inspector on the content you are interested in with just a Shift + right-click instead of having to open the DOM Inspector and then selecting the correct document and then find the correct element . Normal Webpages : .. . For normal web pages you can use the Inspector : .. . By default you can right-click and select Inspect Element Q . A default profile on Windows 7x64 running Firefox 45 : .. . .. . Firefox right-click menu http : i.stack.imgur.com 63MGA.png .. . .. . Which opens the Inspector on the element over which you are hovering : .. . .. . Web page with inspector http : i.stack.imgur.com iU3c6.png .. . .. . If you have installed Element Inspector without DOM Inspector it will open the normal inspector as in the image above with a Shift + right-click on the element you desire to inspect . You can also open the Inspector by the shortcut Ctrl + Shift + C or from the menu bar- Tools- Web Developer- Inspector . By the way : Your question as originally written appears to demonstrate that you expect the user-interface for Chrome and Firefox to be the same . This is an unreasonable expectation . It is unreasonable to expect two different programs to have the same user-interface . While it sometimes happens that one program will adopt aspects of another program s user-interface it does not happen all that often . Expecting it to have happened is not a viewpoint which will get you very far . While there are often similarities between programs that do somewhat the same thing the user-interface is usually different .", "Question : This is my first time on this site . I have a HTML CSS JS application . For that application to work we also have a browser npapi plugin .so file that is installed in plugins dir of firefox . This works on firefox browser on Linux . Now I want my application to run on Firefox OS B2G . How do I port that .so plugin to firefox OS . What I have done is I have built B2G and flashed it on my test device . I have built that plugin for android platform by using gecko sdk and firefox OS source . I have pushed my .so file in FFOS phone in system lib as well as system b2g the folders where I can see other .so files . . Is that the correct approach What else do I need to do to make it work . Currently my application is unable to load that plugin I checked using . run-gdb . Any pointers would be helpful . I have gone through the documentation on mozilla website and also googled it alot but couldn t find the solution . Thanks . Comment : A bit more search revealed to me that NPAPI is not supported on firefox OS : . My bad . But I do see a lot of source and compiled files for npapi within firefox OS source code tree under gecko dom plugins base and objdir-gecko dom plugins base . What are these about . .. . Answer : Mozilla use single gecko engine to support all platform browsers . Those plugins are only used by desktop browsers . Comment : On Firefox for Android plugin code is used to support Flash as well .", "Question : I AM Using Flex Builder 4 for flex Web application In which I create one flex Web Application . Now i am trying to run my application on web browser at that time builder shows some error like Cannot run program C : Program Files Mozilla Firefox firefox.exe : CreateProcess error 5 Access is denied . This error shows me from last one day . So will anyone can give me answer that why i got such error . In preferences Default System Web browser is selected . which is Mozilla Firefox . Thanks Comment : Can you manually launch firefox and is it working Comment : Yes manually it is working Comment : try in admin mode .. . Answer : If you can t run as an admin try checking on the security settings to ensure all users have full access to the Firefox directory files . This almost has to be security related unless Firefox is actually a location different from where it s looking .", "Question : Are there any add-ons to test an HTML page to see what it will look like on a mobile device I m developing with PhoneGap but Eclipse emulator is too slow to refresh it all the time so I want to have a browser-extension that make screen-resolution like on mobile . Comment : Are you looking to simply emulate the screen-size or do you need to emulate device functionality as well If screen-size is your only concern you can use any Webkit-based browser and resize the viewport as needed . .. . Answer : If you care only about the screen-size Firefox 15 currently Beta http : www.mozilla.org firefox beta release coming up in two weeks has Responsive Design View https : hacks.mozilla.org 2012 07 debugger-responsive-design-view-and-more-in-firefox-aurora-15 in the Web Developer menu that allows you to adjust screen-size . For example you can select 360x640 nHD resolution and have a look at your page . However mobile browsers do custom adjustments to web pages and these adjustments depend on the browser used . For example Firefox Mobile does something called Font Inflation http : jwir3.wordpress.com 2012 07 30 font-inflation-fennec-and-you . You cannot reproduce it in a desktop browser you have to actually run Firefox Mobile for that . The problem : mobile browsers will only run on mobiles even Mozilla stopped supplying Firefox Mobile for the desktop after they switched to the native Android UI . Edit : Starting with Firefox 33 there is a Firefox OS simulator built into Firefox thanks to Tomek https : stackoverflow.com users 1597982 tomek for pointing me into this direction . To start it open WebIDE https : developer.mozilla.org en-US docs Tools WebIDE Opening WebIDE then click Select Runtime and choose Firefox OS 1.3 . This will start the simulator all you need to do then is clicking the Firefox icon for me it s a blue one not the usual orange . There you are you can test any website in a real mobile-browser right on your desktop . Comment : +1 for mentioning Font Inflation in Firefox Mobile . I was not aware of that . Comment : There s a very handy short demo here : youtube.com watch v t07cLJhJkjQ https : www.youtube.com watch v t07cLJhJkjQ" ] }
[]
cross-platform
UNK_RELATION
selenium-grid@selenium@54
selenium-grid -- selenium-grid is a component of the @placeholder project that helps running your tests in parallel across multiple machines .
{ "confidence": [ 65.92857360839844, 61.042213439941406, 56.548057556152344, 53.09462356567383, 52.80474090576172, 52.760009765625, 52.658180236816406, 52.022735595703125, 51.71000671386719, 51.516395568847656, 51.34400939941406, 51.109580993652344, 50.84947967529297, 50.73854064941406, 50.55784606933594, 50.47596740722656, 49.781185150146484, 49.720550537109375, 49.5286865234375, 48.947967529296875, 48.68303680419922, 48.393096923828125, 48.21569061279297, 48.169776916503906, 47.91858673095703, 47.66997528076172, 47.57025146484375, 47.57025146484375, 47.067073822021484, 47.009559631347656, 46.98950958251953, 46.78986358642578, 46.718849182128906, 46.507469177246094, 46.507469177246094, 46.475975036621094, 46.340396881103516, 46.311065673828125, 46.311065673828125, 46.311065673828125, 46.28990173339844, 46.28990173339844, 45.861610412597656, 45.438385009765625, 45.19369125366211, 45.10319519042969, 45.07898712158203, 45.077537536621094, 44.70777893066406, 44.68238067626953, 44.68238067626953, 44.596946716308594, 44.423866271972656, 44.35735321044922, 44.28340148925781, 43.75818634033203, 43.75818634033203, 43.75818634033203, 43.75818634033203, 43.28084182739258, 43.254188537597656, 42.99844741821289, 42.99844741821289, 42.99844741821289, 42.99844741821289, 42.863006591796875, 42.7718505859375, 42.054443359375, 41.65907287597656, 41.65215301513672, 41.65215301513672, 40.947425842285156, 40.770591735839844, 40.770591735839844, 40.770591735839844, 40.770591735839844, 40.770591735839844, 40.770591735839844, 40.770591735839844, 40.770591735839844, 40.649200439453125, 40.59943389892578, 40.56243896484375, 40.24999237060547, 40.243160247802734, 40.06936264038086, 39.91698455810547, 39.91698455810547, 39.91698455810547, 39.89862823486328, 39.45923614501953, 39.085777282714844, 38.86878967285156, 38.860069274902344, 38.860069274902344, 38.860069274902344, 38.860069274902344, 38.860069274902344, 38.860069274902344, 38.860069274902344 ], "content": [ "These Tests run parallel on Selenium Grid .", "Implemented Selenium Grid but facing issues while trying to run tests across multiple machines in parallel .", "I m using Selenium grid to run multiple instances of my test in parallel .", "We are running Selenium bdd scenarios over selenium Grid .", "I decided to use selenium-plugin selenium-grid to dispatch tests among remote machines nodes .", "We re converting our Selenium tests to use Selenium-Grid .", "Has anyone found a way to run Selenium RC Selenium Grid tests written in C in parallel", "Per this site : - .. . .. . Of course to really take advantage of the Selenium Grid you need to run your tests in parallel .", "I leverage that ability to send tests to Selenium Grid in parallel the Grid manages the flow from that point on .", "There is a project aiming at providing Sikuli capabilities on Selenium Grid .", "Or do you mean Selenium-Grid http : www.seleniumhq.org docs 07 selenium grid.jsp allowing you to run multiple tests on multiple machines", "Selenium Grid 2 supports Selenium 2 and is backward compatible with Selenium 1", "Setup : .. . .. . Selenium Webdriver using .Net for coding and Selenium Grid for distributing the tests .", "Grid should at least kill your selenium issue .", "or even using a local Selenium-Grid", "Recently I decided to go with Selenium Grid 2 to distribute tests across machines for performance reasons .", "By using Selenium Grid in combination with .NET s task Parallel library and the DynamicObject class you can run the same test on multiple Selenium Grid Nodes multiple browsers at the same time .", "I manage a Selenium Grid .", "Selenium Grid and maven are really not much different than Selenium and maven .", "Also I have the test classes setup as in this post http : stackoverflow.com questions 27497875 selenium-grid-running-tests-in-parallel .", "Nothing else is running apart from OS and selenium-grid node .", "Please specify what the operating systems are of the selenium-grid and node machines .", "This works perfectly for me for selenium-grid in parallel and in normal way .", "You should know that Selenium Grid framework is only for Selenium and nothing else .", "https : github.com sterodium selenium-grid-extensions .. . .. . It works by adding extensions both on Selenium Grid hub and nodes .", "Grid is basically a drop-in replacement for selenium-rc .", "I am new to selenium-grid .", "I am using Selenium Grid .", "I ve got 2 win2k3 server boxes setup one is running selenium-grid hub along with 2 selenium-rc s .", "From the README : .. . .. . This project adds video recording capability to a Selenium Grid .", "I have a suite of tests that I want to execute in a dockerized Selenium Grid .", "I am trying to setup selenium-grid to achieve parallel execution of my tests .", "I am using selenium-grid and I have 3 machines allocated for the grid .", "I am trying to run the selenium tests with selenium-grid 2 set up .", "Over Cucumber the Selenium tests have to start with Selenium Grid over a hub and nodes .", "Is it possible to know which node the selenium-grid hub assigned to your test", "Unfortunately NUnit can not run tests in parallel so you have to use another runner to archive all advantages of parallel testing with Selenium Grid .", "However this seems to completely defeat the purpose of the Selenium Grid .", "I am starting test on selenium-grid 2 .", "We re confused on meaning of MaxSession and MaxInstances of Selenium Grid .", "With Webdriver I would know how to change but not in Selenium Grid I am new to Selenium Grid .", "I ve tried adding that to both the Hub s root selenium-grid folder and the RC s root selenium-grid folder .", ".. . .. . Step 5 - Watch the grid doing the magic of running 5 tests in parallel .", "I am getting this error when running the below selenium scripts using TestNG with Selenium Grid .", "If you were to include Sikuli into a grid configuration that means you or somebody has to build a Sikuli Grid for you to use and if you need Sikuli + Selenium then that means somebody has to modify the two grid software into one something you can call a Selenium Sikuli Grid or Sikuli Selenium Grid etc .", "This question already has an answer here : .. . .. . Specifying Windows Versions or Specific Machines in Selenium Grid questions 20711021 specifying-windows-versions-or-specific-machines-in-selenium-grid 1 answer .. . .. . I have multiple nodes and few of them are same OS and Browser combinations I had it like that some reason .", "Do you need the internet-explorer driver for selenium-grid tests", "https : github.com angular protractor issues 111 and Running Selenium tests in parallel http : sauceio.com index.php tag parallel-testing .", "I am currently running my tests with RemoteWebDriver with Selenium Grid 2 through TestNG suites .", "The Selenium Grid Hub would then manage the flow of the jobs .", "I have selenium-grid setup in my system .", "Is it possible to use jBrowserDriver https : github.com MachinePublishers jBrowserDriver together with Selenium grid to distribute headless selenium tests to registered nodes", "I have selenium plugin installed in jenkins comes with selenium-grid .I am triggering my selenium scripts to run on nodes with desired capabilities .", "That s exactly what Selenium Grid http : code.google.com p selenium wiki Grid2 is for", "I am using Selenium Grid and would like to run the tests on parallel nodes however the concern is that as the tests exercise an underlying REST API there could be conflicts .", "EDIT : The above given site was for Selenium 1.x version and not for Grid 2.0 .", "I couldn t find any documentation about selenium-grid + maven .", "This seems to be the best answer until Protractor adds direct support for Selenium Grid .", "See issue 111 How to pass more configuration to selenium-grid", "Have any of you successfully implemented parallel testing using C NUnit connected to a Selenium Grid setup", "If you are writing your Selenium tests in Java you can leverage TestNG parallel runs or Parallel JUnit .", "If you want to use selenium-grid locally start local hub first using selenium-server-standalone.jar .", "I was asking myself if Selenium has any possibilities to secure the communication in Selenium Grid for example .", "I have read that Selenium Grid support was planned for Selenium 2.0 at the year end - 2010 .", "One of the talks at the Selenium Conference http : www.seleniumconf.com this weekend talked about Selenium Grid 2 .", "here is a good tutorial on configuring testng Ant and selenium-grid : .. . .. . http : technologyandleadership.com six-steps-for-complete-test-automation-with-selenium-grid", "Selenium Grid means communication between hub and node", "What am I doing .. . .. . I am trying to run parallel java selenium-webdriver test with Selenium-Grid which was integrated in selenium-server-standalone-2.47.1.jar .", "I have downloaded Selenium Grid plugin for Jenkins and I have two nodes running : .. . .. . java -jar selenium-server-standalone-2.41.0.jar -role node -hub http : jenkins.bla.bla.com : 4444 grid register .", "So I thought of using Selenium Grid to run the scripts in parallel to achieve lesser time .", "But While using selenium-grid with parallel mode it does not work as it uses same object .", "http : blog.dmbcllc.com running-selenium-in-parallel-with-any-net-unit-testing-tool", "And also you have to mention the PLATFORM while connecting to Selenium Grid .", "I am also using Selenium grid if that changes anything .", "For example in my selenium-grid i have 40 firefox 40 chromes .", "I was able to do this by leveraging Jenkins with Selenium Grid.. . Why Jenkins", "How can we start a selenium-grid hub on a remote machine programmatically", "Can anybody tell me how to configure selenium-grid plugin in jenkins", "I m using Selenium Grid with WebDriver Java maven and maven-surefire-plugin .", "My selenium-grid is active on http : localhost : 5555 console .", "Currently I am running a Selenium Server grid with 4 Firefox nodes the following is how I start the Grid and its nodes .", "I m trying to put together my first Data Driven Test Framework that runs tests through Selenium Grid WebDriver on multiple browsers .", "As you are going to use Selenium Grid you will want to use the possibility to run the tests in parallel so remember to configure this feature for your JUnit tests available since v . 4.7 .", "http : stackoverflow.com questions 7951371 security-in-selenium-2 .. . .. . Gridlastic https : gridlastic.com selenium-grid-demo.html is a good tool that can help you setup firewall with Selenium Grid .", "http : autumnator.wordpress.com 2011 12 22 autoit-sikuli-and-other-tools-with-selenium-grid .. . .. . On a side note not sure how your X.11 issue came into play it would be best you work on the framework using local network of machines with Selenium Grid before you convert to an Amazon EC2 deployment .", "You can start the selenium-grid as follows .. . .. . You can start the selenium node as follows .. . .. . Instead of the string hostname ip give the hostname or ip of the machine where hub is running .", "I want to run the same TestNG suite multiple times using Selenium Grid for load-testing .", "I am trying to perform automation on multiple devices using Selenium Grid and Appium .", "I have written few test cases in Selenium WebDriver using Java and execute them on grid hub and multiple nodes .", "The aim is to have Selenium running across several machines so it would be great to be able to set this programatically .", "http : stackoverflow.com questions 29427771 can-selenium-grid-and-node-urls-be-used-with-security and Security in Selenium 2", "Selenium is not executing the tests it is testng which does that management", "If you prefer to write your Selenium tests in Ruby you might want to look into DeepTest or spawn multiple processes .", "This tutorial shows how you could implement a custom Prioritizer for Selenium Grid .", "http : selenium.polteq.com en use-custom-prioritizer-for-selenium-grid-hub", "Refer : Can selenium Grid and Node URLs be used with security", "Also Refer : Can Selenium Grid be configured to require authentication", "http : stackoverflow.com questions 14593670 can-selenium-grid-be-configured-to-require-authentication", "Just remotely using IE via selenium-grid seems to be a problem .", "Unfortunately there seems to be very little documentation on using Arquillian Drone with Selenium Grid ." ] }
{ "confidence": [ 72.41290283203125, 68.74513244628906, 68.61279296875, 67.5001449584961, 67.08509826660156, 66.93167877197266, 66.70215606689453, 65.22723388671875, 65.10861206054688, 64.97914123535156, 64.97914123535156, 64.72906494140625, 64.39298248291016, 64.35944366455078, 63.507774353027344, 62.78681945800781, 61.67814636230469, 61.35367202758789, 60.784053802490234, 59.79920959472656 ], "content": [ "Question : I ve got several unit tests written with NUnit that are calling selenium commands . I ve got 2 win2k3 server boxes setup one is running selenium-grid hub along with 2 selenium-rc s . The other box is running 5 selenium-rc s . All of them are registered with the hub as running Firefox on Windows to keep it simple . In my unit test setup method I ve got it connected to the hub s hostname at port 4444 . When running the tests they only run sequentially as expected . I ve done a lot of reading on NUnit s roadmap and how they are shooting for parallel testing abilities . I ve seen lots of pointers to using PNUnit in the meantime . However this seems to completely defeat the purpose of the Selenium Grid . Have any of you successfully implemented parallel testing using C NUnit connected to a Selenium Grid setup If so please elaborate . I m at a complete loss at how this will can work using NUnit as it exists now I m using version 2.9.3 .. . Answer : By using Selenium Grid in combination with .NET s task Parallel library and the DynamicObject class you can run the same test on multiple Selenium Grid Nodes multiple browsers at the same time . http : blog.dmbcllc.com running-selenium-in-parallel-with-any-net-unit-testing-tool", "Question : Currently I am working on the automation testing framework which combines with both Selenium Grid and Sikuli API . I already implemented a library which includes functionality of Selenium and Sikuli and it works well when I set up my hub and node on the same machine . However this is just the same as running Selenium RC on the machine . So in order to achieve parallel testing my next step is to launch the nodes from other machines and register them to the hub machine . The idea environment is Amazon EC2 instance . Hub : Linux box .. . .. . Nodes : win server 2008 .. . .. . It works fine if I just ran the tests using the library only contains Selenium functions . However I got error message that .. . .. . NO X11 DISPLAY variable was set but this program performed an operation which requires it . Should I export DISPLAY variable to the node s ip-address And do I need to set the node machine as an X server What if there are many instances registered to the hub machines Sorry for the vague question.. . but any idea that how to implement this framework is appreciated . I am using selenium-grid since there are many action performing graph verification . It would be very efficient if I can do it parallel testings . Thanks a lot for any help and advice . Comment : You should know that Selenium Grid framework is only for Selenium and nothing else . If you were to include Sikuli into a grid configuration that means you or somebody has to build a Sikuli Grid for you to use and if you need Sikuli + Selenium then that means somebody has to modify the two grid software into one something you can call a Selenium Sikuli Grid or Sikuli Selenium Grid etc . So the short answer is no there is no solution for you other than for somebody to build a Sikuli or Sikuli + Selenium grid framework for you to use . Comment : Out of curiosity did you get it working If yes can your please elaborate on how .. . Answer : There is a project aiming at providing Sikuli capabilities on Selenium Grid . https : github.com sterodium selenium-grid-extensions .. . .. . It works by adding extensions both on Selenium Grid hub and nodes . Comment : thanks for posting this I came acrossed it earlier but forgot the URL to it .", "Question : I ve got several unit tests written with NUnit that are calling selenium commands . I ve got 2 win2k3 server boxes setup one is running selenium-grid hub along with 2 selenium-rc s . The other box is running 5 selenium-rc s . All of them are registered with the hub as running Firefox on Windows to keep it simple . In my unit test setup method I ve got it connected to the hub s hostname at port 4444 . When running the tests they only run sequentially as expected . I ve done a lot of reading on NUnit s roadmap and how they are shooting for parallel testing abilities . I ve seen lots of pointers to using PNUnit in the meantime . However this seems to completely defeat the purpose of the Selenium Grid . Have any of you successfully implemented parallel testing using C NUnit connected to a Selenium Grid setup If so please elaborate . I m at a complete loss at how this will can work using NUnit as it exists now I m using version 2.9.3 .. . Answer : Unfortunately NUnit can not run tests in parallel so you have to use another runner to archive all advantages of parallel testing with Selenium Grid . I using Gallio runner for my tests on c and have examples here : .. . .. . project on c with tests runned in parallel : http : code.google.com p design-of-selenium-tests-for-asp-net .. . .. . description : http : slmoloch.blogspot.com 2009 12 design-of-selenium-tests-for-aspnet 19.html .. . .. . Gallio test runner : http : www.gallio.org Comment : note : NUnit has since about version 2.5 had the PNUnit extension Parallel NUnit nunit.org index.php p pnunit r 2.5 http : www.nunit.org index.php p pnunit r 2.5", "Question : I m running a test : .. . .. . This runs the Firefox browser and in the http : localhost : 4444 grid console web-console view I can see that one Firefox browser is running . How can I use more than one browser on the node in parallel I m using the Grid2 wiki page found here https : code.google.com p selenium wiki Grid2 Comment : Do you have 5 tests in your test suite .. . Answer : You need to trigger 5 tests simultaneously - all pointing to the same hub to use all the browsers . On receiving the commands from different tests hub would pass those commands to RCs matching the capability . You can see more details in this page : http : selenium-grid.seleniumhq.org how it works.html . Per this site : - .. . .. . Of course to really take advantage of the Selenium Grid you need to run your tests in parallel . If you are writing your Selenium tests in Java you can leverage TestNG parallel runs or Parallel JUnit . If you prefer to write your Selenium tests in Ruby you might want to look into DeepTest or spawn multiple processes . Chances are that your favorite programming language and development platform already have a solution . EDIT : The above given site was for Selenium 1.x version and not for Grid 2.0 . However the underlying concept for running parallel tests remains the same .. . .. . EDIT2 : Steps and example programs are below . Please note that this is a very basic test ONLY to show you how Grid runs tests in parallel . Step1 - Start Grid Hub java -jar selenium-server-standalone.jar -role hub .. . .. . Step2 - Start RC nodes . The tests which we are using for example are webdriver tests . So we need to start webdriver nodes . This command would start a webdriver node which supports 5 firefox browsers 5 googlechrome and 1 IE browser . This is the default config for webdriver . Step 3- Create 5 separate programs similar to the one given below . This program is in JAVA . You need to change it to the language you need . Change class name to Program2 Program3 etc . As mentioned earlier this is not the best way to run tests in parallel . You need to use testNG or jUnit to trigger multiple tests at the same time . Since that is a different topic by itself am not going to explain it here . Step 4 - Run all 5 programs simultaneously . .. . .. . Step 5 - Watch the grid doing the magic of running 5 tests in parallel . : Comment : i still working with this . I always get errors and ff close when run it 2 times . If run it just once then works . Why How then run it 2 times or more . Can you give me example Thx Comment : OK I have updated my answer . Note that am not using WebDriverBackedSelenium object in example program . You can add that line to the code instead of using wd.get Comment : thx for such a big help Comment : i must tell you that now everything works like it must . WIth ws is much faster then with rc . Thx again Comment : Cool . Glad that I could help you .", "Question : Currently I am working on the automation testing framework which combines with both Selenium Grid and Sikuli API . I already implemented a library which includes functionality of Selenium and Sikuli and it works well when I set up my hub and node on the same machine . However this is just the same as running Selenium RC on the machine . So in order to achieve parallel testing my next step is to launch the nodes from other machines and register them to the hub machine . The idea environment is Amazon EC2 instance . Hub : Linux box .. . .. . Nodes : win server 2008 .. . .. . It works fine if I just ran the tests using the library only contains Selenium functions . However I got error message that .. . .. . NO X11 DISPLAY variable was set but this program performed an operation which requires it . Should I export DISPLAY variable to the node s ip-address And do I need to set the node machine as an X server What if there are many instances registered to the hub machines Sorry for the vague question.. . but any idea that how to implement this framework is appreciated . I am using selenium-grid since there are many action performing graph verification . It would be very efficient if I can do it parallel testings . Thanks a lot for any help and advice . Comment : You should know that Selenium Grid framework is only for Selenium and nothing else . If you were to include Sikuli into a grid configuration that means you or somebody has to build a Sikuli Grid for you to use and if you need Sikuli + Selenium then that means somebody has to modify the two grid software into one something you can call a Selenium Sikuli Grid or Sikuli Selenium Grid etc . So the short answer is no there is no solution for you other than for somebody to build a Sikuli or Sikuli + Selenium grid framework for you to use . Comment : Out of curiosity did you get it working If yes can your please elaborate on how .. . Answer : See my blog post about the topic of integrating tools like Sikuli and AutoIt with Selenium Grid . It provides a theoretical approach to implement said automation though to my knowledge no one has yet implemented a working solution to demonstrate . http : autumnator.wordpress.com 2011 12 22 autoit-sikuli-and-other-tools-with-selenium-grid .. . .. . On a side note not sure how your X.11 issue came into play it would be best you work on the framework using local network of machines with Selenium Grid before you convert to an Amazon EC2 deployment . It helps in the design and debug process as EC2 may present its own issues so you want to have the simplest basic Grid setup working first non-EC2 . Comment : Out of curiosity did you get it working If yes can your please elaborate on how Comment : Somewhat depending on what one considers working . The best status of how to get it working is described here although it s about AutoIt but you can correlate that to Sikuli : github.com daluu AutoItDriverServer issues 7 https : github.com daluu AutoItDriverServer issues 7 . Still not a ready-to-use solution one has to put in some work to it . Comment : @JustARandomGuy noticed the other recent answer from Dmitry that s the best option for now .", "Question : I am trying to setup selenium-grid to achieve parallel execution of my tests . First I ll explain the my current scenario . 1 . I have my fully functional test suite written in cucumber with watir-webdriver .. . 2 . I need to execute all my tests in multiple environments . 3 . I created a setup for selenium hub and node .. . 4 . I can run my tests on a single node through hub .. . .. . My goal is to run my tests on multiple vm s simultaneously . I missing a part where I need to configure my tests to run in parallel . there are some examples about grid setup in the web as I am using different framework I couldn t relate to my scenario . Thanks in advance .. . Answer : look at MBUnit as this can run tests in parallel This should help . It will only run tests in parallel in one assembly and will not coordinate across multiple assemblies .", "Question : I am trying to run the selenium tests with selenium-grid 2 set up . My tests are more dependent . I have to well-define my sequential run parallel run . Attaching my build.xml file for ref . Inside sequential node I have many parallel nodes with different targets . I am facing inconsistency issues in running this build.xml . Some times it picks up the targets of 2nd parallel node sometimes its not . It is not giving error also . I tried running ant command in verbose mode still not getting ant exceptions . Will be glad if someone helps in this regard . Thanks in advance .. . Anjana Comment : possible duplicate of Ant - continue the target execution even if one target completes for selenium automation http : stackoverflow.com questions 10117370 ant-continue-the-target-execution-even-if-one-target-completes-for-selenium-a .. . Answer : It s much better to use tesng or junit to manager parallel testing instead of doing it directly in Build.xml . here is a good tutorial on configuring testng Ant and selenium-grid : .. . .. . http : technologyandleadership.com six-steps-for-complete-test-automation-with-selenium-grid", "Question : null .. . Answer : I have built a new Selenium Webdriver framework in Python 2.7 using unittest module . Implemented Selenium Grid but facing issues while trying to run tests across multiple machines in parallel . Here is my problem statement : .. . .. . Please let me know how I can execute HTMLTestRunner object such that each machine executes its corresponding tests simultaneously . Any help would be greatly appreciated . Also if my question does not clear please let me know further information that might be needed .", "Question : I am trying to setup selenium-grid to achieve parallel execution of my tests . First I ll explain the my current scenario . 1 . I have my fully functional test suite written in cucumber with watir-webdriver .. . 2 . I need to execute all my tests in multiple environments . 3 . I created a setup for selenium hub and node .. . 4 . I can run my tests on a single node through hub .. . .. . My goal is to run my tests on multiple vm s simultaneously . I missing a part where I need to configure my tests to run in parallel . there are some examples about grid setup in the web as I am using different framework I couldn t relate to my scenario . Thanks in advance .. . Answer : I was able to do this by leveraging Jenkins with Selenium Grid.. . Why Jenkins a Jenkins is a build tool and is built to run parallel jobs by default . I leverage that ability to send tests to Selenium Grid in parallel the Grid manages the flow from that point on . b Jenkins is part of many development build processes . Dev s could make calls to your QA jenkins to kick off tests as they commit build . c Jenkins provides a nice UI to see pass failures of your tests as well as sending email-notifications of failures and d Jenkins has a great Cucumber reporting plugin . You could avoid Jenkins but you ll need to send your cucumber features in parallel to the Grid . If you just run cucumber it will farm jobs to the grid but they will run sequentially . You would need something to kick off each feature async . Below is my full set up . Jenkins is basically being used here to start multiple simultaneous cucumber jobs . the details are below : .. . .. . Grid Setup .. . .. . I had 10 VM s . I took VM1 as my primary . It was a windows-server box so I put the selenium-grid standalone on it and wrote a batch-file like so : .. . .. . Then used the windows-server task to auto run that batch-file in case of VM restart . On each of the other VM s I made them part of the grid by registering them with VM1 hub : .. . .. . Cucumber Set UP .. . .. . In Cucumber I set up a env.rb file in the features support folder . This allows me to specify command-line-arguments before the tests run and what happens when they stop . I added a begin statement that set the a value for using a browser as well as using the Grid.. . .. . .. . Browser Environment Config .. . .. . In the env.rb file I add : .. . .. . Grid Config .. . .. . Then I add : .. . .. . Now you could pass a argument like : cucumber feature login.feature BROWSER firefox ENV int and it would farm all the work to the Grid HUB - which should pass it to the Grid NODES it s connected to with the browser support i.e send the test for login.feature to a firefox compatible node - maybe not all your nodes have firefox if they all do then it will go to any one of them . At this point you get one job at a time going through . So how to run more then one You would have a script that kicks off all feature files or sans-Cucumber your tests through that same browser profile to use the Grid HUB . If you use a script it needs to make these calls asynchronously - so all the features tests are sent to the Grid at the same time and the Grid manages the jobs . How I did that was with.. . .. . .. . Jenkins .. . .. . Jenkins is used for builds deploys of code - but in my case I use it to trigger QA jobs . Jenkins is a Java JAR that you just run.. . i.e . java jenkins.jar It launches a local UI on some port and you can start adding jobs . From a high level .. . .. . I built Jenkins jobs and had a parent job that ran all jobs - sending them to the Grid . The Selenium Grid Hub would then manage the flow of the jobs . I wanted to be able to kick off individual feature tests individual feature tests by browser and all tests by browser . To do that I started with individual jobs for each feature by browser . Details .. . .. . In Jenkins I created A New Job and choose Free style software component and then filled out the description with my feature name browser name i.e . Login Tests via IE .. . .. . Down in the Build section of this Jenkins job I choose to use a BATCH Command . Since it s a windows box I picked Windows Batch command and input something like this : .. . .. . That stuff from --format on that s all making use of a Cucumber reports plugin for Jenkins . It makes these nice looking graph driven reports on the features tests that passed failed . You don t need it it s optional . If you build the Jenkins job it will execute that windows batch-file and it does the following : .. . .. . Starts the Job .. . Runs a cucumber command to use a specific browser IE in this case .. . Runs all the tests of that feature file i.e . login.feature could have 20 tests .. . All tests run through the grid which farms them off to nodes .. . .. . It s not yet running jobs in parallel though . Running Jobs in Parallel .. . .. . Now that Jenkins can kick off the tests by feature and browser via a Grid - we can now finally run jobs in parallel we just need more jobs . So create a few more jobs.. . like : Jenkins job for registration.feature and jenkins job for subscription.feature . Each will have it s own windows batch command like : .. . .. . Or .. . .. . That last one is a duplicate of the registration test just calling a different browser . Jenkins by default limits how many simultaneous jobs you can run. . I think it s 10 . You can change that in the Jenkins config . I changed mine to 40 . So now you can click on your first Jenkins job : Login Test via IE and click BUILD .. . .. . As it starts click BUILD on your second job : Registration Test via IE .. . .. . and the same for your other jobs.. . .. . .. . Jenkins will start each job in parallel farming them to the Grid HUB which sends the jobs to your appropriate nodes All in parallel . By default Jenkins limits the jobs to 5 or 10 parallel jobs . You can change that . I modified mine to be 25 to 40 depending on my needs . .. . .. . Jenkins will also update the UI with pass fail and has details of the failures in the logs of each job . You can see the history of the failures.. . and another Jenkins repo i.e . the dev repo can make rest calls to your repo to auto trigger these test as they build . Launching All Tests From One Job .. . .. . Rather then manually running your individual jobs you can build a parent job . In Jenkins the parent job would be a NEW Job that is the same type Free style software component . You go down to the very bottom and it should have a field called Build Other Projects In that field you can put each project for deploying : Login Registration etc . Now when you Build this parent job you ll see Jenkins starts all jobs Projects to kick off at the same time . Basically your entire set of tests could start with one click - all being sent to Selenium Grid which would then manage the flow . Group Tests .. . .. . In Jenkins I create tabs for my tests.. . IE Tests FF Tests Chrome Tests etc . In each tab I put the appropriate features . Then I create a new Parent job to kick off all jobs of a type like : All IE Tests All FF Tests etc . Conclusion .. . .. . You can probably avoid Cucumber if you like . You just need something to kick off the jobs in parallel-for me I used Jenkins to do that . You could use a script that runs async jobs kicking off your tests . Hopefully something in post is useful to your needs . I have this documented at my site along with some pictures of the Jenkins flow.. . .. . .. . URLs .. . .. . My tutorial on setting up Cucumber and Selenium Grid : http : sdet.us selenium-grid-with-watir-and-cucumber-browser-automation .. . .. . My tutorial on setting up Cucumber Reports with Jenkins : http : sdet.us jenkins-and-cucumber-reports", "Question : I ve got several unit tests written with NUnit that are calling selenium commands . I ve got 2 win2k3 server boxes setup one is running selenium-grid hub along with 2 selenium-rc s . The other box is running 5 selenium-rc s . All of them are registered with the hub as running Firefox on Windows to keep it simple . In my unit test setup method I ve got it connected to the hub s hostname at port 4444 . When running the tests they only run sequentially as expected . I ve done a lot of reading on NUnit s roadmap and how they are shooting for parallel testing abilities . I ve seen lots of pointers to using PNUnit in the meantime . However this seems to completely defeat the purpose of the Selenium Grid . Have any of you successfully implemented parallel testing using C NUnit connected to a Selenium Grid setup If so please elaborate . I m at a complete loss at how this will can work using NUnit as it exists now I m using version 2.9.3 .. . Answer : There s also PNUnit http : www.nunit.org index.php p pnunit r 2.5 worth taking a look at I haven t tried it yet for parallel testing .", "Question : I ve got several unit tests written with NUnit that are calling selenium commands . I ve got 2 win2k3 server boxes setup one is running selenium-grid hub along with 2 selenium-rc s . The other box is running 5 selenium-rc s . All of them are registered with the hub as running Firefox on Windows to keep it simple . In my unit test setup method I ve got it connected to the hub s hostname at port 4444 . When running the tests they only run sequentially as expected . I ve done a lot of reading on NUnit s roadmap and how they are shooting for parallel testing abilities . I ve seen lots of pointers to using PNUnit in the meantime . However this seems to completely defeat the purpose of the Selenium Grid . Have any of you successfully implemented parallel testing using C NUnit connected to a Selenium Grid setup If so please elaborate . I m at a complete loss at how this will can work using NUnit as it exists now I m using version 2.9.3 .. . Answer : NCrunch http : www.ncrunch.net is worth looking at - it has the option of distributed processing as part of a build and one of it s main features is parallel testing .", "Question : I m trying to record videos of my Selenium-Tests . These Tests run parallel on Selenium Grid . I wanted to open a VNC-Server for each firefox and then start recording . So one grid-node would open 5 vncservers and then a program like recordMyDesktop would record each one of them and store them in a different file . I found this : http : www.theautomatedtester.co.uk blog 2010 castro-selenium-video.html but not for Java and Grid.. . Thank you in advance .. . .. . Richard My environment is Firefox on Linux Comment : why don t you take screenshots that s a lot cheaper and as useful.. . .. . Answer : Available since April 2014 there is a java library you can use to record videos called selenium-video-node . From the README : .. . .. . This project adds video recording capability to a Selenium Grid . Videos are encoded into WebM VP8 format on-the-fly and made available at the end of the test .. . .. . https : github.com aimmac23 selenium-video-node", "Question : I can t find any information on how to set this up but it seems like a pretty basic concept so I m sure there s an answer out there . I know how to run protractor on different browsers by setting the browserName property of the capabilities object in the config . And that s working great . I can set it to chrome or firefox or whatever I need and it runs just as expected . But the only way to run a single test suite against multiple browsers as far as I know is to create separate config files each with a different browserName and then run each browser with its own config . This works but its really slow because tests are then running in sequence rather than concurrently . Is there any way to run it on multiple browsers in parallel Can it be done on SauceLabs or even using a local Selenium-Grid We are just trying to streamline our testing process and this would be a huge help . Any suggestions or info would be greatly appreciated . Thanks in advance . Comment : Do u mean run parallel test .. . Answer : Update Feb 2014 - This answer is no longer valid . Use Paolo Moretti s answer below . .. . .. . .. . .. . There may be a better way to do this but currently I am just executing these as concurrent Grunt tasks . 1 Add the grunt concurrent plugin .. . .. . 2 Add a task for each browser under grunt.initConfig . We can add the browser as an arg to re-use our configuration file . 3 Register these as tasks .. . .. . 4 Create your concurrent task under grunt.initConfig .. . .. . 5 Add the grunt task for concurrent .. . .. . And executing that should give you concurrent protractor tests . Comment : This seems to be the best answer until Protractor adds direct support for Selenium Grid . See issue 111 How to pass more configuration to selenium-grid https : github.com angular protractor issues 111 and Running Selenium tests in parallel http : sauceio.com index.php tag parallel-testing .", "Question : I am trying to run the selenium tests with selenium-grid 2 set up . My tests are more dependent . I have to well-define my sequential run parallel run . Attaching my build.xml file for ref . Inside sequential node I have many parallel nodes with different targets . I am facing inconsistency issues in running this build.xml . Some times it picks up the targets of 2nd parallel node sometimes its not . It is not giving error also . I tried running ant command in verbose mode still not getting ant exceptions . Will be glad if someone helps in this regard . Thanks in advance .. . Anjana Comment : possible duplicate of Ant - continue the target execution even if one target completes for selenium automation http : stackoverflow.com questions 10117370 ant-continue-the-target-execution-even-if-one-target-completes-for-selenium-a .. . Answer : Try ISFW http : seleniumhq.org about platforms.jsp testing-frameworks where you can run test parallel with without use of grid . In Your case following config file can fulfill your requirement :", "Question : I have more than one test tags in my testng.xml file that I am running using maven . I have set the parallel attribute at the suite level to methods and the thread-count as 5 . The problem I am facing is that the tests are executed sequentially and only the methods inside the test cases are executed in parallel . To be more clear though there are unused threads Selenium nodes in the grid in my case available the subsequent tests waits till all the methods in the previous test is executed . Here is the testng.xml that i have used .. . .. . As I have more than 10 nodes available in my selenium-grid this behavior increases the execution-time considerably and defeats the purpose of having a grid architecture . Please let me know if there s a way using which I can execute the test methods across the suite in parallel . I am sure that I am missing something silly but could you please help me point that .. . Answer : Type parallel tests in your TestNG xml file Comment : i.e . replace parallel methods by parallel tests", "Question : Has anyone found a way to run Selenium RC Selenium Grid tests written in C in parallel .. . .. . I ve currently got a sizable test suite written using Selenium RC s C driver . Running the entire test suite takes a little over an hour to complete . I normally don t have to run the entire suite so it hasn t been a concern up to now but it s something that I d like to be able to do more regularly ie as part of an automated build .. . .. . I ve been spending some time recently poking around with the Selenium Grid project whose purpose essentially is to allow those tests to run in parallel . Unfortunately it seems that the TestDriven.net plugin that I m using runs the tests serially ie one after another . I m assuming that NUnit would execute the tests in a similar fashion although I haven t actually tested this out . I ve noticed that the NUnit 2.5 betas are starting to talk about running tests in parallel with pNUnit but I haven t really familiarized myself enough with the project to know for sure whether this would work . Another option I m considering is separating my test suite into different libraries which would let me run a test from each library concurrently but I d like to avoid that if possible since I m not convinced this is a valid reason for splitting up the test suite . .. . Answer : I am working on this very thing and have found Gallio http : www.gallio.org latest can drive mbUnit tests in parallel . You can drive them against a single Selenium Grid http : selenium-grid.seleniumhq.org hub which can have several remote control servers listening . I m using the latest nightly from Gallio http : ccnet.gallio.org Distributables to get the ParallelizableAttribute http : www.gallio.org api html T 5FMbUnit 5FFramework 5FParallelizableAttribute.html and DegreeOfParallelismAttribute http : www.gallio.org api html T 5FMbUnit 5FFramework 5FDegreeOfParallelismAttribute.html . Something things I ve noticed is I cannot rely on TestSet and TestTeardown be isolated the parallel tests . You ll need the test to look something like this : .. . .. . Using the SetUp attribute to start the Selenium session was causing the tests to not get the remote session from s.Start . Comment : Thanks for your response . I ve moved off of this project for the time being but when I come back to it I ll give your solution a shot", "Question : This question already has an answer here : .. . .. . Specifying Windows Versions or Specific Machines in Selenium Grid questions 20711021 specifying-windows-versions-or-specific-machines-in-selenium-grid 1 answer .. . .. . I have multiple nodes and few of them are same OS and Browser combinations I had it like that some reason . Now How do I differentiate on which node to run in my code .. . .. . remote driver above will run Chrome browser machine .. . .. . remote driver above will run Firefox machine .. . .. . what if I have another machine with same browser and I want my another test run on that machine . How do I differentiate .. . Answer : The selenium-grid determines for you which node is available and runs it on that node you don t do this yourself . If your grid has two nodes available both having a firefox browsers attached then either one of them can be used . This is the whole point of the grid . Comment : can I explicitly ask Grid to which one to choose when having same browser combinations by desired capabilities or something Comment : This plugin provides a way to explicitly choose a node via labels I do not know how this works in pure selenium but it must be possible . wiki.jenkins-ci.org display JENKINS Selenium+Plugin https : wiki.jenkins-ci.org display JENKINS Selenium+Plugin Comment : Even I know that from kawaguchi s presentation but I also couldn t figure out how to differentiate by label Comment : I m not sure what you re trying to say here . Comment : @motobrockers I mean to say that even I came across the selenium plugin but could not understand the way to explicitly choose a node via labels .", "Question : null .. . Answer : Is there a way to run a single test case multiple times automatically in Gallio At this point in time I have everything set up and parallel tests running correctly . The problems is I want to run the same test in parallel with itself in theory all I need to do since the test is already set up to run in parallel is get the test to run multiple times . I am using Selenium Grid with a node per test case and Gallio to run my C Selenium webdriver test cases .", "Question : I am executing my test cases using Selenium + TestNG . My test cases are spread across multiple classes . I want to use same copy of webDriver with every class . I dont want to login every time and then do other operations so option of invoking separate browser each class is gone . To solve this problem right now I am using inheritance with static webdriver object . But While using selenium-grid with parallel mode it does not work as it uses same object . Can you please show me a way in which I can share the object with multiple class OR To create a different instance of static on each test its like I am running separate Java program for each test . Comment : Unclear . Do you want to have a single instance of browser or not if then what do you want to do in grid You use grid to run multiple isntances on multiple nodes Comment : You are not using TestNg properly then . Just use testng.xml to run tests in parallel and there is no need to share the same object or for that matter inherit the classes . .. . Answer : Here is how I have implemented the solution . I have an object myObj which has webDriver object inside it and few more things . I have created static array of static object myObj . Its like this .. . .. . some part of class which has WebDriver implemented in it . WebDriver is not static btw . Now when I want to use this in my testng class I do it like this . and Here is my testng.xml looks like . This works perfectly for me for selenium-grid in parallel and in normal way .", "Question : null .. . Answer : I use Cucumber and Selenium 2 to automate tests . Also I use Maven as build tool to start the tests . Now I want to run the tests in parallel . What is the best way to do this in my configuration Furthermore I want to start the tests via Maven . Over Cucumber the Selenium tests have to start with Selenium Grid over a hub and nodes . Is this possible with the cucumber-jvm-parallel-plugin https : github.com temyers cucumber-jvm-parallel-plugin explained in this example http : automationrhapsody.com running-cucumber-tests-in-parallel And how is it possible to generate at the end only one report with all test results of all parallel runs Maybe with this https : github.com Comcast zucchini blob develop README.md plugin THX Martin" ] }
[ "yes-answer-long", "yes-answer-short" ]
selenium
UNK_RELATION
lua-4.0@scripting-language@58
lua-4 .0 -- lua is a powerful fast lightweight embeddable @placeholder .
{ "confidence": [ 38.29821014404297, 38.29821014404297, 38.13004684448242, 35.340728759765625, 33.411067962646484, 32.506874084472656, 32.490814208984375, 31.483516693115234, 30.31134033203125, 30.306583404541016, 30.306583404541016, 30.306583404541016, 30.306583404541016, 30.306583404541016, 29.561809539794922, 29.142711639404297, 27.34280776977539, 27.34280776977539, 27.34280776977539, 27.34280776977539, 24.39774513244629, 24.39774513244629, 24.39774513244629, 23.49728775024414, 23.49728775024414, 22.583850860595703, 21.291553497314453, 19.71054458618164, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 13.259451866149902, 10.314388275146484, 10.314388275146484, 10.314388275146484, 10.314388275146484, 10.314388275146484, 10.314388275146484, 10.314388275146484 ], "content": [ "I ve written a small program in Lua 4 .", "I need this translated into Lua 4 code .", "You can use 0 as an index in Lua tables .", "In Lua they start with 1 .", "The way tags are described in Lua 4.0 sounds like the precursor to what we know today as metatables in Lua 5+ .", "Out of curiosity why are you using Lua 4.0", "Just out of curiosity why are you stuck with lua 4", "A tag method is a programmer-defined function that is called at specific key points during the execution of a Lua program allowing the programmer to change the standard Lua behavior at these points .", "And looking at section 4.8 tag methods we understand that those unique ids are just used for comfortably associating all values of the same Lua type or for table s and userdata s of the same semantic user-type with special behavior : .. . .. . Lua provides a powerful mechanism to extend its semantics called tag methods .", "It doesn t evaluate to true and it can t because there is no boolean type in Lua 4.0 .", "It seems the true and false keywords were not added until Lua 5 .", "Is there a reason you re reading that older manual instead of lua-5.1 manual", "Tag methods are the main mechanism for extending the semantics of Lua see Section 4.8 .", "Just don t blindly use those tables with the standard Lua library .", "I can however add lua functions .", "This happens due to Lua 4.0 scoping rules http : lua-users.org wiki LuaScoping : .. . .. . Function scopes have a special limitation in that outer scopes other than the global-scope may not be accessed .", "The following Lua 4.0 script fails due to some of the variables being in an outer scope .", "I was reading the Lua 4.0 manual and I came across this tag thing but I have no idea what it is referring to .", "As explained above values of type function can have two different tags depending on whether they are Lua functions or C functions .", "See also The evolution of Lua http : www.lua.org doc hopl.pdf especially sections 5.3 and 6.8 .", "I m stuck using the 4.0 version of lua which does not seem to support the os library .", "Preferably by using a .lua file and not a .c file since I don t have complete access to the code .", "then a .lua file cannot possibly replicate the os library you d need a C module .", "Every value has a tag depending on its type : .. . .. . All values of the types nil number string-function C-flavor function Lua flavor have a type-specific tag set on the C side .", "Try to keep the algorithm exactly the same while translating from JS to Lua and then only add +1 in every table access e.g . gride y+1 x+1 .", "If you can t get what you need using the Lua 4.0 standard libraries http : www.lua.org manual 4.0 manual.html 6 .", "As LHF mentions below there s a wealth of additional detail and history in The evolution of Lua http : www.lua.org doc hopl.pdf for example how the tag-methods evolved from the previous extension-mechanism of fallbacks which did not support different behavior for separate groups of values instead being global .", "In JS tables start with 0 .", "What are the different ways I can fix this", "I would like to avoid putting things in the global-scope completely if possible .", "Thanks .", "On which line does it give you the error", "The first error is on Line 18 .", "This is the first time I ve written this type of script .", "It might be illegal .", "Here s the error message : parameter : cannot access a variable in outer scope last token read : fEcc at line 18 in string", "This applies to any function but is most noticeable in the case of nested functions where you may want to access locals of the enclosing scope .", "In your code fEcc is defined in the scope of function flokalAdd so it can t be accessed from the inner norm function .", "You can fix this using upvalues : .. . .. . Upvalues were added to work around the function scope limitation .", "Prefixing an outer-scope variable reference with produces a copy of that variable as of the function s instantiation .", "Only the immediate scope containing the function and the global-scope may be accessed in this manner .", "Looking at the code it seems that copying by value is OK . Here is the fixed version .", "http : codepad.org XbLe7dow", "This bit of code is confusing me .", "Why is gogo evaluating as true", "Shouldn t it spawn an error instead", "That was released in 2000 and 5.x is more widely used .", "I m working on a mod for Homeworld 2 which was released in 2003 .", "Undefined global-variables are nil by default so indeed gogo true .", "They are both nil .", "Oops", "In the output it produces I have the program version number stored as a string as follows : .. . .. . How do I parse this string to check whether the recorded version number is equal to or less than the current program version number", "If the version strings only contain single-digit fields as in the example ordinary string-comparison works just fine : AppVersion recordedVersion .", "You can use this code : .. . .. . The relevant section of the manual is here http : www.lua.org manual 4.0 manual.html 6.2 .", "Then you can convert the three components of each version to numbers and compare them .", "http : www.lua.org manual 4.0 manual.html 3 .. . .. . That s the section where it mentions it but I still have no idea what the manual is talking about .", "Yeah scripting in an old game .", "TL DR : Tags are the precursor to modern-day meta-tables .", "Where now the event-handler-pairs are stored directly in the meta-table using normal table-manipulation as it is a normal table then we used those tags normal though unique numbers and special data-structures which restricted the events we could set and had a different interface .", "One of the disadvantages of tags was they could not be garbage-collected as they were normal numbers and thus their associated data could not either .", ".. . .. . Quoting the important parts of section 3 types and tags : .. . .. . Besides a type all values also have a tag .", ".. . Each of the types nil number and string has a different tag .", "All values of each of these types have the same pre-defined tag .", "Finally values of type userdata and table can have variable tags assigned by the programmer see Section 4.8 .", "The tag function returns the tag of a given value .", "User tags are created with the function newtag .", "The settag function is used to change the tag of a table see Section 6.1 .", "The tag of userdata values can only be set from C see Section 5.7 .", "Tags are mainly used to select tag methods when some events occur .", ".. . .. . So think of tags as unique ids .", "All values of the types table and userdata have tags too but those are set by the programmer for each value indepent from any other .", "tag returns the tag settag sets it for table and userdata newtag creates a new one .", "Each of these points is called an event .", ".. . The tag method called for any specific event is selected according to the tag of the values involved in the event see Section 3 .", "The function settagmethod changes the tag method associated with a given pair tag event .", "Its first parameter is the tag the second parameter is the event name a string see below and the third parameter is the new method a function or nil to restore the default behavior for the pair .", "The settagmethod function returns the previous tag method for that pair .", "A companion function gettagmethod receives a tag and an event name and returns the current method associated with the pair .", "Which just boils down to settagmethod and gettagmethod being used to manage a mapping from tag+event to handler and the runtime using that as an extension point .", "I have the following JS script that is known to work correctly and produces the correct value of 12 for the restrictCount value .", "However the table indices are confusing me .", "They are mixed frequently in this code and it s throwing me off .", "Here s my attempt which results in 11 instead of 12 : .. . .. . Can someone double check my code", "I can t find the mistake .", "Thanks", "This way you should easily get a correct translation .", "You can refactor from there if you like .", "Your second loop uses gnWide but the original uses gnHigh just for the record .", "You don t even need top add +1 .", "@lhf I used your advice and at least found the error I made .", "Is there a way to include this library into my project", "Or get another way to use the functionality contained within pertaining to-date time calculations", "When I run the following line .. . .. . I get an error stating : .. . .. . attempt to index global os a nil value", "@hjpotter92 : I m stuck with 4.0 because the application I m running is made in 4.0 and is not mine to upgrade .", "@ColonelThirtyTwo : I was afraid of that .", "As @Colonel Thirty Two http : stackoverflow.com users 646619 colonel-thirty-two said it s not possible to use the os library .", "So the time funciton is not available for me ." ] }
{ "confidence": [ 42.156005859375, 37.825782775878906, 36.421993255615234, 35.84983825683594, 32.70172882080078, 31.621124267578125 ], "content": [ "Question : null .. . Answer : I have the following JS script that is known to work correctly and produces the correct value of 12 for the restrictCount value . I need this translated into Lua 4 code . However the table indices are confusing me . In JS tables start with 0 . In Lua they start with 1 . They are mixed frequently in this code and it s throwing me off . Here s my attempt which results in 11 instead of 12 : .. . .. . Can someone double check my code I can t find the mistake . Thanks Comment : Try to keep the algorithm exactly the same while translating from JS to Lua and then only add +1 in every table access e.g . gride y+1 x+1 . This way you should easily get a correct translation . You can refactor from there if you like . Comment : Your second loop uses gnWide but the original uses gnHigh just for the record . Comment : You don t even need top add +1 . You can use 0 as an index in Lua tables . Just don t blindly use those tables with the standard Lua library . Comment : @lhf I used your advice and at least found the error I made . Thanks", "Question : I was reading the Lua 4.0 manual and I came across this tag thing but I have no idea what it is referring to . http : www.lua.org manual 4.0 manual.html 3 .. . .. . That s the section where it mentions it but I still have no idea what the manual is talking about . Comment : The way tags are described in Lua 4.0 sounds like the precursor to what we know today as metatables in Lua 5+ . Is there a reason you re reading that older manual instead of lua-5.1 manual Comment : Yeah scripting in an old game . .. . Answer : TL DR : Tags are the precursor to modern-day meta-tables . Where now the event-handler-pairs are stored directly in the meta-table using normal table-manipulation as it is a normal table then we used those tags normal though unique numbers and special data-structures which restricted the events we could set and had a different interface . One of the disadvantages of tags was they could not be garbage-collected as they were normal numbers and thus their associated data could not either . .. . .. . Quoting the important parts of section 3 types and tags : .. . .. . Besides a type all values also have a tag . .. . Each of the types nil number and string has a different tag . All values of each of these types have the same pre-defined tag . As explained above values of type function can have two different tags depending on whether they are Lua functions or C functions . Finally values of type userdata and table can have variable tags assigned by the programmer see Section 4.8 . The tag function returns the tag of a given value . User tags are created with the function newtag . The settag function is used to change the tag of a table see Section 6.1 . The tag of userdata values can only be set from C see Section 5.7 . Tags are mainly used to select tag methods when some events occur . Tag methods are the main mechanism for extending the semantics of Lua see Section 4.8 . .. . .. . So think of tags as unique ids . Every value has a tag depending on its type : .. . .. . All values of the types nil number string-function C-flavor function Lua flavor have a type-specific tag set on the C side . All values of the types table and userdata have tags too but those are set by the programmer for each value indepent from any other . tag returns the tag settag sets it for table and userdata newtag creates a new one . And looking at section 4.8 tag methods we understand that those unique ids are just used for comfortably associating all values of the same Lua type or for table s and userdata s of the same semantic user-type with special behavior : .. . .. . Lua provides a powerful mechanism to extend its semantics called tag methods . A tag method is a programmer-defined function that is called at specific key points during the execution of a Lua program allowing the programmer to change the standard Lua behavior at these points . Each of these points is called an event . .. . The tag method called for any specific event is selected according to the tag of the values involved in the event see Section 3 . The function settagmethod changes the tag method associated with a given pair tag event . Its first parameter is the tag the second parameter is the event name a string see below and the third parameter is the new method a function or nil to restore the default behavior for the pair . The settagmethod function returns the previous tag method for that pair . A companion function gettagmethod receives a tag and an event name and returns the current method associated with the pair . Which just boils down to settagmethod and gettagmethod being used to manage a mapping from tag+event to handler and the runtime using that as an extension point . As LHF mentions below there s a wealth of additional detail and history in The evolution of Lua http : www.lua.org doc hopl.pdf for example how the tag-methods evolved from the previous extension-mechanism of fallbacks which did not support different behavior for separate groups of values instead being global . Comment : See also The evolution of Lua http : www.lua.org doc hopl.pdf especially sections 5.3 and 6.8 .", "Question : I m stuck using the 4.0 version of lua which does not seem to support the os library . Is there a way to include this library into my project Or get another way to use the functionality contained within pertaining to-date time calculations Preferably by using a .lua file and not a .c file since I don t have complete access to the code . When I run the following line .. . .. . I get an error stating : .. . .. . attempt to index global os a nil value Comment : Just out of curiosity why are you stuck with lua 4 Comment : If you can t get what you need using the Lua 4.0 standard libraries http : www.lua.org manual 4.0 manual.html 6 . then a .lua file cannot possibly replicate the os library you d need a C module . Comment : @hjpotter92 : I m stuck with 4.0 because the application I m running is made in 4.0 and is not mine to upgrade . I can however add lua functions . Comment : @ColonelThirtyTwo : I was afraid of that . .. . Answer : As @Colonel Thirty Two http : stackoverflow.com users 646619 colonel-thirty-two said it s not possible to use the os library . So the time funciton is not available for me .", "Question : This bit of code is confusing me . Why is gogo evaluating as true Shouldn t it spawn an error instead Comment : Out of curiosity why are you using Lua 4.0 That was released in 2000 and 5.x is more widely used . Comment : I m working on a mod for Homeworld 2 which was released in 2003 . .. . Answer : It doesn t evaluate to true and it can t because there is no boolean type in Lua 4.0 . Undefined global-variables are nil by default so indeed gogo true . They are both nil . Comment : Oops It seems the true and false keywords were not added until Lua 5 .", "Question : I ve written a small program in Lua 4 . In the output it produces I have the program version number stored as a string as follows : .. . .. . How do I parse this string to check whether the recorded version number is equal to or less than the current program version number Comment : If the version strings only contain single-digit fields as in the example ordinary string-comparison works just fine : AppVersion recordedVersion . .. . Answer : You can use this code : .. . .. . The relevant section of the manual is here http : www.lua.org manual 4.0 manual.html 6.2 . Then you can convert the three components of each version to numbers and compare them .", "Question : The following Lua 4.0 script fails due to some of the variables being in an outer scope . What are the different ways I can fix this I would like to avoid putting things in the global-scope completely if possible . Thanks . Comment : On which line does it give you the error Comment : The first error is on Line 18 . This is the first time I ve written this type of script . It might be illegal . Here s the error message : parameter : cannot access a variable in outer scope last token read : fEcc at line 18 in string .. . Answer : This happens due to Lua 4.0 scoping rules http : lua-users.org wiki LuaScoping : .. . .. . Function scopes have a special limitation in that outer scopes other than the global-scope may not be accessed . This applies to any function but is most noticeable in the case of nested functions where you may want to access locals of the enclosing scope . In your code fEcc is defined in the scope of function flokalAdd so it can t be accessed from the inner norm function . You can fix this using upvalues : .. . .. . Upvalues were added to work around the function scope limitation . Prefixing an outer-scope variable reference with produces a copy of that variable as of the function s instantiation . Only the immediate scope containing the function and the global-scope may be accessed in this manner . Looking at the code it seems that copying by value is OK . Here is the fixed version . http : codepad.org XbLe7dow" ] }
[ "yes-answer-long", "yes-answer-short" ]
scripting-language
UNK_RELATION
sipml@javascript@90
sipml -- an open-source html5 sip session initiation protocol client entirely written in @placeholder for integration in social networks facebook twitter google + online games e-commerce sites . . .without an extension plugin or gateway .
{ "confidence": [ 38.597007751464844, 34.463531494140625, 33.77492904663086, 32.38531494140625, 31.905048370361328, 30.82329559326172, 30.697534561157227, 29.832305908203125, 29.443092346191406, 29.144699096679688, 28.35814666748047, 28.177913665771484, 28.147125244140625, 28.078998565673828, 27.79555892944336, 26.554014205932617, 26.284503936767578, 25.786273956298828, 25.778335571289062, 25.738113403320312, 25.419322967529297, 25.270709991455078, 25.11107635498047, 25.11107635498047, 24.72667694091797, 24.010929107666016, 23.941986083984375, 23.928756713867188, 23.73409652709961, 22.927658081054688, 22.555591583251953, 22.420063018798828, 22.30029296875, 21.55473518371582, 21.294904708862305, 21.28728485107422, 21.28728485107422, 21.286163330078125, 21.213645935058594, 21.184871673583984, 21.184871673583984, 21.11465835571289, 21.08905029296875, 20.531497955322266, 20.271587371826172, 20.17976188659668, 20.09664535522461, 20.042625427246094, 19.70827293395996, 19.521072387695312, 19.521072387695312, 19.521072387695312, 19.521072387695312, 19.521072387695312, 19.521072387695312, 19.47681999206543, 19.347362518310547, 19.265762329101562, 18.85860824584961, 18.61251449584961, 18.605060577392578, 18.541000366210938, 18.502792358398438, 18.451942443847656, 18.347644805908203, 17.95168685913086, 17.94097900390625, 17.892826080322266, 17.85751724243164, 17.6826114654541, 17.55307388305664, 17.55307388305664, 17.489818572998047, 17.42861557006836, 17.362281799316406, 17.23965835571289, 17.2098331451416, 17.2098331451416, 17.1690731048584, 17.1690731048584, 17.15423583984375, 17.089815139770508, 16.941261291503906, 16.941261291503906, 16.874256134033203, 16.772205352783203, 16.772205352783203, 16.51518440246582, 16.44042205810547, 16.188854217529297, 16.13797378540039, 16.099594116210938, 16.028018951416016, 16.028018951416016, 16.028018951416016, 16.028018951416016, 16.028018951416016, 16.028018951416016, 16.028018951416016, 16.028018951416016 ], "content": [ "If it work perfectly with sipml- sip try call sipml- Local s@context n- sipml .", "now i have only sipML5 to SIP server without any gateway", "Sipml is registered .", "sipml webrtc are experemental .", "But no matter what I try I am not able to connect to the server through a SipML client with and without RTCWeb Breaker enabled .", "sipML5 is a SIP client .", "I used : https : raw.githubusercontent.com DoubangoTelecom sipml5 master release SIPml-api.js", "If your SIP server can handle webrtc then there is no need for a gateway .", "Sipml is highly experemental .", "I am unable to register to FreeSwitch server unable to call to SIP client XLite by using SIPml5 SIP client .", "Here is the deal the SIP was just fine the client to .", "I am using sipml with asterisk 12 .", "raw.githubusercontent.com DoubangoTelecom sipml5 master release https : raw.githubusercontent.com DoubangoTelecom sipml5 master release SIPml-api.js", "Has anyone got a SipML client working with freeSWITCH or should I consider Asterisk", "When I try to register the SipML client to the FS server the client status changes to connecting and stays so for a minute or so after which it changes to disconnected .", "I built the source of webrtc2sip when i run it i got messages : .. . .. . Page with sipML5 connects without errors with websocket to my webrtc2sip gateway .", "I don t know anything about it just learning now sipML .", "I had a look into sipml source code and seems that transport implementation expects to receive a domain in realm variable but you directly set an IP address .", "case 2 : SIP client calling chrome .", "Please help me in registering to FreeSwitch server calling to SIP client using SIPml5 client .", "So as i understand i should make gateway to connect sipML5 with my SIP server and in my gateway i will be able to remove unnecessary lines from my invite", "Actually I want to create communication between webRTC and SIP client .", "SipML is experemental so you need be expert in asterisk to use it correctly .", "So for any case with sipml need expert-level debugging .", "Your server or WebRTC to SIP gateway should solve this automatically by forwarding on TCP or removing unnecessary lines if can be forwarded on UDP only .", "Yep noob in SIP .", "Also note that sipml in asterisk have experemental state so expected you have expert or guru skill in asterisk before using it .", "The peerConnection RTCPeerConnection https : developer.mozilla.org en-US docs Web API RTCPeerConnection object is actually created by this SIPML library http : sipml5.org source code available here https : code.google.com p sipml5 source checkout .", "or maybe there are other possibilities to make this invite smaller using only sipML or changing it by tSDP", "In this case your SIP server should be able to transform the SIP signaling if it have to forward on UDP .", "So when i don t have any access to SIP server and i m getting in response of invite Message too big i need to have a gateway right", "The apps can successfully register into the SIP server .", "I have installed and configure asterisk on my server everything is working fine but the problem is when user connected first time following message appears on sip debug : .. . .. . but on refreshing page sip peer is reachable .", "I want to setup a SIPML5 client who can call my server without any authentication .", "When I tried to connect Sip Servlets using ws : ws : 192.168.X.Y : 5082 .. . .. . And Sip Servlets Config looks like : .. . .. . I got an error : SIPml-api.js : 4 Mixed Content : The page at https : 192.168.X1.X2 : 8443 CallCenterBK CallCenterBK.jsp sip 1 was loaded over HTTPS but attempted to connect to the insecure WebSocket endpoint ws : 192.168.X.Y : 5082 .", "I have a sipml5 web client and I can successfully make a call to it .", "But when a caller hangs up the web client is not hanging the call .", "I gave a try making calls between chrome and a android SIP client CSipSimple and the problem remains the same .", "When I have changes my SIPML 5 Client to wss : wss : 192.168.X.Y : 5082 .. . .. . And my sip servlets config looks like : .. . .. . I got another error : WebSocket connection to wss : 192.168.X.Y : 5082 failed : Error in connection establishment : net : : ERR CONNECTION CLOSED .. . .. . And when I have set to sipml 5 client : wss : 192.168.X.Y : 5082 and config changed to : .. . .. . I got an error : WebSocket connection to wss : 192.168.1.3 : 5082 failed : Error in connection establishment : net : : ERR TIMED OUT .. . .. . What I did incorrectly", "But this only happens soon after i dial another SIP number account .", "How can i remove unnecesary data from SIP invite in sipML5", "How I can distinguish audioRTP audioRTCP videoRTP and videoRTCP data so that I can use these data to interect with other sip client .", "Some addition to this .. . .. . For configuring browser as sip client we need to enable encryption true .. . .. . If you browser client is inside a firewall you need to enable ICN Support for proper communication", "The new function looks like : .. . .. . Now I receive all incoming SIP messages in function CatchWebrtcSignaling msg where I can parse the message and get any SIP headers value .", "For example if you have the following entry for a sip user in sip.conf : .. . .. . Add one siptest2.com to the Display name and the Private Identity in the SipML5 interface .", "But After some google i found new link https : code.google.com p sipml5 wiki Downloads for SIPml-api.js and after replacing that JS File Calls are comming in browser even i am able to answer that calls Also in browser it says In call but in asterisk CLI it keep showing ringing and other end showing like remote ringing .", "Case 1 : Chrome calls SIP client .. . Result : No video shown on both transmit and receive side .. . .. . On the chrome JS console it says that : .. . .. . I have attached the JS console logs case1 web2SIPClient JSLogs.txt wireshark trace case1 web2SIPClient WStrace.pcap webrtc2sip gateway console logs case1 web2SIPClient gatewayLogs.txt sipml5 expert settings Expert settings.png and config.xml config.xml for this case .", "What extension are you calling to and what extension are you calling from", "Case2 : .. . .. . You re using RTCWeb-capable browser Chrome and trying to call a SIP client which may not be implementing some mandatory features like ICE SRTP .", "I have this chat system that s using SIP for voice transmission no phones only browser to browser in the same server .", "You should see more details on the SIP server-side of things if you have access to that .", "I m using sipml5 to connect to a sip phone service and one of the setting is the service websocket server URL .", "I cannot make calls to wss : the sip phone webserver does not accept websocket connections on the that port and it is not under my control .", "I also needed to get a SIP header s value for something similar in a project using SIPml5 .", "So I found and changed that debug function in SIPml5 library to receive all the incoming SIP messages regardless of the debug level .", "When I send SIP offer message to chrome removing two lines a group : BUNDLE audio video and a rtcp-mux then google-chrome send me answer message with different port numbers .", "But as suggested in this http : stackoverflow.com questions 20517496 unable-to-register-to-freeswitch-server-unable-to-call-sip-client-xlite-resp question I used it and now neither it is throwing any error nor it is responding .", "Unfortunately the configuration for that is located at the SIP Stack level so you need to edit your standalone configuration mss-sip-stack.properties and add", "I have tried both browser Google Chrome and Firefox with their latest versions .", "We have successfully implemented webRTC on asterisk 11 using sipml5 as client without putting any webrtc2sip in the middle .", "This application is the out of the box WebRTC application that ships with RestComm SIP Servlets .", "When I try to register my extension using sipml5 I get the following in my CLI .", "What I did is a bit of a hack but it works : all SIP signaling messages are logged to browser console if the debug level is set to info .", "From what i see in your console - 1st - the extension dose not exist in you context 2nd - set avpf yes in your sip user config 3rd - set encryption yes in your sip user config .. . .. . From your title what i get to know is that you have not generated certificates for that - .. . .. . here is an example for sip config for webphone phone : .. . .. . If you still have problem then share me your configurations hope you u have configured webrtc support", "Enable sip logs in asterisk debug file and check the details of SDP offer-answer .", "You can have a look at https : github.com RestComm sip-servlets tree master sip-servlets-examples websocket-b2bua as example of how to handle responses and requests .", "The problem is when I make video calls from chrome to any SIP client ekiga jitsi the call gets connected but I am unable to see videos on both the sides .", "Here is the asterisk logs : http : pastebin.com JZeDjyay .. . .. . For Incoming calls : When call come to browser And allow microphone then Call rejected and asterisk showing like Got SIP response 603 Failed to get local SDP in asterisk CLI .", "I try to call a 3CX extension from browser using sipml5 .", "I have setup my webrtc2sip gateway and registered to sip2sip.info as my domain .", "However on the server machine there is no indication that a client is trying to register", "It is not recommended to modify this on the client-side from JavaScript .", "streamB is the screencapture I get from my extension .", "Additional Information .. . .. . 1.Works perfectly if one client is xlite and other is sipml5 .. . .. . 2.ICE enabled in both sipml5 clients and asterisk .. . .. . 3.Both clients are in different tabs of chrome .. . .. . 4.my sip configuration .. . .. . 5.Here is my rtp log in asterisk", "The only part where I can get it from is SIP Invite message : .. . .. . My VOIP phone detects it from Call-Info header : .. . .. . Is there any way how to access Call-Info header using sipml5", "I have asterisk 11.9.0 installed and downloaded source of SIPml5 from http : code.google.com p sipml5 source checkout I copied sample code into web root directory and example loaded successfully and also able to register 2 extensions .", "The scenario is that I want my website to call my office without dialing any number or anything .", "Now my problem is that I can not find the way to use SIPML5 without giving it authentication info .", "Use .. . .. . And use random username at your client-side .. . .. . But note no authentification is not something you really need to do becuase of spammers and crackers .", "You have generate on your page temporary account and put thoose account into asterisk via realtime and sipml5 client no idea how", "Following is my HTML5 code : .. . .. . Following is my Chrome console output : .. . .. . I followed this developer guide http : sipml5.org docgen index.html svn 200 .", "Also I m actually using Google App engine servers java .", "In this case yo ushould take a look to sipML5 doc and how to regsiter callback JS function to process SIP responses .", "I studied both but how i get response from SIP server in My Java Class Method .", "You need to install webrtc2sip http : webrtc2sip.org in order to work with web client .", "I use Firefox 38.0.1 to make calls from an extension to the other and till last night everything worked just fine .", "Now today when I start to call an extension and want to answer that call firefox suddenly crashes .", "UPDATE : .. . .. . SIPML5 Client : .. . .. . To make a call : .. . .. . To answere a call : .. . .. . 405 Method Not Allowed .. . .. . Some interpretation of this any chance that everthing is fine but the audio TAG is the problem in the mobile client", "Try without virtualization .", "My sip.conf file looks as follows : .. . .. . My extensions.conf file is as follows : .. . .. . I can successfully make calls between 2 SIP softphones like Zoiper Linphone Ekiga etc .", "Finally I solved my issue with Google Chrome 43 I didn t want to use it but I had it coming .", "Did any one know the parameter list other than type and session send to the event-listener function when an event occurs .", "I think I missed an event for this in the sipml5 API .", "I got this error in chrome console .. . .. . But I m not sure how to fix this .", "This happened to me around 2 months back and somehow I got updated SIPml.js file .", "It was working till today", "Can you guide me what are the necessary changes I can do to make it work", "In-case your problem is solved :", "update the library and try again .", "This happens in chrome versions 45 due to certain mediastream deprecations ." ] }
{ "confidence": [ 54.02044677734375, 51.62188720703125, 45.681339263916016, 42.023948669433594, 40.82862091064453, 38.99251174926758, 38.25695037841797, 37.51085662841797, 36.988372802734375, 36.83356857299805, 35.57899475097656, 35.32246398925781, 35.00238037109375, 32.12921905517578, 31.731124877929688, 31.082141876220703, 28.764617919921875, 28.057191848754883, 27.796175003051758, 27.436124801635742 ], "content": [ "Question : How can i remove unnecesary data from SIP invite in sipML5 Now it s too big when i sending it to my server need only audio . It will accept maximum of 1 500 bytes and it must be on UDP . Could you tell me how to do it how to remove some codecs etc I don t know anything about it just learning now sipML . In other posts there are answers like remove codecs but there is no answers how to do it : .. . .. . My invite : .. . Answer : It is not recommended to modify this on the client-side from JavaScript . Your server or WebRTC to SIP gateway should solve this automatically by forwarding on TCP or removing unnecessary lines if can be forwarded on UDP only . Comment : So as i understand i should make gateway to connect sipML5 with my SIP server and in my gateway i will be able to remove unnecessary lines from my invite now i have only sipML5 to SIP server without any gateway Comment : If your SIP server can handle webrtc then there is no need for a gateway . In this case your SIP server should be able to transform the SIP signaling if it have to forward on UDP . Comment : So when i don t have any access to SIP server and i m getting in response of invite Message too big i need to have a gateway right or maybe there are other possibilities to make this invite smaller using only sipML or changing it by tSDP don t know how to do it by tSDP", "Question : I am unable to register to FreeSwitch server unable to call to SIP client XLite by using SIPml5 SIP client . Following is my HTML5 code : .. . .. . Following is my Chrome console output : .. . .. . I followed this developer guide http : sipml5.org docgen index.html svn 200 . I don t know where am going wrong . I even enabled RTCWEB breaker as mentioned here http : code.google.com p sipml5 wiki FAQ Is it possible to use FreeSWITCH to make receive calls . Please help me in registering to FreeSwitch server calling to SIP client using SIPml5 client . The XLite is registered to FreeSwitch is in ready state . .. . Answer : I had a look into sipml source code and seems that transport implementation expects to receive a domain in realm variable but you directly set an IP address . Have you tried to set realm to freeswitch.org Comment : I tried freeswitch.org OsamaMohammed as realm but still same .", "Question : I have integrated sipml5 with my asterisk server which is publicly accessible .Am facing a one way audio on call between two sipxml5 clients . Additional Information .. . .. . 1.Works perfectly if one client is xlite and other is sipml5 .. . .. . 2.ICE enabled in both sipml5 clients and asterisk .. . .. . 3.Both clients are in different tabs of chrome .. . .. . 4.my sip configuration .. . .. . 5.Here is my rtp log in asterisk Comment : have you enabled videosupport yes in asterisk this somtimes happen if you enable video in asterisk because asterisk sends video sdps to the callee .. . Answer : Sipml is highly experemental . How it work highly depend of client realsization and asterisk version even subversion used . So for any case with sipml need expert-level debugging . If it work perfectly with sipml- sip try call sipml- Local s@context n- sipml . That will force do codec translation and send all rtp via asterisk .", "Question : I Have Tomcat run on HTTPS . I have tried to deploy SIPML5 WebSocket Application To into my tomcat . When I tried to connect Sip Servlets using ws : ws : 192.168.X.Y : 5082 .. . .. . And Sip Servlets Config looks like : .. . .. . I got an error : SIPml-api.js : 4 Mixed Content : The page at https : 192.168.X1.X2 : 8443 CallCenterBK CallCenterBK.jsp sip 1 was loaded over HTTPS but attempted to connect to the insecure WebSocket endpoint ws : 192.168.X.Y : 5082 . This request has been blocked this endpoint must be available over WSS . When I have changes my SIPML 5 Client to wss : wss : 192.168.X.Y : 5082 .. . .. . And my sip servlets config looks like : .. . .. . I got another error : WebSocket connection to wss : 192.168.X.Y : 5082 failed : Error in connection establishment : net : : ERR CONNECTION CLOSED .. . .. . And when I have set to sipml 5 client : wss : 192.168.X.Y : 5082 and config changed to : .. . .. . I got an error : WebSocket connection to wss : 192.168.1.3 : 5082 failed : Error in connection establishment : net : : ERR TIMED OUT .. . .. . What I did incorrectly Any idea will be appreciated . .. . Answer : You configured the HTTPs connector with the certificate information you need to do the same thing for the WSS connector . Unfortunately the configuration for that is located at the SIP Stack level so you need to edit your standalone configuration mss-sip-stack.properties and add Comment : everything works fine . Thank you so much for your post . Comment : Thanks . Feel free to upvote the answer for future readers", "Question : I Have Tomcat run on HTTPS . I have tried to deploy SIPML5 WebSocket Application To into my tomcat . When I tried to connect Sip Servlets using ws : ws : 192.168.X.Y : 5082 .. . .. . And Sip Servlets Config looks like : .. . .. . I got an error : SIPml-api.js : 4 Mixed Content : The page at https : 192.168.X1.X2 : 8443 CallCenterBK CallCenterBK.jsp sip 1 was loaded over HTTPS but attempted to connect to the insecure WebSocket endpoint ws : 192.168.X.Y : 5082 . This request has been blocked this endpoint must be available over WSS . When I have changes my SIPML 5 Client to wss : wss : 192.168.X.Y : 5082 .. . .. . And my sip servlets config looks like : .. . .. . I got another error : WebSocket connection to wss : 192.168.X.Y : 5082 failed : Error in connection establishment : net : : ERR CONNECTION CLOSED .. . .. . And when I have set to sipml 5 client : wss : 192.168.X.Y : 5082 and config changed to : .. . .. . I got an error : WebSocket connection to wss : 192.168.1.3 : 5082 failed : Error in connection establishment : net : : ERR TIMED OUT .. . .. . What I did incorrectly Any idea will be appreciated . .. . Answer : SIPML5 works fine with wss for sure . The problem is on your server-side . 1 . Make sure that 5082 port is listening telnet .. . 2 . Make sure that you have installed a valid SSL certificate to your server .. . 3 . Make sure that 5082 is the secure wss port On most servers the ws unsecured and wss secured are listening on different ports", "Question : null .. . Answer : I have a freeSWITCH server v1.5.5b setup on a machine which is connecting well with desktop clients like X-lite . But no matter what I try I am not able to connect to the server through a SipML client with and without RTCWeb Breaker enabled . When I try to register the SipML client to the FS server the client status changes to connecting and stays so for a minute or so after which it changes to disconnected . However on the server machine there is no indication that a client is trying to register When X-lite tries to register the FS server displays quite a bit of information about the register attempt .. . .. . What am I missing Has anyone got a SipML client working with freeSWITCH or should I consider Asterisk Comment : No answers yet", "Question : I have a sipml5 web client and I can successfully make a call to it . But when a caller hangs up the web client is not hanging the call . I think I missed an event for this in the sipml5 API . I got this error in chrome console .. . .. . But I m not sure how to fix this . Comment : This happened to me around 2 months back and somehow I got updated SIPml.js file . It was working till today Can you guide me what are the necessary changes I can do to make it work In-case your problem is solved : Comment : update the library and try again . raw.githubusercontent.com DoubangoTelecom sipml5 master release https : raw.githubusercontent.com DoubangoTelecom sipml5 master release SIPml-api.js .. . Answer : My problem solved when I updated the library . I used : https : raw.githubusercontent.com DoubangoTelecom sipml5 master release SIPml-api.js", "Question : I am trying to configure an example for SIPml5 and i found this info from https : wiki.asterisk.org wiki display AST Asterisk+WebRTC+Support . I have asterisk 11.9.0 installed and downloaded source of SIPml5 from http : code.google.com p sipml5 source checkout I copied sample code into web root directory and example loaded successfully and also able to register 2 extensions . I have tried both browser Google Chrome and Firefox with their latest versions . For asterisk I made some configuration like below . Please check : http : pastebin.com 7KCvtcNf .. . .. . For Outbound calls : when i am dialling 8002 - 8001 every time Chrome Browser asking for allow microphone . Is there any way to disable asking permission and allowing it by default when i allow microphone then SIpml5 phone showing like Not Allow . Here is the asterisk logs : http : pastebin.com JZeDjyay .. . .. . For Incoming calls : When call come to browser And allow microphone then Call rejected and asterisk showing like Got SIP response 603 Failed to get local SDP in asterisk CLI . But After some google i found new link https : code.google.com p sipml5 wiki Downloads for SIPml-api.js and after replacing that JS File Calls are comming in browser even i am able to answer that calls Also in browser it says In call but in asterisk CLI it keep showing ringing and other end showing like remote ringing . Here is the asterisk logs : http : pastebin.com e8Ap3bhq .. . .. . Can anyone please let me know what am i doing wrong Comment : sipml webrtc are experemental . It not always working even when used by expert . .. . Answer : If you are going to test webRTC i successfully tested the Flashphoner Web Call Server with Asterisk 1.8.x versions using different call scenarios . Regarding sipML5 i would suggest you to please try using this tutorial by Sanjay Willy : http : highsecurity.blogspot.com 2012 12 webrtc-and-asterisk-11-using-sipml5.html I hope it will be helpful for you . Regards Comment : Thanks for response.i made up call successfully now but still have an issue with some other chrome browser and audio not working . Comment : @Shah Hussain how did you manage to solve it Could you share it with us please", "Question : When I try to register my extension using sipml5 I get the following in my CLI . Please note that my asterisk and sipml5 are on the same server . Comment : So the problem is Sipml is registered . for DNS resolve issue show us your SIPml.Stack configuration . Comment : Also note that sipml in asterisk have experemental state so expected you have expert or guru skill in asterisk before using it . Comment : I m having the same messages on call attempt but call flow is not affected by that DNS resolving in Ast 11.7 .. . Answer : I d encountered the same error while I tried using SipML5 . As @mirkobrankovic said but call flow is not affected by that DNS resolving in Asterisk 11.7 Asterisk 11.6 . However to get rid of the error all you have to do is to add the correct hostname of the asterisk server in the etc hosts-file and while logging in in the SipML5 interface make sure you enter the Display Name and the Private Identity as the same values - the name of the account that you declared in sip.conf . This will get rid of the error . For example if you have the following entry for a sip user in sip.conf : .. . .. . Add one siptest2.com to the Display name and the Private Identity in the SipML5 interface . If you are using Realtime database you can get the name to be entered from the following simple query : .. . .. . and enter the name you want in the 2 fields mentioned above . An image example : .. . .. . sipml5 http : i.stack.imgur.com zwFSj.png", "Question : When I try to register my extension using sipml5 I get the following in my CLI . Please note that my asterisk and sipml5 are on the same server . Comment : So the problem is Sipml is registered . for DNS resolve issue show us your SIPml.Stack configuration . Comment : Also note that sipml in asterisk have experemental state so expected you have expert or guru skill in asterisk before using it . Comment : I m having the same messages on call attempt but call flow is not affected by that DNS resolving in Ast 11.7 .. . Answer : Try using DTLS certificate . To do that", "Question : I am a newbie to webrtc2sip . I have setup my webrtc2sip gateway and registered to sip2sip.info as my domain . The problem is when I make video calls from chrome to any SIP client ekiga jitsi the call gets connected but I am unable to see videos on both the sides . Case 1 : Chrome calls SIP client .. . Result : No video shown on both transmit and receive side .. . .. . On the chrome JS console it says that : .. . .. . I have attached the JS console logs case1 web2SIPClient JSLogs.txt wireshark trace case1 web2SIPClient WStrace.pcap webrtc2sip gateway console logs case1 web2SIPClient gatewayLogs.txt sipml5 expert settings Expert settings.png and config.xml config.xml for this case . I did not change anything in the config.xml that was generated after i built the source as mentioned in the instructions of this page http : linux.autostatic.com installing-webrtc2sip-on-ubuntu-1204 . I gave a try making calls between chrome and a android SIP client CSipSimple and the problem remains the same . case 2 : SIP client calling chrome . Result : as soon as I click answer button on chrome the calls gets rejected . The JS console logs states that : .. . .. . For this case I am attaching JS logs case2 SIPClient2WebJSLogs.txt wireshark dump case2 jitsiToWeb WStrace.pcap .. . .. . .. . .. . Configuration : .. . .. . .. . .. . Chrome Version : checked on 30.0.1599.114 and even on Latest chrome version Webrtc2sip version : 2.6.0 sipml5 Version : svn 203 ubuntu version : 12.04 checked on both desktop and server editions .. . .. . .. . .. . Am I missing something in my setup or configuration please guide and help in moving further . Thanks .. . Shyam .. . Answer : Case2 : .. . .. . You re using RTCWeb-capable browser Chrome and trying to call a SIP client which may not be implementing some mandatory features like ICE SRTP . Chrome uses SRTP-SDES and Firefox uses SRTP-DTLS . Enable RTCWeb Breaker in sipml5 expert settings http : sipml5.org expert.htm and check . The RTCWeb Breaker is used to enable audio and video transcoding when the endpoints do not support the same codecs or the remote-server is not RTCWeb-compliant . Case : 1 : Is audio working and I can t see your logs .", "Question : I have configured and Asterisk server and am trying to make browser to browser calls using SipML5 http : code.google.com p sipml5 . I followed 2 guides both individually and together - thereby trying the whole setup thrice which are located here http : highsecurity.blogspot.in 2012 12 webrtc-and-asterisk-11-using-sipml5.html and SipML s official How-TO http : code.google.com p sipml5 wiki Asterisk . My sip.conf file looks as follows : .. . .. . My extensions.conf file is as follows : .. . .. . I can successfully make calls between 2 SIP softphones like Zoiper Linphone Ekiga etc . However the moment I try to call from browser to browser and it fails . Exact nature is when the destination picks up the call the call gets rejected and the following error shows up in the Asterisk console : .. . .. . A search on Google revels that I need to disable Video which I have done both in the sip.conf file videosupport no and in the SipML5 application by checking the Disable Video option . I still get the same error . This error is repeated when I call from the softphone to the browser and vice versa as well . Could someone point out my errors Is there anything additional that needs to be installed configured Or are the some inherent errors in my configuration itself Any help is appreciated . Comment : this is not programming question . SipML is experemental so you need be expert in asterisk to use it correctly . .. . Answer : Some addition to this .. . .. . For configuring browser as sip client we need to enable encryption true .. . .. . If you browser client is inside a firewall you need to enable ICN Support for proper communication Comment : I have same issue.can any one tell me i already define all necessary params define in sip.conf still no luck .", "Question : I am unable to register to FreeSwitch server unable to call to SIP client XLite by using SIPml5 SIP client . Following is my HTML5 code : .. . .. . Following is my Chrome console output : .. . .. . I followed this developer guide http : sipml5.org docgen index.html svn 200 . I don t know where am going wrong . I even enabled RTCWEB breaker as mentioned here http : code.google.com p sipml5 wiki FAQ Is it possible to use FreeSWITCH to make receive calls . Please help me in registering to FreeSwitch server calling to SIP client using SIPml5 client . The XLite is registered to FreeSwitch is in ready state . .. . Answer : you have too set the ws web socket like that : websocket proxy url : ws : 192.168.200.10 : 8088 ws", "Question : I have a sipml5 web client and I can successfully make a call to it . But when a caller hangs up the web client is not hanging the call . I think I missed an event for this in the sipml5 API . I got this error in chrome console .. . .. . But I m not sure how to fix this . Comment : This happened to me around 2 months back and somehow I got updated SIPml.js file . It was working till today Can you guide me what are the necessary changes I can do to make it work In-case your problem is solved : Comment : update the library and try again . raw.githubusercontent.com DoubangoTelecom sipml5 master release https : raw.githubusercontent.com DoubangoTelecom sipml5 master release SIPml-api.js .. . Answer : This happens in chrome versions 45 due to certain mediastream deprecations . In newer versions of chrome MediaStream.stop is deprecated and replaced by MediaStreamTrack.stop . sipML5 API has not yet been modified to accept these changes . https : github.com DoubangoTelecom sipml5 issues 231 Comment : This happened to me around 2 months back and somehow I got updated SIPml.js file . It was working till today Can you guide me what are the necessary changes I can do to make it work :", "Question : I have configured and Asterisk server and am trying to make browser to browser calls using SipML5 http : code.google.com p sipml5 . I followed 2 guides both individually and together - thereby trying the whole setup thrice which are located here http : highsecurity.blogspot.in 2012 12 webrtc-and-asterisk-11-using-sipml5.html and SipML s official How-TO http : code.google.com p sipml5 wiki Asterisk . My sip.conf file looks as follows : .. . .. . My extensions.conf file is as follows : .. . .. . I can successfully make calls between 2 SIP softphones like Zoiper Linphone Ekiga etc . However the moment I try to call from browser to browser and it fails . Exact nature is when the destination picks up the call the call gets rejected and the following error shows up in the Asterisk console : .. . .. . A search on Google revels that I need to disable Video which I have done both in the sip.conf file videosupport no and in the SipML5 application by checking the Disable Video option . I still get the same error . This error is repeated when I call from the softphone to the browser and vice versa as well . Could someone point out my errors Is there anything additional that needs to be installed configured Or are the some inherent errors in my configuration itself Any help is appreciated . Comment : this is not programming question . SipML is experemental so you need be expert in asterisk to use it correctly . .. . Answer : Enable sip logs in asterisk debug file and check the details of SDP offer-answer . Check the SDP contents .", "Question : I am unable to register to FreeSwitch server unable to call to SIP client XLite by using SIPml5 SIP client . Following is my HTML5 code : .. . .. . Following is my Chrome console output : .. . .. . I followed this developer guide http : sipml5.org docgen index.html svn 200 . I don t know where am going wrong . I even enabled RTCWEB breaker as mentioned here http : code.google.com p sipml5 wiki FAQ Is it possible to use FreeSWITCH to make receive calls . Please help me in registering to FreeSwitch server calling to SIP client using SIPml5 client . The XLite is registered to FreeSwitch is in ready state . .. . Answer : You need to install webrtc2sip http : webrtc2sip.org in order to work with web client . I also faced the same problem i.e . transport error but after installing webrtc2sip this problem has been resolved . I am able to connect to FreeSwitch successfully although now there are other problems . to install it Go to this link - http : code.google.com p webrtc2sip wiki Building Source v2 0 .. . .. . it looks lengthy but its straight forward . Also don forget to read the technical guide here . http : webrtc2sip.org technical-guide-1.0.pdf .. . .. . After successfull installation run this command in terminal .. . .. . and find the socket address of webrtc2sip server which should look like 192.168.1.2 : 10060 and put this address in your code in front of websocket address . ws : 192.168.1.2 : 10060 precisely .", "Question : null .. . Answer : I am using sipml with asterisk 12 . The problem is that sometimes the sound doesn t comes on chrome and sometimes it comes . Without refreshing the page if I call from the browser 10 times then 5 times it comes and 5 times it doesn t . Sometimes the sound always comes . I am not able to understand what is happening . Please help . Thanks Comment : While using chrome I get an error on asterisk console pjsip : 0 : icess0x7fba900 ..Error sending STUN request : Invalid argument . I don t get this error when using firefox . Comment : If it had issues with STUN arguments what did you use for ice servers Did you try", "Question : I am trying to make a phonecall using sipML5 library . The apps can successfully register into the SIP server . How ever when i try to make a phone call it says 403 Forbidden soon after ringing . Here is some screenshot .. . .. . enter image description here http : i.stack.imgur.com lRSSK.png enter image description here http : i.stack.imgur.com BCIGJ.png .. . .. . Does anyone know why i am getting 403 Forbidden I can fully authenticate and register my account prior dialing any numbers . But this only happens soon after i dial another SIP number account . .. . Answer : sipML5 is a SIP client . You should try to connect with a softphone using those credentials and trying to dial the same account number . You should see more details on the SIP server-side of things if you have access to that .", "Question : I use sipml5 with freeswitch and I need to detect when call should be answered automatically . The only part where I can get it from is SIP Invite message : .. . .. . My VOIP phone detects it from Call-Info header : .. . .. . Is there any way how to access Call-Info header using sipml5 .. . Answer : I also needed to get a SIP header s value for something similar in a project using SIPml5 . What I did is a bit of a hack but it works : all SIP signaling messages are logged to browser console if the debug level is set to info . So I found and changed that debug function in SIPml5 library to receive all the incoming SIP messages regardless of the debug level . You can find the function by searching for this : function tsk utils log info . The new function looks like : .. . .. . Now I receive all incoming SIP messages in function CatchWebrtcSignaling msg where I can parse the message and get any SIP headers value . You can either make this change in SIPml5-api.js file or you can download the source code from github https : github.com DoubangoTelecom sipml5 make the change and minify build SIPml5-api.js by executing release.sh from main directory . Comment : I ve decided to use sip.js instead of sipml5 - it s much easier to do this kind of stuff without dirty hacks . but thanks anyway .", "Question : I have an asterisk for web calls in the website only working on PC but when I run the same client on my android 5 no sound at least not in my android it does send voice to PC but just cant reproduce the incomming voice . Everthing seems to be just fine with my asterisk it shows in call : .. . .. . But in eclipse console i receive code 405 from android : .. . .. . Any suggestions UPDATE : .. . .. . SIPML5 Client : .. . .. . To make a call : .. . .. . To answere a call : .. . .. . 405 Method Not Allowed .. . .. . Some interpretation of this any chance that everthing is fine but the audio TAG is the problem in the mobile client If not what is the address identified by the Request-URI .. . Answer : So it s working . Here is the deal the SIP was just fine the client to . The hole problem was a chrome limitation that makes necessary a click from the user to play any sound in the browser it s something like this : .. . .. . I have my audio tag : .. . .. . and later I feed the source with sipml5 : .. . .. . And here is the catch the audio tag-it s been feed with the SIPML5 source but it s in pause or hold dont know what.. . as long the user don t give a onclick action so right after the 2 lines to make and answere a call I add a button with : .. . .. . and everthing finally works" ] }
[ "yes-answer-long", "yes-answer-short" ]
javascript
UNK_RELATION
func@.net@51
func -- func is a family of delegate types in the @placeholder framework .
{ "confidence": [ 44.6488151550293, 44.1688232421875, 42.45078659057617, 42.45078659057617, 40.41362762451172, 38.76160430908203, 37.254093170166016, 36.406005859375, 36.20903778076172, 35.97552490234375, 35.40549850463867, 35.33229064941406, 35.33229064941406, 35.33229064941406, 35.33229064941406, 35.33229064941406, 34.7957878112793, 34.64253234863281, 34.44573211669922, 34.44573211669922, 34.44573211669922, 34.322208404541016, 34.2114143371582, 33.848548889160156, 33.848548889160156, 33.848548889160156, 33.848548889160156, 33.848548889160156, 33.848548889160156, 33.848548889160156, 33.848548889160156, 32.849185943603516, 32.71076202392578, 32.515777587890625, 32.484981536865234, 32.484981536865234, 32.484981536865234, 32.484981536865234, 32.38423156738281, 32.38423156738281, 32.222537994384766, 32.222537994384766, 32.202781677246094, 31.85163116455078, 31.85163116455078, 31.85163116455078, 31.684486389160156, 31.684486389160156, 31.684486389160156, 31.563064575195312, 31.563064575195312, 31.563064575195312, 31.500656127929688, 31.399906158447266, 31.28225326538086, 31.264116287231445, 31.141387939453125, 31.141387939453125, 31.141387939453125, 31.141387939453125, 31.13998794555664, 31.13998794555664, 31.112411499023438, 30.965450286865234, 30.8319149017334, 30.8319149017334, 30.612041473388672, 30.578739166259766, 30.578739166259766, 30.367887496948242, 30.351716995239258, 30.246498107910156, 30.246498107910156, 29.657644271850586, 29.657644271850586, 29.657644271850586, 29.657644271850586, 29.6562442779541, 29.6562442779541, 29.6562442779541, 29.6562442779541, 29.5353946685791, 29.399002075195312, 29.399002075195312, 29.383563995361328, 29.383563995361328, 29.062955856323242, 28.762754440307617, 28.762754440307617, 28.762754440307617, 28.762754440307617, 28.762754440307617, 28.762754440307617, 28.762754440307617, 28.762754440307617, 28.762754440307617, 28.762754440307617 ], "content": [ "Actually Func is just a simple delegate declared in the .NET Framework .", "Action and Func are framework defined and they operates seamlessly as long as the parameter types match .", "Func is a delegate type .", "Func .. . T is delegate .", "The Func family of delegates or Action for that matter are nothing but simple delegate types declared like .. . .. . etc .", "Action and Func are framework-provided Delegate http : msdn.microsoft.com en-us library ms173171 28v vs.80 29.aspx types .", "possible duplicate of func-delegate-vs-function http : stackoverflow.com questions 3113226 func-delegate-vs-function", "The Func family of delegates and their return-type-less cousins Action are not any greater than anything else you d find in the .NET framework .", "I was fiddling around with the linq its Func parameter on entity-framework .", "Func T represents a generic delegate and not an expression .", "The delegate delegate R Func A R A a has formal parameter a with type A .", "possible duplicate of What s so great about Func delegate", "http : stackoverflow.com questions 319789 whats-so-great-about-func-delegate", "In short Func is a delegate where the last type-parameter is the return-type .", "So Func int bool is a delegate that takes an int parameter and returns a bool .", "But out of interest shouldn t a delegate a func be able to pass on a generic type", "How do I defined a Func delegate for this method", "What is Func", "I d say - in most cases - declare delegate types for your public apis but it s quite alright to use Func internally .", "Surely the actual reason for using Func instead of a specific delegate is that C treats separately declared delegates as totally different types .", "By encouraging everyone to use Func Microsoft is hoping that this will alleviate the problem of incompatible delegate types .", "Or is there an order for types being inferred in case of Func s", "Here s another one where you cannot use Func - you cannot use Func if it has to return itself as mentionned here : stackoverflow.com questions 27989296 http : stackoverflow.com questions 27989296 how-do-i-declare-a-func-delegate-which-returns-a-func-delegate-of-the-same-type", "How do I get back my Func from a Delegate", "Is there some way in Func or delegate to check the receiver of the function is alive and well", "Note that the Func .. . is a delegate type.. . it s just not one you ve declared .", "Func doesn t not support out parameters but there is no problem with custom delegate", "By calling it like this : .. . .. . To handover the method I want to assign them to a Func delegate .", "The advantage of using Func of course is that you then don t need to look up the delegate.. .", "If the purpose of the delegate is clear from the method that uses it I use Action or Func .", "E.g . a Func T0 bool is the same as a System.Predicate T delegate .", "Instead of defining your own delegate types for the same thing delegate explosion use the ones provided by the framework .", "You may want to look at the various Func questions on SO : stackoverflow.com questions tagged func http : stackoverflow.com questions tagged func", "So am I justified in saying that Func is nothing great and just an example in the .Net framework that we can use and if needed create custom func delegates to suit our own needs", "Do I have to explicity create my Func as an Expression Func instead", "There is big difference between Expression Func T bool and Func T bool .", "Yes I do know the difference between a Func and Expression Func .", "There is no way to convert from Func TIn TOut to Expression Func TIn .", "Surely it should state Do use the new LINQ types Func and Action .. . .", "The code in the loop doesn t care about the types passed into the Func .", "Func NameRequest bool is not a subtype of Func Request bool .", "There doesnt seem to be a difference if the Func is a Func int int", "Say I ve cast a Func to a Delegate for example.. . .. . .. . Now if I know the type of Delegate ahead of time I can cast directly back to Func .. . .. . But what if I don t know the function type until runtime", "The question is : Why is the example using Func", "Ok - but what about the Func part", "See my answer for link-to Func .", "It cannot be done by Func but you can define a custom delegate for it : .. . .. . Usage example :", "http : stackoverflow.com questions 1906787 cast-delegate-to-func-in-c", "Can I expand this a bit more with replacing Func delegate with normal delegates", "No I guess the Func is cleaner .", "Action Func are implemented as delegates .", "Action and Func are not the future of .NET .", "Are you saying that a Func Dog should not be castable to a Func Pet", "The generic Func delegates are regular generic types that take regular type parameters .", "With Func you just write : .. . .. . It means the same as the first code example - Func int long defines a delegate that takes one integer argument and returns a long value .", "It is obvious if you understand generic types and delegates but for those who dont it is Func int string that kan delegate to a function that takes a int argument and returns a string .", "Related great answer : stackoverflow.com questions 319789 http : stackoverflow.com questions 319789 whats-so-great-about-func-delegate", "Suppose every time you see Func int string you think to yourself : .. . .. . That is the delegate is an object that implements this interface .", "A Func int string like .. . .. . is a delegate accepting int as its sole parameter and returning a string .", "The Func T1 T2 is a delegate which represents a transformation from type T1 to type T2 .", "In C I would like a method that returns a Func but where the expression of the Func depends on some input-given dimension .", "func like following func test currentName name : String : Int print aa name abc how to use parameter", "Func is a generic delegate - it is just very convenient to use because you don t have to create your own delegate for each argument return-type combination .", "As of .net-3.5 about using Func T and Action T the guideline states http : blogs.msdn.com mirceat archive 2008 03 13 linq-framework-design-guidelines.aspx : .. . .. . Do use the new LINQ types Func and Expression instead of custom delegates and predicates", "You can not cast Func NameRequest bool or Func PhoneRequest bool to Func Request bool .", "Why is a Func created from an Expression Func via .Compile considerably slower than just using a Func declared directly", "The advent of Action and Func family of delegates has rendered custom delegates less used but the latter still finds uses .", "change it to func getPow - Double", "The caller is passing in the Func T .", "Now let s use a Func instead .", "In most cases mocking methods with Func Action is a little bit tricky In any mock framework I know.. . .. . .. . Usually you have to execute the given Func Action and then the result should affect the rest of the unit under test .", "Func int for example is a type in the way that string is a type .", "Read here http : nazmoonnoor.com uses-func-in-cs .", "public delegate double ChangeListAction int p1 params string p2 .. . .. . .. . but not .. . .. . Func int params string double ChangeListAction .. . .. . .. . 6 .", "It is not possible to have a dynamic number of strongly typed parameters in a Func Action Delegate or Lambda .", "Intellisense is telling me that it can t convert from the Delegate into a Func but my teacher insists that it should totally do that without a problem .", "but for the sake of what my professor wants me to do for the project is it even possible to cast a delegate to a Func", "Instead I need to inject the func to create the instance but I don t know how to inject a func with a generic parameter .", "Func Employee Person is fine because it sill matches the signature while Func Person Person fails because it isn t .", "A Person is not an Employee .. . .. . There is no cast possible between Func Employee xxx and Func Person xxx", "Just to avoid confusion for others I will clearify that you are talking about Func int string here and not Func T TResult .", "This question already has an answer here : .. . .. . Func Delegate vs Function questions 3113226 func-delegate-vs-function 6 answers .. . .. . This is a curiosity questions for you all in the know : .. . .. . Is there any harm downside to using a Func instead of a method", "no Func is far simpler .", "These are generics not Func or Action .", "There s a difference between an Expression and a Func .", "You re trying to use the UserAccessCheckExpression as a func .", "I see the problem - you want to pass a Func NameRequest bool or a Func PhoneRequest bool to a parameter of type Func Request bool .", "If that even compiles then MethodOne returns a Func int string .", "Is it possible to extend the code to work with Func IEnumerable T", "The advice in 3.5 and above is to use the Action .. . and Func .. . - for the why", "And it will not get passed one Func but a list of IRowsBuilder instances .", "@PetSerAl Could func validate be forced to be non-static", "Could func validate be made non-static", "If it s not possible with Func is it possible with Expression or delegates", "func downloadPokemonDetails1 is included in Pokemon class also .", "I have a Func ProductItemVendor bool stored in CompareProductItemVendorIds .", "A Func int string eats ints and returns strings ." ] }
{ "confidence": [ 54.21490478515625, 48.52246856689453, 48.135536193847656, 47.80464553833008, 47.025840759277344, 46.14497375488281, 45.614898681640625, 44.3863410949707, 43.79376983642578, 42.803489685058594, 42.52289581298828, 41.79814910888672, 41.64525604248047, 41.35164260864258, 41.34519577026367, 41.22628402709961, 41.19441223144531, 40.721824645996094, 40.458614349365234, 40.35167694091797 ], "content": [ "Question : Sorry if this is basic but I was trying to pick up on .Net 3.5 . Question : Is there anything great about Func and it s 5 overloads From the looks of it I can still create a similar delgate on my own say MyFunc with the exact 5 overloads and even more . eg : public delegate TResult MyFunc TResult and a combo of various overloads.. . The thought came up as I was trying to understand Func delegates and hit upon the following scenario : .. . .. . This implies a delegate with one parameter of type int and a return-type of type int . There are five variations if you look at the overloads through intellisense . So I am guessing that we can have a delegate with no return-type So am I justified in saying that Func is nothing great and just an example in the .Net framework that we can use and if needed create custom func delegates to suit our own needs Thanks .. . Answer : The Func family of delegates and their return-type-less cousins Action are not any greater than anything else you d find in the .NET framework . They re just there for re-use so you don t have to redefine them . They have type parameters to keep things generic . E.g . a Func T0 bool is the same as a System.Predicate T delegate . They were originally designed for LINQ . You should be able to just use the built-in Func delegate for any value-returning method that accepts up to 4 arguments instead of defining your own delegate for such a purpose unless you want the name to reflect your intention which is cool . Cases where you would absolutely need to define your delegate types include methods that accept more than 4 arguments methods with out ref or params parameters or recursive method signatures e.g . delegate Foo Foo Foo f .", "Question : Sorry if this is basic but I was trying to pick up on .Net 3.5 . Question : Is there anything great about Func and it s 5 overloads From the looks of it I can still create a similar delgate on my own say MyFunc with the exact 5 overloads and even more . eg : public delegate TResult MyFunc TResult and a combo of various overloads.. . The thought came up as I was trying to understand Func delegates and hit upon the following scenario : .. . .. . This implies a delegate with one parameter of type int and a return-type of type int . There are five variations if you look at the overloads through intellisense . So I am guessing that we can have a delegate with no return-type So am I justified in saying that Func is nothing great and just an example in the .Net framework that we can use and if needed create custom func delegates to suit our own needs Thanks .. . Answer : In addition to Marxidad s correct answer : .. . .. . It s worth being aware of Func s related family the Action delegates . Again these are types overloaded by the number of type parameters but declared to return void . If you want to use Func Action in a .NET 2.0 project but with a simple route to upgrading later on you can cut and paste the declarations from my version comparison page http : csharpindepth.com Articles Chapter1 Versions.aspx . If you declare them in the System namespace then you ll be able to upgrade just by removing the declarations later - but then you won t be able to easily build the same code in .NET 3.5 without removing the declarations .", "Question : Sorry if this is basic but I was trying to pick up on .Net 3.5 . Question : Is there anything great about Func and it s 5 overloads From the looks of it I can still create a similar delgate on my own say MyFunc with the exact 5 overloads and even more . eg : public delegate TResult MyFunc TResult and a combo of various overloads.. . The thought came up as I was trying to understand Func delegates and hit upon the following scenario : .. . .. . This implies a delegate with one parameter of type int and a return-type of type int . There are five variations if you look at the overloads through intellisense . So I am guessing that we can have a delegate with no return-type So am I justified in saying that Func is nothing great and just an example in the .Net framework that we can use and if needed create custom func delegates to suit our own needs Thanks .. . Answer : The greatness lies in establishing shared language for better communication . Instead of defining your own delegate types for the same thing delegate explosion use the ones provided by the framework . Anyone reading your code instantly grasps what you are trying to accomplish. . minimizes the time to what is this piece of code actually doing So as soon as I see a .. . .. . Action some method that just does something and returns no output .. . Comparison some method that compares two objects of the same type and returns an int to indicate order .. . Converter transforms Obj A into equivalent Obj B .. . EventHandler response handler to an event raised by some object given some input in the form of an event argument .. . Func some method that takes some parameters computes something and returns a result .. . Predicate evaluate input object against some criteria and return pass fail status as bool .. . .. . I don t have to dig deeper than that unless it is my immediate area of concern . So if you feel the delegate you need fits one of these needs use them before rolling your own . Disclaimer : Personally I like this move by the language designers . .. . .. . Counter-argument : Sometimes defining your delegate may help communicate intent better . e.g . System.Threading.ThreadStart over System.Action . So it s a judgment call in the end . Comment : man. . just got skeeted : Comment : Nah your answer s better . I m glad that Func Action are there and they re usually sufficient - but I think there are still times when it s worth defining your own delegates . A good example is predicate - it s not strictly necessary when there s alreay Func T bool but it indicates intent . Comment : Likewise you may well want to provide a named delegate that could be represented as Func string string int or whatever - calling it MatchCounter makes the intention clearer . It s a balancing act . The advantage of using Func of course is that you then don t need to look up the delegate.. . Comment : Well I intentionally left that part out from my answer but seems like it needs to be included to complete it . Comment : The real benefit I see in custom delegate types is that they can have custom parameter names and custom XML documentation . Therefore I use custom delegate types in scenarios that are so complex they need this . If the purpose of the delegate is clear from the method that uses it I use Action or Func .", "Question : Today I was thinking about declaring this : .. . .. . but why not use this : .. . .. . or if ChangeListAction would have no return-value I could use : .. . .. . so where is the advantage in declaring a delegate with the delegate keyword Is it because of .NET 1.1 and with .NET 2.0 came Action T and with .NET 3.5 came Func T .. . Answer : The advent of Action and Func family of delegates has rendered custom delegates less used but the latter still finds uses . Advantages of custom delegates include : .. . .. . 1 . As others have pointed conveys intent clearly unlike generic Action and Func Patrik http : stackoverflow.com a 4482653 661933 has a very good point about meaningful parameter names . 2 . You can specify ref out parameters unlike the other two generic delegates . For eg you can have .. . .. . public delegate double ChangeListAction out string p1 ref int p2 .. . .. . .. . but not .. . .. . Func out string ref int double ChangeListAction .. . .. . .. . 3 . Also with custom delegates you need to write ChangeListAction I mean the definition only once somewhere in your code base whereas if you don t define one you will have to litter everywhere Func string int double all over . Changing the signature will be a hassle in the latter case - a bad case of not being dry . 4 . Can have optional-parameters . public delegate double ChangeListAction string p1 haha int p2 .. . .. . .. . but not .. . .. . Func string int double ChangeListAction p1 haha p2 double p2 .. . .. . .. . 5 . You can have params-keyword for parameters of a method not so with Action Func . public delegate double ChangeListAction int p1 params string p2 .. . .. . .. . but not .. . .. . Func int params string double ChangeListAction .. . .. . .. . 6 . Well if you re truly out of luck and need parameters more than 16 for the moment : .. . .. . .. . .. . As to merits of Action and Func : .. . .. . 1 . It s quick and dirty and I use it all over . It makes code short if the use-case is trivial custom delegates have gone out of fashion with me . 2 . More importantly its type compatible across domains . Action and Func are framework defined and they operates seamlessly as long as the parameter types match . You can t have ChangeSomeAction for ChangeListAction . Linq finds great use of this aspect . Comment : Here s another one where you cannot use Func - you cannot use Func if it has to return itself as mentionned here : stackoverflow.com questions 27989296 http : stackoverflow.com questions 27989296 how-do-i-declare-a-func-delegate-which-returns-a-func-delegate-of-the-same-type Comment : thanks @Marwie . Helpful . Will add to my answer at some point . Comment : Best answer Thank you Comment : In example 5 params must be last parameter . Comment : @Jalal you re right . Silly mistake . Anyone can edit answers anytime :", "Question : This question already has an answer here : .. . .. . Func T with out parameter questions 1283127 funct-with-out-parameter 4 answers .. . .. . Func a out b bool just don t compile how to declare that i want the second parameter be an out one I want to use it like this : .. . Answer : Actually Func is just a simple delegate declared in the .NET Framework . Actually there are several Func delegates declared there : .. . .. . So the only thing you can do is declare your custom delegate :", "Question : Can I pass a method with an out parameter as a Func Func needs a type so out won t compile there and calling listFunction requires an int and won t allow an out in . Is there a way to do this .. . Answer : The Func family of delegates or Action for that matter are nothing but simple delegate types declared like .. . .. . etc . Delegates as such can have out ref parameters so in your case its only a matter of custom implementation by yourself as other answers have pointed out . As to why Microsoft did not pack this by default think of the sheer number of combinations it would require . for just two parameters . We have not even touched ref . It would actually be cumbersome and confusing for developers .", "Question : This is just a curiosity question I was wondering if anyone had a good answer to : .. . .. . In the .NET Framework Class Library we have for example these two methods : .. . .. . Why do they use Func TSource bool instead of Predicate TSource Seems like the Predicate TSource is only used by List T and Array T while Func TSource bool is used by pretty much all Queryable and Enumerable methods and extension methods.. . what s up with that Comment : Ugh yes the inconsistent usage of these drives me crazy too . .. . Answer : Surely the actual reason for using Func instead of a specific delegate is that C treats separately declared delegates as totally different types . Even though Func int bool and Predicate int both have identical argument and return types they are not assignment-compatible . So if every library declared its own delegate type for each delegate pattern those libraries would not be able to interoperate unless the user inserts bridging delegates to perform conversions . By encouraging everyone to use Func Microsoft is hoping that this will alleviate the problem of incompatible delegate types . Everyone s delegates will play nicely together because they will just be matched up based on their parameter return types . It doesn t solve all problems because Func and Action can t have out or ref parameters but those are less commonly used . Update : in the comments Svish says : .. . .. . Still switching a parameter type from Func to Predicate and back doesn t seem to make any difference At least it still compiles without any problems . Yes as long as your program only assigns methods to delegates as in the first line of my Main function . The compiler silently generates code to new a delegate object that forwards on to the method . So in my Main function I could change x1 to be of type ExceptionHandler2 without causing a problem . However on the second line I try to assign the first delegate to another delegate . Even thought that 2nd delegate type has exactly the same parameter and return types the compiler gives error CS0029 : Cannot implicitly convert type ExceptionHandler1 to ExceptionHandler2 . Maybe this will make it clearer : .. . .. . My method IsNegative is a perfectly good thing to assign to the p and f variables as long as I do so directly . But then I can t assign one of those variables to the other . Comment : Still switching a parameter type from Func T bool to Predicate T and back doesn t seem to make any difference At least it still compiles without any problems . Comment : Seems MS are trying to discourage developers from thinking these are the same . I wonder why Comment : Switching the parameter type does make a difference if the expression you are passing to it has been defined separately to the method call since then it will be typed as either Func T bool or Predicate T rather than having the type inferred by the compiler .", "Question : Sorry if this is basic but I was trying to pick up on .Net 3.5 . Question : Is there anything great about Func and it s 5 overloads From the looks of it I can still create a similar delgate on my own say MyFunc with the exact 5 overloads and even more . eg : public delegate TResult MyFunc TResult and a combo of various overloads.. . The thought came up as I was trying to understand Func delegates and hit upon the following scenario : .. . .. . This implies a delegate with one parameter of type int and a return-type of type int . There are five variations if you look at the overloads through intellisense . So I am guessing that we can have a delegate with no return-type So am I justified in saying that Func is nothing great and just an example in the .Net framework that we can use and if needed create custom func delegates to suit our own needs Thanks .. . Answer : Though it is an old thread I had to add that func and action also help us use covariance and contra variance . http : msdn.microsoft.com en-us library dd465122.aspx", "Question : I ve been seing Func for sometime now and I ve manage to avoid it for now . But now it looks like I can t dodge it forever . For instance I tried Dynamic Linq but almost everything was in terms of Func . I ve tried one of my book C 2008 Deitel Deitel and also MSDN but I m not getting it yet . They all jump straight in the subject . 1 . What can be said in few words about Func .. . 2 . Can I get some links on the web that can get me started on that matter Thanks for helping Comment : Jon Skeet s book on c sharp has an excellent few chapters on this and why it is so important to lambda functions and linq . Comment : There is nothing scary about and no reason to avoid Func or generic delegates - they are simply delegates that represent general methods that take a certain number of arguments . Comment : You may want to look at the various Func questions on SO : stackoverflow.com questions tagged func http : stackoverflow.com questions tagged func Comment : possible duplicate of What s so great about Func delegate http : stackoverflow.com questions 319789 whats-so-great-about-func-delegate .. . Answer : Func .. . is a family of delegate types that return some value and take some number of arguments for example : .. . .. . Func int bool is simply something that takes an int and returns a bool the return is always at the end for example a predicate : .. . .. . int data 1 2 3 4 5 .. . var odd data.Where i i 2 0 .. . .. . .. . Func string is a method that returns string such as hello world . Func DateDtime TimeSpan DateTime might be something like when howLong when + howLong .. . .. . Likewise there is Action .. . which does the same but without a return-type . There s nothing magic about Func .. . - it is just a simpler way of expressing delegates while a : using generics useful for LINQ or b : not needing you to look up what the arguments are if the delegate type is something obscure PipeStreamImpersonationWorker for example it can be hard to know what it takes if that was expressed as the comparable Action it would be clear that it takes no parameters and returns void .", "Question : This is just a curiosity question I was wondering if anyone had a good answer to : .. . .. . In the .NET Framework Class Library we have for example these two methods : .. . .. . Why do they use Func TSource bool instead of Predicate TSource Seems like the Predicate TSource is only used by List T and Array T while Func TSource bool is used by pretty much all Queryable and Enumerable methods and extension methods.. . what s up with that Comment : Ugh yes the inconsistent usage of these drives me crazy too . .. . Answer : While Predicate has been introduced at the same time that List T and Array T in .net-2.0 the different Func and Action variants come from .net-3.5 . So those Func predicates are used mainly for consistency in the LINQ operators . As of .net-3.5 about using Func T and Action T the guideline states http : blogs.msdn.com mirceat archive 2008 03 13 linq-framework-design-guidelines.aspx : .. . .. . Do use the new LINQ types Func and Expression instead of custom delegates and predicates Comment : Cool never seen those guildelines before Comment : Will accept this as answer since it has most votes . and because Jon Skeet has plenty of rep.. . : p Comment : That s a bizarre guideline as written . Surely it should state Do use the new LINQ types Func and Action .. . . Expression is a completely different thing . Comment : Well actually you have to place that in the context of the guideline which is about writing a LINQ provider . So yeah for LINQ operators the guideline is to use Func and Expression as parameters for the extension-methods . I agree I d appreciate a separate guideline about using Func and Action Comment : I think Skeet s point is that Expression isn t a guideline . It s a C compiler feature to recognise that type and do something different with it .", "Question : I have a project in school where my teacher is asking us to add a delegate to a List of Funcs . The code I have below is having issues in the AddDel method . Intellisense is telling me that it can t convert from the Delegate into a Func but my teacher insists that it should totally do that without a problem . What am I doing wrong .. . Answer : Basically you shouldn t declare your own delegate here at all . There are no conversions between delegate types like this . You want a Func int double char string string so declare one : .. . .. . Or more simply just call Add : .. . .. . If you really want to keep your current code you can create a Func .. . that wraps your delegate : .. . .. . .. . but I don t actually see any benefit from that here . Comment : Thanks for the answer but for the sake of what my professor wants me to do for the project is it even possible to cast a delegate to a Func Comment : @McKenzieWinward : No it s not . See my final addition though - you can create a new delegate that wraps the old one . Note that the Func .. . is a delegate type.. . it s just not one you ve declared . Comment : I don t see the benefits either but your answer is exactly what I was looking for nonetheless . In the rubric for the project he did say something about using a wrapper . Thanks a ton", "Question : Sorry if this is basic but I was trying to pick up on .Net 3.5 . Question : Is there anything great about Func and it s 5 overloads From the looks of it I can still create a similar delgate on my own say MyFunc with the exact 5 overloads and even more . eg : public delegate TResult MyFunc TResult and a combo of various overloads.. . The thought came up as I was trying to understand Func delegates and hit upon the following scenario : .. . .. . This implies a delegate with one parameter of type int and a return-type of type int . There are five variations if you look at the overloads through intellisense . So I am guessing that we can have a delegate with no return-type So am I justified in saying that Func is nothing great and just an example in the .Net framework that we can use and if needed create custom func delegates to suit our own needs Thanks .. . Answer : One thing I like about delegates is that they let me declare methods within methods like so this is handy when you want to reuse a piece of code but you only need it within that method . Since the purpose here is to limit the scope as much as possible Func comes in handy . For example : .. . .. . It s even easier and more handy when you can use inference which you can if you create a helper function like so : .. . .. . Now I can rewrite my function without the Func : .. . .. . Here s the code to test the method :", "Question : I know how to use Action and Func in .NET but every single time I start to the exact same solution can be achieved with a regular old Method that I call instead . This excludes when an Action or Func is used as an argument for something I don t control like LINQ s .Where . So basically my question is...why do these exist What do they give me extra and new that a simple Method doesn t Comment : I assume by function you mean method right Want to make sure you re not referring to something more esoteric . Comment : @MichaelPetrotta : Yes I mean method I always use those words for the same thing even know I know they aren t . Comment : You ve already identified a very powerful reason for Func to exist : Linq . The fact that you can do other things with them is a very nice bonus . Comment : Check out this article : blackwasp.co.uk FuncAction.aspx http : www.blackwasp.co.uk FuncAction.aspx Comment : possible duplicate of func-delegate-vs-function http : stackoverflow.com questions 3113226 func-delegate-vs-function .. . Answer : Action and Func are framework-provided Delegate http : msdn.microsoft.com en-us library ms173171 28v vs.80 29.aspx types . Delegates allow functions to be treated like variables meaning that you can among other things pass them from method to method . If you have ever programmed in C++ you can think of Delegates as function-pointers that are restricted by the signature of the method they refer to . Action and Func specifically are generic delegates meaning they take type parameters with some of the most common signatures- almost any method in most programs can be represented using one or the other of those two saving people a lot of time manually defining delegates like we did in .net prior to version 2 . In fact when I see code like this in a project I can usually safely assume that the project was migrated from .net-1.1 : .. . .. . I d recommend that you look into delegates some more . They are a hugely powerful feature of the C language . Comment : I know Delegates too though have worked with them little . Your statement that they can be passed as arguments between methods really hits home as that is something I find incredibly helpful in Javascript and never put 2 and 2 together with Delegates . Comment : A cool and level-headed answer to a borderline-combative question . big +1 .", "Question : Sorry if this is basic but I was trying to pick up on .Net 3.5 . Question : Is there anything great about Func and it s 5 overloads From the looks of it I can still create a similar delgate on my own say MyFunc with the exact 5 overloads and even more . eg : public delegate TResult MyFunc TResult and a combo of various overloads.. . The thought came up as I was trying to understand Func delegates and hit upon the following scenario : .. . .. . This implies a delegate with one parameter of type int and a return-type of type int . There are five variations if you look at the overloads through intellisense . So I am guessing that we can have a delegate with no return-type So am I justified in saying that Func is nothing great and just an example in the .Net framework that we can use and if needed create custom func delegates to suit our own needs Thanks .. . Answer : Decoupling dependencies and unholy tie-ups is one singular thing that makes it great . Everything else one can debate and claim to be doable in some home-grown way . I ve been refactoring slightly more complex system with an old and heavy lib and got blocked on not being able to break compile-time dependency - because of the named delegate lurking on the other side . All assembly loading and reflection didn t help - compiler would refuse to just cast a delegate .. . to object and whatever you do to pacify it would fail on the other side . Delegate type comparison which is structural at compile-time turns nominal after that loading invoking . That may seem OK while you are thinking in terms of my darling lib is going to be used forever and by everyone but it doesn t scale to even slightly more complex systems . Fun templates bring a degree of structural equivalence back into the world of nominal typing . That s the aspect you can t achieve by rolling out your own . Example - converting : .. . .. . to : .. . .. . Allows completely independent code to do reflection invocation like : .. . .. . Existing code doesn t notice the difference new code doesn t get dependence - peace on Earth : -", "Question : Today I was thinking about declaring this : .. . .. . but why not use this : .. . .. . or if ChangeListAction would have no return-value I could use : .. . .. . so where is the advantage in declaring a delegate with the delegate keyword Is it because of .NET 1.1 and with .NET 2.0 came Action T and with .NET 3.5 came Func T .. . Answer : I have found a special use-case where you can only use delegate : .. . .. . .. . .. . Using Func Action just does not work : Namespace.Class.WndEnumProc is a field but is used like a type : .. . .. . .. . .. . Following code does compile but throws exception when running because System.Runtime.InteropServices.DllImportAttribute does not support marshaling of generic types : .. . .. . .. . .. . I present this example to show to every one that : sometimes delegate is your only choice . And this is a reasonable answer to your question why not use Action T Func T", "Question : I ve been seing Func for sometime now and I ve manage to avoid it for now . But now it looks like I can t dodge it forever . For instance I tried Dynamic Linq but almost everything was in terms of Func . I ve tried one of my book C 2008 Deitel Deitel and also MSDN but I m not getting it yet . They all jump straight in the subject . 1 . What can be said in few words about Func .. . 2 . Can I get some links on the web that can get me started on that matter Thanks for helping Comment : Jon Skeet s book on c sharp has an excellent few chapters on this and why it is so important to lambda functions and linq . Comment : There is nothing scary about and no reason to avoid Func or generic delegates - they are simply delegates that represent general methods that take a certain number of arguments . Comment : You may want to look at the various Func questions on SO : stackoverflow.com questions tagged func http : stackoverflow.com questions tagged func Comment : possible duplicate of What s so great about Func delegate http : stackoverflow.com questions 319789 whats-so-great-about-func-delegate .. . Answer : Func int for example is a type in the way that string is a type . So you use it to declare variables fields parameters and so on . It represents a computation that can be done whenever you ask it for an answer : .. . .. . Note how you can call it just like a method . There are many overloaded versions of Func to support different numbers of parameters . The last type argument is the return-type . Func is a delegate type . You can declare your own but it s easier to use Func . Where you want to return void use Action instead of Func . You only need to declare custom delegates if you need out or ref parameters . When assigning a lambda to a Func you can refer to local-variables . This is extremely powerful it means that a Func is more than just code it has data . So it s like an object with a single method which technically it is - the method is called Invoke and the compiler implicitly calls that method for you when you call a delegate . The syntax can be placed before any expression to say don t do this now delay it until later . It allows you to initialize a delegate capturing the delayed computation . And then the syntax can be placed after the delegate to actually trigger the computation . So suffix is kind-of the opposite of prefix . Comment : +1 for a neat explanation .", "Question : I ve been seing Func for sometime now and I ve manage to avoid it for now . But now it looks like I can t dodge it forever . For instance I tried Dynamic Linq but almost everything was in terms of Func . I ve tried one of my book C 2008 Deitel Deitel and also MSDN but I m not getting it yet . They all jump straight in the subject . 1 . What can be said in few words about Func .. . 2 . Can I get some links on the web that can get me started on that matter Thanks for helping Comment : Jon Skeet s book on c sharp has an excellent few chapters on this and why it is so important to lambda functions and linq . Comment : There is nothing scary about and no reason to avoid Func or generic delegates - they are simply delegates that represent general methods that take a certain number of arguments . Comment : You may want to look at the various Func questions on SO : stackoverflow.com questions tagged func http : stackoverflow.com questions tagged func Comment : possible duplicate of What s so great about Func delegate http : stackoverflow.com questions 319789 whats-so-great-about-func-delegate .. . Answer : Func .. . T is delegate . where T is return-type and all others - input parameters .", "Question : I was wondering if someone could explain what Func int string is and how it is used with some clear examples . .. . Answer : Are you familiar with delegates in general I have a page about delegates and events http : csharpindepth.com Articles Chapter2 Events.aspx which may help if not although it s more geared towards explaining the differences between the two . Func T TResult http : msdn.microsoft.com en-us library bb549151.aspx is just a generic delegate - work out what it means in any particular situation by replacing the type parameters T and TResult with the corresponding type arguments int and string in the declaration . I ve also renamed it to avoid confusion : .. . .. . In other words Func int string is a delegate which represents a function taking an int argument and returning a string . Func T TResult is often used in LINQ both for projections and predicates in the latter case TResult is always bool . For example you could use a Func int string to project a sequence of integers into a sequence of strings . Lambda expressions are usually used in LINQ to create the relevant delegates : .. . .. . Result : Comment : In other words it s a delegate which represents a function taking an int argument and returning a string . Just to avoid confusion for others I will clearify that you are talking about Func int string here and not Func T TResult . It is obvious if you understand generic types and delegates but for those who dont it is Func int string that kan delegate to a function that takes a int argument and returns a string . Comment : Will clarify when I m back on a PC later . Comment : Downvoters : please provide reasons.. . Comment : So are you going to downvote every answer which you deem to be not as helpful as your particular favourite Is this answer actively unhelpful do you think Do you think that perhaps having more than one way of looking at things might not be a bad idea Comment : @TheSoftwareJedi : No of course no reason to take your downvote personally - the fact that you did downvote for personal reasons on Saturday and then just happened to come into this thread after we ve been having a long discussion on email about appropriate behaviour is entirely coincidental isn t it", "Question : I ve been seing Func for sometime now and I ve manage to avoid it for now . But now it looks like I can t dodge it forever . For instance I tried Dynamic Linq but almost everything was in terms of Func . I ve tried one of my book C 2008 Deitel Deitel and also MSDN but I m not getting it yet . They all jump straight in the subject . 1 . What can be said in few words about Func .. . 2 . Can I get some links on the web that can get me started on that matter Thanks for helping Comment : Jon Skeet s book on c sharp has an excellent few chapters on this and why it is so important to lambda functions and linq . Comment : There is nothing scary about and no reason to avoid Func or generic delegates - they are simply delegates that represent general methods that take a certain number of arguments . Comment : You may want to look at the various Func questions on SO : stackoverflow.com questions tagged func http : stackoverflow.com questions tagged func Comment : possible duplicate of What s so great about Func delegate http : stackoverflow.com questions 319789 whats-so-great-about-func-delegate .. . Answer : You can start with 101 Linq Samples http : msdn.microsoft.com en-us vcsharp aa336746.aspx . In short Func is a delegate where the last type-parameter is the return-type . So Func int bool is a delegate that takes an int parameter and returns a bool .", "Question : I ve been seing Func for sometime now and I ve manage to avoid it for now . But now it looks like I can t dodge it forever . For instance I tried Dynamic Linq but almost everything was in terms of Func . I ve tried one of my book C 2008 Deitel Deitel and also MSDN but I m not getting it yet . They all jump straight in the subject . 1 . What can be said in few words about Func .. . 2 . Can I get some links on the web that can get me started on that matter Thanks for helping Comment : Jon Skeet s book on c sharp has an excellent few chapters on this and why it is so important to lambda functions and linq . Comment : There is nothing scary about and no reason to avoid Func or generic delegates - they are simply delegates that represent general methods that take a certain number of arguments . Comment : You may want to look at the various Func questions on SO : stackoverflow.com questions tagged func http : stackoverflow.com questions tagged func Comment : possible duplicate of What s so great about Func delegate http : stackoverflow.com questions 319789 whats-so-great-about-func-delegate .. . Answer : Func is a generic delegate - it is just very convenient to use because you don t have to create your own delegate for each argument return-type combination . Earlier you had to write something like : .. . .. . You had to publish your delegate so that a user can call your method correctly . Especially when you need a bunch of different delegates you ended up publishing one for every argument list and return-type . With Func you just write : .. . .. . It means the same as the first code example - Func int long defines a delegate that takes one integer argument and returns a long value . Of course you can use longer parameter lists too : Func int int bool long will still return a long value while it takes two ints and a bool value . If you wish a delegate without return-value you will have to use Action which will have void as a return-type . EDIT by request : How to call the method in my example : .. . .. . For the caller there is no difference between the solution with MyDelegate or Func . In both cases he has three options to call the method : .. . .. . Using a lambda notation C 3.0 required probably the best solution for short methods : .. . .. . By using an anonymous method C 2.0 required : .. . .. . Or by using a real method as an argument : Comment : Very nice explination Comment : Good explanation . Would be good to include an example of using calling the Method as well . Comment : @Metro : I added some examples how to call the method Comment : very nice +1 for this Comment : Related great answer : stackoverflow.com questions 319789 http : stackoverflow.com questions 319789 whats-so-great-about-func-delegate" ] }
[ "yes-answer-long", "yes-answer-short" ]
.net
UNK_RELATION
tombstoning@user@192
tombstoning -- for windows-phone applications tombstoning is the process in which some data about the application state are saved upon app termination so that this state is re-created if the @placeholder navigates back to the tombstoned application in order to simulate multitasking .
{ "confidence": [ 55.171875, 52.443450927734375, 48.51920700073242, 47.18940734863281, 46.237464904785156, 44.74870300292969, 44.084381103515625, 43.589683532714844, 43.546932220458984, 43.350914001464844, 43.297874450683594, 43.09607696533203, 42.914642333984375, 42.26462173461914, 42.049747467041016, 42.04158401489258, 41.328495025634766, 40.43182373046875, 40.43182373046875, 40.34069061279297, 40.3311767578125, 39.98915481567383, 39.656166076660156, 39.24245834350586, 39.17976379394531, 39.05376052856445, 38.96711730957031, 38.96711730957031, 38.68857955932617, 38.14513397216797, 38.12424087524414, 37.994239807128906, 37.94514846801758, 37.93759536743164, 37.93759536743164, 37.418243408203125, 36.95261001586914, 36.95261001586914, 36.42070770263672, 36.42060852050781, 36.40693283081055, 35.94670867919922, 35.906883239746094, 35.863887786865234, 35.753868103027344, 35.1701545715332, 34.55902862548828, 34.26084518432617, 34.25668716430664, 34.00260543823242, 33.733970642089844, 33.513301849365234, 33.510459899902344, 33.508731842041016, 33.301361083984375, 33.05715560913086, 32.818115234375, 32.678749084472656, 32.4248046875, 32.39236831665039, 32.11915969848633, 31.935665130615234, 31.697654724121094, 31.625762939453125, 31.262672424316406, 31.13370132446289, 30.89620590209961, 30.65964126586914, 30.524803161621094, 30.38031005859375, 30.317489624023438, 30.24997329711914, 30.012454986572266, 30.008113861083984, 30.008113861083984, 30.008113861083984, 30.008113861083984, 29.088821411132812, 28.892852783203125, 28.76480484008789, 28.54815673828125, 28.53276824951172, 28.477453231811523, 28.266788482666016, 28.258251190185547, 28.129314422607422, 27.884979248046875, 27.551555633544922, 27.49256134033203, 27.47861099243164, 27.33812713623047, 27.31265640258789, 27.097152709960938, 27.005142211914062, 27.004764556884766, 26.863056182861328, 26.547054290771484, 26.511951446533203, 26.380290985107422, 26.25527572631836 ], "content": [ "Save the state of each page it s viewmodel everytime you navagitefrom it so that it is already saved if the application happens to be terminated and reactivated during the tombstoning process .. . 2 .", "You shouldn t think of tombstoning as persisting state more as of persisting data .", "Tombstoning is designed to allow you to save your state not your data .", "In phone on tombstoning the static properties are lost .", "When you restore a State item after tombstoning the references don t match .", "There is a good document on MSDN about Windows Phone App Lifecycle http : msdn.microsoft.com en-us library windowsphone develop ff817008 28v vs.105 29.aspx .. . .. . You can learn how it works using this article with example - WP7 Application Lifecycle and Tombstoning http : www.geekchamp.com articles wp7-application-lifecycle-and-tombstoning", "But data from Items not recovers when app activates after tombstoning .", "but it seems so ad-hoc this mvvm + tombstoning combination .", "Im having serious problems with tombstoning this data .", "Unfortunately I am having some trouble properly handling the tombstoning process .", "When returning from tombstoning state is it mandatory for my app to restore the image too", "In tombstoning you should look at storing application data in the PhoneApplicationService.State or IsolatedStorage.ApplicationSettings depending on the size of the data .", "You are not actually tombstoning your app - only deactivating it .", "in short tombstoning is when a user on a phone pushes the home button on there phone then comes back to the game and its where they left off", "You might save directly to your main store or you might save to transient state specifically for handling tombstoning .", "Something like this http : www.garethpw.co.uk 2010 11 tombstoning-in-phone-7-xna-games.html or this http : fiercedesign.wordpress.com 2011 08 29 windows-phone-mango-tombstoning-xna", "Tombstoning deactivation occurs when you press Win or Search buttons on the phone .", "I know the basic idea of tombstoning .", "Closing has nothing to do with tombstoning .", "When the app is tombstoning I want to preserve all app state including the collection and the images that have been downloaded from the internet .", "at this point tombstoning is becoming very confusing for me .", "You should save your state on Deactivated so that if the application is removed from memory tombstoned you can set yourself up again upon reactivation .", "Also you can debug deactivation and tombstoning and see if the ScrollOffset is really stored to and read from state on these events", "How should the ViewModel be setup in a tombstoning scenario here", "Execution Model Overview http : msdn.microsoft.com en-us library ff817008 28v vs.92 29.aspx see the control-flow diagram under Activating .. . .. . This article http : jesseliberty.com 2010 09 22 iphone-to-windows-phone-7-application-lifecycle-and-tombstoning also gives a decent explanation with examples of the app lifecycle and tombstoning differentiating between backing out closing deactivating and tombstoning .", "The approach you want to take to handling tombstoning is making sure that as long as it makes sense within the application the app page should be in the same state when the user returns to it as when they left .", "I m struggling with tombstoning support in my WP 7.1 app .", "I m trying to test tombstoning in my C Store app that is based on mvvmcross .", "I read a lot about application states tombstoning and recommended practises but I am still confused .. . .. . Here is my scenario .. . .. . User launches app through application icon .", "EDIT .. . .. . I checked the documentation http : caliburnmicro.com documentation windows-phone tombstoning of Caliburn.Micro : .. . .. . I have to specify an Id .", "Much of the detail about handling tombstoning is actually page view specific so it s not always appropriate the for the viewmodel to handle this .", "I ve got a big code base we just migrated to phone and are beginning to deal with tombstoning and deactivation .", ".. . A Windows Phone OS 7.0 app is tombstoned terminated when it is deactivated .", "I ve added a bit more items and in tombstoning it works .", "@Claus would that query-string persist through tombstoning", "The App.xaml.cs file already contains four methods to help you know when you application is Launching raised when the user initially launches the application Activated raised when the application is dormant or tombstoned and the user navigates back to the application Deactivated whenever the user navigates forward away from the application .", "i ve just run into the infamous tombstoning problem issue in WP7 .", "All your handling for tombstoning should be done in the OnNavigatingFrom and the OnNavigatedTo events .", "I read this post to try to resolve tombstonning problems : http : www.scottlogic.com blog 2011 10 03 a-windows-phone-7-1-mango-mvvm-tombstoning-example.html .. . .. . This example implements Tombstonning on a MVVM application .", "The page URI including querystring is restored when an application returns from its tombstoned state .", "I have an issue with the tombstoning mechanism of Caliburn.Micro .", "Update .. . .. . I have tried the following things : .. . 1 http : www.scottlogic.co.uk blog colin 2011 05 a-simple-windows-phone-7-mvvm-tombstoning-example .. . 2 http : www.scottlogic.co.uk blog colin 2011 10 a-windows-phone-7-1-mango-mvvm-tombstoning-example .. . and many more .", "But still all the pages that are in backstack will also lose their state when tombstoned .", "this info has helped me a lot with my problems in tombstoning collections .", "Short answer : If you want to put your application logic in a webBrowser control then you can t support tombstoning .", "So the difference is that tombstoned app doesn t keep all the state inside and that s developer s task .", "i m already handling Application Activated and deactivated in the App.Xaml.cs file for tombstoning .", "I think if your app is simple enough just some strings and numbers with no web security or facebook logins etc you can leave it up to the phone to handle tombstoning .", "I don t know if you re using a specific MVVM framework but Caliburn Micro has some built-in features for tombstoning .", "Rather that using Tombstone Helper I would recommend that you learn how tombstoning actually works have a read of this article : .. . .. . http : www.scottlogic.co.uk blog colin 2011 05 a-simple-windows-phone-7-mvvm-tombstoning-example .. . .. . It s not too complicated .", "i want to know what are your strategies for saving state in a windows-phone-7 wp7 app .", "Your apps goes to dormant or tombstoned state depending on many things .", "I can t vote up the previous answer because I don t have sufficient reputation but yes any transient state information should be persisted in the Application.Deactivated event and then restored in the Application.Activated event for tombstoning support .", "the generated code-behind for App.xaml.cs generates the methods .. . .. . how are we to take advantage of these methods to save an applications full state when being tombstoned", "Should transient state always be loaded when a page is navigated to or just when resuming from a tombstoned state", "In the application deactivated event go through all the pages that are in the navigation stack and save their state their viewmodel and then re-inject it in the application activated event .", "What the maximum time the application can be active state .", "recently i asked a question at problems with tombstoning in WP7 cannot tell if i need to restore or instantiate query new data http : stackoverflow.com questions 6675979 problems-with-tombstoning-in-wp7-cannot-tell-if-i-need-to-restore-or-instantiate and the solution works .", "What is the recommended way to set up inject dependencies in a viewModel after tombstoning given that when the app deactivates you typically add the ViewModel to the State dictionary and then before your app reactivates the framework deserialises the ViewModel which requires a default constructor", "So if LoadTransientState is only concerned with the persistence of information while tombstoning then it may be appropriate to move it inside the if block .", "I do it like this : .. . .. . However I ve recently detected that this code fails if the app comes out of tombstoning and this page is the active page .", "After this event your application is terminated .. . .. . For more info check out : How to : Preserve and Restore Application State for Windows Phone http : msdn.microsoft.com en-us library ff967547 28v vs.92 29.aspx", "After my wonderings on the events registration you can find here WP7 MVVM ViewModel Event Registration and ViewModel Lifetime http : stackoverflow.com questions 9212883 wp7-mvvm-viewmodel-event-registration-and-viewmodel-lifetime now I m thinking about viewmodel tombstoning : .. . .. . In case of Tombstoning is the ViewModel serialization a good approach", "Since there is a limit on the state data which can be saved of 4Mb Max will it affect the functioning of my application even if I do implement it", "You obviously can t magically tombstone the state of your entire application .", "When activation occurs your app might be restored from dormant everything is kept in memory app is just paused or from tombstoned state system relaunches the app and restores navigation stack and current page developer is responsible to restore all other state - variables input data and so on .", "Just add the code to check if a tombstoned instance exists and then load the data of the viewmodel with that upon creation .", "I m currently developing an app for Windows Phone 7.1 and need to save some data for when the user quits the app .", "The app goes to Application Closing state .", "http : vimeo.com 14311977 .. . .. . Here s a blog post that explains in good detail http : xna-uk.net blogs darkgenesis archive 2010 11 08 there-and-back-again-a-tombstoning-tale-the-return-of-the-application.aspx .. . .. . And this one is from the Windows Phone Developer Blog : http : windowsteamblog.com windows-phone b wpdev archive 2010 07 15 understanding-the-windows-phone-application-execution-model-tombstoning-launcher-and-choosers-and-few-more-things-that-are-on-the-way-part-1.aspx .. . .. . Basically when you want to tombstone you need to use the Application Deactivated event to store your variables in isolated storage and use the Application Activated event to retrieve them .", "Applications should incrementally save data to isolated storage and to the State property while the application is running to reduce the amount of data-storage that needs to be performed in the Deactivated handler .", "This is automatically persisted when the app is tombstoned .", "This means that your portable-class-library doesn t care about application lifecycle or saving restoring state or anything like that instead it is the responsibility of your Windows Phone application to provide this behavior and your portable-class-library can remain independent of such Windows Phone-specific requirements .", "this is the code I am using for Tombstoning .. . .. . I would appreciate if you could help me", "Not necessary : Is there a popular library framework to help me with tombstoning and serializing objects images etc", "I don t need a huge library for tombstoning I think a smart serializer would fit for me .", "http : www.imaginativeuniversal.com blog post 2010 08 22 WP7-Tombstoning-Pattern-Tip.aspx .. . .. . Update : from Claus in the comments below .", "I have a application built for both windows-8.1 and windows-phone-8.1 .", "I am building a MVVM Windows Phone 8 application .", "If our memory has not been thrown away i.e . the application has not been tombstoned can t we just keep using the old view model without reloading its state", "This flag tells you whether your app was tombstoned .", "I am running very basic xml reader and I pass some data to the details page by using : .. . .. . For a week I am trying to read and understand how to deal with Tombstoning but I failed .", "But the keyword in my question is tombstoning - your recipe does not allow me to tell whether it is the case .", "How much data did you add to the State", "Although applications are typically made dormant after they are deactivated there is no way to know at this point whether the application will be tombstoned or terminated after this event and Closing when the user uses the Back button to navigate backwards past the first page of your application .", "It would appear that when I press the windows-phone the app get instantly tombstoned as resuming it doesn t provide the same result anymore .", "How do i store the static-class members of a portable-class-library in deactivated event and restore to the current instance of the non-static class inside the portable-class-library in the activated event of the phone life cycle so that the after tombstoning the application continues to run without any crash .", "Here is what I changed in the view Model to simulate a new Twitter Feed : .. . .. . But when I close my application and re launch it the state is not the same for example the scroller position is not the same as when I left the application although there is a method in this sample to remember the scrolling position of the list .", "I would also recommend Shawn s book : amazon.com Essential-Windows-Phone-7-5-Application dp http : www.amazon.com Essential-Windows-Phone-7-5-Application dp 0321752139", "But if the user presses the start button or starts any other application the data fetching process in my application is interrupted and the app throws exceptions like WebException .", "I ve added my own code to save state to the phone using custom serializers and read from the phone on reactivate .", "This way you clear out the objects so the phone doesn t try to manage state for you .", "I m reading through Windows Phone 7.5 Unleashed and there is a lot of code that looks like this in the code-behind for a page : .. . .. . The idea is that loaded will be false when resuming from a tombstoned state so we know that we want to rebuild the view model .", "You could expose static-methods to do this which you would call in the appropriate application lifecycle handlers of your Windows Phone application .", "How can I simulate the suspend mode in the Windows Phone 8.1 emulator", "Only if you disable the app from saving a background state .", "I changed the some lines of codes of this example as it deals with the old twitter api but when I run the application close it or activate Win or Search Buttons and then re launch it again the page state is not the same .", "If yes should my app state only be restored to second page when user comes to my app through back button and Application Activated event is fired", "I am building a Windows Phone 8 version of an app that I already have for Windows Phone 7.1 which works perfectly .", "Hoping the app gets tombstoned after a long time after suspension of the app ." ] }
{ "confidence": [ 99.46961212158203, 89.77532958984375, 86.98334503173828, 86.97325134277344, 80.08771514892578, 78.37791442871094, 77.6695327758789, 75.98966979980469, 69.5688247680664, 69.13218688964844, 68.34203338623047, 66.49258422851562, 65.90624237060547, 64.35765838623047, 63.07311248779297, 61.747371673583984, 60.559139251708984, 59.80656433105469, 59.647239685058594, 59.395225524902344 ], "content": [ "Question : I am building a MVVM Windows Phone 8 application . I read this post to try to resolve tombstonning problems : http : www.scottlogic.com blog 2011 10 03 a-windows-phone-7-1-mango-mvvm-tombstoning-example.html .. . .. . This example implements Tombstonning on a MVVM application . The application generates a twitter-feed in a listbox . I changed the some lines of codes of this example as it deals with the old twitter api but when I run the application close it or activate Win or Search Buttons and then re launch it again the page state is not the same . Here is what I changed in the view Model to simulate a new Twitter Feed : .. . .. . But when I close my application and re launch it the state is not the same for example the scroller position is not the same as when I left the application although there is a method in this sample to remember the scrolling position of the list . Do you know why tombstonning is not working properly Comment : Are you running it on emulator Have you set in project- properties- debug checbox Tombstone upon deactivation Comment : No I am running it on a phone .. . Answer : Closing has nothing to do with tombstoning . Tombstoning deactivation occurs when you press Win or Search buttons on the phone . You app becomes inactive and home screen or search app or any other that s just an example becomes active . Your apps goes to dormant or tombstoned state depending on many things . When you press back active app closes and previously active app becomes active again . That is called activation . When activation occurs your app might be restored from dormant everything is kept in memory app is just paused or from tombstoned state system relaunches the app and restores navigation stack and current page developer is responsible to restore all other state - variables input data and so on . So the difference is that tombstoned app doesn t keep all the state inside and that s developer s task . There is a good document on MSDN about Windows Phone App Lifecycle http : msdn.microsoft.com en-us library windowsphone develop ff817008 28v vs.105 29.aspx .. . .. . You can learn how it works using this article with example - WP7 Application Lifecycle and Tombstoning http : www.geekchamp.com articles wp7-application-lifecycle-and-tombstoning Comment : Sorry I did not make myself very clear I also pressed the WinButton and the search button but I returned to my the app it was like the app was running from the beginning Comment : Following your example did you implement LoadViewModelFromAppState method to load data Also you can debug deactivation and tombstoning and see if the ScrollOffset is really stored to and read from state on these events Comment : Yes i implemente this method can you please try to compile this code and see if it works Comment : In your example it s not enough items to make a scroll offset . I ve added a bit more items and in tombstoning it works . Make sure you check this checkbox scottlogic.com blog archive 2011 10 ForceTombstone.png http : www.scottlogic.com blog archive 2011 10 ForceTombstone.png What I noticed that scroll position is restored but not exactly at the same point . You might try this method but still the result is not exact . ItemsPanel.ScrollOwner.ScrollToVerticalOffset double State ScrollOffsetKey Comment : Indeed the the scroll position is restored with your line of Code . But there is something else that i would like to know When I re launch my app there is this image of a clock how can I remove this", "Question : I have a listbox in my WP7 app and I would like to keep save listbox inserted items when I reload the application . I tried this but it not work : .. . .. . What should I do Comment : how are you populating the listbox .. . Answer : In tombstoning you should look at storing application data in the PhoneApplicationService.State or IsolatedStorage.ApplicationSettings depending on the size of the data . The App.xaml.cs file already contains four methods to help you know when you application is Launching raised when the user initially launches the application Activated raised when the application is dormant or tombstoned and the user navigates back to the application Deactivated whenever the user navigates forward away from the application . Although applications are typically made dormant after they are deactivated there is no way to know at this point whether the application will be tombstoned or terminated after this event and Closing when the user uses the Back button to navigate backwards past the first page of your application . After this event your application is terminated .. . .. . For more info check out : How to : Preserve and Restore Application State for Windows Phone http : msdn.microsoft.com en-us library ff967547 28v vs.92 29.aspx", "Question : I have a page where user can enter his name and attach an image . When returning from tombstoning state is it mandatory for my app to restore the image too 1 . Is it app certification requirement something without which my app will not pass certification Or is it a recommended pattern 2 . same question in the case-when I have a pivot for example is it mandatory to save the index of selected pivot item and restore the selection when activating from tombstoning Not necessary : Is there a popular library framework to help me with tombstoning and serializing objects images etc .. . Answer : According to the Technical certification requirements for Windows Phone http : msdn.microsoft.com en-us library windowsphone develop hh184840 28v vs.105 29.aspx the only requirements are : .. . .. . A Windows Phone app is deactivated when the user presses the Start button or if the device timeout causes the lock screen to engage . A Windows Phone app is also deactivated with it invokes a Launcher or Chooser API . .. . A Windows Phone OS 7.0 app is tombstoned terminated when it is deactivated . A Windows Phone OS 7.1 or higher app becomes Dormant when it is deactivated but can be terminated by the system when resource use policy causes it to tombstone . .. . When activated after termination the app must meet the requirements in Section 5.2.1 Launch time . As the section 5.2.1 - Launch time only concerns startup performance and responsiveness you don t have a certification requirement for your issue . However if the user enters data attaches images etc . and let s say it answer a call does some other stuff and get s back to the application and then the data he entered was lost.. . it surely won t appreciate it . That will look more like a defect bug . Concerning the serialization of your state I recommend you to use binary-serialization as the performance is at least 10x better than using Json Xml or any other format . Personally I implement a custom interface IBinarySerializable to my state related classes and use this BinaryWriter extensions class to help writing the serialization code : .. . .. . .. . .. . Comment : OK so it s not a requirement to pass the certification . I am in big hurry with publishing the app I will fix the issue in an update .", "Question : i want to know what are your strategies for saving state in a windows-phone-7 wp7 app . when i say state i mean the model-view state of each page in the stack . recently i asked a question at problems with tombstoning in WP7 cannot tell if i need to restore or instantiate query new data http : stackoverflow.com questions 6675979 problems-with-tombstoning-in-wp7-cannot-tell-if-i-need-to-restore-or-instantiate and the solution works . however this approach seems to be ad-hoc and or page-specific only . the code doesn t save the states of the pages preceding it . it s my understanding that when the app is activated or deactivated you are supposed to handle restore or backup of the app s state respectively . the generated code-behind for App.xaml.cs generates the methods .. . .. . how are we to take advantage of these methods to save an applications full state when being tombstoned i haven t found a good tutorial yet online . any help is appreciated . .. . Answer : In practise you might as well forget those methods . You shouldn t think of tombstoning as persisting state more as of persisting data . You obviously can t magically tombstone the state of your entire application . And generally speaking the UI state of a page will only be known of the individual page . What you need to do is to figure out what UI states you wish to persist if any and then persist those along with the data obviously in the PhoneApplicationService.State or IsolatedStorage.ApplicationSettings depending on the size of the data . For ViewModels it s fairly easy to tombstone them . Just add the code to check if a tombstoned instance exists and then load the data of the viewmodel with that upon creation . And if you bind all the UI settings to your viewmodel you re pretty much golden . The code from your previous question can be used in your ViewModels constructor with pretty much the same result . And to constantly persist the ViewModel just attach a local handler for PropertyChanged and save the ViewModel s state every time that s called .", "Question : I was wondering when is more appropriate to save the view model of the single pages . I see two possibilities : .. . .. . 1 . Save the state of each page it s viewmodel everytime you navagitefrom it so that it is already saved if the application happens to be terminated and reactivated during the tombstoning process .. . 2 . In the application deactivated event go through all the pages that are in the navigation stack and save their state their viewmodel and then re-inject it in the application activated event . Which is the correct way of handling it Thx Simone .. . Answer : I suppose it depends on your needs but it s unlikely you need to stray from the documentation which suggests the application deactivated event as the appropriate place to save persistent and transient state data while close should only save persistent . Execution Model Overview http : msdn.microsoft.com en-us library ff817008 28v vs.92 29.aspx see the control-flow diagram under Activating .. . .. . This article http : jesseliberty.com 2010 09 22 iphone-to-windows-phone-7-application-lifecycle-and-tombstoning also gives a decent explanation with examples of the app lifecycle and tombstoning differentiating between backing out closing deactivating and tombstoning . You can t anticipate when a user will-change the foreground app between page changes . You can however anticipate what will happen when closing or deactivating . Therefore saving your page state between views seems extraneous .", "Question : I am running very basic xml reader and I pass some data to the details page by using : .. . .. . For a week I am trying to read and understand how to deal with Tombstoning but I failed . I managed to use Tombstone Helper but i couldn t save images and webbrowser content . In the earlier question : WP7 - Resume from the page I assigned http : stackoverflow.com questions 6731228 wp7-resume-from-the-page-i-assigned . I heard that I can save the navigation url so when the user clicks back wp7 will navigate to the same url like before . For the records : I don t use ViewModel .. . .. . I would like to get your view on how to save this url so My damned : application can tombstone and I can rest a while : D . .. . .. . Thanks in advance . .. . Answer : The page URI including querystring is restored when an application returns from its tombstoned state . Rather that using Tombstone Helper I would recommend that you learn how tombstoning actually works have a read of this article : .. . .. . http : www.scottlogic.co.uk blog colin 2011 05 a-simple-windows-phone-7-mvvm-tombstoning-example .. . .. . It s not too complicated . Comment : Thanks Colin . Your tutorial has been so useful to me . It took some time but I did it at last : P", "Question : I m reading through Windows Phone 7.5 Unleashed and there is a lot of code that looks like this in the code-behind for a page : .. . .. . The idea is that loaded will be false when resuming from a tombstoned state so we know that we want to rebuild the view model . My question is : Why load the transient state outside of the if block If our memory has not been thrown away i.e . the application has not been tombstoned can t we just keep using the old view model without reloading its state Should transient state always be loaded when a page is navigated to or just when resuming from a tombstoned state .. . Answer : I m not familiar with the book and from the code you ve shown it s hard to say if this is correct or not . It comes down to what LoadTransientState actually does . The approach you want to take to handling tombstoning is making sure that as long as it makes sense within the application the app page should be in the same state when the user returns to it as when they left . So if LoadTransientState is only concerned with the persistence of information while tombstoning then it may be appropriate to move it inside the if block . If it deals with some other form of transient data then probably not . Hopefully LoadTransientState will contain some logic to make sure it s not setting or resetting data that already exists or has been set internally and so will avoid any intended consequences of being called unnecessarily . Some obvious exceptions being live data timers possibly real-time info etc .", "Question : I want to implement tomb-stoning in my WP7 app and this app is not based on MVVM Pattern . Can any one refer me any good example of that to implement that . So I can maintain states of my app with some generic class . .. . Answer : Here are a few links that do pretty well explaining it : .. . .. . This one does a good job explaining the different states that you have to manage including the difference between suspended and tombstoned . http : lnluis.wordpress.com 2011 09 25 fast-application-switching-in-windows-phone .. . .. . Shawn Wildermuth is really good and shows you in this video how to implement . http : vimeo.com 14311977 .. . .. . Here s a blog post that explains in good detail http : xna-uk.net blogs darkgenesis archive 2010 11 08 there-and-back-again-a-tombstoning-tale-the-return-of-the-application.aspx .. . .. . And this one is from the Windows Phone Developer Blog : http : windowsteamblog.com windows-phone b wpdev archive 2010 07 15 understanding-the-windows-phone-application-execution-model-tombstoning-launcher-and-choosers-and-few-more-things-that-are-on-the-way-part-1.aspx .. . .. . Basically when you want to tombstone you need to use the Application Deactivated event to store your variables in isolated storage and use the Application Activated event to retrieve them . With the advent of Mango last fall you should put a test in Application Activated to see if the app is coming from a suspended state . EDIT to add another example : Maybe this additional simple example will help you . http : dotnet-redzone.blogspot.com 2010 09 windows-phone-7-scrollbar-position.html Comment : I would also recommend Shawn s book : amazon.com Essential-Windows-Phone-7-5-Application dp http : www.amazon.com Essential-Windows-Phone-7-5-Application dp 0321752139 Comment : Thanks for such detailed answer . I know the basic idea of tombstoning . In my case I have PanromaPage and there are lot of stuff on it Like Longlist selecter on one item on Other Item Listbox and On Thir Item there are many Textboxes . So I want to preserve the state of my page or you can say state of my controls . I am confused how to achieve this Comment : You re not giving a whole lot of information . Like if the controls are bound to something etc . Here is another nicely detailed example - does it help blogs.microsoft.co.il blogs alex golesh archive 2010 07 14 http : blogs.microsoft.co.il blogs alex golesh archive 2010 07 14 silverlight-for-windows-phone-7-tombstoning.aspx Comment : See edited answer for one more example .", "Question : If I lock my phone while running my application and unlock it say after 30 minutes or 60 minutes my screen appears blank . All my data its a huge list compare it to a user s twitter-feed which was in an Observable collection in my ViewModel has disappeared . When I refresh I get NullReferenceException . Note that I am not handling any state save while locking and unlocking the phone . Is that the reason for the loss of my data How can I handle it Since there is a limit on the state data which can be saved of 4Mb Max will it affect the functioning of my application even if I do implement it Update .. . .. . I have tried the following things : .. . 1 http : www.scottlogic.co.uk blog colin 2011 05 a-simple-windows-phone-7-mvvm-tombstoning-example .. . 2 http : www.scottlogic.co.uk blog colin 2011 10 a-windows-phone-7-1-mango-mvvm-tombstoning-example .. . and many more . The problem which I now face is that my application s viewModel contains an observable collection which I have binded to the UI . This observable collection is a collection of my user-defined class which contains complex data-members . One of them is a dictionary . When i try to save my viewModel using XMLSerialization it throws an error as XML serialization doesn t support Dictionary . I have also tried to write my viewmodel after Data contract serialization onto the IS during App Deactivated and retrieve it on App Activated . But my collection is null on resume . On opening the IS file it shows that the collection was not written onto the file . Am I missing some key ingredient in-order to solve this problem Note : I need my list . I cannot refresh data . Comment : If you re saving too much data probably your app is getting terminated before flushing data onto disk . Deactivated event has a timeout of 10 seconds your application will be forcefully terminated if you exceed the limit . Check out SaveDataToIsolatedStorage and GetDataAsync in this http : msdn.microsoft.com en-us library windowsphone develop ff967547 v vs.92 .aspx msdn article for a strategy to read save data incrementally over application lifetime . Comment : The message is get is this The type System.RuntimeType was not expected . Use the XmlInclude or SoapInclude attribute to specify types that are not known statically . Not : I am not using System.RuntimeType anywhere in my project it might be present in some System files internally . .. . Answer : I d suggest that this is the wrong approach . Tombstoning is designed to allow you to save your state not your data . You want to store the following : .. . .. . 1 . The page you re currently on .. . 2 . The parameters if any that were used to get your list of data that you are currently showing .. . 3 . Any selection state has the user selected a row etc .. . 4 . Any page state is it in edit-mode etc .. . .. . Not all of these things will apply but it should provide you with an idea of what you should be storing . This will be a significantly smaller set of data using simple data types rather than large chains of complex objects . So : .. . .. . 1 . Store the properties parameters that you use to get your data .. . 2 . When the app resumes go get your data again using the params . If this take a while give the user some form of progress notification . If you can t accurately do this then display activity on the screen until the load finishes so the user knows that something is happening . Comment : so shall i open my homescreen only every time when my app resumes from tombstone state i.e . start the flow from state 1 Comment : When you resume you should return the user to where they were when the app tombstoned . When resuming you should redirect to the correct page and set the state of the page to what it was before the app was suspended . Comment : But according to my app usage its difficult to maintain on which page the user is on . Thus I am directing the user to page1 everytime . Hoping the app gets tombstoned after a long time after suspension of the app . Comment : Fair enough - then that sounds good", "Question : I was wondering when is more appropriate to save the view model of the single pages . I see two possibilities : .. . .. . 1 . Save the state of each page it s viewmodel everytime you navagitefrom it so that it is already saved if the application happens to be terminated and reactivated during the tombstoning process .. . 2 . In the application deactivated event go through all the pages that are in the navigation stack and save their state their viewmodel and then re-inject it in the application activated event . Which is the correct way of handling it Thx Simone .. . Answer : I can t vote up the previous answer because I don t have sufficient reputation but yes any transient state information should be persisted in the Application.Deactivated event and then restored in the Application.Activated event for tombstoning support . If you need to store anything between application sessions then you could use the Application.Closing event but depending on what you need to store you could just store it whenever it changes . Again depending on what you need to store you can either restore it in the Application.Launching event or just read it when you need it .", "Question : I read a lot about application states tombstoning and recommended practises but I am still confused .. . .. . Here is my scenario .. . .. . User launches app through application icon . User then moves to next page . User Click on Windows button . User launches app again using application icon .. . .. . What should happen here My second page should be displayed because user didn t quit the app through back button .. . Main page should be displayed because user launched it through app list which means new instance .. . .. . MSDN says .. . .. . Ensure that when your application is launched by the user from Start or the installed applications list the user is taken to a consistent launch experience . It should be evident to the user that they are experiencing a new application instance . Does this mean that I should launch the main page again not second page If yes should my app state only be restored to second page when user comes to my app through back button and Application Activated event is fired .. . Answer : You should start new instance of application . I believe this is also part of certification process . And the whole thing would get quite complicated because only way to ensure that application is onpened on same page with same data is to save whole state into isolated storage .", "Question : I was wondering when is more appropriate to save the view model of the single pages . I see two possibilities : .. . .. . 1 . Save the state of each page it s viewmodel everytime you navagitefrom it so that it is already saved if the application happens to be terminated and reactivated during the tombstoning process .. . 2 . In the application deactivated event go through all the pages that are in the navigation stack and save their state their viewmodel and then re-inject it in the application activated event . Which is the correct way of handling it Thx Simone .. . Answer : Unfortunately the best time to save the state will depend on : the application the complexity of the models used by each page the interaction that each page supports and the complexity of models shared between pages at the app level . As a general rule I try and have a single model at the application level and persist that on activation deactivation . The model for a page is a reference to part of the app level model and I only persist page specific information on navigation from to a page . Examples of page specific information I persist are : entered but unsaved data and scroll positions .", "Question : I was wondering when is more appropriate to save the view model of the single pages . I see two possibilities : .. . .. . 1 . Save the state of each page it s viewmodel everytime you navagitefrom it so that it is already saved if the application happens to be terminated and reactivated during the tombstoning process .. . 2 . In the application deactivated event go through all the pages that are in the navigation stack and save their state their viewmodel and then re-inject it in the application activated event . Which is the correct way of handling it Thx Simone .. . Answer : This is something I have given some thought to as well . I ve generalised my view of it to this . Save as early as you can . .. . .. . What this means is short of any other imperatives which motivate you to defer your save do your save at the earliest available opportunity . You might save directly to your main store or you might save to transient state specifically for handling tombstoning . You might save in the background while the page is open . You might save when the user requests to navigate between pages . In situations where something unexpected can occur such as loss of power an exception requiring the users attention noting no time for this if being deactivated saving early offers a bit more dependendability to the user . Imperatives that might motivate you to defer saving could include .. . .. . Depending on your architecture it may be inconvenient to implement saving data at a page level . Depending on the volume of data to be saved and the architecture of your isolated storage model it may detract from performance substantially trying to save at a page or field level .", "Question : I have a application built for both windows-8.1 and windows-phone-8.1 . There is a non static-class with static-members in a portable-class-library which is being shared by both tablet and phone projects . In phone on tombstoning the static properties are lost . How do i store the static-class members of a portable-class-library in deactivated event and restore to the current instance of the non-static class inside the portable-class-library in the activated event of the phone life cycle so that the after tombstoning the application continues to run without any crash . .. . Answer : It depends on the access level of those static-members . If they re public and you can access them directly from your Windows Phone application then you can just save and restore them as you normally would with your app s state in the appropriate application lifecycle handlers or with the SuspensionManager class if that s what you re using . This means that your portable-class-library doesn t care about application lifecycle or saving restoring state or anything like that instead it is the responsibility of your Windows Phone application to provide this behavior and your portable-class-library can remain independent of such Windows Phone-specific requirements . If they re non-public then your portable-class-library will need to provide some way of saving and restoring its internal state . You could expose static-methods to do this which you would call in the appropriate application lifecycle handlers of your Windows Phone application . For example you might have a method in your portable-class-library like : .. . .. . You d call this method in the suspending handler for your app for example : .. . .. . Similarly you would load the state in your App.OnLaunched override method when e.PreviousExecutionState ApplicationExecutionState.Terminated . The Pivot App project template or similar contains skeleton-code for application lifecycle events that you can work from . How do i store the static-class members of a portable-class-library in deactivated event and restore to the current instance of the non-static class inside the portable-class-library .. . The fact that your class is non-static doesn t matter you have static-members in that class which are shared amongst all instances of that class . You can t restore the state of static-members of just one instance of your class that doesn t make any sense .", "Question : null .. . Answer : I have an issue with the tombstoning mechanism of Caliburn.Micro . For example I have three Views ViewModels : .. . .. . MainPageViewModel : displays each item in a list .. . DisplayPageViewModel : displays detailed item information .. . MaintainPageViewModel : add or edit an item .. . .. . I navigate through MainPageVM DisplayPageVM and MaintainPageVM . Then in MaintainPageVM I navigate back to DisplayPageVM via navigationService.GoBack . In DisplayPageVM I pin the item to start and I think at this time the MaintainPageVM gets tombstoned although it is not active anymore . After that I navigate back to MainPageVM and then navigate forward to MaintainPageVM to create a new item . A new instance of MaintainPageVM is created but the values from the instance before are restored . This does only occurre if I leave the app by pinning an item to start in the DisplayPageVM tombstone . This is my StorageHandler for the MaintainPageViewModel : .. . .. . Could it be possible that I don t close my MaintainPageVM correctly so that the StorageHandler for this ViewModel is still active although the ViewModel was deactivated EDIT .. . .. . I checked the documentation http : caliburnmicro.com documentation windows-phone tombstoning of Caliburn.Micro : .. . .. . I have to specify an Id . In this case the tombstoned MaintainPageVM will not be restored if I naviagte to this ViewModel again to add a new item . In another case the problem is stil present : I navigate to DisplayPageVM to display an item then navigate to MaintainPageVM to edit this item and go back without saving . In DisplayPageVM I pin the item to start MaintainPageVM gets tombstoned and go to MaintainPageVm again . The tombstoned version is restored again . So I have still the problem that the MaintainPageVM is in memory although I ve already navigated back from it . Comment : how is the MaintainPageVM declared in the container Comment : Per request : container.PerRequest MaintainPageViewModel", "Question : I read a lot about application states tombstoning and recommended practises but I am still confused .. . .. . Here is my scenario .. . .. . User launches app through application icon . User then moves to next page . User Click on Windows button . User launches app again using application icon .. . .. . What should happen here My second page should be displayed because user didn t quit the app through back button .. . Main page should be displayed because user launched it through app list which means new instance .. . .. . MSDN says .. . .. . Ensure that when your application is launched by the user from Start or the installed applications list the user is taken to a consistent launch experience . It should be evident to the user that they are experiencing a new application instance . Does this mean that I should launch the main page again not second page If yes should my app state only be restored to second page when user comes to my app through back button and Application Activated event is fired .. . Answer : The only thing I would show first one time only is the help or options screen so a new user can get to know the app . From that time on when the app is started it should start with the key main page that the user wants to use .", "Question : What is the recommended way to set up inject dependencies in a viewModel after tombstoning given that when the app deactivates you typically add the ViewModel to the State dictionary and then before your app reactivates the framework deserialises the ViewModel which requires a default constructor If I have the class below I would like to have dependency-injection create an instance of MyVM injecting the dependencies for IServiceA and IServiceB . Having a default constructor would not set up the requried dependecies . How should the ViewModel be setup in a tombstoning scenario here .. . Answer : I don t know if you re using a specific MVVM framework but Caliburn Micro has some built-in features for tombstoning . A little snippet from the docs : .. . .. . That example is storing the ActiveItemIndex a property on PiveotPageViewModel in phone state but it can also store entire object graphs in PhoneState AppSettings or your own custom implementation . You get all that by inheriting from StorageHandler . With CM you don t have to worry about re-injecting services it will handle that for you as it has it s own built-in container . CM WP7 Docs http : caliburnmicro.codeplex.com wikipage title Working 20with 20Windows 20Phone 207 20v1.1 referringTitle Documentation .. . .. . In a recent Hanselman http : www.hanselman.com blog FromConceptToCodeIn6HoursShippingMyFirstWindowsPhoneApp.aspx post about building a WP7 app he talked a bit about TombstoneHelper http : tombstonehelper.codeplex.com documentation . I haven t used this one but it looks interesting .", "Question : i ve just run into the infamous tombstoning problem issue in WP7 . let s say i have 3 pages FirstPage.xaml SecondPage.xaml and ThirdPage.xaml . the natural flow will be : .. . .. . FirstPage.xaml - SecondPage.xaml - ThirdPage.xaml .. . .. . in other words .. . .. . main page - page with list of objects - page displaying one object in detail from previous page .. . .. . when i go from FirstPage.xaml to SecondPage.xaml i have to do a database query to get a List in SecondPage.xaml . i then need to go to a ThirdPage.xaml from SecondPage.xaml after i select one MyObject from List . at this point tombstoning is becoming very confusing for me . i know when going FirstPage.xaml - SecondPage.xaml the constructor of SecondPage.xaml.cs is called . i know when going ThirdPage.xaml - SecondPage.xaml going back by hitting the back button or NavigationService.GoBack the constructor of SecondPage.xaml.cs is NOT called . when i move from SecondPage.xaml to ThirdPage.xaml i store the view-model VM objects in PhoneApplicationService.Current.State SecondPage.xaml.cs.OnPageNavigatedFrom . my flawed strategy was well if the constructor of SecondPage.xaml.cs is called in one instance FirstPage.xaml - SecondPage.xaml but not in the other instance ThirdPage.xaml - SecondPage.xaml then i can set a boolean flag in the constructor whether to do a fresh DB query or to restore the page s state from PhoneApplication.Current.State . the boolean flag is set to false initially and only set to true in the constructor of SecondPage.xaml.cs . i thought this worked well but then when i pressed the start button to leave the app and then hit the back button to come back to the app the constructor of SecondPage.xaml.cs was called . so i do another fresh DB query instead of restoring the state which is NOT the intended behavior . my question is this how do i know when to do a fresh DB query vs a restore when the user hits start and then back to get to the app i thought about how to solve this myself but most of what i thought up were kludges it seemed un-natural and as-if i was tinkering to get things to work . for example i thought i can pass in a querystring from FirstPage.xaml to SecondPage.xaml i.e . SecondPage.xaml freshDbQuery 1 but when i move from ThirdPage.xaml back to SecondPage.xaml that querystring key-value pair freshDbQuery 1 is always so so as you can tell i don t know wp7 too well . any help is appreciated . .. . Answer : All your handling for tombstoning should be done in the OnNavigatingFrom and the OnNavigatedTo events . You can create all purpose handlers for your situation with the following : .. . .. . Use this in preference to OnNavigatedFrom wherever possible . Comment : thanks . i didn t revisit this issue again until this morning when it haunted me again . it s working quite well . but it seems so ad-hoc this mvvm + tombstoning combination . i understand mvvm it s actually a nice design pattern . however there must be a more disciplined way of saving state i mean the whole state that would mean the view+model of the ViewModel part of the MVVM . is there a general purpose framework to handle this issue Comment : the approach you listed above works on my emulator . however when i test it on my real device press the home button then press the back button all i get is a page saying Resuming with a progress-bar running . any ideas Comment : @user373312 If it s stuck displaying resuming check that VS isn t waiting for you to restart the debug session F5 Comment : @user373312 You can save the whole state if you have app level viewmodel model objects and wish to handle them with the activated deactivated events . Much of the detail about handling tombstoning is actually page view specific so it s not always appropriate the for the viewmodel to handle this .", "Question : I am using the Tombstone helper http : tombstonehelper.codeplex.com documentation referringTitle Home from Codeplex and I am a bit confused I thought that it saves the state of your app s controls i.e Textbox and I use the code on one page of my app and don t use it on another page but when I test it it just saves the state of the Textboxes in both pages the same the Textbox without the Tombstone Helper attached when I test it keeps it s state . The way I am testing is pressing the Windows logo on the emulator opening the browser and then keeping the back button pressed . this is the code I am using for Tombstoning .. . .. . I would appreciate if you could help me Comment : Are you sure your testmethod actually causes thombstoning Comment : I don t know what other test methods I could do on an emulator Comment : How long does it take for Tombstone to come into effect .. . Answer : You are not actually tombstoning your app - only deactivating it . To force the app to tombstone while debugging do the following : .. . .. . 1 . In Visual Studio right-click the project in Solution Explorer and select Properties to open the Project Designer . 2 . On the Debug tab check the Tombstone upon deactivation while debugging check box if you want the application to tombstone when deactivated . Uncheck the check box if you want the application to go into a dormant state when deactivated . source : http : msdn.microsoft.com en-us library ff402564 v vs.92 .aspx Comment : This worked thanks", "Question : I read a lot about application states tombstoning and recommended practises but I am still confused .. . .. . Here is my scenario .. . .. . User launches app through application icon . User then moves to next page . User Click on Windows button . User launches app again using application icon .. . .. . What should happen here My second page should be displayed because user didn t quit the app through back button .. . Main page should be displayed because user launched it through app list which means new instance .. . .. . MSDN says .. . .. . Ensure that when your application is launched by the user from Start or the installed applications list the user is taken to a consistent launch experience . It should be evident to the user that they are experiencing a new application instance . Does this mean that I should launch the main page again not second page If yes should my app state only be restored to second page when user comes to my app through back button and Application Activated event is fired .. . Answer : Unless you re doing some crazy custom stuff this should be handled for you as page navigation is supported by the deactivation process . If the user backs into your application the last page they were on will be restored and PhoneApplicationService.Activated http : msdn.microsoft.com en-us library microsoft.phone.shell.phoneapplicationservice.activated 28v vs.92 29.aspx will be raised ActivatedEventArgs.IsApplicationInstancePreserved http : msdn.microsoft.com en-us library microsoft.phone.shell.activatedeventargs.isapplicationinstancepreserved 28v vs.92 29.aspx will be true if you don t need to unpersist your state . If the user accesses your application from start the application s default page will be loaded and PhoneApplicationService.Launching http : msdn.microsoft.com en-us library microsoft.phone.shell.phoneapplicationservice.launching 28v vs.92 29.aspx will be raised ." ] }
[ "yes-answer-long", "yes-answer-short" ]
user
UNK_RELATION
jedi-code-library@delphi@115
jedi-code-library -- the jedi-code-library jcl is a set of utility functions and non-visual classes for re-use in @placeholder and c++ builder projects .
{ "confidence": [ 58.61811065673828, 51.34014892578125, 49.893211364746094, 49.790306091308594, 48.874961853027344, 48.20133590698242, 44.03156280517578, 40.1412467956543, 39.76615524291992, 38.264068603515625, 36.92687225341797, 34.864830017089844, 34.17353820800781, 32.52100372314453, 29.732160568237305, 29.19498634338379, 29.18860626220703, 28.50870132446289, 28.426860809326172, 27.762836456298828, 27.762836456298828, 27.762836456298828, 27.762836456298828, 27.499919891357422, 27.013851165771484, 27.00528335571289, 26.212854385375977, 25.926353454589844, 25.833740234375, 25.833740234375, 25.833740234375, 25.833740234375, 24.857341766357422, 24.653093338012695, 24.26413917541504, 24.237804412841797, 24.237804412841797, 23.898880004882812, 23.770694732666016, 23.63553237915039, 23.51950454711914, 23.46869659423828, 23.330724716186523, 23.330724716186523, 23.262706756591797, 23.262706756591797, 23.107589721679688, 22.170564651489258, 21.89503288269043, 21.425933837890625, 21.425933837890625, 21.425933837890625, 21.425933837890625, 21.425933837890625, 21.425933837890625, 21.425933837890625, 21.425933837890625, 21.425933837890625, 21.425933837890625, 21.425933837890625, 21.425933837890625, 21.425933837890625, 21.425933837890625, 21.425933837890625, 21.425933837890625, 21.425933837890625, 21.425933837890625, 21.425933837890625, 20.343355178833008, 19.87154197692871, 19.505212783813477, 19.505212783813477, 19.011768341064453, 19.011768341064453, 18.70977020263672, 18.034975051879883, 16.667007446289062, 16.667007446289062, 16.667007446289062, 16.667007446289062, 16.667007446289062, 16.667007446289062, 16.667007446289062, 16.667007446289062, 16.667007446289062, 16.667007446289062, 16.667007446289062, 16.667007446289062, 16.667007446289062, 16.667007446289062, 16.667007446289062, 16.667007446289062, 16.667007446289062, 16.667007446289062, 16.667007446289062, 16.667007446289062, 16.667007446289062, 16.667007446289062, 16.667007446289062 ], "content": [ "There s a separate tag for the Jedi Code Library .", "You can download the latest stable build as zip file from github.com project-jedi jcl tree JCL-Latest https : github.com project-jedi jcl tree JCL-Latest then zip file containing jedi.inc from github.com project-jedi jedi https : github.com project-jedi jedi then place the jedi.inc into the proper folder as described in the answer and run install.bat", "If you are using an actual GIT client you can clone github.com project-jedi jvcl https : github.com project-jedi jvcl and github.com project-jedi jcl https : github.com project-jedi jcl instead of the trunk versions .", "Place it into a new folder jedi in the ...jcl source include folder .", "The two checkouts are : .. . .. . Into Jvcl folder : https : github.com project-jedi jvcl trunk jvcl Into Jcl folder : https : github.com project-jedi jcl trunk jcl .. . .. . You should arrange for the common root folder jedi to be in your program files folder e.g .", "Using TortoiseSVN checkout the two JEDI GIT repositories so that you have a common root folder Jedi and the two checkouts are subfolders of it Jcl and Jvcl .", "Now go to the jedi jcl folder and right-click install.bat using Run as administrator .", "Here is my solution for installing the JCL and JVCL latest Project Jedi code from the GIT repository thus to get XE5 support until binary installers are readily available .", "c : program files x86 .. . .. . Now checkout the JEDI.INC file which you will need for XE5 but checking out from : .. . .. . https : github.com project-jedi jedi .. . .. . You will see a file jedi.inc in this checkout .", "Update Was using the binary Jedi installer from A.Hausladen http : andy.jgknet.de blog 2011 11 updated-jcl-and-jvcl-binary-installers-for-xe2-2 intended for use in Delphi trial editions only .", "Find files named JclUnitVersioning.dcu that are not in the proper JCL Library folder and remove them .", "Now go to the jedi jvcl folder and right-click install.bat using Run as administrator .", "Now I try to load the JVCL package 16 it opens delphi and starts to load libarys When it gets to the Jedi code Library MPL1.1 i start to get errors like below .. . .. . this is not the only one i get quite a few ill post a few more in case it helps .. . .. . ect.. .", "It seems to me that the pace of XE3 - XE4 - XE5 rapid release cycle has outstripped the Jedi team s ability to test and release new installers .", "4 . make an AddFunc that s able to use method functions .", "After answering the prompts this should install the jcl .", "After several hours of recompiling both my projects and the JCL projects the installer bat file errors on my PC discovered the problem was the order in which the directories were declared in the tools options Delphi Options libraries .", "AddFunc with standalone functions .", "The proper library folders are named jcl lib d7 through jcl lib d16 depending on your delphi version number .. . .. . This usually means that your project has access to both a directory that is in your library-path or project search path that contains pre-compiled DCU files and may also have access to some source units .pas files and that one or more of the units that depends on other units was compiled at a different time than now with multiple versions of a common unit .", "Although JCL comes with some samples I seem to miss something .", "I am trying to manually install JCL and jvcl for delphi-xe2 .", "I have installed JCL as directed and it seems to have installed with no issues .", "Has anyone managed to get JCL and JVCL working with XE5 yet please", "Of course that s hardly ideal is it since the whole purpose of a Library path was to contain a precompiled library of DCU files .", "You should have the dcp in your library path .", "Took them all out added the version specific directory eg lib D14 lib D17 Win32 and then the other JCL sub-directories required ie one at a time until a project using JCL would build", "Try to add the following to your Search Path HKCU Software Embarcadero BDS x.x Library Win32 of course including the correct path prefix : .. . .. . You might also be interested in the following link : http : andy.jgknet.de blog 2013 05 how-to-install-jcl-and-jvcl-for-xe4", "I am trying to install JVCL 3.47 on a Delphi XE3 instance but I failed twice I know that first I must install JCL When I run Install.bat located in the jcl folder I get this error : Windows cannot find . . bin JediInstaller.exe .. . .. . .. . I looked into bin folder but indeed JediInstaller.exe is not there So I have opened the project JediInstaller located in . . JVCL347CompleteJCL241-Build4571 jcl jcl install and compiled it and then I started JediInstaller and installed JCL Afer I tried to install JVCL again with opening the installer project and compiling it but again it returned an error that JCL is not installed and I don t know way because I have it installed .. . .. . When I installed JVCL 3.45 on Delphi Xe2 Win 7 it worked by opening install.bat but now on Win8 Delphi XE3 it doesn t work.. .", "Take a look at jcl examples common containers hashing HashingExample.dpr for a few examples integer strings objects etc .", "I have installing JCL http : jvcl.delphi-jedi.org via Install.bat and its successfully installed .", "The JCL tag is normally used for IBM s Job control language which runs on the IBM mainframe", "Using the installer that is ..jcl lib d16 win32 which contains the 32-bit jcl.dcp .", "But each - is its own dialog box with ignore cancel ignore all .. . .. . Now after I press Ignore 50 times it will finally load the project when i try to build all the projects for JVCl package it says required package jcl not found .", "I see that JCL and JVCL are now in GitHub and I have previously installed them both under XE3 using the built-in installer .", "My solution then was to use the Turbo Power SysTools evaluator that accepts methods .", "in library path i have .. . .. . in browsing path i have .. . .. . and in DCU debug path i have", "globally to the Unit scope names http : docwiki.embarcadero.com RADStudio XE4 en Library configuration option .", "This seems to be a non-problem .", "i want to be able to make available each object s weight available for use in the formula .", "I m trying to use TJCLHashMap family of classes but apparently this class has no useful public methods .", "The classes in JclHashMaps implement those interfaces .", "you can use the AddFunc method to make the function available : .. . .. . here s the problem.. . .. . .. . i need to call a method on an object instead of a standalone routine .", "In the Project Options dialog check if you have configured proper paths in Search Path section and if there are some which directs to the folders with your previous JCL installation delete them and try to rebuild the project .", "Uninstalling did not clear your Delphi current-user s registry settings nor did it format your hard drive so it s possible that there are JCL-named DCU files somewhere around that are messing you up .", "You either have old DCU files lying around that need to be rebuilt or removed or your project or library path contents are not consistent .", "and then review both your project s search path and library path to see that both contain only the folders you think they should contain .", "I had installed JCL and JVCL with these installers http : andy.jgknet.de blog 2011 11 updated-jcl-and-jvcl-binary-installers-for-xe2-2 because I thought they would have solved an issue I had but maybe they where compiled with a different version of the IDE and installers simply copied the DCUs without compiling sources with my IDE .", "Cleaning it up is possible in several ways It may be a simple matter for you to make sure you compile 100 from .pas files and have no Library folders containing .dcu files at all .", "When I try to compile I get .. . .. . DCC Fatal Error MyUnit.pas 9 : F2051 Unit JclUnitVersioning was compiled with a different version of System.Contnrs.TObjectList.Remove .. . .. . at the following row : .. . .. . I tried uninstalling and reinstalling RAD Studio JCL and JVCL but nothing changes .", "i m using JCL s-expression evaluator TEvaluator a marvelous creation donated by barry kelly .", "THANK YOU barry", "background .. . .. . i ve used the AddFunc method .", "the reason is that i have a list of objects that provide the values .", "say we have a list of vehicle objects .", "each object has a Weight function .", "a silly example but it s easy to explain : .. . .. . my options : .. . .. . 1 .", "AddVar or AddConst -- but that isn t so great because i need to be able to raise an exception if the value is not available .", "2 .", "can t do that because the names of and number of variables is unknown until runtime .", "3 . modify the object to add a callback if the variable isn t found .", "i have actually done this but needed to edit a copy of the source to call back to make it do this .", "option 3 is actually built but an additional AddFunc would be nicer .", "the trouble is i don t know what method prototype to provide .", "i thought TMethod would be the way but my knowledge is too limited here.. . here was my unsuccessful attempt but i still get E2250 There is no overloaded version of AddFunc that can be called with these arguments at the eval.AddFunc call like before .", "thank you for your help", "mp", "figured it out.. . .. . .. . TFloat64MethodFunc function : TFloat of object", "Long time ago 2004 I have faced this problem .", "How to use this class", "You should use the interfaces declared in JclContainerIntf.pas .", "This solution may be of use to others when say XE6 comes along... .", "Or did you use a Subversion client to check out the git-repo", "after adding .. . .. . The solution is to change the uses to use a fully qualified-name : .. . .. . Now it compiles without error .", "If you d prefer to use old style unit scope names you might add for this case the System.Win namespace prefix e.g .", "If you don t find such directories in that section try to go to View Project Manager and right-click over you project item and try to use Clean and then Build .", "@LightBulb Hello I did that but still the same results I also think that it might be a issue of win 8 the thing is that I don t want to reinstall my os I will try today to set up a virtual-machine and I hope that I will install JVCL If somebody comes with another idea I will be thankfull best regards", "All methods are protected .", "A basic example would be great .", "Extend it and add public methods that call the protected methods internally", "shouldn t a generic hash map class has public methods", "This would be a tedious job .", "See Java .", ":", "Please somebody advise me how to install properly JVCL I need to modify a project built with XE2 and Jvcl by the day after tomorrow .", "Thanks in advance .", "Seems more likely to be a win8 issue than related to xe3", "Did you try Run as Administrator on install.bat", "I found the issue the thing was that my XE3 was a trial version and in trial delphi-xe3 doesn t have command-line compiler which is required by jcvl to install Could JVCL be installed without the command-line compiler", "You could compile it all manually rather than scripting .", "But why don t you get a real XE3", "That s the obvious solution .", "However when I try to install JVCL http : jvcl.delphi-jedi.org via install.bat I got an error message like this : .. . .. . Anyone know what s wrong here", "It seems you are not alone .", "If you remove the System .", "you can compile the JVCL version you have .", "http : issuetracker.delphi-jedi.org view.php id 6024", "Thanks Lieven . . it worked", "No problem .", "gl ." ] }
{ "confidence": [ 70.21297454833984, 64.16102600097656, 60.25992202758789, 51.29347610473633, 44.97599411010742, 37.0794677734375, 33.31336975097656, 32.76544952392578, 26.645383834838867, 26.043704986572266, 25.95903778076172 ], "content": [ "Question : I see that JCL and JVCL are now in GitHub and I have previously installed them both under XE3 using the built-in installer . I ve also used the XE4 special posted on the Embarcadero page http : cc.embarcadero.com item 29426 . Has anyone managed to get JCL and JVCL working with XE5 yet please Comment : It seems to me that the pace of XE3 - XE4 - XE5 rapid release cycle has outstripped the Jedi team s ability to test and release new installers . However I m not sure what you re asking . Did you clone the GIT repos and then run the usual install batch files Did that work if not what error did you get I would expect Andreas or someone will eventually post a new binary to CodeCentral as well . Comment : XE5 support has been comitted . This seems to be a non-problem . Comment : Thank you for your constructive suggestion Warren . I will see if the installer batch works from the commit . Comment : Thanks Warren you were right it nearly worked but with a common include file needed . See my procedure below . .. . Answer : Here is my solution for installing the JCL and JVCL latest Project Jedi code from the GIT repository thus to get XE5 support until binary installers are readily available . This solution may be of use to others when say XE6 comes along... . Using TortoiseSVN checkout the two JEDI GIT repositories so that you have a common root folder Jedi and the two checkouts are subfolders of it Jcl and Jvcl . The two checkouts are : .. . .. . Into Jvcl folder : https : github.com project-jedi jvcl trunk jvcl Into Jcl folder : https : github.com project-jedi jcl trunk jcl .. . .. . You should arrange for the common root folder jedi to be in your program files folder e.g . c : program files x86 .. . .. . Now checkout the JEDI.INC file which you will need for XE5 but checking out from : .. . .. . https : github.com project-jedi jedi .. . .. . You will see a file jedi.inc in this checkout . Place it into a new folder jedi in the ...jcl source include folder . Now go to the jedi jcl folder and right-click install.bat using Run as administrator . After answering the prompts this should install the jcl . Now go to the jedi jvcl folder and right-click install.bat using Run as administrator . After answering the prompts this should install the jvcl too . Comment : No need to check out the jedi.inc seperately it s included via git-submodules they just need to be initialized and updated which the install.bat should try to do . Comment : THanks for that Robert . I ran the INSTALL.BAT of course but it just failed with the missing jedi.inc . Did I have to get it manually I checked out using SVN i.e without GIT Comment : You should install Git and clone using Git . The subversion sources are no longer updated . Or did you use a Subversion client to check out the git-repo Because although GitHub has that feature that defeats the intended purpose of moving to Git So we could check out submodules for you automagically . So if you insist on using SVN you will have to do hacks like you did . Comment : If you are using an actual GIT client you can clone github.com project-jedi jvcl https : github.com project-jedi jvcl and github.com project-jedi jcl https : github.com project-jedi jcl instead of the trunk versions . Comment : You can download the latest stable build as zip file from github.com project-jedi jcl tree JCL-Latest https : github.com project-jedi jcl tree JCL-Latest then zip file containing jedi.inc from github.com project-jedi jedi https : github.com project-jedi jedi then place the jedi.inc into the proper folder as described in the answer and run install.bat", "Question : I am trying to manually install JCL and jvcl for delphi-xe2 . I have installed JCL as directed and it seems to have installed with no issues . Now I try to load the JVCL package 16 it opens delphi and starts to load libarys When it gets to the Jedi code Library MPL1.1 i start to get errors like below .. . .. . this is not the only one i get quite a few ill post a few more in case it helps .. . .. . ect.. . I can add rest if you need . But each - is its own dialog box with ignore cancel ignore all .. . .. . Now after I press Ignore 50 times it will finally load the project when i try to build all the projects for JVCl package it says required package jcl not found . in library path i have .. . .. . in browsing path i have .. . .. . and in DCU debug path i have Comment : The JCL tag is normally used for IBM s Job control language which runs on the IBM mainframe Comment : @BruceMartin : I corrected it for him . There s a separate tag for the Jedi Code Library . Comment : @KenWhite Thanks did not know the tag was different Sooo.. . any idea on solving this Comment : You should have the dcp in your library path . Using the installer that is ..jcl lib d16 win32 which contains the 32-bit jcl.dcp . Comment : @SertacAkyuz That seems to help I still get all the desgin time errors and when i start to build the project it starts with an error fmeJvSegmentedLEDDisplayMapper.sldEdit does not have a coresponding component . After i hit no it builds unitll i get error file-not-found ComObj.dcu .. . Answer : after adding .. . .. . The solution is to change the uses to use a fully qualified-name : .. . .. . Now it compiles without error . Comment : If you d prefer to use old style unit scope names you might add for this case the System.Win namespace prefix e.g . globally to the Unit scope names http : docwiki.embarcadero.com RADStudio XE4 en Library configuration option . This option is also available at project options level not only in global settings scope .", "Question : I am trying to manually install JCL and jvcl for delphi-xe2 . I have installed JCL as directed and it seems to have installed with no issues . Now I try to load the JVCL package 16 it opens delphi and starts to load libarys When it gets to the Jedi code Library MPL1.1 i start to get errors like below .. . .. . this is not the only one i get quite a few ill post a few more in case it helps .. . .. . ect.. . I can add rest if you need . But each - is its own dialog box with ignore cancel ignore all .. . .. . Now after I press Ignore 50 times it will finally load the project when i try to build all the projects for JVCl package it says required package jcl not found . in library path i have .. . .. . in browsing path i have .. . .. . and in DCU debug path i have Comment : The JCL tag is normally used for IBM s Job control language which runs on the IBM mainframe Comment : @BruceMartin : I corrected it for him . There s a separate tag for the Jedi Code Library . Comment : @KenWhite Thanks did not know the tag was different Sooo.. . any idea on solving this Comment : You should have the dcp in your library path . Using the installer that is ..jcl lib d16 win32 which contains the 32-bit jcl.dcp . Comment : @SertacAkyuz That seems to help I still get all the desgin time errors and when i start to build the project it starts with an error fmeJvSegmentedLEDDisplayMapper.sldEdit does not have a coresponding component . After i hit no it builds unitll i get error file-not-found ComObj.dcu .. . Answer : Try to add the following to your Search Path HKCU Software Embarcadero BDS x.x Library Win32 of course including the correct path prefix : .. . .. . You might also be interested in the following link : http : andy.jgknet.de blog 2013 05 how-to-install-jcl-and-jvcl-for-xe4 Comment : i dont see a current folder i assume with out the current Comment : after adding i still get errors updated post maybe it will help Comment : also note that link is for xe4 and the auto version I need manually install", "Question : I m migrating a Delphi 2 project to RAD Studio XE2 . When I try to compile I get .. . .. . DCC Fatal Error MyUnit.pas 9 : F2051 Unit JclUnitVersioning was compiled with a different version of System.Contnrs.TObjectList.Remove .. . .. . at the following row : .. . .. . I tried uninstalling and reinstalling RAD Studio JCL and JVCL but nothing changes . Update Was using the binary Jedi installer from A.Hausladen http : andy.jgknet.de blog 2011 11 updated-jcl-and-jvcl-binary-installers-for-xe2-2 intended for use in Delphi trial editions only . Comment : Go to Project Options menu item . In the Project Options dialog check if you have configured proper paths in Search Path section and if there are some which directs to the folders with your previous JCL installation delete them and try to rebuild the project . If you don t find such directories in that section try to go to View Project Manager and right-click over you project item and try to use Clean and then Build . Comment : You ve still got more crap lying around that merely uninstalling and reinstalling did not clean up . Uninstalling did not clear your Delphi current-user s registry settings nor did it format your hard drive so it s possible that there are JCL-named DCU files somewhere around that are messing you up . There is more state here to be addressed . See my answer . Search your drive for copies of JclUnitVersioning.dcu . .. . Answer : Just had the same problem with Delphi 2010 and XE3 both on same PC while migrating . After several hours of recompiling both my projects and the JCL projects the installer bat file errors on my PC discovered the problem was the order in which the directories were declared in the tools options Delphi Options libraries . Took them all out added the version specific directory eg lib D14 lib D17 Win32 and then the other JCL sub-directories required ie one at a time until a project using JCL would build", "Question : I m migrating a Delphi 2 project to RAD Studio XE2 . When I try to compile I get .. . .. . DCC Fatal Error MyUnit.pas 9 : F2051 Unit JclUnitVersioning was compiled with a different version of System.Contnrs.TObjectList.Remove .. . .. . at the following row : .. . .. . I tried uninstalling and reinstalling RAD Studio JCL and JVCL but nothing changes . Update Was using the binary Jedi installer from A.Hausladen http : andy.jgknet.de blog 2011 11 updated-jcl-and-jvcl-binary-installers-for-xe2-2 intended for use in Delphi trial editions only . Comment : Go to Project Options menu item . In the Project Options dialog check if you have configured proper paths in Search Path section and if there are some which directs to the folders with your previous JCL installation delete them and try to rebuild the project . If you don t find such directories in that section try to go to View Project Manager and right-click over you project item and try to use Clean and then Build . Comment : You ve still got more crap lying around that merely uninstalling and reinstalling did not clean up . Uninstalling did not clear your Delphi current-user s registry settings nor did it format your hard drive so it s possible that there are JCL-named DCU files somewhere around that are messing you up . There is more state here to be addressed . See my answer . Search your drive for copies of JclUnitVersioning.dcu . .. . Answer : You either have old DCU files lying around that need to be rebuilt or removed or your project or library path contents are not consistent . Find files named JclUnitVersioning.dcu that are not in the proper JCL Library folder and remove them . The proper library folders are named jcl lib d7 through jcl lib d16 depending on your delphi version number .. . .. . This usually means that your project has access to both a directory that is in your library-path or project search path that contains pre-compiled DCU files and may also have access to some source units .pas files and that one or more of the units that depends on other units was compiled at a different time than now with multiple versions of a common unit . I wish I could draw you a picture . Imagine you have a car and someone upgrades the engine changing it from a V6 to a V8 . Now someone who had previously been servicing your engine comes back and tries to find the place where the V6 s exhaust manifold attached . It s not there any more it s moved . Since the new engine is frozen in its current shape stay with me here your service technician simply goes back to you the customer and says sorry I m confused I can t continue I give up . That s roughly what this error message means . Cleaning it up is possible in several ways It may be a simple matter for you to make sure you compile 100 from .pas files and have no Library folders containing .dcu files at all . Of course that s hardly ideal is it since the whole purpose of a Library path was to contain a precompiled library of DCU files . So instead I suggest you do a cleanup delete all your DCU files and rebuild all your component packages from source you do have a batch-file for that purpose right and then review both your project s search path and library path to see that both contain only the folders you think they should contain . Comment : great I had installed JCL and JVCL with these installers http : andy.jgknet.de blog 2011 11 updated-jcl-and-jvcl-binary-installers-for-xe2-2 because I thought they would have solved an issue I had but maybe they where compiled with a different version of the IDE and installers simply copied the DCUs without compiling sources with my IDE . Many thanks Comment : The binary installers are for users of the TRIAL version of Delphi only . It says so clearly at the link you posted Glad that you solved it . But if in future you used a weird installer please note that in the question or we ll assume you used the regular installer .", "Question : I m trying to use TJCLHashMap family of classes but apparently this class has no useful public methods . All methods are protected . How to use this class Although JCL comes with some samples I seem to miss something . A basic example would be great . .. . Answer : You should use the interfaces declared in JclContainerIntf.pas . The classes in JclHashMaps implement those interfaces . Take a look at jcl examples common containers hashing HashingExample.dpr for a few examples integer strings objects etc .", "Question : I m trying to use TJCLHashMap family of classes but apparently this class has no useful public methods . All methods are protected . How to use this class Although JCL comes with some samples I seem to miss something . A basic example would be great . .. . Answer : Extend it and add public methods that call the protected methods internally Comment : shouldn t a generic hash map class has public methods This would be a tedious job . See Java . :", "Question : null .. . Answer : I am trying to install JVCL 3.47 on a Delphi XE3 instance but I failed twice I know that first I must install JCL When I run Install.bat located in the jcl folder I get this error : Windows cannot find . . bin JediInstaller.exe .. . .. . .. . I looked into bin folder but indeed JediInstaller.exe is not there So I have opened the project JediInstaller located in . . JVCL347CompleteJCL241-Build4571 jcl jcl install and compiled it and then I started JediInstaller and installed JCL Afer I tried to install JVCL again with opening the installer project and compiling it but again it returned an error that JCL is not installed and I don t know way because I have it installed .. . .. . When I installed JVCL 3.45 on Delphi Xe2 Win 7 it worked by opening install.bat but now on Win8 Delphi XE3 it doesn t work.. . Please somebody advise me how to install properly JVCL I need to modify a project built with XE2 and Jvcl by the day after tomorrow . Thanks in advance . Comment : Seems more likely to be a win8 issue than related to xe3 Comment : Did you try Run as Administrator on install.bat Comment : @LightBulb Hello I did that but still the same results I also think that it might be a issue of win 8 the thing is that I don t want to reinstall my os I will try today to set up a virtual-machine and I hope that I will install JVCL If somebody comes with another idea I will be thankfull best regards Comment : I found the issue the thing was that my XE3 was a trial version and in trial delphi-xe3 doesn t have command-line compiler which is required by jcvl to install Could JVCL be installed without the command-line compiler Comment : You could compile it all manually rather than scripting . But why don t you get a real XE3 That s the obvious solution .", "Question : I have installing JCL http : jvcl.delphi-jedi.org via Install.bat and its successfully installed . However when I try to install JVCL http : jvcl.delphi-jedi.org via install.bat I got an error message like this : .. . .. . Anyone know what s wrong here Thanks in advance . Comment : It seems you are not alone . If you remove the System . you can compile the JVCL version you have . http : issuetracker.delphi-jedi.org view.php id 6024 Comment : Thanks Lieven . . it worked Comment : No problem . gl . Comment : @Lieven post that as an answer Comment : @jachguate - Done . .. . Answer : Apparantly this is a known resolved issue . The solution is to remove the System . to compile the JVCL version you have http : issuetracker.delphi-jedi.org view.php id 6024", "Question : i m using JCL s-expression evaluator TEvaluator a marvelous creation donated by barry kelly . THANK YOU barry background .. . .. . i ve used the AddFunc method . you can use the AddFunc method to make the function available : .. . .. . here s the problem.. . .. . .. . i need to call a method on an object instead of a standalone routine . the reason is that i have a list of objects that provide the values . say we have a list of vehicle objects . each object has a Weight function . i want to be able to make available each object s weight available for use in the formula . a silly example but it s easy to explain : .. . .. . my options : .. . .. . 1 . AddVar or AddConst -- but that isn t so great because i need to be able to raise an exception if the value is not available . 2 . AddFunc with standalone functions . can t do that because the names of and number of variables is unknown until runtime . 3 . modify the object to add a callback if the variable isn t found . i have actually done this but needed to edit a copy of the source to call back to make it do this . 4 . make an AddFunc that s able to use method functions . option 3 is actually built but an additional AddFunc would be nicer . the trouble is i don t know what method prototype to provide . i thought TMethod would be the way but my knowledge is too limited here.. . here was my unsuccessful attempt but i still get E2250 There is no overloaded version of AddFunc that can be called with these arguments at the eval.AddFunc call like before . thank you for your help mp .. . Answer : Long time ago 2004 I have faced this problem . My solution then was to use the Turbo Power SysTools evaluator that accepts methods .", "Question : i m using JCL s-expression evaluator TEvaluator a marvelous creation donated by barry kelly . THANK YOU barry background .. . .. . i ve used the AddFunc method . you can use the AddFunc method to make the function available : .. . .. . here s the problem.. . .. . .. . i need to call a method on an object instead of a standalone routine . the reason is that i have a list of objects that provide the values . say we have a list of vehicle objects . each object has a Weight function . i want to be able to make available each object s weight available for use in the formula . a silly example but it s easy to explain : .. . .. . my options : .. . .. . 1 . AddVar or AddConst -- but that isn t so great because i need to be able to raise an exception if the value is not available . 2 . AddFunc with standalone functions . can t do that because the names of and number of variables is unknown until runtime . 3 . modify the object to add a callback if the variable isn t found . i have actually done this but needed to edit a copy of the source to call back to make it do this . 4 . make an AddFunc that s able to use method functions . option 3 is actually built but an additional AddFunc would be nicer . the trouble is i don t know what method prototype to provide . i thought TMethod would be the way but my knowledge is too limited here.. . here was my unsuccessful attempt but i still get E2250 There is no overloaded version of AddFunc that can be called with these arguments at the eval.AddFunc call like before . thank you for your help mp .. . Answer : figured it out.. . .. . .. . TFloat64MethodFunc function : TFloat of object" ] }
[ "yes-answer-long", "yes-answer-short" ]
delphi
UNK_RELATION
xlet@java@38
xlet -- an xlet is very similar to a @placeholder applet and is originally introduced in sun s java tv specification to support applications for digital tv .
{ "confidence": [ 55.09987258911133, 52.56779479980469, 51.34001922607422, 49.34466552734375, 46.86804962158203, 45.791893005371094, 44.040245056152344, 42.93852233886719, 42.025726318359375, 40.727867126464844, 40.29995346069336, 39.655303955078125, 38.73570251464844, 36.95271682739258, 36.95271682739258, 35.65486145019531, 35.65486145019531, 35.65486145019531, 35.259185791015625, 34.792762756347656, 34.58960723876953, 34.178428649902344, 33.84792709350586, 33.27855682373047, 31.98069953918457, 30.993797302246094, 30.993797302246094, 30.243587493896484, 29.07259178161621, 23.74158477783203, 22.17873191833496, 21.728078842163086, 21.212833404541016, 20.473403930664062, 19.645320892333984, 18.227895736694336, 17.727632522583008, 17.727632522583008, 16.880428314208984, 16.847089767456055, 16.83904266357422, 16.676177978515625, 14.986345291137695, 14.803000450134277, 14.803000450134277, 14.803000450134277, 14.803000450134277, 14.803000450134277, 14.803000450134277, 14.803000450134277, 14.803000450134277, 14.803000450134277, 12.846643447875977, 12.846643447875977, 12.846643447875977, 12.846643447875977, 12.846643447875977, 12.846643447875977, 12.846643447875977, 12.846643447875977, 12.846643447875977, 12.846643447875977, 12.846643447875977, 12.846643447875977, 12.846643447875977, 12.846643447875977, 12.846643447875977, 12.846643447875977, 12.846643447875977, 12.846643447875977, 12.846643447875977, 12.846643447875977, 12.846643447875977, 12.846643447875977, 12.846643447875977, 12.846643447875977, 12.846643447875977, 12.846643447875977, 12.846643447875977, 12.846643447875977, 12.846643447875977, 12.846643447875977, 12.846643447875977, 12.846643447875977, 12.846643447875977, 12.846643447875977, 12.846643447875977, 12.846643447875977, 12.846643447875977, 12.846643447875977, 12.846643447875977, 12.846643447875977, 12.846643447875977, 12.846643447875977, 12.846643447875977, 12.846643447875977, 12.846643447875977, 12.846643447875977, 12.846643447875977 ], "content": [ "From the HD Cookbook Chapter 16 : XletContext and Xlet are defined in the Java TV packages javax.tv.xlet and in the PBP packages javax.microedition.xlet .", "Wikipedia is saying.. . .. . .. . Accordingly Xlet has later been re-introduced as a part of Personal Basis Profile in javax.microedition.xlet package which is slightly different from the original design in Java TV specification .", "I am involved in development of Xlet http : en.wikipedia.org wiki Xlet using Java 1.4 API .", "Is there any emulator to run an Xlet on", "Are you answering my question from a Java standpoint or MHP xlet", "i m trying to create my first xlet project .", "The docs say Xlet interface methods those are actually xlet life-cycle methods are called on its special thread not the EDT thread .", "I was using LWUIT to develop a Xlet project in a emulator .", "Add that to your classpath and you ll be able to compile your Xlet .", "And then you can call myemulator.putResidentXlet and fill name path of the xlet in .", "What you need to develop is called an Xlet and they are used in many consumer electronics like printers stereos TV set top boxes even Blu-ray players run Xlets from Blu-ray discs .", "Now you can create your own xlet by creating a java file which implements javax.tv.Xlet.xlet interface in the same project .", "I ve been trying to find a way to play with Xlet http : en.wikipedia.org wiki Xlet development as a part of Personal Basis Profile http : en.wikipedia.org wiki Personal Basis Profile Connected Device Configuration in javax.microedition.xlet package .", "If your initXlet method does nothing else then your life cycle thread will exit and your Xlet will be assumed to be in the Paused state .", "Hence weather your Xlet is thread safe or not will depend on what it does in the other life cycle methods .", "To execute the xlet you need to implement main method and create an instance of SIEmulator assume myemulator .", "Obviously the existing implementation of Xlet was created for specific platforms in mind meaning it wouldn t be of any use for other platforms .", "In short whenever Xlet was to be used for other platforms it would need to be re-implemented to fit that platform .", "So basically some pieces of code inside of the Xlet implementation class do create update read operations on xlet internal state objects from EDT thread and some other pieces of code do from the life-cycle thread without any synchronization including that state variables are not declared as volatile .", "I couldn t find any significant differences between javax.tv.xlet.Xlet http : docs.oracle.com javame config cdc opt-pkgs api jsr927 javax tv xlet Xlet.html and javax.microedition.xlet.Xlet http : docs.oracle.com javame config cdc ref-impl pbp1.1.2 jsr217 javax microedition xlet Xlet.html .. . .. . Is there any aspects that those two interface definitions imply different to each other", "Instead the X became synonym for Unknown and should tell us that Xlets could be used a lot of places not only for Digital TV .", "I don t have a definitive answer but here s something to think about : .. . .. . Java TV was originally created to be used for set-top boxes and alike .", "This site has a lot of useful info : http : www.interactivetvweb.org tutorials javatv first xlet .. . .. . You can use XletView to view your Xlet .", "http : i.imgur.com N3lJQ9D.png I m creating an xlet which means I have to use the Blu-Ray Disc Java Project which just doesn t appear to come with the Libraries folder .", "Finally please go to the output folder which contains the compiled class file of the source codes usually folder bin type java -Djava.class.path path of the javatv jar class containing main method .. . .. . Note that the xlet executed is NOT in a service context .", "Blu-ray xlets must use the Java TV version of the interface and not the PBP version .", "Yet we must use the Java TV version of the interface to create blu-ray Xlets .", "The steps should be the same for the microedition as the tv just using a different jar .", "If you wish to run in a service context you either need to modify codes in com.sun.tv.XletManager.java to fill a service context object for the xlet or put the xlet s info in javatv s SI source an xml file .", "I am running some daemon user processes as well as some Xlet GUI apps in a QNX operating system.I connect to the QNX console using TeraTerm.I need to get the list of running user apps process inorder to see which user apps are already running in the system .", "In normal Java applications in NetBeans you d have the Libraries folder in your project in NetBeans .", "Can any one tell me what is xlets and a simple program with xlets and java and what all the softwares required to run .", "Xlets are for the Java ME platform http : docs.oracle.com javame config cdc cdc-opt-impl ojmeec 1.0 reference html z4000c821288734.html for embedded devices .", "As you know the X in the name was originally a placeholder .", "so I want to develop application using Java programming only .", "For HashMap this has to be done within a synchronized block or similar for it to be atomic .", "This link http : docs.oracle.com javame config cdc cdc-opt-impl ojmeec 1.0 reference html z4000c841293984.html may help .. . .. . Netbeans allows you to run the application from your PC http : docs.oracle.com javame config cdc cdc-opt-impl ojmeec 1.0 reference html z4000c841293984.html z40000f91303119 .", "A copy and paste from the link :", "I researched and found about the Ricoh SDK J which is supported on a J2ME environment for developing applications for Ricoh Printers .", "I ve added the .jar file in my Tools Libraries and in my Project Properties Java Sources Classpath .", "My environment is a linux x86 PC linux 2.6 + eclipse-3.2 + j2se 1.4.2 09 I downloaded javatv 1.0 1.1 source codes of reference implementation from sun .", "your last link looks very promising", "I m 100 sure there s a way to make this work because I ve seen my professor work with the library in an MHP project I couldn t get his help because we haven t had a class in 2 weeks and he doesn t check his mail very often .", "1 .", "Using GUI Builder is helpful .. . but the limitation is there .", "Welcome to Stack Overflow", "Have you attempted to solve this problem", "If you have include your code and research in your question to show what hasn t worked for you .", "If not you should attempt to solve it yourself first and then post the code and research here .", "It makes your question easier for others to answer too", "Just select the hand coded application in the new project wizard .", "With the recent version of the plugin this is now the default .", "I checked by logging - this is true .", "This is a bit surprising for me because it is different from BB Android frameworks where life-cycle methods are called on the EDT but it s OK so far .", "In the project code I see the app extensively uses Display.getInstance .callSerially Runnable task calls this is an LWUIT way of running a Runnable on the EDT thread .", "Smth like this : .. . .. . My question is : does this create a background for rare concurrency issues", "Should the access to the state be synchronized explicitly or at least state should be declared as volatile", "My guess is it depends on whether the code is run on a multy-core CPU or not because I m aware that on a multy-core CPU if 2 threads are running on its own core then variables are cached so each thread has its own version of the state unless explicitly synchronized .", "I would like to get some trustful response on my concerns .", "Yes in the scenario you describe the access to the shared state must be made thread safe .", "There are 2 problems that you need to be aware of : .. . .. . The first issue visability which you ve already mentioned can still occur on a uniprocessor .", "The problem is that the JIT compiler is allowed to cache varibles in registers and on a context-switch the OS will most likely dump the contents of the registers to a thread context so that it can be resumed later on .", "However this is not the same as writing the contents of the registers back to the fields of an object hence after a context-switch we can not assume that the fields of an object is up to-date .", "For example take the follow code : .. . .. . Since the loop variable an instance field i is not declared as volatile the JIT is allowed to optimise the loop variable i using a CPU register .", "If this happens then the JIT will not be required to write the value of the register back to the instance variable i until after the loop has completed .", "So lets s say a thread is executing the above loop and it then get s pre-empted .", "The newly scheduled thread won t be able to see the latest value of i because the latest value of i is in a register and that register was saved to a thread-local execution context .", "At a minimum the instance field i will need to be declared volatile to force each update of i to be made visible to other threads .", "The second issue is consistent object state .", "Take the HashMap in your code as an example internally it is composed of several non final member variables size table threshold and modCount .", "Where table is an array of Entry that forms a linked-list .", "When a element is put into or removed from the map two or more of these state variables need to be updated atomically for the state to be consistent .", "For the second issue you would still experience problems when running on a uniprocessor .", "This is because the OS or JVM could pre-emptively switch threads while the current thread is part way through executing the put or remove method and then switch to another thread that tries to perform some other operation on the same HashMap .", "Imagine what would happen if your EDT thread was in the middle of calling the get method when a pre-emptive thread switch occurs and you get a callback that tries to insert another entry into the map .", "But this time the map exceeds the load factor causing the map to resized and all the entries to be re-hashed and inserted .", "Nam San thanks for your feedback .", "In my case all the data is put to that HashMap guaranteedly BEFORE it is read on the EDT that s by design of the app initialization .", "So if I get you correctly the only issue is visibility which can only happen on a multy-core CPU .", "Do I get you right", "Nam San please check my comment above I forgot to direct it to you using @user notation .", "@Arhimed Note that the call to Display.getInstance .callSerially will return immediately .", "At this point your Xlet s other life cycle callbacks such as startXlet could be called .", "If your other life cycle callback methods modify the state HashMap then you could potentially hit thread-safety issues that I described above .", "Yes I understand that callSerially returns immediately and that if in startXlet the state is changed then it is unsafe .", "But let s suppose the code is as simple as it is described in my post .", "In this case if I get you correctly the only issue is visibility which can only happen on a multy-core CPU .", "Can you help me", "I don t know wich library i ve to download .", "What kind of project i ve to create", "I m using netbeans .. . .. . Thanks .. . .. . Silvio", "SO is for specific programming questions where you demonstrate your problem what did not work and what you tried .", "It is not an online tutorial .", "http : sourceforge.net projects xletview .. . .. . You will need to get a hold on the various API s which is somewhat troublesome I ve heard .", "But there are also other ways of getting them .", "For example if you own PowerDVD you ll be able to find BDJ.jar somewhere in that package .", "If you re running Windows you can probably develop Xlets with JavaME SDK 3.0 too sadly not available for Linux though .", "I m working on an MHP project using NetBeans .", "I need to import the JSON.simple library but I m having some issues ." ] }
{ "confidence": [ 101.98394012451172, 67.62326049804688, 54.77635192871094, 52.42079544067383, 52.02510070800781, 51.476444244384766, 43.149192810058594, 43.149192810058594, 35.399009704589844, 21.975812911987305, 18.116079330444336 ], "content": [ "Question : Wikipedia is saying.. . .. . .. . Accordingly Xlet has later been re-introduced as a part of Personal Basis Profile in javax.microedition.xlet package which is slightly different from the original design in Java TV specification . I couldn t find any significant differences between javax.tv.xlet.Xlet http : docs.oracle.com javame config cdc opt-pkgs api jsr927 javax tv xlet Xlet.html and javax.microedition.xlet.Xlet http : docs.oracle.com javame config cdc ref-impl pbp1.1.2 jsr217 javax microedition xlet Xlet.html .. . .. . Is there any aspects that those two interface definitions imply different to each other .. . Answer : This question interested me so I searched a bit . I don t have a definitive answer but here s something to think about : .. . .. . Java TV was originally created to be used for set-top boxes and alike . As you know the X in the name was originally a placeholder . The name was meant to change but never did . Instead the X became synonym for Unknown and should tell us that Xlets could be used a lot of places not only for Digital TV . Obviously the existing implementation of Xlet was created for specific platforms in mind meaning it wouldn t be of any use for other platforms . In short whenever Xlet was to be used for other platforms it would need to be re-implemented to fit that platform . Which class to use depends on your target-platform . From the HD Cookbook Chapter 16 : XletContext and Xlet are defined in the Java TV packages javax.tv.xlet and in the PBP packages javax.microedition.xlet . Blu-ray xlets must use the Java TV version of the interface and not the PBP version . This is somewhat funny since Blu-ray Xlets reside within the PBP packages . Yet we must use the Java TV version of the interface to create blu-ray Xlets . So what is the PBP version of the interface meant for Good question . My best guess is : Hardware devices like printers with 7 displays .", "Question : I ve been trying to find a way to play with Xlet http : en.wikipedia.org wiki Xlet development as a part of Personal Basis Profile http : en.wikipedia.org wiki Personal Basis Profile Connected Device Configuration in javax.microedition.xlet package . Currently as a starting point I have Eclipse Indigo I do Android development in it . My questions are : .. . .. . What steps should I do to setup a development-environment for Xlets Is there any emulator to run an Xlet on .. . Answer : I m not sure if my experience helps but at least it provides a reference . My environment is a linux x86 PC linux 2.6 + eclipse-3.2 + j2se 1.4.2 09 I downloaded javatv 1.0 1.1 source codes of reference implementation from sun . You can create a project in eclipse where imports all source codes . Please fix all possible errors if any . Usually if there are some just comment them . Finally please export the project as a jar file . You can then create another project and configure the build path click import external jars to import the generated javatv jar . Now you can create your own xlet by creating a java file which implements javax.tv.Xlet.xlet interface in the same project . To execute the xlet you need to implement main method and create an instance of SIEmulator assume myemulator . And then you can call myemulator.putResidentXlet and fill name path of the xlet in . Finally please go to the output folder which contains the compiled class file of the source codes usually folder bin type java -Djava.class.path path of the javatv jar class containing main method .. . .. . Note that the xlet executed is NOT in a service context . If you wish to run in a service context you either need to modify codes in com.sun.tv.XletManager.java to fill a service context object for the xlet or put the xlet s info in javatv s SI source an xml file . Default is JavaTVSampleFile01.xml . The usage please refer to javatv s documents . That was from a forum post . LINK : https : forums.oracle.com forums thread.jspa messageID 7310245 .. . .. . Your best chance for file downloads : http : docs.oracle.com javame config cdc cdc-opt-impl ojmeec 1.0 reference html z4000c841293984.html Comment : can you provide links to downloads . Comment : @azulflame : +1 thanks for your reply . However let me admit this is not exactly what I am asking for . The reply is about javax.tv.xlet while my question is about javax.microedition.xlet . Comment : Arhimed I ll be honest just in case you didn t see the last line : I did not figure that out I simply found that in a forum post from a link from a google-search . The steps should be the same for the microedition as the tv just using a different jar . Comment : your last link looks very promising unfortunately I have no time to try it right now but it looks like exactly what I ve been looking for so you win . :", "Question : I have a requirement for creating a simple application for showing a text that says Hello World on the Ricoh printer console . I researched and found about the Ricoh SDK J which is supported on a J2ME environment for developing applications for Ricoh Printers . But I am curious to know is there any other way to create the application using say simple J2ME Midlet application . Will that run on the RICOH printer console .. . Answer : I m no expert but I m 99 sure there are no other ways of developing apps for Ricoh printers . What you need to develop is called an Xlet and they are used in many consumer electronics like printers stereos TV set top boxes even Blu-ray players run Xlets from Blu-ray discs . The movie menu stuff you see when you watch a Blu-ray disc . Xlets may seem a bit complex because there exists many API s for development . For example Blu-ray discs have an additional API not available for other Xlets . So you need to figure out which API s are available for Ricoh printers . Probably just the core basic ones I suspect . Do a search for Getting started with Xlets and I bet you ll get started fairly quick .", "Question : I am involved in development of Xlet http : en.wikipedia.org wiki Xlet using Java 1.4 API . The docs say Xlet interface methods those are actually xlet life-cycle methods are called on its special thread not the EDT thread . I checked by logging - this is true . This is a bit surprising for me because it is different from BB Android frameworks where life-cycle methods are called on the EDT but it s OK so far . In the project code I see the app extensively uses Display.getInstance .callSerially Runnable task calls this is an LWUIT way of running a Runnable on the EDT thread . So basically some pieces of code inside of the Xlet implementation class do create update read operations on xlet internal state objects from EDT thread and some other pieces of code do from the life-cycle thread without any synchronization including that state variables are not declared as volatile . Smth like this : .. . .. . My question is : does this create a background for rare concurrency issues Should the access to the state be synchronized explicitly or at least state should be declared as volatile My guess is it depends on whether the code is run on a multy-core CPU or not because I m aware that on a multy-core CPU if 2 threads are running on its own core then variables are cached so each thread has its own version of the state unless explicitly synchronized . I would like to get some trustful response on my concerns . .. . Answer : Yes in the scenario you describe the access to the shared state must be made thread safe . There are 2 problems that you need to be aware of : .. . .. . The first issue visability which you ve already mentioned can still occur on a uniprocessor . The problem is that the JIT compiler is allowed to cache varibles in registers and on a context-switch the OS will most likely dump the contents of the registers to a thread context so that it can be resumed later on . However this is not the same as writing the contents of the registers back to the fields of an object hence after a context-switch we can not assume that the fields of an object is up to-date . For example take the follow code : .. . .. . Since the loop variable an instance field i is not declared as volatile the JIT is allowed to optimise the loop variable i using a CPU register . If this happens then the JIT will not be required to write the value of the register back to the instance variable i until after the loop has completed . So lets s say a thread is executing the above loop and it then get s pre-empted . The newly scheduled thread won t be able to see the latest value of i because the latest value of i is in a register and that register was saved to a thread-local execution context . At a minimum the instance field i will need to be declared volatile to force each update of i to be made visible to other threads . The second issue is consistent object state . Take the HashMap in your code as an example internally it is composed of several non final member variables size table threshold and modCount . Where table is an array of Entry that forms a linked-list . When a element is put into or removed from the map two or more of these state variables need to be updated atomically for the state to be consistent . For HashMap this has to be done within a synchronized block or similar for it to be atomic . For the second issue you would still experience problems when running on a uniprocessor . This is because the OS or JVM could pre-emptively switch threads while the current thread is part way through executing the put or remove method and then switch to another thread that tries to perform some other operation on the same HashMap . Imagine what would happen if your EDT thread was in the middle of calling the get method when a pre-emptive thread switch occurs and you get a callback that tries to insert another entry into the map . But this time the map exceeds the load factor causing the map to resized and all the entries to be re-hashed and inserted . Comment : Nam San thanks for your feedback . Comment : In my case all the data is put to that HashMap guaranteedly BEFORE it is read on the EDT that s by design of the app initialization . So if I get you correctly the only issue is visibility which can only happen on a multy-core CPU . Do I get you right Comment : Nam San please check my comment above I forgot to direct it to you using @user notation . Comment : @Arhimed Note that the call to Display.getInstance .callSerially will return immediately . If your initXlet method does nothing else then your life cycle thread will exit and your Xlet will be assumed to be in the Paused state . At this point your Xlet s other life cycle callbacks such as startXlet could be called . If your other life cycle callback methods modify the state HashMap then you could potentially hit thread-safety issues that I described above . Hence weather your Xlet is thread safe or not will depend on what it does in the other life cycle methods . Comment : Yes I understand that callSerially returns immediately and that if in startXlet the state is changed then it is unsafe . But let s suppose the code is as simple as it is described in my post . In this case if I get you correctly the only issue is visibility which can only happen on a multy-core CPU . Do I get you right", "Question : i m trying to create my first xlet project . Can you help me I don t know wich library i ve to download . What kind of project i ve to create I m using netbeans .. . .. . Thanks .. . .. . Silvio Comment : SO is for specific programming questions where you demonstrate your problem what did not work and what you tried . It is not an online tutorial . .. . Answer : This site has a lot of useful info : http : www.interactivetvweb.org tutorials javatv first xlet .. . .. . You can use XletView to view your Xlet . http : sourceforge.net projects xletview .. . .. . You will need to get a hold on the various API s which is somewhat troublesome I ve heard . But there are also other ways of getting them . For example if you own PowerDVD you ll be able to find BDJ.jar somewhere in that package . Add that to your classpath and you ll be able to compile your Xlet . If you re running Windows you can probably develop Xlets with JavaME SDK 3.0 too sadly not available for Linux though .", "Question : null .. . Answer : I m working on an MHP project using NetBeans . I need to import the JSON.simple library but I m having some issues . In normal Java applications in NetBeans you d have the Libraries folder in your project in NetBeans . I don t have this folder supposedly because it s an MHP project . I ve added the .jar file in my Tools Libraries and in my Project Properties Java Sources Classpath . When I did the latter NetBeans started to autocomplete for import org.json.simple . and didn t give me any errors . But when I run my project I still get the package org.json.simple does not exist . error for the import line . I m guessing I still haven t added the library to my project properly but I m not sure what I m doing wrong . I m 100 sure there s a way to make this work because I ve seen my professor work with the library in an MHP project I couldn t get his help because we haven t had a class in 2 weeks and he doesn t check his mail very often . Comment : its lib folder not library exactly @AdriaanMarain Comment : I meant this http : i.imgur.com llyCWAX.png . Mine looks like this http : i.imgur.com 6gW4tHc.png no Libraries folder . Comment : during creation of new project you have done some mistakes . that y this problem occurs . because lib folder exists in default setup of Project . @Adriaan Comment : Here are 2 new projects I created to show my issue . http : i.imgur.com N3lJQ9D.png I m creating an xlet which means I have to use the Blu-Ray Disc Java Project which just doesn t appear to come with the Libraries folder . Are you answering my question from a Java standpoint or MHP xlet I ll probably just use a different IDE if I can t resolve my issue . Thanks for the help though", "Question : I am running some daemon user processes as well as some Xlet GUI apps in a QNX operating system.I connect to the QNX console using TeraTerm.I need to get the list of running user apps process inorder to see which user apps are already running in the system . I would be needing processID memory appname . I came across the pidin command but it list out all the process.Anyways to filter out user process and their app names .. . Answer : You can try pidin a .", "Question : I was using LWUIT to develop a Xlet project in a emulator . The project is multiple threaded when one of the thread finish its work then die or just enter the wain state the repaint method of displaying form will be called and the screen will flash white screen for a shot time then back to normal . Part of the code below : .. . .. . Has anyone encountered this problem too .. . Answer : You are changing LWUIT code off the EDT which isn t allowed and isn t supported . I suggest looking at implementing the Animation interface and using registerAnimated in Form .", "Question : I am running some daemon user processes as well as some Xlet GUI apps in a QNX operating system.I connect to the QNX console using TeraTerm.I need to get the list of running user apps process inorder to see which user apps are already running in the system . I would be needing processID memory appname . I came across the pidin command but it list out all the process.Anyways to filter out user process and their app names .. . Answer : I would really like to have an better answer like use ps but BB10 did not include this at least we cannot access it so far as I know . But furtunatly there is something that is at least a bit better than pidin : .. . .. . -n stands for display process name but I think you can omit it because it is default -i N gives the number of iterations this means 1 will only show it once . Omitting this option will continuously list this output all 3 seconds . Output looks like this :", "Question : Can any one tell me what is xlets and a simple program with xlets and java and what all the softwares required to run . .. . Answer : Xlets are for the Java ME platform http : docs.oracle.com javame config cdc cdc-opt-impl ojmeec 1.0 reference html z4000c821288734.html for embedded devices . This link http : docs.oracle.com javame config cdc cdc-opt-impl ojmeec 1.0 reference html z4000c841293984.html may help .. . .. . Netbeans allows you to run the application from your PC http : docs.oracle.com javame config cdc cdc-opt-impl ojmeec 1.0 reference html z4000c841293984.html z40000f91303119 . A copy and paste from the link :", "Question : 1 . Using GUI Builder is helpful .. . but the limitation is there . so I want to develop application using Java programming only . Comment : Welcome to Stack Overflow Have you attempted to solve this problem If you have include your code and research in your question to show what hasn t worked for you . If not you should attempt to solve it yourself first and then post the code and research here . It makes your question easier for others to answer too .. . Answer : Just select the hand coded application in the new project wizard . With the recent version of the plugin this is now the default ." ] }
[ "yes-answer-long", "yes-answer-short" ]
java
UNK_RELATION
squirrel.windows@desktop@90
squirrel.windows -- squirrel.windows is an installation and update framework for windows @placeholder apps .
{ "confidence": [ 53.27997970581055, 47.40648651123047, 42.83038330078125, 40.89670181274414, 38.755245208740234, 38.136314392089844, 36.8459358215332, 36.8459358215332, 36.8459358215332, 36.669708251953125, 35.624420166015625, 34.061180114746094, 33.715110778808594, 30.208471298217773, 29.058334350585938, 26.401321411132812, 22.572925567626953, 22.464237213134766, 20.1778507232666, 18.522159576416016, 18.073806762695312, 17.71546173095703, 17.470441818237305, 17.470441818237305, 17.470441818237305, 17.440940856933594, 17.440940856933594, 17.391708374023438, 17.106178283691406, 16.832263946533203, 16.771177291870117, 16.771177291870117, 16.703712463378906, 16.61284828186035, 16.61284828186035, 16.61284828186035, 16.588476181030273, 16.588476181030273, 16.588476181030273, 16.588476181030273, 16.066749572753906, 15.787452697753906, 15.322356224060059, 14.447020530700684, 14.447020530700684, 14.447020530700684, 14.447020530700684, 14.447020530700684, 14.447020530700684, 14.447020530700684, 14.447020530700684, 14.447020530700684, 14.447020530700684, 14.447020530700684, 14.447020530700684, 14.447020530700684, 14.447020530700684, 14.447020530700684, 14.447020530700684, 14.447020530700684, 14.447020530700684, 14.447020530700684, 14.447020530700684, 14.447020530700684, 14.447020530700684, 14.447020530700684, 14.447020530700684, 14.447020530700684, 14.447020530700684, 14.447020530700684, 14.447020530700684, 14.447020530700684, 14.32142162322998, 13.803718566894531, 13.803718566894531, 13.803718566894531, 13.28199291229248, 12.537710189819336, 12.537710189819336, 12.537710189819336, 12.537710189819336, 12.537710189819336, 12.537710189819336, 12.537710189819336, 12.537710189819336, 12.537710189819336, 12.537710189819336, 12.537710189819336, 12.537710189819336, 12.537710189819336, 12.537710189819336, 12.537710189819336, 12.537710189819336, 12.537710189819336, 12.537710189819336, 12.537710189819336, 12.537710189819336, 12.537710189819336, 12.537710189819336, 12.537710189819336 ], "content": [ "Grunt-electron-installer uses squirrel.windows https : github.com Squirrel Squirrel.Windows for update mechanism .", "Check out http : chaseflorell.github.io devops 2015 08 07 deploying-squirrel.windows-apps-with-octopus-deploy .", "I am building a .net-4.5 c app and packaging it with Squirrel for Windows https : github.com Squirrel Squirrel.Windows .", "I m attempting to use Squirrel.Windows with my application to install and auto update from it s GitHub repositories .", "I could use Enigma virtual box http : enigmaprotector.com en aboutvb.html as a virtual system to overcome squirrel.windows path problem .", "Electron-builder relies on many packages and for auto-updates it uses Squirrel-windows https : github.com Squirrel Squirrel.Windows .", "Here is the link-to the other thread in GitHub also : https : github.com Squirrel Squirrel.Windows issues 422", "The error is pretty clear : .. . .. . It s not finding the file in the path you re specifying which is : C : a 1 packages squirrel.windows .", "I m interested if someone has managed to deploy a Squirrel installer https : github.com Squirrel Squirrel.Windows with the Octopus workflow .", "Using Squirrel.Windows https : github.com Squirrel Squirrel.Windows I wanted to handle the update process in the Application Exit handler https : msdn.microsoft.com en-us library system.windows.application.exit v vs.110 .aspx of my WPF application using this code : .. . .. . This code works if I call it on startup or on an event handler during execution but not inside the Application Exit event handler defined like this : .. . .. . app.xaml : .. . .. . app.xaml.cs : .. . .. . Is it a limitation of Squirrel.Windows", "Looking at the docs https : github.com Squirrel Squirrel.Windows blob master docs using install-process.md running the MSI wouldn t work anyway .", "See https : github.com Squirrel Squirrel.Windows blob master docs using visual-studio-packaging.md", "Following along in the examples at .. . .. . https : github.com Squirrel Squirrel.Windows blob master docs getting-started 1-integrating.md .. . .. . I was able to complete all steps successfully .", "I have a WPF application that is updating itself on the background via Squirrel.Windows this is done by the following code : .. . .. . This code is in the OnStartup of the App.xaml.cs This is an Async and Await call so it will be done in the background .", "My question is .. . .. . Is there a better way to use as auto-update feature for portable electron apps", "I was following the directions here : .. . .. . https : github.com Squirrel Squirrel.Windows blob master docs using github.md .. . .. . From that I updated the code in my App.xaml.cs to the following .. . .. . Next I go through the same process as before creating the nupkg and performing the releasify command with Squirrel .", "For windows .. . .. . I need this app to be portable on USB disk and also I want this app to have auto-update feature .", "Looks like you re the owner of the thread over on GitHub but just in case anyone else gets the error in the meantime there appears to be a bug in that particular version of Squirrel whereby it s not closing a zip file it creates here is the tracked error : https : github.com Squirrel Squirrel.Windows pull 425 doesn t look like too long until it will be fixed .", "Squirrel uses SHGetFolderPath function with CSIDL LOCAL APPDATA to decide installation path which is normally C : Users Username AppData Local pkgName .", "The Setup.exe installs the app as expected on the two windows-10 computers I had access to .", "I moved the update check to a method in the MainWindowViewModel .", "Upon installation I handle the squirrel events like so : .. . .. . and the createShortcuts function just spawns a child-process to call the Update.exe Squirrel.exe with the --createShortcut myapp.exe arguments .. . .. . This works however when the shortcut it generated it is named Electron instead of myapp .", "I ve had no issues in building the bundle targeting Windows 64bits only .", "I solved it for many users by building directly on a windows-10 fresh install .", "The builds I used before were built on a windows-7 .", "So update the script to following should fix your problem :", "I ve built an Electron app using the Squirrel packager update manager .", "using the electron-packager command-line I pass these arguments to update the embedded electron exe information : .. . .. . The grunt-electron-installer will look for this embedded application information to generate the name for the shortcut .", "UPDATE : Here is the full code of my OnStartup in the App.xaml.cs .. . .. . What i m trying to do is Have Squirrel determine if there is an update they will automatically download all the necesary files and apply them after a restart of the application .", "I ve been battling with auto-update on Windows for 3 days and at the end I ve come up with a working solution that seems to give no problems .", "I have an electron application for which I use electron-packager https : github.com electron-userland electron-packager to compile and grunt-electron-installer https : github.com electronjs grunt-electron-installer to generate the Windows installer package .", "On the windows-7 I used to build the app though when I try to open Setup.exe the window where I double clicked the icone goes in please wait mode with the blue progress circle instead of the usual mouse pointer forever .", "But because this application is some kind of starter for another application that will check for updates for this application and install unzip them it will close itself after installation is completed and installed application is started .", "I am trying to use squirrel for windows version 1.0.0.0 and there is no way to get rid of that error .", "I installed it on my Macbook pro on a windows-7 x64 dual boot without trouble .", "electron-builder : 3.17.1 electron-installer-squirrel-windows : 1.3.0 electron-prebuilt : 0.37.0 electron-winstaller : 2.3.0 .", "It s like at this point it gets stuck in the Update part of the code and never goes past it .", "First having the UpdateManager inside the App.xaml.cs s OnStartup method was causing the code execution to halt at the await until the update finished .", "From there I wrapped the update code in a try-catch and used a MessageBox to show the exception messages .", "So i can still update when it finishes i want to close the application.. .", "@PedroG.Dias Squirrel is an auto-update library that checks a remote xml version file downloads any new version installers and runs them .", "You can use the command as below to make your installer for Windows : electron-builder path to your-electron-packager-output --platform win --out path to your-installer-output --config path to builder.json --target win .. . .. . Sample content for builder.json : .. . .. . win : title : My Production Name icon : path to your-icon.ico version : 1.0.0 publisher : Your Company Name .. . .. . P.s : You must install NSIS http : prdownloads.sourceforge.net nsis nsis-2.50-setup.exe download and add NSIS path into PATH environment before you run the above command .", "I m building an app for windows using Electron .", "I don t see any other ways to specify the output name of the shortcut so how would I change the generated shortcut to say myapp", "Here is the snippet of the squirrel logs :", "Upon further investigation into electron-packager I found a more detailed explanation about the resource editing here https : github.com electron-userland electron-packager blob master usage.txt .", "Try to use electron-builder https : github.com electron-userland electron-builder if you get painful with Squirrel .", "As expected the releasify command creates one Setup.exe file and one Setup.msi .", "If I check the processes open at that point I see three Setup.exe that I cannot kill with the kill-process button or via Taskkill command .", "And all I can do at that point to kill them is pretty much rebooting .", "As to the Setup.msi it seems to do nothing I can see tells me something like checking requirements and once it has it just closes with no visible effect .", "Any idea about what s going on or how I could find out", "Have you tried just running the .msi file directly", "Think so .", "But to make sure after reading your comment I rebooted directly went to .msi to no apparent effect I checked C : Users MyUserName AppData Local and couldnt find my app .", "It s odd that it fails on the machine you built it on and works on others it s usually the other way round", "Deactivating my antivirus solved the issue I wish Avast had told me hey I m blocking this and saved me a few hours", "I have an application which based on git electron .", "In this option I need a way to change CSIDL LOCAL APPDATA variable in virtual system .", "Any idea", "Any help would be really appreciated .", "Thank you", "I followed the Squirrel s docs realisfied the project but it barely works .", "On one computer where I tested it it creates a cefsharp icon on the desktop too but apart from an initial error it works .", "On two other computers it simply crashes .", "I can t find a full guide or even a conclusive discussion about this issue so in the NuGet Package Editor I ve included in the net45 folder all the files vaguely related to Cefsharp .", "This is a screenshot of the folder : .. . .. .", "enter image description here http : i.stack.imgur.com Ylu71.png .. . .. . It created a 72MB setup file that is a little bigger than I was expecting so.. .", "I ve included some unnecessary file", "Anyway it doesn t work what is wrong", "It s the right procedure or Cefsharp must be referenced in a different way", "github.com cefsharp CefSharp wiki https : github.com cefsharp CefSharp wiki Frequently-asked-questions 4-why-do-i-get-an-error-about-could-not-load-file-or-assembly-cefsharpcoredll-or-one-of-its-dependencies-the-specified-module-could-not-be-found-when-trying-to-run-my-cefsharp-based-application-it-compiles-successfully-but-does-not-run-it-runs-on-my-developer-machine-though-throws-an-exception-when-i-copy-it-to-another-computer", "The logic is as follows : .. . .. . if the sub-folder fullupdate inside the path of the current executable does not exists see later it will be clarified we connect with an online server and check if there is an update by sending the current app version .. . if there is no update do nothing .", "at the end of the download we create a new file update inside the folder fullupdate to be sure the download has finished successfully .", "next time the app opens : .. . if the folder fullupdate exists we check if the file update exists .", "else if the file update exists we launch the .exe file we have downloaded and return true .", "if there is an update we instruct the server to return a json string that contains the url from which we can download of the .exe installer produced by electron-builder .", "Or is there something special to do to use the code presented in the Application Exit event handler", "Do you wait for that task to finish", "async in application exit smells .", "Try Task.Run ...... . .Wait .", "Specify a timeout if you want one .", "@NETscape It works : If you set an anwer I ll accept it thanks", "Careful about doing just a naive wait here there are some considerations that should be borne in mind as laid out in Why Application.Exit event works even if handler is async void in WPF application lifecycle", "http : stackoverflow.com questions 18637395 why-application-exit-event-works-even-if-handler-is-async-void-in-wpf-applicatio", "Since you re creating a hot Task that is running immediately it will continue to the next line of code .", "Presumably that next line of code is the end of your application exit handler .", "If you want to prevent this from happening then do : .. . .. . You may make use of timeout cancel features by supplying appropriate arguments to Task.Wait https : msdn.microsoft.com en-us library system.threading.tasks.task.wait v vs.110 .aspx", "I have done everything to be sure that file is indeed not in use .", "The following steps reproduce the error on my PC .", "1 .", "Create the nuget-package to releasify .. . 2 .", "Restart the PC .. . 3 .", "Open command-prompt only no other application is running not even visual-studio .. . 4 .", "Run the command squirrel --releasify Digger.1.0.0.1.nupkg .. . .. . The weird thing is that I am be able to delete the file right after getting the error from the releasify command : .. . .. . The following is the log .", "BTW : The nuget-package was created using a Any CPU build .", "Standard bat signal of anti-malware getting in the way .", "Make an exclusion and try again .", "Process Monitor will tell you whose dirty fingers are on it .", "Attempting to create a SquirrelPack target however it does not seem to be working for me using the docs : .. . .. . line 84 Target CreateSquirrelPackage fun - SquirrelPack fun p - p with WorkingDir . tmp . my.nuget line 88 .. . .. . Output .. . .. . build.fsx 86 49 : error FS0001 : This expression was expected to have type string option but here has type string .. . .. . Has anyone been able to get SquirrelPack working in F Fake" ] }
{ "confidence": [ 74.93461608886719, 53.2901725769043, 48.29460144042969, 48.25756072998047, 46.97997283935547, 43.65385437011719, 42.553627014160156, 36.376155853271484, 34.417179107666016, 29.74172592163086, 23.751819610595703, 21.086896896362305, 18.680267333984375, 15.172297477722168, 14.41148567199707, 12.471694946289062, 12.471694946289062, 12.471694946289062 ], "content": [ "Question : null .. . Answer : I have an application which based on git electron . For windows .. . .. . I need this app to be portable on USB disk and also I want this app to have auto-update feature . Grunt-electron-installer uses squirrel.windows https : github.com Squirrel Squirrel.Windows for update mechanism . Squirrel uses SHGetFolderPath function with CSIDL LOCAL APPDATA to decide installation path which is normally C : Users Username AppData Local pkgName . My question is .. . .. . Is there a better way to use as auto-update feature for portable electron apps I could use Enigma virtual box http : enigmaprotector.com en aboutvb.html as a virtual system to overcome squirrel.windows path problem . In this option I need a way to change CSIDL LOCAL APPDATA variable in virtual system . Any idea Any help would be really appreciated . Thank you", "Question : I m interested if someone has managed to deploy a Squirrel installer https : github.com Squirrel Squirrel.Windows with the Octopus workflow . I ve had a ClickOnce deployment running just fine with it but with Squirrel I need access to the nupkg the ability to run some XML transform and finally run a command-line to push it to a UNC location . So it actually never reaches a remote machine to be installed . I realise Octopus has a different primary focus for delivery but I wanted to know if someone has manged to figure out a way to do this . Thanks for any input on this C . Comment : I ve been able to deploy click once applications using OD before . Again it needs access to the NuGet package to perform xml transformations and there s an additional step to resign the manifest and repackage the click once app but it can all be done as library steps in OD . Would a solution based on this help as I don t know Squirrel but imagine the process would be fairly similar . .. . Answer : Check out http : chaseflorell.github.io devops 2015 08 07 deploying-squirrel.windows-apps-with-octopus-deploy . It looks like a good walkthrough .", "Question : Using Squirrel.Windows https : github.com Squirrel Squirrel.Windows I wanted to handle the update process in the Application Exit handler https : msdn.microsoft.com en-us library system.windows.application.exit v vs.110 .aspx of my WPF application using this code : .. . .. . This code works if I call it on startup or on an event handler during execution but not inside the Application Exit event handler defined like this : .. . .. . app.xaml : .. . .. . app.xaml.cs : .. . .. . Is it a limitation of Squirrel.Windows Or is there something special to do to use the code presented in the Application Exit event handler Comment : Do you wait for that task to finish async in application exit smells . Comment : Try Task.Run ...... . .Wait . Specify a timeout if you want one . Comment : @NETscape It works : If you set an anwer I ll accept it thanks Comment : Careful about doing just a naive wait here there are some considerations that should be borne in mind as laid out in Why Application.Exit event works even if handler is async void in WPF application lifecycle http : stackoverflow.com questions 18637395 why-application-exit-event-works-even-if-handler-is-async-void-in-wpf-applicatio .. . Answer : Since you re creating a hot Task that is running immediately it will continue to the next line of code . Presumably that next line of code is the end of your application exit handler . If you want to prevent this from happening then do : .. . .. . You may make use of timeout cancel features by supplying appropriate arguments to Task.Wait https : msdn.microsoft.com en-us library system.threading.tasks.task.wait v vs.110 .aspx", "Question : I am trying to use squirrel for windows version 1.0.0.0 and there is no way to get rid of that error . I have done everything to be sure that file is indeed not in use . The following steps reproduce the error on my PC . 1 . Create the nuget-package to releasify .. . 2 . Restart the PC .. . 3 . Open command-prompt only no other application is running not even visual-studio .. . 4 . Run the command squirrel --releasify Digger.1.0.0.1.nupkg .. . .. . The weird thing is that I am be able to delete the file right after getting the error from the releasify command : .. . .. . The following is the log . BTW : The nuget-package was created using a Any CPU build . Comment : Standard bat signal of anti-malware getting in the way . Make an exclusion and try again . Comment : Process Monitor will tell you whose dirty fingers are on it . .. . Answer : Looks like you re the owner of the thread over on GitHub but just in case anyone else gets the error in the meantime there appears to be a bug in that particular version of Squirrel whereby it s not closing a zip file it creates here is the tracked error : https : github.com Squirrel Squirrel.Windows pull 425 doesn t look like too long until it will be fixed . Here is the link-to the other thread in GitHub also : https : github.com Squirrel Squirrel.Windows issues 422", "Question : null .. . Answer : I am building a .net-4.5 c app and packaging it with Squirrel for Windows https : github.com Squirrel Squirrel.Windows . As expected the releasify command creates one Setup.exe file and one Setup.msi . The Setup.exe installs the app as expected on the two windows-10 computers I had access to . On the windows-7 I used to build the app though when I try to open Setup.exe the window where I double clicked the icone goes in please wait mode with the blue progress circle instead of the usual mouse pointer forever . If I check the processes open at that point I see three Setup.exe that I cannot kill with the kill-process button or via Taskkill command . And all I can do at that point to kill them is pretty much rebooting . As to the Setup.msi it seems to do nothing I can see tells me something like checking requirements and once it has it just closes with no visible effect . Any idea about what s going on or how I could find out Comment : Have you tried just running the .msi file directly Comment : Think so . But to make sure after reading your comment I rebooted directly went to .msi to no apparent effect I checked C : Users MyUserName AppData Local and couldnt find my app . Comment : Looking at the docs https : github.com Squirrel Squirrel.Windows blob master docs using install-process.md running the MSI wouldn t work anyway . It s odd that it fails on the machine you built it on and works on others it s usually the other way round Comment : Deactivating my antivirus solved the issue I wish Avast had told me hey I m blocking this and saved me a few hours", "Question : I m attempting to use Squirrel.Windows with my application to install and auto update from it s GitHub repositories . Following along in the examples at .. . .. . https : github.com Squirrel Squirrel.Windows blob master docs getting-started 1-integrating.md .. . .. . I was able to complete all steps successfully . I tested the install application opens no problems . I updated and releasified it and the local installed application updated as expected . So with that I know that Squirrel is working properly if I m doing this from a local directory however I need to do this from GitHub . I was following the directions here : .. . .. . https : github.com Squirrel Squirrel.Windows blob master docs using github.md .. . .. . From that I updated the code in my App.xaml.cs to the following .. . .. . Next I go through the same process as before creating the nupkg and performing the releasify command with Squirrel . No issues here good . After all this I perform a git-commit and git-push of the source up to GitHub . Everything on GitHub is updated with the latest commit . Good here .. . .. . Next on the GitHub page I create a new release . The Tag used for the release is the same as the Assembly Version used in the .nupkg that was created . For the files to attach to the release I drag-and-drop all the files from the Release folder that was created via Squirrel . Ok now everything is on GitHub . I then move into testing this to make sure when a user downloads all the files then runs the Setup.exe it installs properly and opens up . When i do this I download each of the files into a folder on my desktop then click the Setup.exe . When i do this I get the expected MessageBox.Show typeof App .Assembly.GetName .Version.ToString MessageBox popup from the app showing the correct Assembly version number but then nothing . It s like at this point it gets stuck in the Update part of the code and never goes past it . I can leave it sitting there overnight and nothing . I can even see the process running in memory in the Task Manager so I know it hasn t errored out and closed but it sits at 0 CPU usage and 0 Network usage . Any help would be phenomenally appreciated . .. . Answer : I figured this out and wanted to post the answer for anyone else that may get to this point and have the same issue . It was all user error . First having the UpdateManager inside the App.xaml.cs s OnStartup method was causing the code execution to halt at the await until the update finished . I moved the update check to a method in the MainWindowViewModel . From there I wrapped the update code in a try-catch and used a MessageBox to show the exception messages . It was Resource could not be found : Error 404 . I double checked the URL i was using for the GitHubManager source and it was the correct address to the repository page . However the issue was the at the end of the url . I changed it from .. . .. . https : github.com dartvalince DiscerningEye .. . .. . to .. . .. . https : github.com dartvalince DiscerningEye .. . .. . and tested everything and it s working now . This is the CheckForUpdate function within the MainWindowViewModel", "Question : I am setting up the build-process for a desktop application on Visual Studio Team Services i.e . Visual Studio Online and would like to run the squirrel installer Releasify command automatically under some build cases . So far I have created the following powershell script that I am running after the project gets built .. . .. . This is leading to the following error message .. . .. . How can I fix this error Is there a better approach Why can t powershell run a program that is in that directory .. . Answer : The error is pretty clear : .. . .. . It s not finding the file in the path you re specifying which is : C : a 1 packages squirrel.windows . tools Squirrel.exe .. . .. . Correct the path to point to the correct folder .", "Question : I have a WPF application that is updating itself on the background via Squirrel.Windows this is done by the following code : .. . .. . This code is in the OnStartup of the App.xaml.cs This is an Async and Await call so it will be done in the background . Now i want to know if it is possible before i close my application i can see if this thread that is started is still running. . If so i cannot close the application but i want to hide the icon from taskbar and minimize the application . So i can still update when it finishes i want to close the application.. . I hope someone can point me in the right direction . UPDATE : Here is the full code of my OnStartup in the App.xaml.cs .. . .. . What i m trying to do is Have Squirrel determine if there is an update they will automatically download all the necesary files and apply them after a restart of the application . But because this application is some kind of starter for another application that will check for updates for this application and install unzip them it will close itself after installation is completed and installed application is started . But if the starter application is still updating itself it cannot be closed and restarted . So brief explanation with a simple visio drawing : The Visio drawing http : i.stack.imgur.com bScI0.jpg Comment : Just so I understand - is this code running in the background as a backgroundworker process Comment : @PedroG.Dias Squirrel is an auto-update library that checks a remote xml version file downloads any new version installers and runs them . During this a banner with a progress-bar is displayed . Comment : create a global boolean var named busy . set it to true before thread starts false on return . Next set up an event hanlder for the app.cs onclosing event check the variable . If busy do hiding etc . Comment : @JohnPeters that s a very bad idea global-variables locking when we are talking about asynchronous operations Comment : I can see only one task in the provided code . But as the title the code suggest use Task.WaitAll method to wait for all tasks to complete stackoverflow.com questions 19849847 http : stackoverflow.com questions 19849847 use-task-waitall-to-handle-awaited-tasks if using thread use ThreadPool to determine it refer stackoverflow.com questions 2520179 http : stackoverflow.com questions 2520179 wait-until-all-threads-teminated-in-threadpool .. . Answer : In the closing event you can now await the updateTask and or check the Status of the Task .", "Question : null .. . Answer : I m building an app for windows using Electron . To package and distribute it I m using electron-builder https : www.npmjs.com package electron-builder . Electron-builder relies on many packages and for auto-updates it uses Squirrel-windows https : github.com Squirrel Squirrel.Windows . I ve been battling with auto-update on Windows for 3 days and at the end I ve come up with a working solution that seems to give no problems . I wont go into the details of what I ve tried and failed . Instead I ll post here the solution with which I ve come up . I m sharing it with you guys to see if you may point out to me any flaws that will make my system fail or if it truly is a solid solution to help those who are struggling as I was . For this latter reason I m posting some more code than it would be necessary hoping it will help others . The logic is as follows : .. . .. . if the sub-folder fullupdate inside the path of the current executable does not exists see later it will be clarified we connect with an online server and check if there is an update by sending the current app version .. . if there is no update do nothing . if there is an update we instruct the server to return a json string that contains the url from which we can download of the .exe installer produced by electron-builder . NB : not the .nupkg server code not provided : - . we download the file and save it inside a sub folder fullupdate in the local folder in which our app is currently saved . This should be safe as electron-builder saves the app in the current user folder AppData so we should not have permissions issues . at the end of the download we create a new file update inside the folder fullupdate to be sure the download has finished successfully . We could also rename the file but I prefer this way . next time the app opens : .. . if the folder fullupdate exists we check if the file update exists . If it does not exists the download was not finished so we delete the folder fullupdate and call the remote-server again to start all over again . else if the file update exists we launch the .exe file we have downloaded and return true . This will prevent the app from opening the main window . The cool thing is that the updater will delete the whole old version of the app saved in AppData while leaving local user data and replace it with the new version . In this way we will get rid also of the folder fullupdate . Now the code : Comment : This seems like a reasonable approach . I like that the process is at least straight-forward not overly complex . It would be nice though if you described the context of the code you supplied . For example it appears to be a custom function that I m guessing you call from main.js when the application starts .", "Question : I am trying to automate a job in Jenkins to build and deploy a visual-studio solution . We can already get Jenkins to build the project . I have created a batch-file that Jenkins runs after the project build that deploys a Squirrel package but I have parameterized the batch-file as well as the Jenkins job which means I am still manually typing in the version number each time I run the job . What we need is to extract the version number from the project so it can be used as a parameter in the Squirrel batch-file . Comment : How are you setting the version number in the first place You should really be setting that as part of your build-process . Comment : We are manually incrementing it in the project properties and then commiting to version-control after the change . Adding it to the Jenkins build-process would circumvent the commit of the version number bump . Comment : Manularity is evil . Generally you have something like a simple text file which contains MAJOR MINOR BUILD and an early step in your build-process reads that then queries your source control for the revision to use in the REVISION field and generates your version info file . That same generated version info can then be used to deploy your package . .. . Answer : For my purposes I moved the Squirrel logic to the .csproj file in the AfterBuild event . Now every time a Release build is executed a package is built and releasified along with the accessible version number . See https : github.com Squirrel Squirrel.Windows blob master docs using visual-studio-packaging.md", "Question : I have an electron application for which I use electron-packager https : github.com electron-userland electron-packager to compile and grunt-electron-installer https : github.com electronjs grunt-electron-installer to generate the Windows installer package . Upon installation I handle the squirrel events like so : .. . .. . and the createShortcuts function just spawns a child-process to call the Update.exe Squirrel.exe with the --createShortcut myapp.exe arguments .. . .. . This works however when the shortcut it generated it is named Electron instead of myapp . I don t see any other ways to specify the output name of the shortcut so how would I change the generated shortcut to say myapp Here is the snippet of the squirrel logs : .. . Answer : Upon further investigation into electron-packager I found a more detailed explanation about the resource editing here https : github.com electron-userland electron-packager blob master usage.txt . using the electron-packager command-line I pass these arguments to update the embedded electron exe information : .. . .. . The grunt-electron-installer will look for this embedded application information to generate the name for the shortcut .", "Question : I have an electron application for which I use electron-packager https : github.com electron-userland electron-packager to compile and grunt-electron-installer https : github.com electronjs grunt-electron-installer to generate the Windows installer package . Upon installation I handle the squirrel events like so : .. . .. . and the createShortcuts function just spawns a child-process to call the Update.exe Squirrel.exe with the --createShortcut myapp.exe arguments .. . .. . This works however when the shortcut it generated it is named Electron instead of myapp . I don t see any other ways to specify the output name of the shortcut so how would I change the generated shortcut to say myapp Here is the snippet of the squirrel logs : .. . Answer : Try to use electron-builder https : github.com electron-userland electron-builder if you get painful with Squirrel . You can use the command as below to make your installer for Windows : electron-builder path to your-electron-packager-output --platform win --out path to your-installer-output --config path to builder.json --target win .. . .. . Sample content for builder.json : .. . .. . win : title : My Production Name icon : path to your-icon.ico version : 1.0.0 publisher : Your Company Name .. . .. . P.s : You must install NSIS http : prdownloads.sourceforge.net nsis nsis-2.50-setup.exe download and add NSIS path into PATH environment before you run the above command .", "Question : I ve built an Electron app using the Squirrel packager update manager . I ve had no issues in building the bundle targeting Windows 64bits only . I installed it on my Macbook pro on a windows-7 x64 dual boot without trouble . I tested it also on a 64 bit Surface pro 3 Win 10 and another Win 7 PC . Everything works fine . I published the app and got a few hundred downloads : half the people that downloaded it has it working and for the other half it just won t start . The process spawns then dies a second after . I tried starting it in admin the admin dialog box won t even show . I tried running it from command-line .. . .. . But out is empty . How can I debug this Comment : What version of Electron does your packaged app use Comment : electron-builder : 3.17.1 electron-installer-squirrel-windows : 1.3.0 electron-prebuilt : 0.37.0 electron-winstaller : 2.3.0 . I cloned the electron quick start repo about 2 months ago couole weeks before 1.0 .. . Answer : I solved it for many users by building directly on a windows-10 fresh install . The builds I used before were built on a windows-7 . Not sure if it was that I also have been cleaning the node-modules a little bit so maybe one of the modules I removed was the issue . Anyways I still do not know of to debug the built exe in this kind of situation . There must be a way to get a log or something when the process kills itself", "Question : I am setting up the build-process for a desktop application on Visual Studio Team Services i.e . Visual Studio Online and would like to run the squirrel installer Releasify command automatically under some build cases . So far I have created the following powershell script that I am running after the project gets built .. . .. . This is leading to the following error message .. . .. . How can I fix this error Is there a better approach Why can t powershell run a program that is in that directory .. . Answer : env : Agent BuildDirectory is the local path on the agent where all folders for a given build definition are created . It isn t the complete path for your project solution . You need to use the path env : BUILD SOURCESDIRECTORY to navigate to packages folder . So update the script to following should fix your problem :", "Question : null .. . Answer : I followed the Squirrel s docs realisfied the project but it barely works . On one computer where I tested it it creates a cefsharp icon on the desktop too but apart from an initial error it works . On two other computers it simply crashes . I can t find a full guide or even a conclusive discussion about this issue so in the NuGet Package Editor I ve included in the net45 folder all the files vaguely related to Cefsharp . This is a screenshot of the folder : .. . .. . enter image description here http : i.stack.imgur.com Ylu71.png .. . .. . It created a 72MB setup file that is a little bigger than I was expecting so.. . I ve included some unnecessary file Anyway it doesn t work what is wrong It s the right procedure or Cefsharp must be referenced in a different way Comment : github.com cefsharp CefSharp wiki https : github.com cefsharp CefSharp wiki Frequently-asked-questions 4-why-do-i-get-an-error-about-could-not-load-file-or-assembly-cefsharpcoredll-or-one-of-its-dependencies-the-specified-module-could-not-be-found-when-trying-to-run-my-cefsharp-based-application-it-compiles-successfully-but-does-not-run-it-runs-on-my-developer-machine-though-throws-an-exception-when-i-copy-it-to-another-computer", "Question : Attempting to create a SquirrelPack target however it does not seem to be working for me using the docs : .. . .. . line 84 Target CreateSquirrelPackage fun - SquirrelPack fun p - p with WorkingDir . tmp . my.nuget line 88 .. . .. . Output .. . .. . build.fsx 86 49 : error FS0001 : This expression was expected to have type string option but here has type string .. . .. . Has anyone been able to get SquirrelPack working in F Fake .. . Answer : WorkingDir has type string option https : github.com fsharp FAKE blob master src app FakeLib SquirrelHelper.fs L66 but you re trying to make it just a string . This should work : Comment : Thank you very much I obviously need to study the F language further to better understand these concepts.Thanks again Comment : If my answer helped you would you consider accepting it", "Question : null .. . Answer : I am trying to build an application using Node.js and Electron . I know the automatic updates are possible for these applications since applications like Slack and Atom are using this feature . This can be achieved using Squirrel or electron-updater but couldn t find a proper way to accomplish that . Any help would be appreciated . Thanks in advance . Comment : I d begin with taking a look at electron.atom.io docs v0.36.8 api auto-updater http : electron.atom.io docs v0.36.8 api auto-updater . I am not sure your question is specific enough to otherwise give you proper help .", "Question : I am trying to pass in options -l StartMenu in --createShortcut in electron . It doesn t seem to work . Once I remove the -l option it succeeds . I am using spawnSync from node to create it . .. . Answer : The issue was the quotation . Even though the documentation says that we should use the quotation calling it via spawnSync started working once I got rid of the quotes ." ] }
[ "yes-answer-long", "yes-answer-short" ]
desktop
UNK_RELATION
popup-blocker@popup@126
popup-blocker -- in web browsers a popup-blocker is browser code that attempts to prevent annoying or disruptive unsolicited @placeholder windows from polluting the display area .
{ "confidence": [ 73.75042724609375, 68.03880310058594, 67.57134246826172, 67.57134246826172, 64.88618469238281, 64.88618469238281, 64.79652404785156, 63.01219177246094, 62.163230895996094, 62.04485321044922, 61.279998779296875, 60.81660079956055, 60.2216796875, 59.377174377441406, 58.396148681640625, 58.131446838378906, 57.535282135009766, 57.46441650390625, 56.39521789550781, 56.39521789550781, 54.521217346191406, 53.81134796142578, 53.73064041137695, 53.34269714355469, 52.78361129760742, 52.6402587890625, 52.278961181640625, 52.27518081665039, 52.27518081665039, 50.90673828125, 50.352108001708984, 49.81544494628906, 49.81544494628906, 49.81544494628906, 49.81544494628906, 49.81544494628906, 49.81544494628906, 49.81544494628906, 49.81544494628906, 49.81544494628906, 49.81544494628906, 48.82417678833008, 48.183494567871094, 48.17290496826172, 48.15892791748047, 48.15892791748047, 48.12691116333008, 47.941444396972656, 47.58208465576172, 46.55043029785156, 46.51912307739258, 46.40533447265625, 45.90729522705078, 45.81013488769531, 45.69540786743164, 45.69540786743164, 45.69540786743164, 45.69540786743164, 45.69540786743164, 45.69540786743164, 45.69540786743164, 45.69540786743164, 45.69540786743164, 45.69540786743164, 45.08777618408203, 45.06068801879883, 43.814674377441406, 43.814674377441406, 43.57372283935547, 43.514434814453125, 43.06070327758789, 43.00246810913086, 42.682289123535156, 42.429595947265625, 42.418678283691406, 42.39427185058594, 42.28529739379883, 42.22157287597656, 41.6684455871582, 41.6684455871582, 41.50794982910156, 41.27813720703125, 41.193359375, 40.92638397216797, 40.92638397216797, 40.91294860839844, 40.865562438964844, 40.55595016479492, 40.543270111083984, 39.807594299316406, 39.736114501953125, 39.689537048339844, 39.64231872558594, 39.52729797363281, 39.48841094970703, 39.375267028808594, 39.0389518737793, 39.0389518737793, 39.03710174560547, 38.9644775390625 ], "content": [ "Here the popup-blocker is not blocking the windows .", "When we are using this the browsers are blocking the popup and user has to disable popup-blocker for the specified web site .", "Still getting popup-blocker .", "With an active popup-blocker this will not succeed .", "A popup-blocker is used to block popups .", "However IE popup-blocker blocks it .", "Is there any code or trick available to bypass the popup-blocker at the time of opening the popup", "This might affect the behavior of the popup-blocker .", "There is no way to alter the browser s popup-blocker behaviour from within a webpage .", "possible duplicate of Opening Popup from website without Popup Blocker catching it http : stackoverflow.com questions 12626051 opening-popup-from-website-without-popup-blocker-catching-it", "the main problem is i want to ignore the popup-blocker .", "The popup-blocker is configured in Registry .", "The popup-blocker blocks the popup from opening everytime i try to execute the JavaScript code .", "The original code is something like : .. . .. . The problem is that the window.open is blocked by the popup-blocker .", "the popup does not opens but when i remove e.preventDefault the popup opens but require the popup-blocker be enabled .", "That has nothing to do with the popup-blocker .", "But the answer to your question remains there is no way to alter the behaviour of a user s popup-blocker from the code of your website .", "I don t think you can disable popup-blocker from javascript .", "Is there any other way to open a new tab without popup-blocker .", "triggers the popup-blocker .. . .. . opens the URL in the same tab just if blank was omitted .", "Does anyone have any idea about the Google toolbar Popup blocker", "Every popup-blocker is different so I cannot answer your question but most likely no if there was a way the popup-blocker would be useless since all the advertising companies would use that way to show the popups anyway .", "To prevent the popup-blocker from triggering on auth calls call gapi.auth.init callback when the client loads .", "Popup blocker will not block the opening of popups if the javascript code which opens the popup is executed on user s direct action like click keypress drag etc .", "How can I enable disable browser popup-blocker from server-side", "Kayak is most likely doing it by having established itself as a trusted website and gaining an exemption in the popup-blocker .", "I am facing trouble in turning the popup-blocker off through watin code .", "All works perfect with only window.open being blocked by popup-blocker .", "And unfortunately force users to change popup-blocker is not good choice and not resolving the problemm .", "i want to open a popup window when user leaves tab or closes browser the available option with me was window.open but with that it asks for popup-blocker if it is not enabled i tried every possible ways to ignore popup-blocker but in vain i tried onunload onbeforeunload but it does not works i also tried to use modal-dialog before the tab browser i used it in onbeforeunload event but it shows a browsers alert message which i dont want my simple requirement is i need a popup window if possible or modal-dialog on the close of tab browser but should ignore popup-blocker i guess with modal-dialog i dont need to worry about popup-blocker because that wont be the new window but how i would be handling it while user closes tab browser .", "I have a af : popup which does not work and ask user to off popup-blocker in browser .", "The issue is that popup-blocker is blocking facebook-share dialog when I call window.open .", "I believe that since the user initiated the action there should be a way for me to bypass popup-blocker .", "Could anyone please help me in knowing how to turn off the popup-blocker of IE through watin", "Is there any way to turn off the popup-blocker of tool bars like google yahoo or msn if any of them are installed in IE", "Under these circumstances you can t bypass the popup-blocker as it was created to stop this exact thing happening .", "What is the difference between these two states where popup-blocker does not work them same way", "The popup-blocker is generally triggered when a window.open call happens in the wrong kind of event-loop .", "On the other hand many websites can open new tabs inside thw current window avoiding the popup-blocker to kick in .", "I emphasize that I don t want to open a new window because that activates the popup-blocker .", "I included it into my HTML file to open a local page and it triggers the popup-blocker .", "The reason it s setting off the popup-blocker even though you are opening it in response to user click is that you are calling it from within img.onload which is asynchronous and will cause popup-blocker to show .", "Full answer : A browser will only open a tab popup without the popup-blocker warning if the command to open the tab popup comes from a trusted event http : www.w3.org TR DOM-Level-3-Events trusted-events .", "Exact duplicate of your previous question http : stackoverflow.com questions 12626051 opening-popup-from-asp-net-website-without-popup-blocker-catching-it 12626481 12626481 ... .", "I know this is resolved but this simple code worked for me detecting Better Popup Blocker extension in Chrome : .. . .. . Ockham s razor", "I changed my code but the new window still some times gets blocked by the popup-blocker .", "If I launch a window with a flash game in it and Chrome s popup-blocker suppresses it the user hears the music from the game but sees nothing .", "Also some of the users have Google Toolbar installed which also has a Popup Blocker creating trouble to my app .", "However in IE7 when clicking the button a popup-blocker shows at top of the web page and user has to click the blocker and click the dowload file menu to download the file .", ".. . How to prevent IE7 file download popup-blocker shows up in ASP.NET App on programming side if possible as opposed to make settings in IE .", "User interaction is necessary to prevent the pop-up blocker from kicking in .", "Edited Question .. . i used the below script and with that i can open a new popup window on link click without popup-blocker interfering in it .. . .. . then why its not possible for the closing events .", "The problem is : Many users have their browsers set to block popup windows .", "Popup blockers are designed to prevent this behavior .", "Unfortunately we are addressing a user-case where ie6 on the user end has popup-blocker enabled .", "I d like to add that bypassing a popup-blocker may be actually trying to make the user-experience better .", "Through experiments I ve got to understand that stack depth has nothing to do with popup-blocker .", "try this to avoid popup-blocker using window.open .. . .. . Js fiddle for this http : jsfiddle.net safeeronline 70kdacL4 2", "There is a good example here theandystratton.com 2012 http : theandystratton.com 2012 how-to-bypass-google-chromes-javascript-popup-blocker", "The issue is that when the test opens the window the Google Chrome popup-blocker blocks it causing the tests to fail .", "It doesn t appear that in the current version of chrome that disabling the popup-blocker is a command-line switch any more .", "You need to increase the timeout otherwise it will always say the popup-blocker is blocking even when it isn t .", "Some time the new window opens fine but some times it gets blocked by popup-blocker in chrome .", "I want to figure out why the form is submitted in new window successfully but some times it gets blocked by the popup-blocker .", "But if a client clicks anyother popup window in the form that popup window will not be blocked by the browser .", "Have you tried I don t know not relying on popup windows which the average user finds incredibly annoying", "That is you can call window.open in response to a button click without getting hit by the popup-blocker but if you put the same code in a timer event it will be blocked .", "My question is is there a way to disable the popup-blocker when creating a node webdriver with Selenium Grid 2 or when creating a RemoteWebDriver in code or both", "That is a problem that you can t avoid popup blocking is a built-in function that all the recent browsers have and getting around a pop-up blocker isn t going to get the user happy .", "I want the session notification popup window also not to be blocked by the browser even if the browser Block popup option is enabled .", "Is there a way to disable IE8s popup-blocker application using command-line of some sort", "Disabling the blocker from the options menu does not work .", "Hmmm.. . That might be a way to but.. . the popup windows content varies as this is a dynamic solution used with multiple popup windows .", "Ideal solution would be that the blocker never shows up in IE7 as in other browser .", "Opening popups when a browser window is closed was a common tactic of pop-under ads in the early 2000s and it irritated users that s why Firefox and IE6 s popup-blocker block them and there is no way around it for you unless you ask the user to disable their popup-blocker on your site and I think you ll find most of them will have no idea how to do that .", "I have enabled the Block popup option in browser .", "I have just spent hours stuck on Selenium with Safari before figuring out that I needed to disable popup-blocker to allow a login popup that I have .", "The following code works when I tested it in IE8 .. . .. . Code found on http : javascript.internet.com snippets popup-blocker-detection-2.html not made by Nick", "There s a similar post here.Maybe it helps : stackoverflow.com questions 888964 http : stackoverflow.com questions 888964 javascript-window-open-is-blocked-by-ie-popup-blocker", "Assuming that s true contact your administrators and have group policy set your internal website to be in the Intranet zone and turn off the popup-blocker for that zone .", "since the session notification popup is comming automatically without any client interaction This popup is blocked by the browser .", "radopen null null was able to open a blank modal with a popup-blocker enabled but it only opened when I had a returned a value as well which will show the confirmation box .", "i have a strange query i want to open a new window a popup when the browser tab is closed using asp.net Jquery but i want to bypass the popup-blocker which blocks the window can anyone help me with this how can i open a popup when user closes the browser tab or any other alternatives which can help me achieve the same .", "You can t - because that s what popup blockers do : they block popup windows i.e .", "Popup blockers often block popup windows if they are not opened in direct response to a user action .", "in as3 MouseEvent.CLICK will still cause a pop-up blocker to detect it", "Once I click the blocker and the download menu within it the blocker will NOT show up again .", "Chrome loads the page to get the favicon and page title so they can display it in the popup-blocker dialog which you see when clicking the icon in the address-bar .", "The thing is the browser will only allow you to open a new tab in the click function user initiated action otherwise the popup-blocker will see this as a script opening new tab without user permission and block it .", "The only problem I ve got is that this triggers the browser pop-up blocker at least in FireFox 41 .", "However this seems like a perfectly legitimate response from a pop-up blocker .", "Not use a popup for your notification but rather display it on the page itself through javascript", "What if browsers are by default enabled by pop blocker common non techy users are not aware of whats happening behind how to prompt him in this case", "Hey any one know how to prevent users to use ad blocker on my site.I just want to request them not to use it on my site. .", "what should do in my code so that my popups becomes Popyp blocker independent. .", "To prevent popup-blockers I need to make sure the window.open call is done from the button-click .", "Interestingly this does not trigger the pop-up blocker in Chrome 46 .", "More to the point how can I bypass the pop-up blocker in this case", "I tried handling the mouse down event and execute something like this : System.Windows.Browser.HtmlPage.Window.Navigate new Uri http : google.com blank .. . .. . However this gets blocked by the browser I tried both Chrome and Firefox unless I disable the popup-blocker .", "By using popup windows you trigger an action to the client computer ." ] }
{ "confidence": [ 87.55530548095703, 82.86328887939453, 78.6685791015625, 76.5636215209961, 75.833984375, 74.1773452758789, 73.25119018554688, 72.74835205078125, 71.35247802734375, 70.14725494384766, 69.75823974609375, 69.63280487060547, 69.46142578125, 69.11013793945312, 68.36003112792969, 67.92642211914062, 67.82223510742188, 67.73277282714844, 67.60104370117188, 66.64459228515625 ], "content": [ "Question : From one of our application we are calling window.open method to open a pop-up . When we are using this the browsers are blocking the popup and user has to disable popup-blocker for the specified web site . Is there any way to disable the popup blockers for specified URL patterns With out user intervention like using browser API etc.. . .. . Answer : No . There is no way to alter the browser s popup-blocker behaviour from within a webpage . The best you can do is include a message on your website asking people to turn off their popup blockers while using your site so that the site can function properly . Comment : In the kayak.com web site they are opening multiple windows when we compare the flight prices . Here the popup-blocker is not blocking the windows . That is why I am checking is there any way to handle this Comment : Kayak is most likely doing it by having established itself as a trusted website and gaining an exemption in the popup-blocker . Or they re using a different method than you are . But the answer to your question remains there is no way to alter the behaviour of a user s popup-blocker from the code of your website . Comment : I tried changing Mozilla config parameters dom.disable open during load true to false . It is working fine . But I am searching for extension API to set this parameter . Comment : What you are looking for DOES NOT EXIST . Being able to alter browser settings through javascript would be a HUGE security hole . Have you tried I don t know not relying on popup windows which the average user finds incredibly annoying", "Question : i want to open a popup window when user leaves tab or closes browser the available option with me was window.open but with that it asks for popup-blocker if it is not enabled i tried every possible ways to ignore popup-blocker but in vain i tried onunload onbeforeunload but it does not works i also tried to use modal-dialog before the tab browser i used it in onbeforeunload event but it shows a browsers alert message which i dont want my simple requirement is i need a popup window if possible or modal-dialog on the close of tab browser but should ignore popup-blocker i guess with modal-dialog i dont need to worry about popup-blocker because that wont be the new window but how i would be handling it while user closes tab browser . If any of the above option is not possible can anyone help me with any other possible alternative or helpful articles . Edited Question .. . i used the below script and with that i can open a new popup window on link click without popup-blocker interfering in it .. . .. . then why its not possible for the closing events . Comment : possible duplicate of Opening Popup from website without Popup Blocker catching it http : stackoverflow.com questions 12626051 opening-popup-from-website-without-popup-blocker-catching-it Comment : possible duplicate of stackoverflow.com questions 2587677 http : stackoverflow.com questions 2587677 avoid-browser-pop-up-blockers 30555411 .. . Answer : You can t - because that s what popup blockers do : they block popup windows i.e . calls to window.open or invocations of target blank links unless it is directly in response to a user mouse action . Opening popups when a browser window is closed was a common tactic of pop-under ads in the early 2000s and it irritated users that s why Firefox and IE6 s popup-blocker block them and there is no way around it for you unless you ask the user to disable their popup-blocker on your site and I think you ll find most of them will have no idea how to do that . What are you trying to accomplish anyway What is the content of this popup that you want the user to see What other approaches have you tried Comment : actually i want to display an ad when user leaves the site i have used onunload for popup and onbeforeunload for modal-dialog event but that displays the browser alert Are you sure want to navigate away from this site can i work around with modal-dialog do you have any idea for this . Comment : check the updated question Comment : What you want to do is impossible . Users don t want adverts and the browsers block them - there is no way around it .", "Question : i want to open a popup window when user leaves tab or closes browser the available option with me was window.open but with that it asks for popup-blocker if it is not enabled i tried every possible ways to ignore popup-blocker but in vain i tried onunload onbeforeunload but it does not works i also tried to use modal-dialog before the tab browser i used it in onbeforeunload event but it shows a browsers alert message which i dont want my simple requirement is i need a popup window if possible or modal-dialog on the close of tab browser but should ignore popup-blocker i guess with modal-dialog i dont need to worry about popup-blocker because that wont be the new window but how i would be handling it while user closes tab browser . If any of the above option is not possible can anyone help me with any other possible alternative or helpful articles . Edited Question .. . i used the below script and with that i can open a new popup window on link click without popup-blocker interfering in it .. . .. . then why its not possible for the closing events . Comment : possible duplicate of Opening Popup from website without Popup Blocker catching it http : stackoverflow.com questions 12626051 opening-popup-from-website-without-popup-blocker-catching-it Comment : possible duplicate of stackoverflow.com questions 2587677 http : stackoverflow.com questions 2587677 avoid-browser-pop-up-blockers 30555411 .. . Answer : Popup blocker will not block the opening of popups if the javascript code which opens the popup is executed on user s direct action like click keypress drag etc .", "Question : i want to open a popup window when user leaves tab or closes browser the available option with me was window.open but with that it asks for popup-blocker if it is not enabled i tried every possible ways to ignore popup-blocker but in vain i tried onunload onbeforeunload but it does not works i also tried to use modal-dialog before the tab browser i used it in onbeforeunload event but it shows a browsers alert message which i dont want my simple requirement is i need a popup window if possible or modal-dialog on the close of tab browser but should ignore popup-blocker i guess with modal-dialog i dont need to worry about popup-blocker because that wont be the new window but how i would be handling it while user closes tab browser . If any of the above option is not possible can anyone help me with any other possible alternative or helpful articles . Edited Question .. . i used the below script and with that i can open a new popup window on link click without popup-blocker interfering in it .. . .. . then why its not possible for the closing events . Comment : possible duplicate of Opening Popup from website without Popup Blocker catching it http : stackoverflow.com questions 12626051 opening-popup-from-website-without-popup-blocker-catching-it Comment : possible duplicate of stackoverflow.com questions 2587677 http : stackoverflow.com questions 2587677 avoid-browser-pop-up-blockers 30555411 .. . Answer : Exact duplicate of your previous question http : stackoverflow.com questions 12626051 opening-popup-from-asp-net-website-without-popup-blocker-catching-it 12626481 12626481 ... . I ll post my answer for it here as well though.. . .. . .. . Popup blockers are designed to prevent this behavior . I would suggest using a modal window instead of an actual browser window . I don t think that these get blocked because they are opened within the page itself . As for the event.. . You could do something like.. . If you are just trying ot give a warning or something you could do .. . .. . By returning something in the onbeforeunload statement it will show a confirm box with your message in it . Comment : i tried onbeforeunload i wrote the dialog .Show in it but it never shows up it directly closes the window Comment : I use onbeforeunload often in one of my applications . Is there any other code on your page that is interfering with it And are you trying to open a modal window or just show an alert confirmation window Comment : alert and confirm box works but the modal-dialog stucks can you give me any reference of the working application Comment : Unfortunately I don t know if you can do a modal . I have never used one in this situation . Here is a link-to a similar SO question http : stackoverflow.com questions 276660 how-can-i-override-the-onbeforeunload-dialog-and-replace-it-with-my-own and also to the MSDN article on onbeforeunload http : msdn.microsoft.com en-us library ms536907 28VS.85 29.aspx . I will try a quick example and see if it works for opening a modal . Comment : I was able to open a modal window . I use Telerik s Rad controls so I don t know if its because of them or not . radopen null null was able to open a blank modal with a popup-blocker enabled but it only opened when I had a returned a value as well which will show the confirmation box . I believe that this is by design . So I don t know if there is a way to accomplish what you are trying to do without a confirmation or alert box .", "Question : I m developing an OAuth authentication flow purely in JavaScript and I want to show the user the grant access window in a popup but it gets blocked . How can I prevent pop-up windows created by either window.open or window.showModalDialog from being blocked by the different browsers pop-up blockers Comment : Even if it were possible I don t know if people use popup blockers you should respect it . Most browsers display a message when a site tried to open a popup so they can still see it if they want to . You can put a remark on your site that some content opens in a popup and the user should allow it in order to proceed . Comment : The best practice would look like : 1 Do this successfully 2 Shutter your windows and bar your door and cower in fear from the gathering crowd of upset web-patrons 3 Repent remove the pop-up-busta-busta and respect your audience . Comment : Alex and Felix I ve updated the question . I wont use the knowledge for evil : . Thanks Comment : I d like to add that bypassing a popup-blocker may be actually trying to make the user-experience better . In an example I m working on now we are using a Javascript application based on ExtJS and we are trying to let users pay using paypal . We are giving them a button they can click to launch paypal in a new window but certain versions of IE are blocking it as a popup even though it s a button click . If they now enable the popup the screen reloads and as a JavaScript app we lose the window state and they have to start over . So really : the problem is IE is dumb . Comment : @PabloFernandez did you solve this issue I notice you accepted dthorpe s answer but just curious to know if this worked for you or if the OAuth pop-up still triggered the blocker .. . Answer : The general rule is that popup blockers will engage if window.open or similar is invoked from javascript that is not invoked by direct user action . That is you can call window.open in response to a button click without getting hit by the popup-blocker but if you put the same code in a timer event it will be blocked . Depth of call chain is also a factor - some older browsers only look at the immediate caller newer browsers can backtrack a little to see if the caller s caller was a mouse click etc . Keep it as shallow as you can to avoid the popup blockers . Comment : This is correct . Pop-ups are blocked only when if the browser suspects non-user is initiating the pop-up . Comment : Interestingly popups initiated through a change event bound to a select element will get blocked in Chrome not FF even though that event is initiated by a direct user action like a click . Although if bound to an input they re allowed . Strange . Comment : Nobody said the browser was consistent . : P Comment : Through experiments I ve got to understand that stack depth has nothing to do with popup-blocker . It actually checks whether window.open is called within 1 second after user action or not . Tested in Chrome 46 and Firefox 42 . Comment : The 1 second timeout can be circumvented in both browsers allowing for an indefinite amount of time using the answer by @t-j-crowder on this page http : stackoverflow.com questions 9514698 bypass-popup-blocker-on-window-open-when-jquery-event-preventdefault-is-set . . have the URL you re calling via ajax be some php or whatever that uses sleep for an amount of time before it returns a response . The browser will hang while it loads the page. . then trigger the popup when it receives a response . In Chrome though you must add an alert right before the ajax to make this trick work .", "Question : I m developing an OAuth authentication flow purely in JavaScript and I want to show the user the grant access window in a popup but it gets blocked . How can I prevent pop-up windows created by either window.open or window.showModalDialog from being blocked by the different browsers pop-up blockers Comment : Even if it were possible I don t know if people use popup blockers you should respect it . Most browsers display a message when a site tried to open a popup so they can still see it if they want to . You can put a remark on your site that some content opens in a popup and the user should allow it in order to proceed . Comment : The best practice would look like : 1 Do this successfully 2 Shutter your windows and bar your door and cower in fear from the gathering crowd of upset web-patrons 3 Repent remove the pop-up-busta-busta and respect your audience . Comment : Alex and Felix I ve updated the question . I wont use the knowledge for evil : . Thanks Comment : I d like to add that bypassing a popup-blocker may be actually trying to make the user-experience better . In an example I m working on now we are using a Javascript application based on ExtJS and we are trying to let users pay using paypal . We are giving them a button they can click to launch paypal in a new window but certain versions of IE are blocking it as a popup even though it s a button click . If they now enable the popup the screen reloads and as a JavaScript app we lose the window state and they have to start over . So really : the problem is IE is dumb . Comment : @PabloFernandez did you solve this issue I notice you accepted dthorpe s answer but just curious to know if this worked for you or if the OAuth pop-up still triggered the blocker .. . Answer : try this to avoid popup-blocker using window.open .. . .. . Js fiddle for this http : jsfiddle.net safeeronline 70kdacL4 2 Comment : This works because the user is directly initiating the click and it has nothing to do with the code . Read @dthorpe answer above", "Question : i have a strange query i want to open a new window a popup when the browser tab is closed using asp.net Jquery but i want to bypass the popup-blocker which blocks the window can anyone help me with this how can i open a popup when user closes the browser tab or any other alternatives which can help me achieve the same . the main problem is i want to ignore the popup-blocker . on one the SO Post http : stackoverflow.com questions 9514698 bypass-popup-blocker-on-window-open-when-jquery-event-preventdefault-is-set .. . .. . i read the below example could help : .. . .. . i replaced the click event with window .unload but that too didnt helped . the popup does not opens but when i remove e.preventDefault the popup opens but require the popup-blocker be enabled . Comment : Under these circumstances you can t bypass the popup-blocker as it was created to stop this exact thing happening . Comment : How can I get into Fort Knox There s some nice gold inside but they put those pesky guards all over the place . Comment : @Archer wrong OP is using synchronous AJAX so it s possible . Comment : @Jack - not when the window is closing . There s nothing to handle the ajax response : Comment : @Archer didn t read the bottom part of the question I suppose never tried it on unload : .. . Answer : You have to open the window inside the same function as the .ajax otherwise some browsers will still reject the popup . This is the only reliable way to make sure the uriyip gets called AND popup a window when it s done loading so it freezes the browser too bad .", "Question : i have a strange query i want to open a new window a popup when the browser tab is closed using asp.net Jquery but i want to bypass the popup-blocker which blocks the window can anyone help me with this how can i open a popup when user closes the browser tab or any other alternatives which can help me achieve the same . the main problem is i want to ignore the popup-blocker . on one the SO Post http : stackoverflow.com questions 9514698 bypass-popup-blocker-on-window-open-when-jquery-event-preventdefault-is-set .. . .. . i read the below example could help : .. . .. . i replaced the click event with window .unload but that too didnt helped . the popup does not opens but when i remove e.preventDefault the popup opens but require the popup-blocker be enabled . Comment : Under these circumstances you can t bypass the popup-blocker as it was created to stop this exact thing happening . Comment : How can I get into Fort Knox There s some nice gold inside but they put those pesky guards all over the place . Comment : @Archer wrong OP is using synchronous AJAX so it s possible . Comment : @Jack - not when the window is closing . There s nothing to handle the ajax response : Comment : @Archer didn t read the bottom part of the question I suppose never tried it on unload : .. . Answer : Popup blockers are designed to prevent this behavior . I would suggest using a modal window instead of an actual browser window . I don t think that these get blocked because they are opened within the page itself . As for the event.. . You could do something like.. . If you are just trying ot give a warning or something you could do", "Question : null .. . Answer : I am using a vBulletin forum for my website and I am designing an application . In my application javascript opens a popup window using window.open javascript method . I have to open the popup at this point in my application because i don t want to loose the currently loaded webpage . When I am logged into my forum everything works perfect . But when i am not logged into my forum the javascript does not open the popup window when window.open is executed . The popup-blocker blocks the popup from opening everytime i try to execute the JavaScript code . Why the browser does not block popups when i am logged into my forum What is the difference between these two states where popup-blocker does not work them same way Is there any code or trick available to bypass the popup-blocker at the time of opening the popup Please guide me. . Thanks in advance . Comment : The popup-blocker is generally triggered when a window.open call happens in the wrong kind of event-loop . When exactly do you open the window That is what triggers it If it s a click it should be OK but you can t do it for example on page load or in response to an XMLHttpRequest completion . Comment : @Pointy : Thank you . That really helped . I was calling the window.open method on XMLHttpRequest completion .", "Question : It seems like when trying to open 2 windows from a succession of windows.open calls it only allows the first window to open and deletes the reference to the second window . I know this probably sounds a little kludgy but we do need to have that second popup . Any ideas Unfortunately we are addressing a user-case where ie6 on the user end has popup-blocker enabled . Comment : There s a similar post here.Maybe it helps : stackoverflow.com questions 888964 http : stackoverflow.com questions 888964 javascript-window-open-is-blocked-by-ie-popup-blocker .. . Answer : EDIT : I just realized that you probably are using a blank window name for both windows : .. . .. . This is probably handled with different windows in browsers other than IE6 . If that does not work you might consider injecting divs that display on top of your content instead of using popups which is considered a better practice .", "Question : Please help regarding the following issue . I have enabled the Block popup option in browser . We are doing a session validation using a background ajax call to check the session is active or not . If the session is not active for a desired interval a popup window will come for notification . Now comming to the problem . since the session notification popup is comming automatically without any client interaction This popup is blocked by the browser . But if a client clicks anyother popup window in the form that popup window will not be blocked by the browser . I want the session notification popup window also not to be blocked by the browser even if the browser Block popup option is enabled . .. . Answer : A popup-blocker is used to block popups . If there was a way around it it would be completely useless . You can either : .. . .. . 1 . Add an exception for your domain in your popup-blocker s settings .. . 2 . Not use a popup for your notification but rather display it on the page itself through javascript Comment : Hi Andreas Thanks for the clarification but showing the notification as poup is client requirement . Do you know any javascript ways to achieve it . I tried with onclick function but it didnt worked . Comment : Every popup-blocker is different so I cannot answer your question but most likely no if there was a way the popup-blocker would be useless since all the advertising companies would use that way to show the popups anyway . Comment : can you help me answer this question of mine stackoverflow.com questions 4232546 http : stackoverflow.com questions 4232546 browser-window-popups-risks-and-special-features", "Question : I m developing an OAuth authentication flow purely in JavaScript and I want to show the user the grant access window in a popup but it gets blocked . How can I prevent pop-up windows created by either window.open or window.showModalDialog from being blocked by the different browsers pop-up blockers Comment : Even if it were possible I don t know if people use popup blockers you should respect it . Most browsers display a message when a site tried to open a popup so they can still see it if they want to . You can put a remark on your site that some content opens in a popup and the user should allow it in order to proceed . Comment : The best practice would look like : 1 Do this successfully 2 Shutter your windows and bar your door and cower in fear from the gathering crowd of upset web-patrons 3 Repent remove the pop-up-busta-busta and respect your audience . Comment : Alex and Felix I ve updated the question . I wont use the knowledge for evil : . Thanks Comment : I d like to add that bypassing a popup-blocker may be actually trying to make the user-experience better . In an example I m working on now we are using a Javascript application based on ExtJS and we are trying to let users pay using paypal . We are giving them a button they can click to launch paypal in a new window but certain versions of IE are blocking it as a popup even though it s a button click . If they now enable the popup the screen reloads and as a JavaScript app we lose the window state and they have to start over . So really : the problem is IE is dumb . Comment : @PabloFernandez did you solve this issue I notice you accepted dthorpe s answer but just curious to know if this worked for you or if the OAuth pop-up still triggered the blocker .. . Answer : Most easiest way to get rid of this is which worked for me very well - .. . .. . 1 . Dont use document.open . 2 . Instead use this.document.location.href location where location is the url to be loaded .. . .. . Ex : .. . .. . This works very well . Cheers", "Question : I have an application in .NET that allows user to download document .rtf by clicking a downlaod button then a save open dialogue opens . It works in IE6 and 8 that ways . However in IE7 when clicking the button a popup-blocker shows at top of the web page and user has to click the blocker and click the dowload file menu to download the file . Once I click the blocker and the download menu within it the blocker will NOT show up again . However if I close IE7 windows and start the download process again the blocker repeat . .. . How to prevent IE7 file download popup-blocker shows up in ASP.NET App on programming side if possible as opposed to make settings in IE . .. . It seems to do with HTTP header or content-type Ideal solution would be that the blocker never shows up in IE7 as in other browser . .. . It happens even in localhost . Interestingly the blocker does NOT shows up when clicking HTML archor link-to download other files . .. . The message on the blocker is below : .. . .. . To help protect your security Internet Explorer blocked this site from downloading file to your computer . Click here for options . Download File .. . .. . .. . After investigation what happens is that before sending an url request for a file download a put operation is sent to server to save the change before file download which triggers IE7 security blocker . I would like to know any workaround and the reason if possible . Comment : Add site to trusted-sites under Security settings . Comment : @Tomas Voracek Thanks . That might work . However Ideally it should NOT shows up as in IE6 IE8 firefox and others . Comment : This is a website in .NET not a client app right Comment : @Joshua Thanks . It is a ASP.NET Web Application . Comment : Unfortunately there s not much you can do about what is a documented bug in IE . .. . Answer : http : support.microsoft.com kb 937409 http : technet.microsoft.com en-us library cc875817.aspx Comment : Thanks for your solution . The ideal solution would be on programming side if possible . Because it will eliminate the need to setup on client sides .", "Question : I m developing an OAuth authentication flow purely in JavaScript and I want to show the user the grant access window in a popup but it gets blocked . How can I prevent pop-up windows created by either window.open or window.showModalDialog from being blocked by the different browsers pop-up blockers Comment : Even if it were possible I don t know if people use popup blockers you should respect it . Most browsers display a message when a site tried to open a popup so they can still see it if they want to . You can put a remark on your site that some content opens in a popup and the user should allow it in order to proceed . Comment : The best practice would look like : 1 Do this successfully 2 Shutter your windows and bar your door and cower in fear from the gathering crowd of upset web-patrons 3 Repent remove the pop-up-busta-busta and respect your audience . Comment : Alex and Felix I ve updated the question . I wont use the knowledge for evil : . Thanks Comment : I d like to add that bypassing a popup-blocker may be actually trying to make the user-experience better . In an example I m working on now we are using a Javascript application based on ExtJS and we are trying to let users pay using paypal . We are giving them a button they can click to launch paypal in a new window but certain versions of IE are blocking it as a popup even though it s a button click . If they now enable the popup the screen reloads and as a JavaScript app we lose the window state and they have to start over . So really : the problem is IE is dumb . Comment : @PabloFernandez did you solve this issue I notice you accepted dthorpe s answer but just curious to know if this worked for you or if the OAuth pop-up still triggered the blocker .. . Answer : from Google s oauth JavaScript API : .. . .. . http : code.google.com p google-api-javascript-client wiki Authentication .. . .. . See the area where it reads : .. . .. . Setting up Authentication .. . .. . The client s implementation of OAuth 2.0 uses a popup window to prompt the user to sign-in and approve the application . The first call to gapi.auth.authorize can trigger popup blockers as it opens the popup window indirectly . To prevent the popup-blocker from triggering on auth calls call gapi.auth.init callback when the client loads . The supplied callback will be executed when the library is ready to make auth calls . I would guess its relating to the real answer above in how it explains if there is an immediate response it won t trip the popup alarm . The gapi.auth.init is making it so the api happens immediately . Practical Application .. . .. . I made an open-source authentication microservice using node passport on npm and the various passport packages for each provider . I used a standard redirect approach to the 3rd party giving it a redirect URL to come back to . This was programmatic so I could have different places to redirect back to if login signup and on particular pages . github.com sebringj athu https : github.com sebringj athu .. . .. . passportjs.org http : passportjs.org Comment : Hi @JasonSebring - could you possibly elaborate on the particulars of this server-side approach Maybe share a link or two Thanks : Comment : Thank you for elaborating :", "Question : null .. . Answer : To end a user s browsersession successfully on browser-unload we need to open a new window to call some webservice to reset the user s session data on the server . With an active popup-blocker this will not succeed . Our solution is querying the popupblocker-status when starting our application stop further execution when the blocker is turned on and request the user to turn off popup-blocking or at least make him her accept popups from our application url or not... . I have read a lot on how to determine if a popup is being blocked . All examples are using window.open which actually opens a window if the blocker appears to be off . We would like to avoid this window to appear and close it right away just to check if the blocker is turned on . Do you happen to know if there is an alternative way to get a browser s popupblocker-status By reading a browser-property for example Comment : Why don t you just send out an AJAX request or reload the current page instead Comment : I have been experimenting with sending an AJAX request while the page is being unloaded . However it oftens happens that the page is unloaded before it can execute the AJAX call . Reloading the page is not a logical step I think when a user decides to close the page to just reopen the page again .", "Question : i have a strange query i want to open a new window a popup when the browser tab is closed using asp.net Jquery but i want to bypass the popup-blocker which blocks the window can anyone help me with this how can i open a popup when user closes the browser tab or any other alternatives which can help me achieve the same . the main problem is i want to ignore the popup-blocker . on one the SO Post http : stackoverflow.com questions 9514698 bypass-popup-blocker-on-window-open-when-jquery-event-preventdefault-is-set .. . .. . i read the below example could help : .. . .. . i replaced the click event with window .unload but that too didnt helped . the popup does not opens but when i remove e.preventDefault the popup opens but require the popup-blocker be enabled . Comment : Under these circumstances you can t bypass the popup-blocker as it was created to stop this exact thing happening . Comment : How can I get into Fort Knox There s some nice gold inside but they put those pesky guards all over the place . Comment : @Archer wrong OP is using synchronous AJAX so it s possible . Comment : @Jack - not when the window is closing . There s nothing to handle the ajax response : Comment : @Archer didn t read the bottom part of the question I suppose never tried it on unload : .. . Answer : I don t think there s a way to go around pop-up blockers . You should change the approach and try to open the content in a jQuery UI modal-dialog box http : jqueryui.com demos dialog modal instead of using an actual browser window popup . Comment : ok as per going with jQuery UI modal-dialog box can i open the modal-dialog on close of browser tab . Comment : jQuery s modal-dialog is an HTML emulation of a modal popup thus it has to be inside a page . You could open it before the closing of the window Comment : can you help me how shall i open the modal popup before closing window i am using onbeforeunload but here the problem is when i close the window it first displays alert message and if user clicks stay on page only then the modal is visible and also the leave message box displays on page load too", "Question : I m developing an OAuth authentication flow purely in JavaScript and I want to show the user the grant access window in a popup but it gets blocked . How can I prevent pop-up windows created by either window.open or window.showModalDialog from being blocked by the different browsers pop-up blockers Comment : Even if it were possible I don t know if people use popup blockers you should respect it . Most browsers display a message when a site tried to open a popup so they can still see it if they want to . You can put a remark on your site that some content opens in a popup and the user should allow it in order to proceed . Comment : The best practice would look like : 1 Do this successfully 2 Shutter your windows and bar your door and cower in fear from the gathering crowd of upset web-patrons 3 Repent remove the pop-up-busta-busta and respect your audience . Comment : Alex and Felix I ve updated the question . I wont use the knowledge for evil : . Thanks Comment : I d like to add that bypassing a popup-blocker may be actually trying to make the user-experience better . In an example I m working on now we are using a Javascript application based on ExtJS and we are trying to let users pay using paypal . We are giving them a button they can click to launch paypal in a new window but certain versions of IE are blocking it as a popup even though it s a button click . If they now enable the popup the screen reloads and as a JavaScript app we lose the window state and they have to start over . So really : the problem is IE is dumb . Comment : @PabloFernandez did you solve this issue I notice you accepted dthorpe s answer but just curious to know if this worked for you or if the OAuth pop-up still triggered the blocker .. . Answer : As a good practice I think it is a good idea to test if a popup was blocked and take action in case . You need to know that window.open has a return-value and that value may be null if the action failed . For example in the following code : .. . .. . if the popup is blocked window.open will return null . So the function will return false . As an example imagine calling this function directly from any link with target blank : if the popup is successfully opened returning false will block the link action else if the popup is blocked returning true will let the default behavior open new blank window and go on . This way you will have a popup if it works and a blank window if not . If the popup does not open you can : .. . .. . open a blank window like in the example and go on .. . open a fake popup an iframe inside the page .. . inform the user please allow popups for this site .. . open a blank window and then inform the user etc. .", "Question : I am facing trouble in turning the popup-blocker off through watin code . Could anyone please help me in knowing how to turn off the popup-blocker of IE through watin Is there any way to turn off the popup-blocker of tool bars like google yahoo or msn if any of them are installed in IE Thanks for your help in advance . .. . Answer : You can t disable this with WatiN you could however use UIAutomation to do it .", "Question : This question already has an answer here : .. . .. . Open a URL in a new tab and not a new window using JavaScript questions 4907843 open-a-url-in-a-new-tab-and-not-a-new-window-using-javascript 25 answers .. . .. . there are many answers on how to open a URL in a new window using window.open but this opens a popup window and that s not what I need . The problem is : Many users have their browsers set to block popup windows . On the other hand many websites can open new tabs inside thw current window avoiding the popup-blocker to kick in . triggers the popup-blocker .. . .. . opens the URL in the same tab just if blank was omitted . So here s the question : .. . Is there a way to tell Javascript to behave just as-if the target blank attribute was included in an ordinary link in other words : .. . How is it possible to open a new tab preferably using document.location.href I emphasize that I don t want to open a new window because that activates the popup-blocker . I need a new tab inside the current window . Again any answers proposing window.open are useless for me so please don t recommend anything that opens a new window . Comment : This question has been asked many times before . Please try searching first . Open a URL in a new tab using JavaScript http : stackoverflow.com questions 4907843 open-a-url-in-a-new-tab-using-javascript .. . Answer : This may help . Working Fiddle https : jsfiddle.net za5nLb1u 1 Comment : I tried this in the fiddle and it works well with stackoverflow.com . I included it into my HTML file to open a local page and it triggers the popup-blocker . Comment : Maybe I did something wrong trying out but now it works . Thank you very much for this quick and easy solution . Comment : @GeraldGerosch welcome .", "Question : The thing is if you have links with target blank and you have handler for click on this link that makes window.open then pop window that was called with JS will be shown but the link will be not open in new tab in IE 9 version was tested for sure it will be blocked by IE popup-blocker . All other browsers open both a link in new tab and a pop window . Any workaround Comment : can you post some sample code Not 100 following your description.. . Comment : you WANT to open both Comment : I think he wants to implement his own link opener with window.open . Comment : The sample you can find in 1 answer . Yes I want to open both . Comment : @elisium : Why would you want that .. . Answer : As you said Chrome allows this while IE9 blocks this behavior by default fiddle http : jsfiddle.net 5cgjQ . However this seems like a perfectly legitimate response from a pop-up blocker . I doubt most users would or should have to expect that a hyperlink will open two new windows simultaneously . That said your users can certainly change their pop-up blocker settings for IE in order to allow pop-ups from your site . Update .. . .. . Testing with a timeout on the window.open it appears that it s certainly the second window which is suppressed regardless of whether it s the link s href or the result-of the window.open fiddle http : jsfiddle.net 5cgjQ 8 . Comment : I think than normal behavior is to block pop window not link opening even with target blank . And unfortunately force users to change popup-blocker is not good choice and not resolving the problemm . If IE blocked the pop window I couldn t say it s not normal . Comment : You say that but your click handler window.open is processed before the browser navigates to the href.. . so it may just be that any windows opened beyond the first are treated as pop-ups to be suppressed . Comment : I understand that but how can any browser treat regular link opening as popup in any case . Anyway I need a way to force opening both links ." ] }
[ "yes-answer-long", "yes-answer-short" ]
popup
UNK_RELATION
qt4.6@qt@43
qt4 .6 -- for issues relating to using the @placeholder framework version 4.6 .
{ "confidence": [ 26.311534881591797, 26.178863525390625, 25.20313262939453, 25.081697463989258, 23.873838424682617, 22.268962860107422, 22.01038360595703, 21.762042999267578, 21.322223663330078, 21.322223663330078, 21.188316345214844, 20.998355865478516, 20.552471160888672, 20.528491973876953, 20.528491973876953, 20.148305892944336, 19.654037475585938, 19.47284698486328, 19.3251953125, 18.982759475708008, 18.866905212402344, 18.866905212402344, 18.778636932373047, 18.767589569091797, 18.609464645385742, 18.111839294433594, 17.849979400634766, 17.849979400634766, 17.80815315246582, 17.758506774902344, 17.758506774902344, 17.595130920410156, 17.387468338012695, 17.387468338012695, 16.874862670898438, 16.741579055786133, 16.741579055786133, 16.71098518371582, 16.71098518371582, 16.71098518371582, 16.648807525634766, 16.492551803588867, 16.172607421875, 16.059019088745117, 15.766313552856445, 15.708123207092285, 15.602584838867188, 15.602584838867188, 15.528961181640625, 15.413131713867188, 15.139812469482422, 15.139812469482422, 15.139812469482422, 15.139812469482422, 15.139812469482422, 15.139812469482422, 15.139812469482422, 15.139812469482422, 15.139812469482422, 15.139812469482422, 15.139812469482422, 15.139812469482422, 15.139812469482422, 15.139812469482422, 15.139812469482422, 15.139812469482422, 15.139812469482422, 15.09742546081543, 14.821022987365723, 14.821022987365723, 14.821022987365723, 14.610157012939453, 14.599722862243652, 14.420560836791992, 14.326963424682617, 14.326963424682617, 14.326963424682617, 14.274137496948242, 14.274137496948242, 13.943361282348633, 13.943361282348633, 13.943361282348633, 13.943361282348633, 13.943361282348633, 13.943361282348633, 13.943361282348633, 13.861230850219727, 13.71262264251709, 13.71262264251709, 13.628181457519531, 13.50175666809082, 13.426651000976562, 13.218563079833984, 13.218563079833984, 13.110413551330566, 13.110413551330566, 13.110413551330566, 13.110413551330566 ], "content": [ "I am using Qt 4.6 .", "Trying to use QT4 as I would like to avoid alternative IDEs and languages .", "I m using Qt 4.6 B.T.W .", "I m writing a unit test for a custom Validator in a QTableView using the QTestLib framework http : doc.qt.digia.com 4.6 qtestlib-manual.html .", "For more info see for Qt 4.6 : http : doc.qt.digia.com 4.6 timers.html", "See http : doc.trolltech.com 4.6 dialogs-licensewizard.html http : doc.qt.digia.com 4.6 dialogs-licensewizard.html for an example which makes use of this functionality .", "I m starting with QT4 I m wondering where to put my application code .", "Qt 4.6 gives you both QBasicTimer and QTimer .", "The best solution is probably the one provided by using QWizardPage : : registerField http : doc.qt.digia.com 4.6 qwizardpage.html registerField .", "There are other different approaches such as using processEvents http : doc.qt.nokia.com 4.6 qcoreapplication.html processEvents but I d personally recommend the threads approach .", "You can use QTimer http : doc.trolltech.com 4.6 qtimer.html or a singleShot http : doc.trolltech.com 4.6 qtimer.html singleShot timer set to a delay of zero milliseconds .", "and you d better use tag qt4 instead of qt4.6", "I ve found out the X Y position of a cell can be retrieved using QTableView : : columnViewportPosition int http : doc.qt.digia.com 4.6 qtableview.html columnViewportPosition and QTableView : : rowViewportPosition int http : doc.qt.digia.com 4.6 qtableview.html rowViewportPosition .", "Also QAbstractEventDispatcher http : doc.qt.nokia.com 4.6 qabstracteventdispatcher.html might be useful to you .", "Note that QFont has a setPixelSize http : doc.trolltech.com 4.6 qfont.html setPixelSize method .", "Taken from ctd s answer as suggested in the comments : QT4 : Transparent Window with rounded-corners http : stackoverflow.com questions 1909092 qt4-transparent-window-with-rounded-corners 1910052 1910052", "OS : : win xp sp3 .. . .. . Qt : : 4.6 .. . .. . I am working on the PUZZLE game based on Qt framework and need some help .", "I am using Qt version 4.6.2 .", "Click add to reference your 4.6 qmake manually .", "Check for all dependencies .. . On Visual Studio go to Project Properties- Linking and check for qt4 binaries", "EDIT : QWizard : : button http : doc.qt.digia.com 4.6 qwizard.html button provides access to the buttons in the wizard .", "The Drag and Drop Puzzle example seems to do what you are looking for : https : doc.qt.io archives 4.6 draganddrop-puzzle.html", "I am using Linux 10.10 .", "I have been following the Gestures Programming http : doc.qt.digia.com 4.6 gestures-overview.html guide and implemented and registered my QGestureRecognizer http : doc.qt.digia.com 4.6 qgesturerecognizer.html -derived classes for each gesture .", "Qt Version : - QMake version 2.01a Using Qt version 4.6.2 I am on Linux system .", "I tested it in the main development area using the control r feature .", "The move function see QWidget http : doc.trolltech.com 4.6 qwidget.html pos-prop doc takes one QPoint or two int as parameter .", "from which I cannot deviate move forward from so I wanted to know timers that would be 4.6 qt compatible", "Qt4 doesn t expose such feature but Qt eXTension library http : www.libqxt.org solves the problem with its QxtGlobalShortcut http : doc.libqxt.org tip qxtglobalshortcut.html .", "Download the qobject p.h file from http : qt.gitorious.org qt qt blobs raw 4.6 src corelib kernel qobject p.h .. . .. . 2 .", "I use Qt 4.6 in combination with .. . .. . EDIT : has been solved here is how I implemented it in case anyone is interested :", "I put together the demo file using the three sliders that change and show the values in the spin box .", "There are several things to consider when trying to edit in a QTableView through simulated events : .. . .. . A QTableView does not display its cells directly it does that using its viewport http : doc.qt.digia.com 4.6 qabstractscrollarea.html viewport .", "The easiest way to do that is the usage of QWidget : : focusWidget http : doc.qt.digia.com 4.6 qwidget.html focusWidget .. . .. . Note that using it like that can be unsafe though as focusWidget can return NULL .", "Your Qt version", "I m starting off QT 4.6 s example OpenGL - 2D painting .. . It uses a subclass of QGLWidget and makes painting operations with the class QPainter .", "If you use the widget as described in its manual http : doc.trolltech.com 4.6 qglwidget.html details you can just use the OpenGL functions as usual .", "If you want to provide your own event-loop you can use QApplication : : processEvents http : doc.qt.nokia.com 4.6 qcoreapplication.html processEvents to signal Qt to process it s events and keep a responsible UI .", "codeblocks 8.02 . win xp SP2 Qt 4.6 .. . .. . After installing Qt SDK I installed QtWorkbench codeblocks plugin that allows you to create Qt applications .", "From the QPrinter docs http : doc.trolltech.com 4.6 qprinter.html PrinterMode-enum it sounds like you have to specify font sizes in pixels to get text and graphics to match up .", "However double clicking at the specified location using QTest : : mouseDClick .. . http : doc.qt.digia.com 4.6 qtest.html mouseDClick neither selects the cell nor sets it into edit mode : .. . .. . How can I implement the test case which I described above using Mouse Keyboard actions only", "I think my answer here is what you want : stackoverflow.com questions 1909092 http : stackoverflow.com questions 1909092 qt4-transparent-window-with-rounded-corners 1910052 1910052", "im not familiar with VC++ with qt ..but Use mandle brot http : harmattan-dev.nokia.com docs library html qt4 threads-mandelbrot.html example .. . .. . and fortune thread example enter link description here http : qt-project.org doc qt-4.8 network-blockingfortuneclient.html .. . .. . use signals to emit the video frame array or QImage .", "My workaround .. . .. . installing kubuntu 10.04 in a vitrualbox .. . copy the project to the virtualbox .. . compile it using qt-creator inside virtualbox .. . .. . The binary made in the virtualbox works fine in both 4.6 and 4.8 envirement", ".. . .. . With that knowledge the test case can be programmed as follows : .. . .. . Note : if you want to verify this you can add QTest : : qWait 1000 commands after each event .. . .. . .. . .. . If you are using the data functions as described here http : doc.qt.digia.com 4.6 qtestlib-tutorial2.html note that you cannot retrieve the focusWidget at the time of data creation .", "This table is fixed at 16 x 128 cells so I guess it won t have speed issues .", "QWidget Class Reference Transparency and Double Buffering http : doc.qt.io archives 4.6 qwidget.html transparency-and-double-buffering .. . .. . The first one explains New in Qt 4.1 : The Backing Store and the picture is exactly what I want .", "Qt : : 4.6 .. . .. . I have class Gameboard in which i have some rectangle.I defined keyPressEvent for that rectangle in order to move him around the screen.Key A : : rectangle.moveToLeft Key D : : rectangle.moveToRight.Problem is that keys work with delay .", "Try this modified version of your TS file : .. . .. . Duplicates are identified by context i.e .", "you should be able to use edit method of the QAbstractItemView http : doc.qt.nokia.com 4.6 qabstractitemview.html class to trigger editing for the given model index .", "I can not get past the make g++ -Wl -O1 -o slider -L usr lib -lQtGui -lQtCore -lpthread usr lib gcc i686-linux-gnu 4.4.5 . . . . . . . . lib crt1.o : In function start : .text+0x18 : undefined-reference to main collect2 : ld returned 1 exit status .", "No matter what I do I searched the manual but found it referencing more Windows stuff than Linux .", "It is so obscure that my level of frustration leads me to ask one more time .", "I really do not want to go to Oracle s stuff .", "Can someone help", "Is this the build of Qt failing or your own program", "It works fine .", "I then save it to a file and do the following in the directory slider where I stored the file : qmake -project qmake make .. . .. . The results are : .. . .. . make g++ -Wl -O1 -o slider -L usr lib -lQtGui -lQtCore -lpthread usr lib gcc i686-linux-gnu 4.4.5 . . . . . . . . lib crt1.o : In function start : .text+0x18 : undefined-reference to main collect2 : ld returned 1 exit status make : slider Error 1 .. . .. . I suspect that I do not have the correct information in either the .project file or the Makefile .", "However I don t know what else to place there .", "The names .Ui seem suspicious but I just don t know enough to validate that .", "Thanks Harry Fernandina Beach Floria", "I need to create a application which is created in QMainWindow .", "I have created application.in UI form I have dragged QGraphicsView .", "I have created Graphic scene also .", "I m posting the code.i m able to get scene but it by deafult coming at topleft corner .", "other than coming inside QGraphicsView.suggest me where I might have gone wrong .", "Please suggest me.Thanks in advance", "Put another way what is the absolute minimum I need to render an HTML page to memory using QGraphicsWebView", "I m using a Table View .", "I m using Qt 4.6.3 .", "I m using Qt4.6 and getOpenFileName .", "I am using windows-7 for this .", "This might lead to performance issues if you are dealing with very large models but for me the hack works pretty well .", "@Laszlo : thanks.That means i need to install latest version .", "Using registerField The Next and Finish buttons are decided together .", "Do you feel comfortable using XML technology", "Using the model s .. . .. . method should cause the view to update .", "Installed QT SDK in my users homefolder and now i have 2 options insted of 1 the old Qt 4.8.1 System and Desktop Qt 4.8.1 for GCC Qt SDK still no 4.6", "tried both Qt SDK 1.2.1 and Qt SDK 1.1.2 under Develement Tools- Desktop Qt there is an 4.7.3 avible is that where you expected med to find a 4.6", "Use QtCreator as this is the official way to write applications using Qt .", "I m using Qt 4.6.3 on Windows 7 with the MS compiler .", "To pass parameters in my case the file path retrieved using QSettings use :", "I m using Qt 4.6.3 Windows 7 K Ubuntu 10.04 .", "To use GDB on Windows you ll need to build the program using MinGW .", "You should be using a QPainter initialised to use the QImage as a paint device .", "I draw the Lines using QPainter see changes in code .", "I am using Qt5.0.1 with Visual Studio 2010 integrated .. . .. . I am rendering the video frames from the video file using ffmpeg with Qt as a QImage actually i need to display the rendered video frame in runtime using a QThread .", "You ll be using QGLWidget a lot", "I m using Qt 5.4.0", "Not the latest but at least a newer version unless you use the separate qml package from pre-historic time .", "I d suggest using Qt Creator .", "Qt has its own main loop you can connect to it using the QTimer class .", "I m using Qt4.6 and I have a QComboBox with a QCompleter in it .", "I m using libqxt with no success in Mac OS X .", "Alternatively if your graphics and text are very tightly dependent on each others sizes then you may be better using pixel sizes everywhere .", "If you are setting up the QPrinter object using a QPrintDialog then the code should be something like this : .. . .. . After this the program should output the DPI of the selected printer .", "If you aren t using the QPrintDialog you should use the QPrinter constructor as shown above and then call setResolution DPI with the known DPI of your printer .", "And just from using other Apps it seems that all platforms do have a way of predicting the window geometry in that windows are positioned prior to appearing on the screen ." ] }
{ "confidence": [ 30.3399600982666, 29.27785873413086, 27.869762420654297, 27.735458374023438, 27.081565856933594, 27.081565856933594, 23.417863845825195, 22.88663101196289, 21.457317352294922, 21.443702697753906, 21.327178955078125, 21.311656951904297, 21.305124282836914, 20.895660400390625, 20.866744995117188, 19.854137420654297, 19.666330337524414, 19.402278900146484, 19.03622817993164, 18.90662384033203 ], "content": [ "Question : I m trying to make a transparent window stays on top z-order . I want to implement something like layer that indicates some parameters on the other program . So what I need is to make background transparent not whole widget with QWidget : : setWindowOpacity function . I found some documents about it .. . .. . 1 . Transparent Backgrounds in Qt 4.1 http : doc.qt.io archives qq qq16-background.html .. . .. . 2 . QWidget Class Reference Transparency and Double Buffering http : doc.qt.io archives 4.6 qwidget.html transparency-and-double-buffering .. . .. . The first one explains New in Qt 4.1 : The Backing Store and the picture is exactly what I want . The second one explains more details about it . left picture .. . .. . The left widget has no additional properties or widget attributes set . This default state suits most custom widgets using transparency are irregularly-shaped or do not paint over their entire area with an opaque brush . But I don t know how to do it . I m using Qt 4.6 B.T.W . Comment : I think my answer here is what you want : stackoverflow.com questions 1909092 http : stackoverflow.com questions 1909092 qt4-transparent-window-with-rounded-corners 1910052 1910052 Comment : Thank you very much .. . Answer : Taken from ctd s answer as suggested in the comments : QT4 : Transparent Window with rounded-corners http : stackoverflow.com questions 1909092 qt4-transparent-window-with-rounded-corners 1910052 1910052", "Question : I m starting with QT4 I m wondering where to put my application code . Here Or here where exactly If I want my app not only react to user events but to execute regularly on a loop where do I put the loop Comment : What do you need to do in the application code Why do you need to loop Comment : I m trying to build a visual debugger for an emulator . My emulator has a method that fetches an instruction and executes it and it needs to be called in a loop . .. . Answer : Qt has its own main loop you can connect to it using the QTimer class . If you want to provide your own event-loop you can use QApplication : : processEvents http : doc.qt.nokia.com 4.6 qcoreapplication.html processEvents to signal Qt to process it s events and keep a responsible UI . Also QAbstractEventDispatcher http : doc.qt.nokia.com 4.6 qabstracteventdispatcher.html might be useful to you . This http : stackoverflow.com questions 1051333 combing-an-external-event-loop-with-qts question might also be useful .", "Question : I m starting with QT4 I m wondering where to put my application code . Here Or here where exactly If I want my app not only react to user events but to execute regularly on a loop where do I put the loop Comment : What do you need to do in the application code Why do you need to loop Comment : I m trying to build a visual debugger for an emulator . My emulator has a method that fetches an instruction and executes it and it needs to be called in a loop . .. . Answer : Unless you loop within a non-gui thread you will block the GUI by looping in the implicit main gui thread . Here s a couple of different approaches : .. . .. . 1 . Use threads . Qt s signals and slots are thread safe . Thus within a thread you can call your emulator which may block and which will then return data to the calling thread . You can then emit a signal to the GUI thread which will respond to the signal and update the GUI accordingly . 2 . Use a timer . You can use QTimer http : doc.trolltech.com 4.6 qtimer.html or a singleShot http : doc.trolltech.com 4.6 qtimer.html singleShot timer set to a delay of zero milliseconds . This has the affect of calling your slot as often as it possibly can while not blocking the loop . If the slot returns quickly this will not appear to block the GUI and simplifies programming a little bit . There are other different approaches such as using processEvents http : doc.qt.nokia.com 4.6 qcoreapplication.html processEvents but I d personally recommend the threads approach .", "Question : OS : : win xp sp3 .. . .. . Qt : : 4.6 .. . .. . I am working on the PUZZLE game based on Qt framework and need some help . In project is included main picture which needs to be disassembled to smaller parts polygons with images belongig to them . So I make image QImage image QImage someImage.jpg and want to operate with something like croping image on that object . I checked QImage QPixmap .. . docu on nokia site looking for member func . similar to croping but found zero . Need reference to class I must use include to solve this problem and then I will recheck online docu . Comment : and you d better use tag qt4 instead of qt4.6 .. . Answer : Supposed the original image is called A . You have a polygon P . You want to create a smaller image B which is basically A cropped by P . Here are the steps : .. . .. . Create B . To know the size just use QPolygonF : : boundingRect on P . .. . Fill B with transparent color or whatever background-color you want to have . Creates a new QPainter that works on B .. . Sets the painter clip-path to P polygon can be converted path see QPainter : : setClipPath .. . Draws A using the painter .. . .. . Note that you might translate the painter if the bounding rect of P is not in the origin .", "Question : OS : : win xp sp3 .. . .. . Qt : : 4.6 .. . .. . I am working on the PUZZLE game based on Qt framework and need some help . In project is included main picture which needs to be disassembled to smaller parts polygons with images belongig to them . So I make image QImage image QImage someImage.jpg and want to operate with something like croping image on that object . I checked QImage QPixmap .. . docu on nokia site looking for member func . similar to croping but found zero . Need reference to class I must use include to solve this problem and then I will recheck online docu . Comment : and you d better use tag qt4 instead of qt4.6 .. . Answer : You may use these members of QImage Comment : That is OK for rectangles but I need polygons . Comment : hmmm.. . then you may use QRegion but it has no methods for extracting images parts . Some ugly code like dot-by-dot checking if qregion contains image coordinate may be written if you find nothing better.. . Comment : Yes it seems that there is no direct method for extracting poly-image from image.It must be done indirectly but i need some guidelines for furher action . Comment : Dot by dot is too expensive unusual must be easier way . Comment : and what format you need on exit something like rectangle with 100 opaque non-used areas", "Question : OS : : win xp sp3 .. . .. . Qt : : 4.6 .. . .. . I am working on the PUZZLE game based on Qt framework and need some help . In project is included main picture which needs to be disassembled to smaller parts polygons with images belongig to them . So I make image QImage image QImage someImage.jpg and want to operate with something like croping image on that object . I checked QImage QPixmap .. . docu on nokia site looking for member func . similar to croping but found zero . Need reference to class I must use include to solve this problem and then I will recheck online docu . Comment : and you d better use tag qt4 instead of qt4.6 .. . Answer : You should use a QPixMap : With it you can copy all or parts of the original image into your puzzle parts . By painting into these parts with a transparent color you can make the outside of your polyongs invisible . Or you use bitBlt Qt 3 Support Member with QImage for the same effect .", "Question : I m writing a unit test for a custom Validator in a QTableView using the QTestLib framework http : doc.qt.digia.com 4.6 qtestlib-manual.html . One of the most basic test cases could be described like this : .. . .. . Double click the table cell in the third column and the fourth row and append the number 5 to its content . It is not sufficient to simply change the value in the model or anything the test case shall perform it like this : .. . .. . 1 . Double Click the table cell to set it into edit mode .. . 2 . Press the End key . 3 . Press the 5 key . Note : This question http : stackoverflow.com questions 3681326 how-to-trigger-the-edit-mode-of-an-item-in-a-qtableview has an answer on how to set a table cell into edit mode from code however the unit test shall try to stick to the possibilities of a human user i.e . Mouse Keyboard actions . I ve found out the X Y position of a cell can be retrieved using QTableView : : columnViewportPosition int http : doc.qt.digia.com 4.6 qtableview.html columnViewportPosition and QTableView : : rowViewportPosition int http : doc.qt.digia.com 4.6 qtableview.html rowViewportPosition . However double clicking at the specified location using QTest : : mouseDClick .. . http : doc.qt.digia.com 4.6 qtest.html mouseDClick neither selects the cell nor sets it into edit mode : .. . .. . How can I implement the test case which I described above using Mouse Keyboard actions only PS : I am trying this under Windows XP 32-bit and Qt 4.6.1 .. . Answer : There are several things to consider when trying to edit in a QTableView through simulated events : .. . .. . A QTableView does not display its cells directly it does that using its viewport http : doc.qt.digia.com 4.6 qabstractscrollarea.html viewport . Likewise the double click event must be sent to the viewport instead of the table view itself . Now when you do .. . .. . the cell will be selected but not in edit mode unlike a human-initiated double click which instantly puts the cell into edit mode even if the table view did not have focus before . If you add a single click on the same location before the double click however it will work If you then sent the End keypress to the viewport the cursor would not jump to the end of the table cell content but instead the last cell in the current row would be selected . In order to change the table cell content you must send the event to the current editor widget instead . The easiest way to do that is the usage of QWidget : : focusWidget http : doc.qt.digia.com 4.6 qwidget.html focusWidget .. . .. . Note that using it like that can be unsafe though as focusWidget can return NULL . .. . .. . With that knowledge the test case can be programmed as follows : .. . .. . Note : if you want to verify this you can add QTest : : qWait 1000 commands after each event .. . .. . .. . .. . If you are using the data functions as described here http : doc.qt.digia.com 4.6 qtestlib-tutorial2.html note that you cannot retrieve the focusWidget at the time of data creation . I solved this issue by creating a custom interface ITestAction with only a pure-virtual execute function . I then added subclasses with a similar constructor as the QTest : : mouseClick .. . etc functions . These classes simply call the QTest functions but use either the widget itself or its focus widget as a parameter dependent on an additional boolean flag . The data slot then stores a QList ITestAction for each data row and the actual test slot iterates over that list and calls execute on each item before the validation is performed . Comment : This is exactly the answer that I needed thank you very much :", "Question : I am using Linux 10.10 . Trying to use QT4 as I would like to avoid alternative IDEs and languages . I can not get past the make g++ -Wl -O1 -o slider -L usr lib -lQtGui -lQtCore -lpthread usr lib gcc i686-linux-gnu 4.4.5 . . . . . . . . lib crt1.o : In function start : .text+0x18 : undefined-reference to main collect2 : ld returned 1 exit status . No matter what I do I searched the manual but found it referencing more Windows stuff than Linux . It is so obscure that my level of frustration leads me to ask one more time . I really do not want to go to Oracle s stuff . Can someone help Comment : Is this the build of Qt failing or your own program .. . Answer : I put together the demo file using the three sliders that change and show the values in the spin box . I tested it in the main development area using the control r feature . It works fine . I then save it to a file and do the following in the directory slider where I stored the file : qmake -project qmake make .. . .. . The results are : .. . .. . make g++ -Wl -O1 -o slider -L usr lib -lQtGui -lQtCore -lpthread usr lib gcc i686-linux-gnu 4.4.5 . . . . . . . . lib crt1.o : In function start : .text+0x18 : undefined-reference to main collect2 : ld returned 1 exit status make : slider Error 1 .. . .. . I suspect that I do not have the correct information in either the .project file or the Makefile . However I don t know what else to place there . The names .Ui seem suspicious but I just don t know enough to validate that . Thanks Harry Fernandina Beach Floria", "Question : I need to drag from a QListWidget or something similar and drop on a QGraphicsScene and create a subclass of QGraphicsItem at the drop location . Anyone have any ideas I m using Qt 4.6.3 . .. . Answer : The Drag and Drop Puzzle example seems to do what you are looking for : https : doc.qt.io archives 4.6 draganddrop-puzzle.html", "Question : I am using Qt5.0.1 with Visual Studio 2010 integrated .. . .. . I am rendering the video frames from the video file using ffmpeg with Qt as a QImage actually i need to display the rendered video frame in runtime using a QThread . I am newbie to Qt please provide some sinppets . Any snippets will be helpful . .. . Answer : im not familiar with VC++ with qt ..but Use mandle brot http : harmattan-dev.nokia.com docs library html qt4 threads-mandelbrot.html example .. . .. . and fortune thread example enter link description here http : qt-project.org doc qt-4.8 network-blockingfortuneclient.html .. . .. . use signals to emit the video frame array or QImage . also this code snippet .. . .. . and", "Question : and I use a QWizard object which contains several pages . when it comes to a specific page I want to hide the Next button first and shows it after the user do something such as clicking on a radiobutton.. . .. . .. . I want to do some customize control of the wizard when this specific page shows up . the question is I know how to hide the button but I don t know which function I should use . I tried the QWizardPage constructor the initializePage function the show function but all of these function didn t work . If I put the button control in the wizard page constructor the program will crash since the wizard object is not there yet . If I put it in initializePage function some QWizard function will reset the buttons after the initializePage function and all the customized setting will gone . And the show function seems cannot be overwritten . I really cannot figure out which function is usable . Is there any function like OnSetActive in MFC or Load in JAVA Which will be called when a page is going to shows out .. . Answer : The best solution is probably the one provided by using QWizardPage : : registerField http : doc.qt.digia.com 4.6 qwizardpage.html registerField . It allows you to define mandatory fields radio buttons etc . and the Next and or Finish buttons in your wizard are enabled only when all mandatory fields are filled checked . See http : doc.trolltech.com 4.6 dialogs-licensewizard.html http : doc.qt.digia.com 4.6 dialogs-licensewizard.html for an example which makes use of this functionality . EDIT : QWizard : : button http : doc.qt.digia.com 4.6 qwizard.html button provides access to the buttons in the wizard . Have you tried something like myWizard- button QWizard : : NextButton - setEnabled false Comment : Thanks but my question is a little different . Using registerField The Next and Finish buttons are decided together . What I want to do is to decide whether a page is final page or not in other words I want to decide if the wizard should end up eariler . I know I can use the setFinalPage however after setting a page to final page the Finish button shows up that s good but the next button is still there that s what I want to avoid . I want to disable it or hide it . isComplete or registerField control the Next and Finish buttons together and I want them to be separated . Comment : @Claire Huang : Added a new idea to my answer I hope it helps . Comment : Hi Greg : Sorry that I didn t see your comment and thanks for your help . Yes I do try to set the button in initializePage function however it seems that the button are been reset after the initializePage . I cannot find the correct function to set the buttons .", "Question : IS there any possible substitute of Qtimer that maybe less developed that Qtimer thats found in 4.7 and above versions I have QT4.6.3 . from which I cannot deviate move forward from so I wanted to know timers that would be 4.6 qt compatible .. . Answer : QTimer was available even in Qt 3.x . However if you need something more simple you can use QObject : : startTimer for your object and reimplement the QObject : : timerEvent event handler in your class which must inherit QObject . Another alternative is to use QBasicTimer . For more info see for Qt 4.6 : http : doc.qt.digia.com 4.6 timers.html Comment : thanks I m not able to include the QTimer it says no such file or directory what setup I should do for that Comment : @Naaz Your installation of Qt is broken then . Qt 4.6 gives you both QBasicTimer and QTimer . But in any case come on you can debug this . Look for files named QTimer and QBasicTimer in your Qt installation . Comment : There s little reason to use QObject : : startTimer since you need to retain the timer id anyway . That id is encapsulated by QBasicTimer and it s the right thing to use if you want something more lightweight than a QTimer . Usually the following holds : Q ASSERT sizeof QBasicTimer sizeof int . Comment : @KubaOber thanks I ll look for it asap and return Comment : @KubaOber okay I was able to locate the QTimer header file but I had to copy it to my headers folder so that its now found and I make the programme successfully", "Question : I have a project in qt-creator . that computer have Qt : 4.8.2 .. . .. . one of the computers i want to run the application on have Qt : 4.6.2 .. . .. . I can see that qt-creator have an option under the project for QtVersions but i only got one option there Qt 4.8.1 System .. . .. . Id like to have Qt 4.6.x as an option there too how do i add install that Target computer : .. . .. . Build computer : Comment : Did you install the Qt SDK or are you are just using what your distro provided Comment : i installed gentoos dev-util qt-creator-2.5.0 that compiles it from get.qt.nokia.com qtcreator qt-creator-2.5.0-src.tar.gz http : get.qt.nokia.com qtcreator qt-creator-2.5.0-src.tar.gz .. . Answer : As the SDK doesn t support the old versions anymore you will have to compile the libraries from source . The archive FTP site ftp : ftp.qt.nokia.com qt source has the version you want . Though I should point out that as long as you are linking dynamically and your code base doesn t use features post-v4.6.2 - then it will work as expected . If you are then compiling using v4.6.2 headers isn t going to change anything - you will still have to upgrade the other computer or remove the newer Qt features from your application . Comment : Installed QT SDK in my users homefolder and now i have 2 options insted of 1 the old Qt 4.8.1 System and Desktop Qt 4.8.1 for GCC Qt SDK still no 4.6 Comment : And did you specify which versions of Qt you needed during the installation You should have been presented with a tree view with all the advanced installation options . Comment : tried both Qt SDK 1.2.1 and Qt SDK 1.1.2 under Develement Tools- Desktop Qt there is an 4.7.3 avible is that where you expected med to find a 4.6 Comment : You re right they must have changed to repos to avoid clashing with Digia s commercial version . I ll update my question to do it the hard way .", "Question : I am new to Qt and now I am developing a simple application in using Visual Studio 2008 and when am building the code the following errors occur : .. . .. . How can I solve these errors Comment : Check for all dependencies .. . On Visual Studio go to Project Properties- Linking and check for qt4 binaries .. . Answer : You need to run moc.exe on your header-files that use Q OBJECT macro or inherit from QObject . For simplicity just install this qt vs addin http : qt.nokia.com downloads visual-studio-add-in and it will add everything for you . You ll probably will need to generate a new project .", "Question : I m starting off QT 4.6 s example OpenGL - 2D painting .. . It uses a subclass of QGLWidget and makes painting operations with the class QPainter . I d like to know how to do drawing directly with OpenGL functions on the OpenGL Widget . .. . Answer : If you use the widget as described in its manual http : doc.trolltech.com 4.6 qglwidget.html details you can just use the OpenGL functions as usual . For example copied from the manual :", "Question : I ve tried these in my mainform s constructor : .. . .. . but both put the bottom right corner of the form at about the center of the screen instead of centering the form . Any ideas .. . Answer : The move function see QWidget http : doc.trolltech.com 4.6 qwidget.html pos-prop doc takes one QPoint or two int as parameter . This corresponds to the coordinates of the top-left corner of your Widget relative to its parent Here OS Desktop . Try :", "Question : I have a project in qt-creator . that computer have Qt : 4.8.2 .. . .. . one of the computers i want to run the application on have Qt : 4.6.2 .. . .. . I can see that qt-creator have an option under the project for QtVersions but i only got one option there Qt 4.8.1 System .. . .. . Id like to have Qt 4.6.x as an option there too how do i add install that Target computer : .. . .. . Build computer : Comment : Did you install the Qt SDK or are you are just using what your distro provided Comment : i installed gentoos dev-util qt-creator-2.5.0 that compiles it from get.qt.nokia.com qtcreator qt-creator-2.5.0-src.tar.gz http : get.qt.nokia.com qtcreator qt-creator-2.5.0-src.tar.gz .. . Answer : In Qt Creator try tools - options - Qt Versions or Build run then qt versions or some other abomination depending on what qt-creator version you have . Should see a list of Qt versions it knows about . Click add to reference your 4.6 qmake manually . That should get creator to pick it up . Comment : -1 But that would mean Puggan Se would have to build his application on the target machine instead of his build machine . Comment : Oh I thought that was the question . If not when you deploy you have to bring the right version of the libraries with you .", "Question : null .. . Answer : I created an own checkbox class from QCheckBox class . In my implementation I use size of checkbox indicator and checkbox label spacing for my internal algorithms . I get sizes like this : .. . .. . For standard widget it works OK . But when I apply qss on my widget with custom indicator icon with another size I still get standard values instead of qss one . How can I get a correct values for styled widget I am using Qt 4.6 . Comment : not enough code . What are you tying to achieve change Why style sheet is not enough Comment : Don t use QSS . Because QStyle does not support a lot of features of QSS . See this answer : stackoverflow.com questions 19138100 http : stackoverflow.com questions 19138100 how-to-draw-control-with-qstyle-and-with-specified-qss", "Question : I am subclassing QTabWidget to add a QTabBar who s tabs stretch over the whole width of the tabBar . Therefore I am setting the expanding property to true . This doesn t seem to change anything about the behavior of the tabs . Did anyone encounter the same problem I use Qt 4.6 in combination with .. . .. . EDIT : has been solved here is how I implemented it in case anyone is interested : .. . Answer : From the QTabBar source code : .. . .. . To get around this feature you can create your own tab widget using a QTabBar above a widget with a QStackedLayout . Comment : Thanks that did the trick . I wonder why that piece of info never made it into the online documentation .", "Question : I have a QGraphicsScene that has graphics as well as text drawn on it . When I try to print the graphics are fine but the text is using a font-size defined in points so scene- render when I pass it a QPainter initialized with a QPrinter has VERY large text . How am I supposed to print a QGraphicsScene that has text on it edit : .. . .. . Here is my current printing code where scene is my custom subclass of QGraphicsScene : .. . .. . The std : cout line doesn t appear to make any difference . The printer still thinks the text is huge so for each text item only a tiny part of the first letter is printed . .. . Answer : From the QPrinter docs http : doc.trolltech.com 4.6 qprinter.html PrinterMode-enum it sounds like you have to specify font sizes in pixels to get text and graphics to match up . Note that QFont has a setPixelSize http : doc.trolltech.com 4.6 qfont.html setPixelSize method . Comment : That makes the font device dependent . My users may have multiple monitors and I don t want to calculate a font in pixels for one monitor then they drag it to another monitor and it looks bad . Comment : Or do I need to use point size normally but when the user prints iterate through all my text and re-compute the fonts in pixels Hopefully there s a better way Comment : @David Burson : It will necessarily be device dependent to to work on both a monitor and a printer . Setting a point size and making it device independent means that 72-point text will always be one inch high whether it s on a printed piece of paper or on monitors of varying resolution . So yes I think you have to treat the printer as a special case and work out the pixel size . Comment : that makes sense - but is there a better way to handle printing than to iterate through every text object reset its font to a calculated pixel size render the scene to the printer then iterate back through all the text objects and reset their fonts back to the appropriate point size Comment : @David Burson : You can put the code in your re-implementation of paint for your text objects . Query the painter s device and if it dynamic casts to a QPrinter then use pixels sizes . Alternatively if your graphics and text are very tightly dependent on each others sizes then you may be better using pixel sizes everywhere ." ] }
[ "yes-answer-long", "yes-answer-short" ]
qt
UNK_RELATION
expression-blend@wpf@77
expression-blend -- expression-blend is a visual design tool used to create @placeholder silverlight and windows-phone-7 application user interfaces .
{ "confidence": [ 66.04552459716797, 60.02215576171875, 60.02215576171875, 59.783485412597656, 58.194766998291016, 57.718116760253906, 55.358150482177734, 55.080108642578125, 54.34271240234375, 54.21778106689453, 53.602195739746094, 53.06296157836914, 53.06296157836914, 52.60899353027344, 52.60899353027344, 52.588619232177734, 52.40029525756836, 52.16548538208008, 51.8697395324707, 51.70689010620117, 51.47625732421875, 51.25862121582031, 51.07151794433594, 51.07151794433594, 51.07151794433594, 50.96466827392578, 50.96466827392578, 50.6175537109375, 50.567752838134766, 50.559322357177734, 50.227901458740234, 49.48481369018555, 49.25657653808594, 49.16252136230469, 48.464271545410156, 48.172691345214844, 47.99689483642578, 47.94408416748047, 47.83256530761719, 47.81509780883789, 47.76599884033203, 47.583106994628906, 47.583106994628906, 47.51150894165039, 47.479469299316406, 47.236629486083984, 47.131107330322266, 47.02864456176758, 47.02864456176758, 47.02864456176758, 47.02864456176758, 47.02864456176758, 47.02864456176758, 47.02864456176758, 47.02864456176758, 47.02864456176758, 47.02864456176758, 46.916175842285156, 46.880462646484375, 46.84410858154297, 46.75865936279297, 46.65284729003906, 46.574676513671875, 46.56812286376953, 46.56812286376953, 46.56812286376953, 46.449424743652344, 46.35651397705078, 45.95834732055664, 45.82798767089844, 45.72203826904297, 45.71011734008789, 45.70276641845703, 45.670738220214844, 45.670738220214844, 45.66861343383789, 45.65805435180664, 45.61634826660156, 45.53139114379883, 45.51893997192383, 45.51893997192383, 45.44194030761719, 45.44194030761719, 45.44194030761719, 45.44194030761719, 45.17195510864258, 44.975860595703125, 44.93558883666992, 44.87388229370117, 44.83141326904297, 44.70281219482422, 44.463775634765625, 43.9262809753418, 43.791107177734375, 43.70098876953125, 43.60006332397461, 43.60006332397461, 43.60006332397461, 43.60006332397461, 43.54023361206055 ], "content": [ "Expression Blend is for Windows Presentation Foundation and Silverlight .", "A Silverlight 5 Solution will not load in Expression Blend 4 .", "I m using Expression Blend 4 and NOT using Silverlight .", "Expression Blend is used in creating Sliverlight XAML .", "I am using Expression Blend 3 and the Silverlight for Windows Embedded Application project type .", "I was re-building the project in Visual Studio and then going to Expression Blend I had to build it IN Expression Blend for it to work .", "I am developing a Sketchflow Silverlight project in Expression Blend 3 .", "In Expression Blend for Visual Studio 2012 the list is somewhat extended but still hardcoded .", "When I try to create a project in expression-blend it only listing windows-phone project .", "What are you favorite resources to learn Expression Design and Expression Blend", "I am new in expression-blend .", "I was right-clicking in Visual Studio and selecting Open In Expression Blend .", "I am using Expression blend 4 and WPF Visual Studio .", "Blend comes with Visual Studio 2012 Pro http : www.microsoft.com expression .", "Where can I find Expression Blend 4 for Visual Studio 2010", "Well in Standard Expression Blend and I assume there is only one version of Expression Blend 4 you actually can t place controls via drag-and-drop from the toolbox onto the design surface .", "http : weblogs.asp.net scottgu archive 2008 02 28 first-look-at-using-expression-blend-with-silverlight-2.aspx", "Solutions are the same for Visual Studio and Expression Blend .", "This works fine in XamlPad but not in Silverlight 3 and Expression blend 3", "I know there s Expression Blend for Graphics design and VS for C code .", "Using C Visual Studio 2008 Express and Expression Blend 3 .", "I m used to Expression Blend since Version 4 from 2010 .", "I have imported the file in Expression Blend .", "Would Expression Studio Blend be useful for my purpose", "Is it just me or are there no arc shapes in expression-blend 5", "There is a decent book : Foundation Expression Blend 2 by Victor Gaudioso .", "Good evening I have a problem with my Expression Blend 4 .", "I am learning Expression Blend on Version 4 .", "I m using Expression Blend 4 .", "This is not a question for Expression blend 4 .", "There you will find out how to do the Visual Studio and Blend design-time stuff for Silverlight .", "It won t let me using Expression Blend .", "questions 19802227 where-is-the-shortcut-open-in-blend-in-visual-studio-2013 3 answers .. . .. . I have built a wpf application in visual-studio and would like to get the project into expression-blend to design the view .", "LightSwitch works fine with Expression Blend but only for custom Silverlight controls Expression Blend will throw an error that it can t load any LightSwitch projects that are part of the solution but it will load any Silverlight control projects .", "I am a C developer and am moving to Silverlight and Expression Studio Blend for richer UX .", "As of Visual Studio 2012 the XAML design experience is based on the same code that runs in Expression Blend for Visual Studio .", "See Rob s article about design-time data in Blend : http : www.robfe.com 2009 08 design-time-data-in-expression-blend-3", "On computers that have Expression Blend 4 installed the following application works .", "You can use Expression blend to create WPF animation .", "You can open your solution through the file menu in expression-blend or by right clicking on a xaml file in Visual Studio and select Open In Expression Blend .", "in Blend or Visual Studio or not", "I m having an odd issue with Expression Blend 4 .", "Aaron is it possible to this from within Expression Blend 4", "And also tell me the Difference between Expression Blend 4 and Blend for Visual Studio 2012 .", "Expression Blend for Silverlight http : www.microsoft.com en-gb download details.aspx id 9503 is also available but only supports Silverlight 5 projects .. . .. . Be warned it may be difficult to revert to the Windows Phone edition if you decide to install a trial version of Blend 4 .", "I want Blend for Visual studio to design the ui", "This is a question about the blend design tool in Visual Studio 2012 .", "My MSDN subscription provides Expression Blend 4 but not Ultimate .", "I cannot find a dropdown menu in Sketchflow - Expression Blend 4 .", "Is Expression Blend expected to come out in a free Express version anytime soon", "We have expression-blend as part of an MSDN subscription and we barely use it .", "Yeah I agree that the role of Expression Blend Integrators is hard to find .", "I now want put some pizazz into this DataTemplate by using Expression Blend .", "However all I see in Expression Blend is a completely blank box .", "I m using Expression Blend 3 which has sample-data capability .", "It s pretty common thing in the Expression Blend world nothing special .", "Is there any way to add a stroke to TextBlock in Expression Blend 4.0", "For those of you using Expression Blend as well as Visual Studio in your real projects please help me understand how you use Blend and Visual Studio in your everyday development design tasks here is a real scenario : .. . .. . I created the following simple WPF application in Visual Studio .", "I want WPF and Silverlight project types too.. . .. . .. . Now my create new project menu in expression-blend is like below .. . .. .", "I m getting the above error when trying to load a User Control xaml file in design view in Expression Blend 4 .", "Now we are in the design phase for the project and feel comfortable enough to look forward to getting more work with Expression Blend", "If i double click it then it places it in my design view but i want to drag-and-drop it . . .. . .. . Am i missing something here the tutorials i am following are for expression-blend-4 and i am using expression-blend-4 .", "How can I install other project types in expression-blend .", "Sadly I had to switch to the newest Version Microsoft Expression Blend for Visual Studio 2015 .", "Here is the code that works in Expression Blend and Visual Studio in full : .. . .. . XAML : .. . .. . Code Behind :", "I have recently just installed Expression Blend 4 Ultimate to run along side my Visual Studio 2010 .", "visual-studio would build correctly but blend choked .", "Got it working by following the demo here http : geekswithblogs.net cskardon archive 2012 10 24 extending-expression-blend-4-amp-blend-for-visual-studio-2012.aspx .", "Also can someone recommend a good book that covers how to create WPF and or Silverlight applications using Expression blend 4 and Visual Studio 2010 together .", "I have a mvvm model-view viewmodel silverlight application that has several views that need to be loaded into ContentControls i made it all in expression-blend .", "Expression http : www.microsoft.com expression Blend - XAML Development .. . 2 .", "Expression Blend 4 supports Silverlight 4 and WPF 4 and is also compatible with Silverlight 3 and WPF 3.5 SP1 .", "Try import-adobe-photoshop-file-in-expression-blend-4 http : www.c-sharpcorner.com UploadFile eda428 import-adobe-photoshop-file-in-expression-blend-4", "This is because you only have Blend for Windows Phone installed a free version .", "I had downloaded Windows Phone SDK and Blend 4 comes free with it .", "Blend from visual-studio-2012 is available .", "I want to make animation in Expression Blend for Windows Store Apps as .gif images are not supported .", "I wanted to try Expression Blend and found out that the product Expression Studio is discontinued .", "I am developing a windows-phone game in expression-blend that generate random numbers .", "The problem is on every Expression Blend 3 I install on any computer seems to simple be turned off in the beta .", "Is there any way to remove a project from a solution in Expression Blend 4 without creating a new solution", "Import the feedback files .feedback into your Expression Blend project .", "I ve created a WPF Storyboard animation on an image in Expression Blend 4 .", "Is there any way I can accomplish that within Expression Blend 4", "How can I make a Datatemplate for a ViewModel blendable designable in expression-blend .", "There is 3 buttons in expression-blend that allow to show xaml code design or both of them at the workspace .", "For me the Open in Expression Blend is only available in Silverlight projects for WPF projects the option does not exist .", "Note : I am using Blend for Windows Visual Studio 2013 .", "The Blend SDK used to create this behavior is Version 4 .", "Is it possible that you are running Visual Studio as Administrator and Expression Blend normally", "Every and every code in its user guide are based on Beehive Sample and that sample is not available in Expression Blend .", "Expression Blend + SketchFlow provides a template for Windows Phone rapid application prototyping which is very useful specifically when one is going to share the app design and mockup functionalities with customer in early stages .", "I m building a prototype using Expression Blend 3 and SketchFlow a Silverlight SketchFlow application to be specific and it consists of multiple screens that I want to share state between .", "Expression Blend 4 http : www.microsoft.com en-us download details.aspx id 5915 supports WPF etc and Silverlight up to version 4 .", "I m using Expression Blend 3 .. . I click on add live datasource add new xml datasource .. . copy in a URL .. . but the OK button remains blank .. . .. . adding a local XML datasource file works fine .. . .. . How can I add a URL datasource in expression-blend 3", "Only Grid StackPanel DockPanel Canvas ScrollViewer Border WrapPanel UniformGrid and Viewbox are available in Expression Blend 4 .", "I m trying to add reference to resource library defined in another project e.g Elysium and use it in expression-blend .", "But I can t seem to get any of the brushes resource defined in those libraries at Expression Blend 4 .", "I was following this article http : www.codeproject.com Articles 75961 Building-extensions-for-Expression-Blend-4-using-M but it is a bit outdated .", "Last Information : I am using Expression Blend 4 ." ] }
{ "confidence": [ 83.07390594482422, 74.78766632080078, 73.47566223144531, 72.34680938720703, 71.14387512207031, 70.92430877685547, 70.14920043945312, 69.264892578125, 68.42593383789062, 68.18246459960938, 68.00230407714844, 67.8246078491211, 67.33861541748047, 67.2841567993164, 66.58971405029297, 65.988037109375, 65.779052734375, 65.60655975341797, 65.2240219116211, 65.09062957763672 ], "content": [ "Question : I am new in expression-blend . When I try to create a project in expression-blend it only listing windows-phone project . But I want to create WPF project . How can I install other project types in expression-blend . I want WPF and Silverlight project types too.. . .. . .. . Now my create new project menu in expression-blend is like below .. . .. . enter image description here http : i.stack.imgur.com gQOXj.png .. . .. . but I want like below .. . .. . enter image description here http : i.stack.imgur.com kUBsa.png .. . Answer : This is because you only have Blend for Windows Phone installed a free version . Blend comes with Visual Studio 2012 Pro http : www.microsoft.com expression . Expression Blend 4 http : www.microsoft.com en-us download details.aspx id 5915 supports WPF etc and Silverlight up to version 4 . Expression Blend for Silverlight http : www.microsoft.com en-gb download details.aspx id 9503 is also available but only supports Silverlight 5 projects .. . .. . Be warned it may be difficult to revert to the Windows Phone edition if you decide to install a trial version of Blend 4 . Once the trial expires you may be stuck with it .", "Question : I am building a desktop application using VS2010 C . I plan to design and implement my own ribbon and redesign other UI controls graphically . Would Expression Studio Blend be useful for my purpose I have not used the software and from the web it says it s mainly for Web . .. . Answer : Expression Web is for web design . Expression Blend is for Windows Presentation Foundation and Silverlight . If you want to use Windows Forms then you have to either do it all by hand or use the Visual Studio 2010 designer but if you want to use WPF then Blend is the way to go . Comment : The design surface tooling in Visual Studio 2010 is significantly better than it was in 2008 so I wouldn t say Blend is always the way to go for WPF dev as it s quite a steep learning curve . To the OP unless you re doing this as a learning exercise I d STRONGLY recommend you look to the third party market for a ribbon before designing your own .", "Question : I am learning Expression Blend on Version 4 . Every and every code in its user guide are based on Beehive Sample and that sample is not available in Expression Blend . So I was wondering if there is a link from where I can download it enter image description here http : i.stack.imgur.com hWcRR.jpg .. . Answer : Yeah got answer to my question . I had downloaded Windows Phone SDK and Blend 4 comes free with it . So I could only make Windows Phone projects in that . The project I wanted to downloaded are WPF Silverlight based used in WPF Projects . When I upgraded my Blend from free to full version Ultimate i.e . Blend + WorkFlow I got those projects .", "Question : how well can LightSwitch work together with Blend I saw in some videos that you can use custom Silverlight control in LS and naturally I can create them with Blend . But can Blend in itself be used to customize the screens of a LightSwitch application It seems LS doesn t use Xaml but puts all screen in an application.lsml file which is invalid for Blend . Is there support coming here Thanks in advance . .. . Answer : LightSwitch works fine with Expression Blend but only for custom Silverlight controls Expression Blend will throw an error that it can t load any LightSwitch projects that are part of the solution but it will load any Silverlight control projects . You cannot edit any of the automatic LightSwitch UI but you do not have to use any of the standard LightSwitch UI if you need changes . I would recommend creating Silverlight custom-controls not LightSwitch extensions the difference is that a control extension has a design-time experience in Visual Studio and is MUCH harder to create Silverlight custom-controls are actually very easy to create . See this article for an example : http : lightswitchhelpwebsite.com Blog tabid 61 EntryId 2 Creating-A-LightSwitch-Custom-Silverlight-Control.aspx", "Question : I want to make an online simulation for physics and chemistry . So that everyone would be able to run this simulation in browser . What do you suggest me to use . And also tell me the Difference between Expression Blend 4 and Blend for Visual Studio 2012 . I have visited Microsoft website but could not find a satisfied answer . .. . Answer : From Visual Studio 2012 Microsoft had made Expression Blend available as a part of Visual Studio and not as a separate package as was before . Expression Blend 4 supports Silverlight 4 and WPF 4 and is also compatible with Silverlight 3 and WPF 3.5 SP1 . If you are trying to build Silverlight Applications you can try using Blend for Visual Studio 2012 2013 as its the latest available application with latest framework - allowing you to use recent APIs . Comment : but brother when I open blend only two types of projects can be created as the welcome screen shows HTML project or XAML project . Which one is used for Silverlight Application . do I need some extra Plugins or Addons . Comment : It may be because you are using Expression Edition of Visual Studio for Windows 8 . Trying using Professional Edition - Cheers . Comment : Thanks for your help mate .", "Question : I created some design-time data from my windows-phone-7 application and when I look at designer in Visual Studio Express the design-time data shows up perfectly fine . However when I try to load the same project in Expression blend 4 I get an error and the design-time data doesn t show up . The error that I get is very generic Error found in my xaml class The exact line that it points to is : .. . .. . I really have no idea what the problem could be since this works fine with the visual-studio designer . Do I have to do something different for expression-blend To create the design-time data I basically followed .. . .. . http : blogs.msdn.com b mcsuksoldev archive 2010 08 27 designdata-mvvm-support-in-blend-vs2010-and-wpf-silverlight.aspx .. . and took the default windows-phone projects that have design-time data in them as an example . The xaml class is in a the folder rootFolder View while the design-time data files are in rootFolder DesignData .. . .. . Any help is appreciated Thanks Haji .. . Answer : Without more details it s quite hard to know what the issue might be . A neat trick to use for these kind of issues is that you can actually attach to the Blend process from the Visual Studio debugger . Go to Debug - Attach to Process find the Blend.exe process and attach to that then try opening the view in Blend this should allow you to debug what s going on . For step by step instructions on this have a look at : Debugging Design-Time Exceptions http : blogs.msdn.com b expression archive 2008 06 19 debugging-design-time-exceptions.aspx .. . .. . Good luck Comment : hi thanks for the help I was never able to figure this one out.. .", "Question : I am a bit confused on how Visual Studio 2010 and Expression Blend 4 operate together . If I want to create a WPF application should I start it in Expression Blend 4 If so then how does Visual Studio 2010 natively open Expression Blend projects or does it Or should I start my application in Visual Studio 2010 If so how do I open my solution in Expression Blend . Also how do I modify an existing WPF form if I need changes . If I already have events handled and code-behind how do I bring it over to expression-blend make my changes then bring it back to visual-studio without disrupting the events and code that I have created in Visual Studio 2010 Also can someone recommend a good book that covers how to create WPF and or Silverlight applications using Expression blend 4 and Visual Studio 2010 together . Comment : Decent book that covers both your needs : amazon.com Foundation-Expression-Blend-Applications-Silverlight http : www.amazon.com Foundation-Expression-Blend-Applications-Silverlight dp 1590599764 ref sr 1 6 ie UTF8 s books qid 1280467824 sr 8-6 newer versions might be available . Comment : Thanks for the suggestion . Comment : Careful that book is for Blend 2 and VS 2008 not 4 and 2010 . .. . Answer : You can have it open in both Visual Studio and Blend at the same time . You re prompted in Visual Studio if you make a change in Blend and vice versa . Personally I create the new application in Visual Studio first then open it in Blend .", "Question : I am a bit confused on how Visual Studio 2010 and Expression Blend 4 operate together . If I want to create a WPF application should I start it in Expression Blend 4 If so then how does Visual Studio 2010 natively open Expression Blend projects or does it Or should I start my application in Visual Studio 2010 If so how do I open my solution in Expression Blend . Also how do I modify an existing WPF form if I need changes . If I already have events handled and code-behind how do I bring it over to expression-blend make my changes then bring it back to visual-studio without disrupting the events and code that I have created in Visual Studio 2010 Also can someone recommend a good book that covers how to create WPF and or Silverlight applications using Expression blend 4 and Visual Studio 2010 together . Comment : Decent book that covers both your needs : amazon.com Foundation-Expression-Blend-Applications-Silverlight http : www.amazon.com Foundation-Expression-Blend-Applications-Silverlight dp 1590599764 ref sr 1 6 ie UTF8 s books qid 1280467824 sr 8-6 newer versions might be available . Comment : Thanks for the suggestion . Comment : Careful that book is for Blend 2 and VS 2008 not 4 and 2010 . .. . Answer : Solutions are the same for Visual Studio and Expression Blend . You can open your solution through the file menu in expression-blend or by right clicking on a xaml file in Visual Studio and select Open In Expression Blend . Personally when I need to make only a small change like changing the text on a button I don t go into Blend . But when I want to see what s going on with margins and layout and stuff I always use Blend . Most often I have Visual Studio and Blend open side-by-side and I keep switching back and forth . Because Expression Blend uses the same solution you don t have to worry about event handlers and such . When they are in-place they stay in-place . Unless you delete the control the event is attached to of course . Creating a solution can be done in both tools but I start most projects in Visual Studio . There are however a few Project templates that can t be found in visual-studio . For example the Databound Application project type . This will give you a start on an MVVM project with folders in-place for the Model View and ViewModel .", "Question : I am a bit confused on how Visual Studio 2010 and Expression Blend 4 operate together . If I want to create a WPF application should I start it in Expression Blend 4 If so then how does Visual Studio 2010 natively open Expression Blend projects or does it Or should I start my application in Visual Studio 2010 If so how do I open my solution in Expression Blend . Also how do I modify an existing WPF form if I need changes . If I already have events handled and code-behind how do I bring it over to expression-blend make my changes then bring it back to visual-studio without disrupting the events and code that I have created in Visual Studio 2010 Also can someone recommend a good book that covers how to create WPF and or Silverlight applications using Expression blend 4 and Visual Studio 2010 together . Comment : Decent book that covers both your needs : amazon.com Foundation-Expression-Blend-Applications-Silverlight http : www.amazon.com Foundation-Expression-Blend-Applications-Silverlight dp 1590599764 ref sr 1 6 ie UTF8 s books qid 1280467824 sr 8-6 newer versions might be available . Comment : Thanks for the suggestion . Comment : Careful that book is for Blend 2 and VS 2008 not 4 and 2010 . .. . Answer : I usualy start my project in Blend . Remember Blend is specially designed to make great UI easy databindig make easy templates and custom-controls . You can edit the code-behind of your app directly in Blend but sometimes it doesn t show the intellisense thats when you need open VS to do that right-click on your project inside blend and click on edit with Visual Studio . It ll launch VS and you can start coding . You dont need to close VS or Blend they booth can be open if you make some change in VS it will notify Blend will appear a dialogbox telling you : reload the app click Yes the changes will be sincronized in Blend and VS the same happens when you make changes in Blend and go to an already open instance of VS . .. . .. . Too remember to install de VS tools it will allow you to open Silverlight projects inside VS if they arent already installed an error message will appear . Hope my answer help you", "Question : Everything I see pertaining to Blend for Visual Studio 2012 talks about making Window s store apps . Am I correct in assuming it can be used for regular desktop applications too .. . Answer : Yes and no . The Windows Store application templates can only be used for the Windows Store model -type applications also known as Tifkam Metro or Immersive . Blend does feature a designer for regular WPF and Silverlight applications and controls . However it isn t a tool for the end-to-end creation of applications it is strictly a user-interface design tool . Note that Visual Studio shares the exact same WPF designer codebase . Use Blend if you re a non-programmer designer or if you need a superior Tifkam HTML or Jupiter XAML not-WPF designer tool .", "Question : I m working on some Silverlight controls and I would like to explicitly handle the way they appear in Blend . Specifically these controls have dependencies that are initialized at runtime and thus throw exceptions in the designer . But even in the absence of the exception I would like to make them appear a certain way in Blend . I know that this is possible with WPF using myassembly.VisualStudio.Design.dll but I haven t been able to find info on doing this with Silverlight . I have seen the hack described here http : blogs.msdn.com expression archive 2008 10 27 simulating-sample-data-in-blend-2-sp1.aspx that checks does this : .. . .. . I would prefer a more explicit solution though . .. . Answer : There is an extremely detailed post on how to deal with design-time extensibility here http : silverlight.net blogs justinangel archive 2008 11 17 silverlight-design-time-extensibility.aspx . There you will find out how to do the Visual Studio and Blend design-time stuff for Silverlight . Control vendors and people who author custom-controls often find themselves wishing they could give a better experience for their custom-controls . However there s a huge lack of public information on this topic . And I ve decided to correct this situation with this short 50+ pages article . Like I said it s long . : Comment : Perfect Thanks", "Question : I have installed the full Expression Blend 4 Ultimate package and I am trying to load a Silverlight 5 solution .. . .. . Although the solution does load I am unable to see anything in design view .. . .. . This occurs even for a straight forward out of the box Navigation Project .. . .. . I am using VS 2010 SP1 .. . .. . Has anyone had this problem I have need mention of ensuring that the project is setup as Silverlight and ensuring that blend 3 SDK is installed .. . .. . As far as I can tell both of these apply .. . .. . Paul .. . Answer : A Silverlight 5 Solution will not load in Expression Blend 4 . You will need to download the Expression Blend 5 Preview : .. . .. . www.microsoft.com en-us download details.aspx id 9503 http : www.microsoft.com en-us download details.aspx id 9503 .. . .. . Please note that it has some bugs which can affect your views mainly around creating design instances from viewmodels .", "Question : I am new to Creating WPF GUI Applications . I am a Mid Level Programmer . I dont have any idea or knowledge about the Graphics Development . I would like to know how do I use the UI Elements designed in Photoshop in my WPF Application . Eg : I would like to replace the default textbox or the button in WPF with the button or textbox designed in Adobe Photoshop . Last Information : I am using Expression Blend 4 . Any Help Would Be Appreciated Thanks Comment : you need to do Styling and Templating http : msdn.microsoft.com en-us library ms745683 28v vs.110 29.aspx for the same . Also have a look at Customizing the Appearance of an Existing Control by Creating a ControlTemplate http : msdn.microsoft.com en-us library ee230084 v vs.110 .aspx Comment : Try import-adobe-photoshop-file-in-expression-blend-4 http : www.c-sharpcorner.com UploadFile eda428 import-adobe-photoshop-file-in-expression-blend-4 .. . Answer : Starting with WPF .. . .. . I personally work with a combination of Microsoft Visual Studio https : www.microsoft.com visualstudio eng environment and Microsoft Expression Blend https : www.microsoft.com expression eng elements editing . Blend is a WYSIWYG front-end for designing XAML-based interfaces for WPF and Silverlight applications and it s good for templates visual states and animation . .. . .. . Editing Templates .. . .. . If you are working with templates a nice tool is WPF Theme Editor http : www.devexpress.com Products NET Controls WPF Themes theme-editor.xml by DevExpress . It integrates with Blend and the tree browser and template hierarchy are very useful for locating styles . One thing you ll always find helpful is access to the actual structural templates for the elements . I usually find myself visiting the DevExpress WPF Controls http : documentation.devexpress.com WPF CustomDocument7875 website which has a very comprehensive list of libraries and controls . The Demo Center for DevExpress https : www.devexpress.com support demos is also a great downloadable app for extracting and editing templates . I find it particularly useful with complex elements like charts not included in Blend where you can toggle the visibility of elements and then move the code to your dev space . .. . .. . Creating Graphics .. . .. . For working with graphics themselves I found Microsoft Expression Design http : www.microsoft.com en-nz download details.aspx id 36180 to be quite good for drawing and exporting vectors into png WPF or Silverlight formats . It has a nice simple set of tools and you can import elements from vector . Also version 4 is free . .. . .. . Testing .. . .. . I just discovered this nice tool for testing live called Snoop https : snoopwpf.codeplex.com . It s open-source and it allows you to spy browse the visual tree of a running WPF application without the need for a debugger and change properties live . For all of these you will probably need at least a basic knowledge of how to write read WPF . I personally use all of the previous and write custom styles for custom elements . Comment : Thanks for the information . But I am not so much of Designer Geek . The real situation is this : I have got UI Elements designed in Photoshop . I want the WPF button to look like the button designed in photoshop . So how do i achieve that Comment : Try http : www.c-sharpcorner.com UploadFile eda428 import-adobe-photoshop-file-in-e xpression-blend-4 http : www.c-sharpcorner.com UploadFile eda428 import-adobe-photoshop-file-in-expression-blend-4 Comment : Thanks for the help .", "Question : For those of you using Expression Blend as well as Visual Studio in your real projects please help me understand how you use Blend and Visual Studio in your everyday development design tasks here is a real scenario : .. . .. . I created the following simple WPF application in Visual Studio . It shows a list of customer objects with a DataTemplate that shows the customers in simple orange boxes . I now want put some pizazz into this DataTemplate by using Expression Blend . I open the project in Expression Blend thinking that I m going to see the orange boxes which I can change the color of create an animation as I mouse over them resize it etc . However all I see in Expression Blend is a completely blank box . So I understand : .. . .. . Expression Blend can t seem to understand that my data is coming from the ViewModel and hence doesn t display it . Is this a limitation of Blend or do I need to change my code in some way so that Blend can interpret what data will be coming out at run-time I m using Expression Blend 3 which has sample-data capability . What is the best way to use this sample-data feature so that even if it can t interpret the C and understand what data will be coming out of the ViewModel property to fill the Listbox how can I get it to at least produce some dummy-data so that I can manipulate the DataTemplate XAML : .. . .. . Code Behind : Comment : Why don t you put your answer as an answer and then self accept it . It will be easier for others to view then Comment : I do that if I remember but there are time hurdles which makes it difficult : you have to wait 48 answers before you answer your own question and then another 48 hours before you accept it . Comment : Well its in the answers at least . Comment : I ll accept it on the weekend if I remember . : - .. . Answer : If one wants to have Blend and Visual Studio see what the datacontext has in design mode only that can be defined with the debug options on the page . Say for example my page in code-behind binds its data context to MainVM in my nampespace WP8TestBed by informing that info on the main page s attributes as d : DataContext it is only used during design-time I can bind to it using the wizards and also does not create a new instance of the view model during runtime . Here is the example all these namespaces are needed d mc and the local which is where my ViewModel MainVM lives :", "Question : What is the best way to quickly get up to speed on Microsoft Expressions Blend 2 Are there some good web sites that can get me started or does someone have a good book that they would recommend .. . Answer : Expression Blend is used in creating Sliverlight XAML . I would start with sliverlight.net http : silverlight.net .. . .. . This is where you should get started . http : silverlight.net GetStarted .. . .. . Here is Scott G blog on Blend and Sliverlight . http : weblogs.asp.net scottgu archive 2008 02 28 first-look-at-using-expression-blend-with-silverlight-2.aspx Comment : Cool I have not seen these sites before .", "Question : I wanted to try Expression Blend and found out that the product Expression Studio is discontinued . I have Visual Studio 2010 Ultimate and the only thing I can find on the website for Expression http : www.microsoft.com expression is software for Visual Studio 2012 . Where can I find Expression Blend 4 for Visual Studio 2010 .. . Answer : If the MSDN subscription for your VS Ultimate license is still active you can download the old versions from there . If not then the new ones are your only option but you should still be able to work on your 2010 solution with the newer version of Blend thanks to the round-tripping feature added to VS 2012 . Comment : How can I work with Blend 2012 I load up my VS 2010 wpf application made in .net 4 and I get no design view and I VS 2012 with update 4 .", "Question : In blend 4 i often open a resource dictionary i.e . Generic.xaml by clicking the resources tab next to the property tab on the right pane navigate to a resource and click on its icon to edit it in the designer . In blend for visual-studio-2012 i can t seem to find the resources tab How am i then able to edit resources in resource dictionaries Comment : Why did someone edit the title of this question This is not a question for Expression blend 4 . This is a question about the blend design tool in Visual Studio 2012 . Comment : SimonTop -- I know exactly what you are talking about . I m a long time blend user and now that .NET 4.5 is out and Blend + sketch flow for VS2012 isn t supported I m using VS 2012 . I dearly miss the Resources explorer that Blend sports . Comment : @Spurkiss That is no longer the case with VS2012 Update 2+ . See my answer below .. . Answer : As of VS2012 Update 2+ we can once again create desktop WPF apps so the Resource tab returns . In addition Visual Studio 2012 Update 2 and later adds support for Silverlight and WPF editing as well as SketchFlow . Developers can now leverage a consolidated tool for all the platforms as part of a fully integrated solution with Visual Studio . 1 .. . .. . .. . .. . 1 Microsoft Expression Changes http : www.microsoft.com expression eng retrieved 2013-9-20", "Question : Everything I see pertaining to Blend for Visual Studio 2012 talks about making Window s store apps . Am I correct in assuming it can be used for regular desktop applications too .. . Answer : At the moment Blend for Visual Studio does not have support for building WPF or Silverlight applications enabled . But it will with the next update . From that point on you will be able to design regular desktop apps using Blend again . Until than you could use Expression Blend 4 which is available to you if you have an MSDN subscription . You can read more about the upcoming update for Visual studio here http : blendinsider.com technical announcing-visual-studio-2012-update-2-ctp-2013-01-30 and download a preview . There s an earlier preview of Blend available that supports WPF too . You can read more about this on the BlendInsiders blog http : blendinsider.com technical announcing-blend-sketchflow-preview-for-visual-studio-2012-2012-08-15 . The only drawback with this preview is that it doesn t have a go-live license yet . It runs side-by-side with Blend for Visual Studio . Although it should be possible to build an application entirely in Blend I would recommend writing your code in Visual Studio and only work with you XAML in Blend . Update : With the release of Visual Studio 2012 update 2 support for WPF is added to Blend . More about that can be found over here http : blogs.msdn.com b visualstudio archive 2013 04 04 visual-studio-2012-update-2-is-here.aspx . Comment : As of Update 2 Blend for Visual Studio 2012 now supports WPF apps that target .NET Framework 3.5 4.0 4.5 . Comment : Thanks I ve updated the answer.. . Comment : update 2 final kills blend for visual-studio-2012 for non windows-8 dev . theres support for non windows-8 in update 2 ctp 4 though . just update to update 2 final and restart . Comment : actually its a known bug that i experience . just repair the update and it works .", "Question : Does anyone know of some global state variable that is available so that I can check if the code is currently executing in design mode e.g . in Blend or Visual Studio or not .. . .. . It would look something like this : .. . .. . The reason I need this is : when my application is being shown in design mode in Expression Blend I want the ViewModel to instead use a Design Customer class which has mock data in it that the designer can view in design mode . However when the application is actually executing I of course want the ViewModel to use the real Customer class which returns real data . Currently I solve this by having the designer before he works on it go into the ViewModel and change ApplicationDevelopmentMode.Executing to ApplicationDevelopmentMode.Designing : .. . Answer : And if you extensively use Caliburn.Micro http : caliburnmicro.codeplex.com for your large WPF Silverlight WP8 WinRT application you could use handy and universal caliburn s Execute.InDesignMode static property in your view-models as well and it works in Blend as good as in Visual Studio :", "Question : Am I missing something or does that Open in blend option in Visual Studio 2008 not exist anymore I am using VS 2008 SP1 + Expression Studio 3.0 . I can do it the other way around from blend to visual-studio but not visual-studio to blend . Cheers .. . Answer : I had the same problem I had the trial version of blend uninstalled and then installed Expression Studio from my MSDN subscription . The option in Silverlight projects was gone . I found here http : blogs.msdn.com anandt archive 2008 03 05 open-in-expression-blend.aspx that all I needed to do was to add the following registry entry : .. . .. . HKEY LOCAL MACHINE SOFTWARE Microsoft Expression Blend VS BlendLaunchPath .. . .. . And this should point to the full path where expession blend is in my case : C : Program Files Microsoft Expression Blend 3 Blend.exe .. . .. . After this all I needed to do was to restart Visual Studio and there it was again Hope this helps . Comment : Thanks this worked for me under Visual Studio 2010 Beta 2 and Expression Blend .NET 4 Trial Comment : This doesn t seem to work with VS2010 SP1 and Blend 4 . Comment : VS 2010 and Blend 4 Trial - Registry entry is already there but no joy ." ] }
[ "yes-answer-long", "yes-answer-short" ]
wpf
UNK_RELATION
srand@c++@79
srand -- a function which initializes the pseudo-random number generator in c @placeholder or php .
{ "confidence": [ 68.7867431640625, 48.60633087158203, 48.191688537597656, 47.19797134399414, 46.911163330078125, 45.65971755981445, 45.523677825927734, 42.948219299316406, 41.72697067260742, 41.51041793823242, 40.86106872558594, 40.74659729003906, 40.24439239501953, 40.11735534667969, 40.11735534667969, 38.77769470214844, 38.34110641479492, 37.88597869873047, 37.79182052612305, 37.41395950317383, 37.226531982421875, 37.192264556884766, 36.79478454589844, 36.2921142578125, 36.22807693481445, 36.10908889770508, 35.07936477661133, 35.07936477661133, 34.85273361206055, 34.65086364746094, 34.6215705871582, 34.430152893066406, 34.430152893066406, 34.430152893066406, 34.430152893066406, 33.85901641845703, 33.128578186035156, 32.50349426269531, 32.46059036254883, 32.398468017578125, 32.36046600341797, 31.99840545654297, 31.99840545654297, 31.862651824951172, 31.770713806152344, 31.639991760253906, 31.639991760253906, 31.639991760253906, 31.639991760253906, 31.639991760253906, 31.63067626953125, 31.557525634765625, 31.49346160888672, 31.366748809814453, 31.24909782409668, 31.16546630859375, 31.078556060791016, 31.078556060791016, 31.078556060791016, 30.816303253173828, 30.585468292236328, 30.290481567382812, 30.17392349243164, 30.0848388671875, 29.95315170288086, 29.75119400024414, 29.626224517822266, 29.546630859375, 29.30050277709961, 29.156299591064453, 29.147464752197266, 29.147464752197266, 29.073963165283203, 28.871074676513672, 28.854202270507812, 28.708206176757812, 28.562938690185547, 28.552913665771484, 28.551258087158203, 28.444442749023438, 28.444442749023438, 28.444442749023438, 28.444442749023438, 28.30040168762207, 28.236083984375, 28.163837432861328, 28.163837432861328, 28.156909942626953, 28.114124298095703, 28.0218505859375, 27.999691009521484, 27.738445281982422, 27.714656829833984, 27.562469482421875, 27.529266357421875, 27.527801513671875 ], "content": [ "The srand function initializes the pseudo-random number generator .", "srand is a function that seeds the random number generator .", "srand time NULL is used to seed the pseudo-random number generator .", "The purpose of srand is to seed the pseudo-random number generator used by rand .", "srand seeds the random number generator .", "srand doesn t return a random number it just reseeds the random number generator .", "srand s purpose is to initialize the random number generator .", "srand initializes the radnom number generator with the given seed and generates unique sequence of random numbers for this seed .", "srand seeds the random number generator and should only be called when you wish to reset the random number generator .", "I need a good way to initialize the pseudo-random number generator in C++ .", "The issue is that the srand function is seeding the random number generator and you re seeding it with the current time which has a 1 second resolution .", "srand generates a seed which is the number used to initialize the random number generator and must be called once per process .", "srand seeds the pseudorandom number generator .", "If you remove srand completely the random number generator will be seeded with 0 .", "Yes think of srand as seed-rand : It seeds the random number generator .", "If you look at the docs http : en.cppreference.com w cpp numeric random srand : .. . .. . Seeds the pseudo-random number generator used by std : : rand with the value seed .", "What s usually called a random number generator is actually a pseudo-random number generator .", "A pseudo random generator is an engine which produce numbers that look almost random .", "You need to seed the psuedo-random number generator first using srand http : en.cppreference.com w cpp numeric random srand .", "srand seeds the random number sequence .", "srand seeds the random number generator so you get a different sequence of random numbers depending on the input .", "The function rand and most other random sources1 is an implementation of a pseudo-random number generator .", "Each time you call a pseudo-random number generator function the generator takes some internal state and produces a pseudo-random number and a new internal state .", "First of all rand is a pseudo random number generator not a true random number generator so there s a bias right there in the first place .", "The core idea is that pseudo random generator is initialized with the special number - seed .", "srand sets the seed which is used by rand to generate random numbers in quotes because they re generally pseudo-random .", "According to http : en.cppreference.com w cpp numeric random srand .. . .. . Notes : .. . .. . Generally speaking the pseudo-random number generator should only be seeded once before any calls to rand and the start of the program .", "cppreference http : en.cppreference.com w cpp numeric random srand : .. . .. . Generally speaking the pseudo-random number generator should only be seeded once before any calls to rand and the start of the program .", "Maybe create a single question titled how does srand affect the state of the random number generator", "The reason is that srand sets the initial state of the random generator and all the values that generator produces are only random enough if you don t touch the state yourself in between .", "The C standard requires that : .. . .. . If srand is then called with the same seed value the sequence of pseudo-random numbers shall be repeated .", "The srand function uses the argument as a seed for a new sequence of pseudo-random numbers to be returned by subsequent calls to rand .", "From man rand : .. . .. . The srand function sets its argument as the seed for a new sequence of pseudo-random integers to be returned by rand .", "The srand function sets its argument as the seed for a new sequence of pseudo-random integers to be returned by rand .", "The srand function uses the argument as a seed for a new sequence of pseudo-random numbers to be returned by subsequent calls to rand .", "rand is a pseudo -random number generator the sequence of numbers it generates is entirely determined by the most recent call to srand .", "If you want a random number generator you can seed then you can continue to use srand for seeding but use rand for generating your numbers .", "This re-initializes the seed srand to the same value and my random numbers are REPEATED. . .. . .. . Can anyone suggest a workaround fix .", "TL DR You need to seed the PRNG Pseudo Random Number Generator only once at the start of your program .", "Currently I m generating dynamic code using srand function in PHP : .. . .. . This would return a 6 digit code which changes dynamically every 30s e.g .", "Do not call srand every time you want a random number .", "How familiar are you with pseudo-random number generation", "This is basically just the idea of pseudo-random number generation .", "Some random number generator libraries allow you to save the state of the generator .", "Better generator than rand srand .", "This depends on the implementation of you random number generator .", "Did you seed your random number generator", "You are constantly reseeding the random number generator .", "It s about the implementation of the random number generator .", "rand 14 is often a poor random number generator .", "I know to put srand time NULL at the beginning of the program to seed the random number generator and so I have that but it isn t working .", "I know one way to generate random number by using srand time NULL as seed and rand function but it takes seed as time in seconds .Is their any alternate way which can generate random number", "Random numbers are actually pseudo random .", "I don t understand the meaning of srand in time.h to create a random number .", "To generate the random seed I need the srand with time .", "From the man page : .. . .. . NAME rand rand r srand - pseudo-random number generator .. . .. . SYNOPSIS .. . .. . .. . include stdlib.h .. . .. . int rand void .. . .. . int rand r unsigned int seedp .. . .. . void srand unsigned int seed .. . .. . .. . By including stdlib.h you get the prototypes for these functions and the compiler can ensure you re calling them correctly .", "If srand is then called with the same seed value the sequence of pseudo-random numbers shall be repeated .", "If you set a specific seed with srand rand will generate a certain sequence of pseudo-random integers .", "If srand is then called with the same seed value the sequence of pseudo-random numbers shall be repeated .", "Even if those other parts do not call srand just by calling rand they will also influence the global random generator .", "By the way why don t you use the C++11 random number generator which will produce random integer values i uniformly distributed on the closed interval a b that is distributed according to the discrete probability function .", "A very simple usable random number generator is a Lehmer number generator https : en.wikipedia.org wiki Lehmer random number generator .", "From the C standard and Objective C is a thin layer on top of C so this should still hold : .. . .. . If srand is then called with the same seed value the sequence of pseudo-random numbers shall be repeated .", "You may read about pseudo random numbers generators standard-library srand-rand functions are implementation of one of them .", "When you call srand using time NULL as the seed multiple times in the same second which is quite possible considering current hardware you will use the same seed with a clean random number generator .", "srand does not make rand more random .", "Here is the code : .. . .. . I ve been trying to random number but one day I forgot to put srand in but the rand function can still random a number the same sequence .", "Note from link above : .. . .. . Generally speaking the pseudo-random number generator should only be seeded once before any calls to rand and the start of the program .", "What to do to srand function", "The function srand sets the random seed and if you call it again with the same random seed it will cause future random calls to return a repeat of the same sequence .", "See also Is uninitialized local variable the fastest random number generator", "if you need a better random number generator don t use the libc rand .", "In a C program if you don t select a book the random numbers come from book 1 or in other words in the absence of a srand call the function rand behaves as-if srand 1 has been called .", "I want to understand if there is a pattern to follow to understand if it is correct to initialize the random generator with srand in the main thread or if every thread must initialize its own random generator .", "Back In The Day tm I was taught a simple rule about random number generator seeds : Thou Shalt Never Seed Thy Random Number Generator With An Even Number", "The numbers rand returns are not actually random but pseudo-random .", "You only need to call srand once to seed the rand generator .", "That s why the notes state that : .. . .. . Generally speaking the pseudo-random number generator should only be seeded once before any calls to rand and the start of the program .", "Basically you need a better initial seed generator than time and a better random number generator than rand .", "I think that it is happening because srand should be a random number usually use time", "However I read that srand time NULL changes each generated random number every time I compile .", "So far I have made a program that creates a random number using srand and rand .", "Generally the random number generators for rand and srand are not required to give different sequences for different seeds but the same sequence for the same seed .", "srand returns void function and doesn t return a value .", "I m trying to use the srand function but I keep getting the error .. . .. . Called object of type int is not a function or function pointer .", "This way your random number generator will be set exactly one and won t be reset producing more random numbers .", "The rather poor standard random number generator then uses these similar seed values to generate apparently identical initial random numbers .", "srand is a function that sets the seed for the rand function .", "If you chose to srand it is a good idea to then call rand at least once before you use it because it is a kind of horrible primitive psuedo-random generator .", "If you call srand inside of rollDice and you pass in the current time then you restart the random number generator with the exact same value every time until the time changes the second hand ticks .", "In cryptographically strong pseudo random number generators it would be considered a serious flaw to be able to guess the seed based on a generated random number .", "OP is asking why srand changes the number sequence .", "The man pages state the following http : linux.die.net man 3 rand : .. . .. . The srand function sets its argument as the seed for a new sequence of pseudo-random integers to be returned by rand .", "If you give the same seed twice you can expect the random number generator subsequent calls to rand to return the same sequence of random numbers .", "If you seed the random number generator multiple times with the same number then you will always get the same result from rand .", "But my random generator was periodic ." ] }
{ "confidence": [ 53.58860778808594, 53.07743835449219, 52.623435974121094, 51.087135314941406, 50.54438781738281, 50.52941131591797, 50.2666015625, 49.804176330566406, 49.54619598388672, 49.430450439453125, 49.39636993408203, 48.590858459472656, 47.91930389404297, 47.62146759033203, 47.17071533203125, 47.048500061035156, 46.9869384765625, 46.86582946777344, 46.745765686035156, 46.688690185546875 ], "content": [ "Question : I don t understand the meaning of srand in time.h to create a random number . Here is my code : .. . .. . and the results are : .. . .. . Why is the result-of srand 1 different from srand 2 Why does the result-of srand 1 or srand 2 keep appearing again and again And why do I have to use srand time NULL in order to create a dynamic random number Comment : read this : cplusplus.com reference cstdlib srand http : www.cplusplus.com reference cstdlib srand Comment : Why is this tagged c and c++ In c++ rand should not be used at all it is deprecated and considered harmful http : channel9.msdn.com Events GoingNative 2013 rand-Considered-Harmful . Comment : @leemes rand is neither deprecated nor considered harmful in C++ . It definitely has its restrictions but that has been true since the early days of C . .. . Answer : If you look at the docs http : en.cppreference.com w cpp numeric random srand : .. . .. . Seeds the pseudo-random number generator used by std : : rand with the value seed . rand has some internal state that it keeps from one call to the next . The function is deterministic - but we can view its output as pseudorandom . So the value produced by : .. . .. . will always be the same for a given implementation . That s why the notes state that : .. . .. . Generally speaking the pseudo-random number generator should only be seeded once before any calls to rand and the start of the program . It should not be repeatedly seeded or reseeded every time you wish to generate a new batch of pseudo-random numbers .", "Question : I don t understand the meaning of srand in time.h to create a random number . Here is my code : .. . .. . and the results are : .. . .. . Why is the result-of srand 1 different from srand 2 Why does the result-of srand 1 or srand 2 keep appearing again and again And why do I have to use srand time NULL in order to create a dynamic random number Comment : read this : cplusplus.com reference cstdlib srand http : www.cplusplus.com reference cstdlib srand Comment : Why is this tagged c and c++ In c++ rand should not be used at all it is deprecated and considered harmful http : channel9.msdn.com Events GoingNative 2013 rand-Considered-Harmful . Comment : @leemes rand is neither deprecated nor considered harmful in C++ . It definitely has its restrictions but that has been true since the early days of C . .. . Answer : What s usually called a random number generator is actually a pseudo-random number generator . This typically means that you can generate the same random sequence if you provide the key to that sequence referred to as the seed . This is very useful when you wish to test your algorithm that is based on randomization and you need to ensure repeatable results . If you do not seed your Random number generator it is seeded with 1 .. . .. . Seed values are integers that define the exact sequence of pseudo-random numbers but there s no way of knowing ahead of time what sequence it will be and there s no way of tweaking a sequence by slightly changing the seed . Even the tiniest change in seed value will result in a radically different random sequence . Comment : Your second paragraph doesn t apply to the standard-library srand rand . If you don t call srand before rand it s documented to behave as though srand 1 was called . Comment : @Blastfurnace yes you are right i have edited my answer .", "Question : I want to learn why my code is not working as I expect . I mean I want to generate a double number between 0 and 1 and I have learnt that when I use double rand RAND MAX it works well . However I read that srand time NULL changes each generated random number every time I compile . However When I use them together the program generates same random number all the time . Why does this happen Thanks . Here is my code : .. . Answer : The srand function initializes the pseudo-random number generator . You can think of that like it is pointing to the rand a number to start its calculations . Every time you compile and run your program the srand function gives your rand function the seed of time NULL which by the way is a very big number changing every second . If you don t use the srand your rand will always return the same sequence of numbers because it is given by default a standart non-changing seed number to start the calculations . You can try to give your srand a static parameter like : srand 1500 You will see that it will return different numbers but their sequence will again be the same every time u compile and run . For more info read here : .. . .. . http : www.cplusplus.com reference cstdlib srand .. . .. . http : www.cplusplus.com reference cstdlib rand", "Question : I try to generate random numbers but they are the same.. . What should i do Array declaration : Comment : Your first calloc call should be sizeof int but you seem to be working on a host where simple pointers and ints are the same size that s true of most architectures . .. . Answer : You need to call srand before entering the loop . srand initializes the radnom number generator with the given seed and generates unique sequence of random numbers for this seed . Your loop executes very fast so every call to time NULL yields the same time measured in seconds - hence you initialize random number generator with the same seed on every loop iteration .", "Question : When I used at first srand time NULL in rollDice function it did not work . But when I put it in main it works . Why is that Can you tell me the logic Comment : What do you mean by not working Comment : What did not work Comment : Your problem is one that many many people encounter when first trying to use random number interfaces and has been asked over and over again on Stack Overflow http : stackoverflow.com search q 5Bc 5D+srand+is 3Aquestion that search isn t all duplicates but nearly half of them are . Comment : When at first I put srand inside rollDice it everytime returned 7 but when I put it under main it gave me different results as expected . Comment : How many rolls before the user starts accurately guessing the outcome .. . Answer : The issue is that the srand function is seeding the random number generator and you re seeding it with the current time which has a 1 second resolution . So when you call srand from inside of the rollDICE function you get the exact same result from rand on every call that occurs in the same second . When the second ticks you ll get a different result from rand . Calling srand inside main means that you only call it once before you start rolling and then rand will return you a sequence of random numbers . Comment : But if it runs once when I put in main why is it giving differenr results I think because it is called one in main it has to give same over and over . When I put it inside rollDice because rollDice is called at different times it has to give different numbers . But situation is not like this . Comment : srand seeds the random number generator . i.e.. . it sets up the pseudo-random sequence of numbers that rand will later return to you . If you seed the random number generator multiple times with the same number then you will always get the same result from rand . If you call srand inside of rollDice and you pass in the current time then you restart the random number generator with the exact same value every time until the time changes the second hand ticks . When you call srand in main you only seed the generator once and every call to rand after that returns a new result . Comment : Thanks so much for the explanation", "Question : why is it when i call srand at 2 very different points it cause numbers to not be random Once i remove one of them it goes back to normal . Comment : You ll have to show some code demonstrating what you mean and also describe what you mean by not random . rand is a pseudo -random number generator the sequence of numbers it generates is entirely determined by the most recent call to srand . .. . Answer : You may read about pseudo random numbers generators standard-library srand-rand functions are implementation of one of them . The core idea is that pseudo random generator is initialized with the special number - seed . srand is used to set seed . For every seed pseudo random generator generate exactly the same sequence of numbers ever . By using different seeds you ll get different sequences of numbers . So if you want to get different random numbers everytime you start you program you need everytime to set new seed . The one of simpliest way to do this is to use time for seed .", "Question : I m using the random shuffle on a vector like this : .. . .. . When run the content of the deck is mixed up but this mixed-up order is kept when I restart the program . Did I miss something How can I make it truly random Comment : You for got to seed rand srand . Comment : how can I do it Comment : std : : srand std : : time NULL .. . Answer : You need to seed the psuedo-random number generator first using srand http : en.cppreference.com w cpp numeric random srand . Note from link above : .. . .. . Generally speaking the pseudo-random number generator should only be seeded once before any calls to rand and the start of the program . It should not be repeatedly seeded or reseeded every time you wish to generate a new batch of pseudo-random numbers . Comment : @Chin : note that you should seed the generator once when the program starts and never again . Comment : is there any difference between time 0 and time NULL Comment : Good point I assumed the code he posted was part of int main . I included the excerpt from the link. . Comment : @Chin There are three ways of writing a null-pointer in C++ : Using the old NULL inherited from C using 0 the old C++ way and using the new C++11 keyword nullptr . Comment : random shuffle isn t actually specified to use rand and so srand may not have any impact . If you want to be sure you should use one of the C++11 forms random shuffle b e RNG or shuffle b e uRNG", "Question : I ve seen quite a few recommendations for not seeding pseudo-random number generators more than once per execution but never accompanied by a thorough explanation . Of course it is easy to see why the following C C++ example is not a good idea : .. . .. . since calling get rand several times per second produces repeated results . But wouldn t the following example still be an acceptable solution .. . .. . MyRand.h .. . .. . MyRand.cpp .. . .. . main.cpp .. . .. . i.e . even though MyRand : s constructor is called several times in rapid succession each call to srand has a different parameter . Obviously this is not thread-safe but then again neither is rand . Comment : I might add that the whole purpose of this exercise is to relieve the burden of calling srand from the client of MyRand where MyRand might be modelling a die . But on the other hand if we also build fortune wheels coin tosses etc . in the same way we will get a lot of seeds . .. . Answer : Each time you call a pseudo-random number generator function the generator takes some internal state and produces a pseudo-random number and a new internal state . The algorithm for transforming the internal state is carefully chosen so the output appears random . When you seed the random number generator you re basically setting this internal state . If you reset the internal state to some predictable value you ll lose the appearance of randomness . For example a popular simple RNG is a linear congruential generator . Numbers are generated like this : .. . .. . In this case X n+1 is both the result and the new internal state . If you seed the generator every time as you suggest above you ll get a sequence that looks like this : .. . .. . where b is your seed base . This doesn t look random at all . Comment : My main.cpp example is a little exaggerated for the purpose of demonstrating the lack of the first example s flaw . Instantiating a new object for each call to get rand will lead to the situation you describe above but that s just wasteful programming . Assuming that the number of MyRand instantiations are few compared to get rand calls things look a little better .", "Question : I don t understand the meaning of srand in time.h to create a random number . Here is my code : .. . .. . and the results are : .. . .. . Why is the result-of srand 1 different from srand 2 Why does the result-of srand 1 or srand 2 keep appearing again and again And why do I have to use srand time NULL in order to create a dynamic random number Comment : read this : cplusplus.com reference cstdlib srand http : www.cplusplus.com reference cstdlib srand Comment : Why is this tagged c and c++ In c++ rand should not be used at all it is deprecated and considered harmful http : channel9.msdn.com Events GoingNative 2013 rand-Considered-Harmful . Comment : @leemes rand is neither deprecated nor considered harmful in C++ . It definitely has its restrictions but that has been true since the early days of C . .. . Answer : The function rand and most other random sources1 is an implementation of a pseudo-random number generator . The numbers it generates are not random at all but simply numbers in a very long sequence of discreet values the sequence is designed so that successive numbers appear random according to some suitable definition of random . The function srand simply sets a starting point in this sequence . 1 Most OS do have some source of truly random numbers such as the file dev random on Unix systems . They can be very slow for more than a few bytes however . There main use is to seed a PRNG .", "Question : I m using the random shuffle on a vector like this : .. . .. . When run the content of the deck is mixed up but this mixed-up order is kept when I restart the program . Did I miss something How can I make it truly random Comment : You for got to seed rand srand . Comment : how can I do it Comment : std : : srand std : : time NULL .. . Answer : With current C++ i.e . C++11 you can use the shuffle algorithm which can take a pseudo random number generator PRNG object which you can seed as third parameter : .. . .. . for GCC 4.8.2 you need to compile it via g++ -std c++11 -Wall -g shuffle.cc -o shuffle .. . .. . In the above example the PRNG is seeded with the current system time . For pre-C++11 compilers you only have the random shuffle algorithm in the STL - but even with that you can optionally specify a number generator object function to it . Note that you can t just pluck in a PRNG object like mtl19937 into it because it does not provide a operator U upper bound member . Thus you can supply your own adapter like this :", "Question : why is it when i call srand at 2 very different points it cause numbers to not be random Once i remove one of them it goes back to normal . Comment : You ll have to show some code demonstrating what you mean and also describe what you mean by not random . rand is a pseudo -random number generator the sequence of numbers it generates is entirely determined by the most recent call to srand . .. . Answer : It depends on how you call it . The purpose of srand is to seed the pseudo-random number generator used by rand . So when you call srand i it will initialise rand to a fixed sequence which depends on i . So when you re-seed with the same seed you start getting the same sequence . The most common use-case is to seed the generator just once and with a suitable random value such as the idiomatic time NULL . This s guarantees s makes it likely that you ll get different sequences of pseudo-random numbers in different program executions . However occasionally you might want to make the pseudo-random sequence replayable . Imagine you re testing several sorting algorithms on random data . To get fair comparisons you should test each algorithm on the exact same data - so you ll re-seed the generator with the same seed before each run . In other words : if you want the numbers simply pseudo-random seed once and with a value as random as possible . If you want some control replayability seed as necessary .", "Question : I m just trying to have simply RndInt limit function that will return random numbers with a limit as limit . I m having problem to make RndInt subsequent calls display different integer . When I debug its fine subsequent calls to RndInt limit give different value . But when I try to run it without cin.get for pause I get same numbers in all three calls . I figured out that problem is that seed is in the same second . My question is how to make calls to RndInt return different values without pause . What to do to srand function Comment : possible duplicate of How do you use rand function to ask different questions each time http : stackoverflow.com questions 11112873 how-do-you-use-rand-function-to-ask-different-questions-each-time .. . Answer : Do not call srand every time you want a random number . Call srand once at the start of your program and then call rand for each number . Comment : Hmm ok thx that solved problem Comment : Yes think of srand as seed-rand : It seeds the random number generator . Give it the same value each time and you ll get the same sequence of pseudo-random numbers with each subsequent call to rand in one thread .", "Question : I m trying to shuffle the cards in a deck . I create two numbers randomly and assign their values to eachother 100 times . But it doesn t create randomly . Weirdest part is this I put a breakpoint to line counter++ to observe if the program really chooses different cards each time . When I m debugging if I click on the continue button too quickly it creates same index1 and same index2 every time but index1 is not equal to index2 . I thought it may be due to the time . when I click too quickly on the continue button or when I don t put breakpoint at all it creates same numbers due to the same time . But if that s the case why does the program creates different values for index1 and index2 There is no breakpoint between their lines . So the time must be very small . It creates different indexes though . I m confused . How to get rid of Edit : Solution is to use srand for one time in main . Comment : Why do you keep calling srand over and over again Who told you to do that Looks like you re repeating code you ve seen elsewhere without actually understanding it No wonder you re having problems Comment : @LightnessRacesinOrbit I was about to get mad . I wrote all of these codes . Then I tried to use srand in main function . It worked . I ll not say I m thankful though . Try helping before insulting . Comment : Also remember that srand does not generate trully random numbers as that is impossible on a computer in the long term expect a tendency to get more lower numbers than high numbers . .. . Answer : According to http : en.cppreference.com w cpp numeric random srand .. . .. . Notes : .. . .. . Generally speaking the pseudo-random number generator should only be seeded once before any calls to rand and the start of the program . It should not be repeatedly seeded or reseeded every time you wish to generate a new batch of pseudo-random numbers . .. . Standard practice is to use the result-of a call to time 0 as the seed . However time returns a time t value and time t is not guaranteed to be an integral type . In practice though every major implementation defines time t to be an integral type and this is also what POSIX requires . By the way why don t you use the C++11 random number generator which will produce random integer values i uniformly distributed on the closed interval a b that is distributed according to the discrete probability function . See http : en.cppreference.com w cpp numeric random uniform int distribution .. . .. . Example code was provided is that cppreference page .", "Question : Both players get the same random number I want each player to get a different number since they are throwing dice . here is the code : .. . .. . The players are throwing dice . So number has to be 1-6 . How can I fix this Comment : Put the different options 1..6 in an array . Select a random array index . Remove that item from the array by swapping it with the last in the array and shortening its length . Comment : move srand time NULL outside the roll a dice Comment : Another gross multi-dup Comment : Ah so I misread the question . OP does not want different random numbers he wants random numbers that are not the same . Comment : RTFM : Use srand once and only once . .. . Answer : srand time NULL is used to seed the pseudo-random number generator . time having a granularity of 1 second if you seed the PNRG every time you call the roll a dice function for all the calls made within the granularity period rand will end up returning the same random number . Move the srand time NULL out of the roll a dice function-call that only once in main . Comment : Thank you so much Sorry if this was a noobie question I m very new into coding and I m trying my hardest . Comment : Why didn t you flag this as one of the thousand duplicates : stackoverflow.com search q c +srand+ http : stackoverflow.com search q 5Bc 5D+srand+ Comment : He can still get the same dice roll for each player . Comment : @WeatherVane Well yes but only by chance instead of every time .", "Question : Possible Duplicate : .. . Recommended way to initialize srand http : stackoverflow.com questions 322938 recommended-way-to-initialize-srand .. . .. . I have the following problem when using srand in c . .. . .. . I call srand time NULL in a loop but the loop finishes before 1 sec and every time I call the rand I get the same value . How can I solve this Comment : why are you calling srand in a loop You just call it once then use rand Comment : Call srand only once at the start of your program . Comment : I am trying to do password generation using srand time and srand num so I override the srand every time an iteration is done . That s is why I have the srand in the loop . It gets changed twice for every iteration .. . Answer : srand s purpose is to initialize the random number generator . Its parameter is called a seed . If you give the same seed twice you can expect the random number generator subsequent calls to rand to return the same sequence of random numbers . In your case you re constantly calling srand with the same value until the second changes so rand will always return you the same value . You just need to call srand once .", "Question : I m trying to make my program return a random number -5 5 using rand function in C . The program is working but I dont like the fact its giving 2 warning everytime i compile the code . Here is the code : .. . .. . And these are the warnings : .. . .. . Why are these warnings showing up I m afraid they might cause some problem later so I would like to eliminate those warnings . Edits : .. . .. . Added another library : .. . .. . 2 warnings gone 1 new one : .. . .. . New warning solved by change in the srand call to : .. . .. . This is the final and solved program : .. . .. . SOLVED showed the edits step by step for future reference to other users . Thanks Comment : You forget to include stdlib.h Comment : How about include stdlib.h or include cstdlib.h Comment : Included the 2 previous ones are gone but now there is another one : warning C4244 : function : conversion from time t to unsigned int possible loss of data Comment : return randomNumber from main doesn t seems a good idea take a look to What should main return in C and C++ http : stackoverflow.com questions 204476 what-should-main-return-in-c-and-c Comment : @AlterMann My program is supposed to run another program that will return different numbers depending of erro kind . This code is only meant to simulate erro occurence of the program i m supposed to run in the future which is not done that why a random number . .. . Answer : You re getting this warning because the functions rand and srand haven t been defined . From the man page : .. . .. . NAME rand rand r srand - pseudo-random number generator .. . .. . SYNOPSIS .. . .. . .. . include stdlib.h .. . .. . int rand void .. . .. . int rand r unsigned int seedp .. . .. . void srand unsigned int seed .. . .. . .. . By including stdlib.h you get the prototypes for these functions and the compiler can ensure you re calling them correctly .", "Question : Can someone explain what srand does exactly . I understand that it relates to the function rand and the value fed into the srand function is a seed value but how exactly does this seed value affect the rand function Comment : Have you looked on the many available c++ sites like cppreference.com and cplusplus.com Comment : yes I was just confused about how the seed value affected rand itself .. . Answer : After srand with a particular argument subsequent calls to rand will produce exactly identical sequences . So you can use srand to allow users to e.g . exactly reproduce the results of an algorithm that uses random numbers . For example on my C .. . .. . Notice that the second sequence and third sequence are identical . If you are asking what exact numeric relationship the seed has with the following random number it is generally irrelevant if you really need to know you will need to know the exact pseudo-random number generation algorithm used : different C compilers are free to use different algorithms as the algorithm is not defined in the C language specification . Comment : Oh okay I see thank you very much", "Question : This comment https : stackoverflow.com questions 27209117 having-issues-with-two-different-objects-within-classtemplate comment42900202 27209117 which states : .. . .. . srand time 0 I would put this line as the first line in main instead if calling it multiple times which will actually lead to less random numbers . ...and I ve bolded the line which I m having an issue with.. . repeats common advice to call srand http : en.cppreference.com w cpp numeric random srand once in a program . Questions like srand why call only once https : stackoverflow.com questions 7343833 srand-why-call-only-once re-iterate that because time 0 returns the current time in seconds that multiple calls to srand within the same second will produce the same seed . A common workaround is to use milliseconds or nanoseconds instead . However I don t understand why this means that srand should or can only be called once or how it leads to less random numbers . cppreference http : en.cppreference.com w cpp numeric random srand : .. . .. . Generally speaking the pseudo-random number generator should only be seeded once before any calls to rand and the start of the program . It should not be repeatedly seeded or reseeded every time you wish to generate a new batch of pseudo-random numbers . .. . .. . phoxis http : stackoverflow.com a 7346409 3920237 s answer to srand why call only once https : stackoverflow.com questions 7343833 srand-why-call-only-once : .. . .. . Initializing once the initial state with the seed value will generate enough random numbers as you do not set the internal state with srand thus making the numbers more probable to be random . .. . .. . Perhaps they re simply using imprecise language none of the explanations seem to explain why calling srand multiple times is bad aside from producing the same sequence of random numbers or how it affects the randomness of the numbers . Can somebody clear this up for me Comment : Per se : No . Provide contexts or we cannot tell to what extent the quality is affected . Comment : @Columbo there are multiple issues with srand for serious usage . One of it is that the distribution is biased . See e.g . eternallyconfuzzled.com arts jsw art rand.aspx http : eternallyconfuzzled.com arts jsw art rand.aspx for some discussion although I remember I ve seen something similar on SO although cannot find it now . Comment : @vsoftco Unrelated We are talking about the difference in quality not about the qualities themselves . Comment : @Columbo I mentioned that bias towards low-order bits is a problem and in my opinion the most serious one . This is a difference in quality and linked a page which was quite long to explain in my post . In other words the entropy of the source is quite far from being H X where X is the size of the alphabet . Comment : @vsoftco We have to cases : Seed rand once and seed rand several times . Now we are concerned about the difference in quality of the produced sequences . How does the page you linked in any way relate to this issue .. . Answer : The std : : time 0 function returns the time in seconds . The problem is that computers are so fast that the std : : time 0 function will not have changed between calls to std : : srand if you call std : : srand each time you ask for a random number std : : srand will keep being reset to produce the same sequence of numbers until the std : : time function returns a different time one second later . In one second you can end up with the same number being produced millions of times That s not very random .", "Question : I need a good way to initialize the pseudo-random number generator in C++ . I ve found an article http : www.cplusplus.com reference clibrary cstdlib srand.html that states : .. . .. . In order to generate random-like numbers srand is usually initialized to some distinctive value like those related with the execution-time . For example the value returned by the function time declared in header ctime is different each second which is distinctive enough for most randoming needs . Unixtime isn t distinctive enough for my application . What s a better way to initialize this Bonus points if it s portable but the code will primarily be running on Linux hosts . I was thinking of doing some pid unixtime math to get an int or possibly reading data from dev urandom . Thanks EDIT .. . .. . Yes I am actually starting my application multiple times a second and I ve run into collisions . Comment : Why is time not enough Are you starting the application multiple times a second Note you should only call srand ONCE in an application . Comment : Unless you start the application multiple times a second time will return a unique value that does not repeat fro 60 years . Comment : If time - or gettimeofday - is not enough then the chances are that rand is not good enough for you . That PRNG need not be very good at all . Cryptographic randomness is hard - use a cryptographic library . Comment : Actually at least MS CRT keeps the seed in TLS so in that case you d actually need to initialize srand ONCE for each thread . Not sure how GCC stores the seed though . Comment : More info about initializing srand with microseconds : guyrutenberg.com 2007 09 03 seeding-srand http : www.guyrutenberg.com 2007 09 03 seeding-srand .. . Answer : Include the header at the top of your program and write : .. . .. . In your program before you declare your random number . Here is an example of a program that prints a random number between one and ten :", "Question : I have a typical situation where I need to generate a batch of random numbers . I have used a loop which generates 100 random numbers on each pass : .. . .. . Now the inner loop executes in less than a millisecond . As a result there is no change in the value of time . This re-initializes the seed srand to the same value and my random numbers are REPEATED. . .. . .. . Can anyone suggest a workaround fix . .. . Answer : You can use the random generator to generate a new seed . For example : .. . .. . And use srand time NULL only once before the loop . But as suggested in another answer you might as well drop the whole srand inside the loop as well . Comment : Can you please give some sample code Comment : Not only is this unnecessary it s dangerous . Most generators now have longer than 32-bit periods and repeated re-seeding with a 32-bit seed limits you to using only the first few numbers of a limited number of sequences . Call srand once and only once at the start of your program ." ] }
[ "yes-answer-long", "yes-answer-short" ]
c++
UNK_RELATION
antlrworks2@parser-generator@34
antlrworks2 -- antlrworks 2 is a @placeholder for reading processing executing or translating structured-text or binary files .
{ "confidence": [ 42.31603240966797, 33.67570877075195, 31.178207397460938, 30.790691375732422, 30.790691375732422, 27.65380096435547, 27.099227905273438, 26.782094955444336, 26.046234130859375, 25.199939727783203, 25.071990966796875, 25.03965187072754, 24.68115234375, 23.892457962036133, 22.57656478881836, 21.777292251586914, 21.76130485534668, 21.76130485534668, 20.303600311279297, 18.88735008239746, 18.692676544189453, 18.637964248657227, 17.451047897338867, 16.252595901489258, 15.531089782714844, 14.945114135742188, 14.945114135742188, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.912775993347168, 14.293866157531738, 12.941911697387695, 12.941911697387695, 12.941911697387695, 12.941911697387695, 12.941911697387695, 12.941911697387695, 12.941911697387695, 12.941911697387695, 12.941911697387695, 12.941911697387695, 12.941911697387695, 12.941911697387695, 12.941911697387695, 12.941911697387695, 12.941911697387695, 12.941911697387695, 12.941911697387695, 12.941911697387695, 12.941911697387695, 12.941911697387695, 12.941911697387695, 12.941911697387695, 12.941911697387695, 12.941911697387695, 12.941911697387695, 12.941911697387695, 12.941911697387695, 12.941911697387695, 12.941911697387695, 12.941911697387695, 12.941911697387695, 12.941911697387695, 12.941911697387695, 12.941911697387695, 12.941911697387695, 12.941911697387695, 12.941911697387695 ], "content": [ "7 Support running ANTLRWorks 2 on Windows XP https : bitbucket.org sharwell antlrworks2 issue 7 support-running-antlrworks-2-on-windows-xp .. . .. . ANTLRWorks 2 requires you to install Java before running it .", "I downloaded antlrworks2 from the tunnel vision labs website and tried to install it by running the antlrworks2.exe but getting the error antlrworks2.exe is not a valid win32 application .", "So i am using Antlrworks 2 working on a rather large grammar .", "Is that the right way to install antlrworks", "The problem will be fixed for ANTLRWorks 2.0.1 .", "Sample : .. . .. . When my grammar VCFG.g4 is opened in ANtlrworks2 - there are no warnings no errors .", "My goal now is to run the same tutorial in Netbeans with AntlrWorks2 I have cannibalised the Main from Here 2 .", "ANTLRWorks should work fine with Java 8 .", "ANTLRWorks generates me a perfect parse-tree from my SQL code but I want to use ANTLR in my webapplication without ANTLRWorks .", "The railroad format is generated by antlrworks but I d like to generate this programatically .", "So far I haven t been able to find anything equivalent in ANTLRWorks 2 .", "I believe antlrworks is a stand alone application or do I also need to install antlr", "I have downloaded ANTLRWorks 2 created new file with File- New and pasted Hello sample into it .. . .. . I can see Syntax Diagram after that but can t do anything else .", "I m in the process of releasing ANTLRWorks 2.1 which will correct this mismatch .", "I have been looking at the grammars located at : .. . .. . Antlr 4 grammars https : github.com antlr grammars-v4 .. . .. . and I have been using Antlrworks 2 to view them however I am finding it difficult to locate the start rule for the entire grammar .", "Previously when I did a run Run in TestRig an passed it an input file EVEN IF the input file was invalid didn t adhere to the grammar ANTLRworks2 still used to pop-up the tree and indicate errors in input file if any .", "ANTLRWorks 1.5 has an Interpreter tab where you could enter strings to test your parser on .", "The most likely cause of this is using ANTLRWorks 2.0 to generate the parser which internally uses ANTLR 4.0 .", "I am using ANTLR v . 4.5.2 ANTLRWorks 2.1 and the made available grammar https : github.com antlr grammars-v4 tree master tsql for tSQL right now .", "What s the best practice to .. . .. . 1 . find out the root cause for the mismatched input error .. . 2 . find out why incorrect rule range is being used .. . .. . I use Antlrworks2 VS2010 Pro Win XP SP3 .. . .. . here is my code :", "Once generated from .g4 files those Java source files can be include in your Java project and compiled together with your other files .", "So if you took the grammar it could be used to recognize any file of that language as opposed to a subset of files .", "You don t need those .g4 files to be compiled at runtime .", "ExprLexer.java : 64 .. . 6 more Caused by : java.io.InvalidClassException : org.antlr.v4.runtime.atn.ATN Could not deserialize ATN with version 3 expected 2 .", "1 : http : www.antlr.org wiki display ANTLR4 Getting+Started+with+ANTLR+v4 .. . 2 : http : www.certpal.com blogs 2011 01 antlr-tutorial-hello-antlr .. . .. . Grammar : .. . .. . Main : .. . .. . .. . .. . Error : .. . .. . .. . .. . ANSWER : antlr4 : ATN version 2 expected 3 http : stackoverflow.com questions 18180103 antlr4-atn-version-2-expected-3", "stackoverflow.com questions 18180103 http : stackoverflow.com questions 18180103 antlr4-atn-version-2-expected-3", "- 280Z28 .. . .. . Answer is Here http : stackoverflow.com questions 18180103 antlr4-atn-version-2-expected-3", "I tried it on Win server 2003 as well as Win 7 32-bit but I got the same error .", "I am using VS 2008 for development as the target language would be C .", "Has it got any dependency", "I know of an issue where the problem you describe appears on Windows XP but haven t heard of this on Windows Vista or later .", "I am not sure whether or not it will work with just the JRE runtime only installed so to be on the safe side I recommend installing the JDK development kit .", "I recommend Java 7 for its performance advantages the current release is 7u13 .", "Java SE Development Kit 7 Downloads http : www.oracle.com technetwork java javase downloads jdk7-downloads-1880260.html", "For example Run menu having 3 items totally dimmed and no clues how to undim them .", "Problem is that in this grammar there are multiple ambiguities that i am trying to work through .", "I was wondering if there is a way to interpret which rules were invoked when there was a failure .", "For instance when i run my rule i get following output .. . .. . I am wondering what @0 0 : 1 99 20 1 : 0 means .", "Do the @0 or 20 have any relationship to the rule number in my grammar or something", "Here is a breakdown of the default token formatting .", "The TokenType field generally corresponds to a particular lexer rule the constant will be declared in your generated lexer .", "However the - type X command can be used in any lexer rule to reassign tokens produced by that rule to another type .", "If the value 20 is assigned to the token named Foo then the first token in your listing was produced by either a lexer rule named Foo or a lexer rule containing the action - type foo or you have a user-defined action which explicitly assigns the type Foo to a token produced by some other rule this will be code you wrote not code generated by ANTLR .", "I think the definition of a start rule is a node which has no other pointers to it does anyone have a working solution to find the start rule for these grammars", "Technically you can use any parser rule as a start rule .", "It only depends on which part of the grammar you want to parse in the code which method you invoke .", "But usually you look for the more abstract composition in the domain of the grammar usually something like program document or query .", "There is no hard rule .", "yes : I wanted a method without manually looking .", "I want the root node for the AST .", "It doesnt take long but it would be handy to be able to detect the root node .", "The root node depends on the rule you used to start parsing .", "It s only a matter of definition what you consider the start rule .", "As a rule of thumb : usually but not always the rule that is meant to be the most used entrance is at the top of a grammar file .", "I can see the confusion the specific start rule which I am after is the rule which can be used to parse all the constructs in the file .", "I don t know the terminology but what im after is the highest root possible in the grammar file .", "Another confusion is that I am not trying to find a start rule im trying to find a specific start rule which defines the start of the whole language .", "The start terminology I used here is conflicting with start rule", "To find the root start rule I have implemented a ANTLR tree listener which creates an adjacency-list of all the rules in an ANTLR grammar and check to see if no other grammar rule references it .", "This would give a hint as to what the start rule might be .", "To run this you will need the antlr grammar taken from Antlr 4 grammar https : github.com antlr grammars-v4 tree master antlr4 .. . .. . Here is the listener implementation : .. . .. . RootFinder.java .. . .. . and here is the Main program that runs it .. . .. . Main.java", "Except I m starting run .. . .. . grun Expr prog -gui .. . .. . But show this error : .. . .. . Exception in thread main java.lang.ExceptionInInitializerError at sun.reflect.NativeConstructorAccessorImpl.newInstance0 Native Method at sun.reflect.NativeConstructorAccessorImpl.newInstance NativeConstructorAccessorImpl.java : 39 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance DelegatingConstructorAccessorImpl.java : 27 at java.lang.reflect.Constructor.newInstance Constructor.java : 513 at org.antlr.v4.runtime.misc.TestRig.process TestRig.java : 166 at org.antlr.v4.runtime.misc.TestRig.main TestRig.java : 142 Caused by : java.lang.UnsupportedOperationException : java.io.InvalidClassException : org.antlr.v4.runtime.atn.ATN Could not deserialize ATN with version 3 expected 2 .", "I follow instruction Getting Started with ANTLR v4 with simple grammar no problem with other instruction .", "But I have one problem .", "at org.antlr.v4.runtime.atn.ATNSimulator.deserialize ATNSimulator.java : 114 at ExprLexer .", ".. . 8 more .. . .. . Anyone have an Idea", "Thanks in Advance .", "Case closed .", "Few day before I download 4.0 version actually .", "But I don t know if later I download the latest version .", "because after few a day I download again to replace 4.0 version some part has error in javac command .", "Unexpected I download 4.1 version .", "Classical issue in export CLASSPATH .bash-profile has been updated .", "Try stable version.. . that s it", "I want to export ANTLR4 rules in the railroad format .", "Please notice that this format is not the same as generated by command-line option -atn .", "I am looking for something like http : clapham.sourceforge.net .. . .. . clapham generates what I want from BNF .", "Is there any tool to convert from antlr4 to BNF", "question probably related to Generate BNF diagrams from an antlr grammar", "http : stackoverflow.com questions 18436796 generate-bnf-diagrams-from-an-antlr-grammar but notice I am not asking the same thing here .", "Converting to BNF is just a workaround what I want is to generate the railroad diagram directly from ANTLR grammar .. . .. . Following the answer for Generate BNF diagrams from an antlr grammar", "http : stackoverflow.com questions 18436796 generate-bnf-diagrams-from-an-antlr-grammar worked for me .. . .. . Just get your ANTLR grammar send to http : bottlecaps.de convert and then to http : bottlecaps.de rr ui .. . .. . ANTLR4 expressions such as WS : t r n + - skip could not be processed so I ve changed to the traditional form WS : : x9 xD xA .. . .. . Clapham could not work with the BNF grammar generated by http : bottlecaps.de convert unfortunately .", "This is a way to get the diagram but this is not programatically .", "I wish I had some JAR I could just add to generate on the fly .", "Here s a library I wrote that you can execute from the command-line or embed into your own code to generate PNG or SVG railroad diagrams from ANTLR 4 grammar rules : .. . .. . https : github.com bkiers rrd-antlr4", "Checkout ANTLR 4 IDE : https : github.com jknack antlr4ide .. . .. . Here is a Java.g4 to HTML example : http : jknack.github.io antlr4ide Java Javav4.g4.html .. . .. . You will find images under the http : jknack.github.io antlr4ide Java images directory .", "Thanks", "sounds impressive .", "can i generate the diagram from the command-line", "d-oh", "I missed that from you question and no you can t do it from command-line :", "er - where-in antlr4ide can I generate the diagram", "I am using Java 7 .", "Updated antlr config file to point to Java 7 .", "And looking at other issues on StackOverflow and elsewhere seems like the fact that NetBeans annotation-processor-compiled-with-RELEASE 6 but need 7 warning is a non-issue .", "I do get these warnings in the ANTLR TestRig java Window many times for different compiled in annotations I guess .", "- Help me please get my GUI Tree back", ".. . .. . More Information : .. . .. . Show tokens Print tree Show tree in GUI all three check-boxes are Checked .", "Encoding is UTF-8 and the checkbox is CHecked as well ." ] }
{ "confidence": [ 55.43846893310547, 40.15867614746094, 35.5218391418457, 32.137123107910156, 31.2004451751709, 29.91084098815918, 26.424232482910156, 26.27570343017578, 25.952287673950195, 24.661813735961914, 21.070302963256836, 21.070302963256836, 14.785722732543945, 11.359052658081055, 11.359052658081055 ], "content": [ "Question : I downloaded antlrworks2 from the tunnel vision labs website and tried to install it by running the antlrworks2.exe but getting the error antlrworks2.exe is not a valid win32 application . I tried it on Win server 2003 as well as Win 7 32-bit but I got the same error . I am using VS 2008 for development as the target language would be C . Is that the right way to install antlrworks I believe antlrworks is a stand alone application or do I also need to install antlr Has it got any dependency .. . Answer : I know of an issue where the problem you describe appears on Windows XP but haven t heard of this on Windows Vista or later . The problem will be fixed for ANTLRWorks 2.0.1 . 7 Support running ANTLRWorks 2 on Windows XP https : bitbucket.org sharwell antlrworks2 issue 7 support-running-antlrworks-2-on-windows-xp .. . .. . ANTLRWorks 2 requires you to install Java before running it . I am not sure whether or not it will work with just the JRE runtime only installed so to be on the safe side I recommend installing the JDK development kit . I recommend Java 7 for its performance advantages the current release is 7u13 . Java SE Development Kit 7 Downloads http : www.oracle.com technetwork java javase downloads jdk7-downloads-1880260.html", "Question : Hi Team .. . I m new to Antlr and I have spent 4 days trying to learn install run tutorials and integrate with my IDE . : .. . .. . I can run this tutorial 1 in the Terminal successfully . My goal now is to run the same tutorial in Netbeans with AntlrWorks2 I have cannibalised the Main from Here 2 . The code compiles but when I run I get an java.lang.ExceptionInInitializerError from init of the Lexer . 1 : http : www.antlr.org wiki display ANTLR4 Getting+Started+with+ANTLR+v4 .. . 2 : http : www.certpal.com blogs 2011 01 antlr-tutorial-hello-antlr .. . .. . Grammar : .. . .. . Main : .. . .. . .. . .. . Error : .. . .. . .. . .. . ANSWER : antlr4 : ATN version 2 expected 3 http : stackoverflow.com questions 18180103 antlr4-atn-version-2-expected-3 .. . Answer : Your parser was generated with ANTLR 4.0 but you are trying to execute it with ANTLR 4.1 . The most likely cause of this is using ANTLRWorks 2.0 to generate the parser which internally uses ANTLR 4.0 . I m in the process of releasing ANTLRWorks 2.1 which will correct this mismatch . - 280Z28 .. . .. . Answer is Here http : stackoverflow.com questions 18180103 antlr4-atn-version-2-expected-3", "Question : I am using Java 7 . Updated antlr config file to point to Java 7 . And looking at other issues on StackOverflow and elsewhere seems like the fact that NetBeans annotation-processor-compiled-with-RELEASE 6 but need 7 warning is a non-issue . I do get these warnings in the ANTLR TestRig java Window many times for different compiled in annotations I guess . Sample : .. . .. . When my grammar VCFG.g4 is opened in ANtlrworks2 - there are no warnings no errors . Previously when I did a run Run in TestRig an passed it an input file EVEN IF the input file was invalid didn t adhere to the grammar ANTLRworks2 still used to pop-up the tree and indicate errors in input file if any . - Help me please get my GUI Tree back .. . .. . More Information : .. . .. . Show tokens Print tree Show tree in GUI all three check-boxes are Checked . Encoding is UTF-8 and the checkbox is CHecked as well . The ANTLR Codegen java Window tab has no errors It s message : .. . .. . Thank you . Comment : ANTLRWorks should work fine with Java 8 . The warning you are seeing about Java 6 is a side effect of ANTLR supporting but not requiring Java 6 . Comment : thanks and just looked further and looks like netbeans annotation components were compiled WITH java-6 and that s what the complaint is about . Am editing the question because problem still remains - correcting it to ask - why tree not visible enough though sample grammar incorrect - it used to popup earlier... . .. . Answer : This was answered somewhere else . After removing the Package Statement in the header and reloading the g4 in ANTLR Works 2.1 it started showing the tree . Support for package or other headers is probably due in future version . Comment : You should not include a package statement in an ANTLR 4 grammar itself . Instead use the -package command-line argument when you invoke the ANTLR tool to generate your parser the Maven plugin always does this automatically according to the location of the file in the project structure .", "Question : I am using ANTLR v . 4.5.2 ANTLRWorks 2.1 and the made available grammar https : github.com antlr grammars-v4 tree master tsql for tSQL right now . ANTLRWorks generates me a perfect parse-tree from my SQL code but I want to use ANTLR in my webapplication without ANTLRWorks . I already generated my tsql.tokens BaseListener lexer and so on but how can I call ANTLR from an already existing Java class I don t need the parse-tree as graphic I need just Java objects for the parse-tree nodes for example SET STATEMENTS .. . Answer : Once generated from .g4 files those Java source files can be include in your Java project and compiled together with your other files . You don t need those .g4 files to be compiled at runtime . Comment : ok but I have one more question : can you tell me which methods I need to call and to overhand my String my SQL code -- or a refer link thanks Comment : @NappyBoy there are tons of examples on Google theendian.com blog http : www.theendian.com blog antlr-4-lexer-parser-and-listener-with-example-grammar so search for them and learn from them .", "Question : null .. . Answer : I have downloaded ANTLRWorks 2 created new file with File- New and pasted Hello sample into it .. . .. . I can see Syntax Diagram after that but can t do anything else . For example Run menu having 3 items totally dimmed and no clues how to undim them .", "Question : ANTLRWorks 1.5 has an Interpreter tab where you could enter strings to test your parser on . So far I haven t been able to find anything equivalent in ANTLRWorks 2 . Does it have anything like that and if so how is it accessed .. . Answer : I have been looking for that feature as well . The only way I have found is the menu Run Run in TestRig.. . . Unfortunately the input has to be provided in a file . TestRig http : i.stack.imgur.com VhvL8.png", "Question : So i am using Antlrworks 2 working on a rather large grammar . Problem is that in this grammar there are multiple ambiguities that i am trying to work through . I was wondering if there is a way to interpret which rules were invoked when there was a failure . For instance when i run my rule i get following output .. . .. . I am wondering what @0 0 : 1 99 20 1 : 0 means . Do the @0 or 20 have any relationship to the rule number in my grammar or something .. . Answer : Here is a breakdown of the default token formatting . The TokenType field generally corresponds to a particular lexer rule the constant will be declared in your generated lexer . However the - type X command can be used in any lexer rule to reassign tokens produced by that rule to another type . If the value 20 is assigned to the token named Foo then the first token in your listing was produced by either a lexer rule named Foo or a lexer rule containing the action - type foo or you have a user-defined action which explicitly assigns the type Foo to a token produced by some other rule this will be code you wrote not code generated by ANTLR .", "Question : Hi Team .. . I m new to Antlr and I have spent 4 days trying to learn install run tutorials and integrate with my IDE . : .. . .. . I can run this tutorial 1 in the Terminal successfully . My goal now is to run the same tutorial in Netbeans with AntlrWorks2 I have cannibalised the Main from Here 2 . The code compiles but when I run I get an java.lang.ExceptionInInitializerError from init of the Lexer . 1 : http : www.antlr.org wiki display ANTLR4 Getting+Started+with+ANTLR+v4 .. . 2 : http : www.certpal.com blogs 2011 01 antlr-tutorial-hello-antlr .. . .. . Grammar : .. . .. . Main : .. . .. . .. . .. . Error : .. . .. . .. . .. . ANSWER : antlr4 : ATN version 2 expected 3 http : stackoverflow.com questions 18180103 antlr4-atn-version-2-expected-3 .. . Answer : It sounds like there might be a version issue . ANTLR generates serialized ATN augmented transition networks that have a special format that can change from version to version like 4.0 to 4.1 . it s possible that your loading source code generated from the command-line in one version and the latest AW2 in NetBeans is trying to read it with a different version . Comment : Yep I just found the answer here . stackoverflow.com questions 18180103 http : stackoverflow.com questions 18180103 antlr4-atn-version-2-expected-3 Comment : WOAH just realised who you are thanks for responding .", "Question : null .. . Answer : When I run Lexer+Parser combined using g4 grammar I get .. . .. . No . of Tokens 9 line 1 : 1 mismatched input module expecting Verilog2001Visitor VisitR Visit Symbol module Rule 74 range Line 2 module kuku a b .. . .. . The Buid is clean no warnings errors . What s the best practice to .. . .. . 1 . find out the root cause for the mismatched input error .. . 2 . find out why incorrect rule range is being used .. . .. . I use Antlrworks2 VS2010 Pro Win XP SP3 .. . .. . here is my code : Comment : How do you run it What do you run exactly Comment : i run my C program which calls lexer parser visitor Comment : Here is my code :", "Question : I have been looking at the grammars located at : .. . .. . Antlr 4 grammars https : github.com antlr grammars-v4 .. . .. . and I have been using Antlrworks 2 to view them however I am finding it difficult to locate the start rule for the entire grammar . I think the definition of a start rule is a node which has no other pointers to it does anyone have a working solution to find the start rule for these grammars Comment : Technically you can use any parser rule as a start rule . It only depends on which part of the grammar you want to parse in the code which method you invoke . But usually you look for the more abstract composition in the domain of the grammar usually something like program document or query . There is no hard rule . Comment : yes : I wanted a method without manually looking . I want the root node for the AST . It doesnt take long but it would be handy to be able to detect the root node . Comment : The root node depends on the rule you used to start parsing . It s only a matter of definition what you consider the start rule . As a rule of thumb : usually but not always the rule that is meant to be the most used entrance is at the top of a grammar file . Comment : I can see the confusion the specific start rule which I am after is the rule which can be used to parse all the constructs in the file . So if you took the grammar it could be used to recognize any file of that language as opposed to a subset of files . I don t know the terminology but what im after is the highest root possible in the grammar file . Another confusion is that I am not trying to find a start rule im trying to find a specific start rule which defines the start of the whole language . The start terminology I used here is conflicting with start rule .. . Answer : To find the root start rule I have implemented a ANTLR tree listener which creates an adjacency-list of all the rules in an ANTLR grammar and check to see if no other grammar rule references it . This would give a hint as to what the start rule might be . To run this you will need the antlr grammar taken from Antlr 4 grammar https : github.com antlr grammars-v4 tree master antlr4 .. . .. . Here is the listener implementation : .. . .. . RootFinder.java .. . .. . and here is the Main program that runs it .. . .. . Main.java", "Question : I want to export ANTLR4 rules in the railroad format . Please notice that this format is not the same as generated by command-line option -atn . The railroad format is generated by antlrworks but I d like to generate this programatically . I am looking for something like http : clapham.sourceforge.net .. . .. . clapham generates what I want from BNF . Is there any tool to convert from antlr4 to BNF question probably related to Generate BNF diagrams from an antlr grammar http : stackoverflow.com questions 18436796 generate-bnf-diagrams-from-an-antlr-grammar but notice I am not asking the same thing here . Converting to BNF is just a workaround what I want is to generate the railroad diagram directly from ANTLR grammar .. . .. . Following the answer for Generate BNF diagrams from an antlr grammar http : stackoverflow.com questions 18436796 generate-bnf-diagrams-from-an-antlr-grammar worked for me .. . .. . Just get your ANTLR grammar send to http : bottlecaps.de convert and then to http : bottlecaps.de rr ui .. . .. . ANTLR4 expressions such as WS : t r n + - skip could not be processed so I ve changed to the traditional form WS : : x9 xD xA .. . .. . Clapham could not work with the BNF grammar generated by http : bottlecaps.de convert unfortunately . This is a way to get the diagram but this is not programatically . I wish I had some JAR I could just add to generate on the fly . .. . Answer : Here s a library I wrote that you can execute from the command-line or embed into your own code to generate PNG or SVG railroad diagrams from ANTLR 4 grammar rules : .. . .. . https : github.com bkiers rrd-antlr4", "Question : I want to export ANTLR4 rules in the railroad format . Please notice that this format is not the same as generated by command-line option -atn . The railroad format is generated by antlrworks but I d like to generate this programatically . I am looking for something like http : clapham.sourceforge.net .. . .. . clapham generates what I want from BNF . Is there any tool to convert from antlr4 to BNF question probably related to Generate BNF diagrams from an antlr grammar http : stackoverflow.com questions 18436796 generate-bnf-diagrams-from-an-antlr-grammar but notice I am not asking the same thing here . Converting to BNF is just a workaround what I want is to generate the railroad diagram directly from ANTLR grammar .. . .. . Following the answer for Generate BNF diagrams from an antlr grammar http : stackoverflow.com questions 18436796 generate-bnf-diagrams-from-an-antlr-grammar worked for me .. . .. . Just get your ANTLR grammar send to http : bottlecaps.de convert and then to http : bottlecaps.de rr ui .. . .. . ANTLR4 expressions such as WS : t r n + - skip could not be processed so I ve changed to the traditional form WS : : x9 xD xA .. . .. . Clapham could not work with the BNF grammar generated by http : bottlecaps.de convert unfortunately . This is a way to get the diagram but this is not programatically . I wish I had some JAR I could just add to generate on the fly . .. . Answer : Checkout ANTLR 4 IDE : https : github.com jknack antlr4ide .. . .. . Here is a Java.g4 to HTML example : http : jknack.github.io antlr4ide Java Javav4.g4.html .. . .. . You will find images under the http : jknack.github.io antlr4ide Java images directory . Thanks Comment : sounds impressive . can i generate the diagram from the command-line Comment : d-oh I missed that from you question and no you can t do it from command-line : Comment : er - where-in antlr4ide can I generate the diagram", "Question : null .. . Answer : I follow instruction Getting Started with ANTLR v4 with simple grammar no problem with other instruction . But I have one problem . Except I m starting run .. . .. . grun Expr prog -gui .. . .. . But show this error : .. . .. . Exception in thread main java.lang.ExceptionInInitializerError at sun.reflect.NativeConstructorAccessorImpl.newInstance0 Native Method at sun.reflect.NativeConstructorAccessorImpl.newInstance NativeConstructorAccessorImpl.java : 39 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance DelegatingConstructorAccessorImpl.java : 27 at java.lang.reflect.Constructor.newInstance Constructor.java : 513 at org.antlr.v4.runtime.misc.TestRig.process TestRig.java : 166 at org.antlr.v4.runtime.misc.TestRig.main TestRig.java : 142 Caused by : java.lang.UnsupportedOperationException : java.io.InvalidClassException : org.antlr.v4.runtime.atn.ATN Could not deserialize ATN with version 3 expected 2 . at org.antlr.v4.runtime.atn.ATNSimulator.deserialize ATNSimulator.java : 114 at ExprLexer . ExprLexer.java : 64 .. . 6 more Caused by : java.io.InvalidClassException : org.antlr.v4.runtime.atn.ATN Could not deserialize ATN with version 3 expected 2 . .. . 8 more .. . .. . Anyone have an Idea Thanks in Advance . Comment : Case closed . Few day before I download 4.0 version actually . But I don t know if later I download the latest version . because after few a day I download again to replace 4.0 version some part has error in javac command . Unexpected I download 4.1 version . Classical issue in export CLASSPATH .bash-profile has been updated . Comment : Try stable version.. . that s it", "Question : I have an ANTLR 4 grammar : .. . .. . I m using it like this : .. . .. . But this gives me : .. . .. . What am I doing wrong I m using antlr v4.1 . Thanks in advance for helping . .. . Answer : fragment lexer rules can only be used by other lexer rules : these will never become a token on their own . Therefor you cannot use fragment rules in parser rules . Comment : Oh I see . Thanks .", "Question : I was searching for a way or tool to convert the regular expression into the ANTLR 4 expression but could not find anything suitable . Now i m curious Can we actually convert it or not . If not then i assume ANTLR 4 expression and regular expression looks same look-wise but are totally different . Please correct if I m wrong . .. . Answer : ANTLR lexer rules are actually regular expressions in the formal sense . This means you won t get pattern-matching features like lookahead lookbehind captures etc out of the box . You can insert custom code in the rules if you need more control over the matching process . As for the syntax it s a bit different from the standard regex syntax . For instance in ANTLR you write a-z instead of a-z" ] }
[ "yes-answer-long", "yes-answer-short" ]
parser-generator
UNK_RELATION
tidesdk@desktop@91
tidesdk -- tidesdk is an open-source software development kit for creating multi-platform @placeholder apps using html5 css3 javascript and other common scripting languages .
{ "confidence": [ 106.91803741455078, 85.2109146118164, 56.26346969604492, 52.8586311340332, 52.3963508605957, 52.09675216674805, 51.219268798828125, 46.70094299316406, 46.28057861328125, 45.58390808105469, 45.58269119262695, 45.563907623291016, 45.37083053588867, 44.960205078125, 43.972572326660156, 43.69704055786133, 43.606571197509766, 43.28623962402344, 43.17903137207031, 42.87425231933594, 42.566349029541016, 42.555328369140625, 42.50696563720703, 41.958126068115234, 41.84854507446289, 41.844913482666016, 41.604576110839844, 41.570350646972656, 41.48064422607422, 41.48064422607422, 41.48064422607422, 41.316017150878906, 41.316017150878906, 41.14336395263672, 40.53414535522461, 40.53414535522461, 40.50314712524414, 40.46937561035156, 39.87196350097656, 39.87196350097656, 39.87196350097656, 39.87196350097656, 39.87196350097656, 39.69137954711914, 39.22407150268555, 39.19969940185547, 39.19969940185547, 39.19969940185547, 39.19969940185547, 39.19969940185547, 39.19969940185547, 39.08205795288086, 39.08205795288086, 39.08205795288086, 39.08205795288086, 38.86069869995117, 38.86069869995117, 38.80475997924805, 38.51490783691406, 38.51490783691406, 38.51490783691406, 38.51490783691406, 38.51490783691406, 38.51490783691406, 38.51490783691406, 38.51490783691406, 38.51490783691406, 38.500370025634766, 38.4022331237793, 37.920833587646484, 37.827327728271484, 37.762691497802734, 37.723655700683594, 37.59101867675781, 37.59101867675781, 37.59101867675781, 37.59101867675781, 37.59101867675781, 37.59101867675781, 37.59101867675781, 37.59101867675781, 37.47338104248047, 37.47338104248047, 37.335025787353516, 37.22853469848633, 37.210899353027344, 36.80845642089844, 36.790836334228516, 36.6977424621582, 36.540042877197266, 36.5238151550293, 36.5238151550293, 36.5144157409668, 36.154014587402344, 36.154014587402344, 36.154014587402344 ], "content": [ "Consolidating my update with feedback from the TideSDK developers : .. . .. . TideSDK http : tidesdk.org formerly Titanium Desktop is an open-source software development kit for creating multi-platform desktop apps using HTML5 CSS3 JavaScript and other common scripting languages .", "Comprehensive Guides on their Way .. . .. . TideSDK is an open-source software development kit for creating multi-platform desktop apps using HTML5 CSS3 and JavaScript .", "It is not possible to build apps on the same platform with TideSDK .", "We will upgrade TideSDK to use the latest version of webkit with TideSDK 1.4 in october to give you full HTML5 and CSS3 support along with the HTML5 Canvas which you can use for javascript image-processing .", "This appears to be an open issue with TideSDK : https : github.com TideSDK TideSDK issues 196", "TideKit is an application development platform for desktop web and mobile whereas TideSDK is a desktop SDK Software Development Kit .", "It will provide a GUI for creating running and packaging TideSDK apps .", "Or the TideSDK", "I writting a desktop application by tideSDK use HTML5 .", "The team abandoned TideSDK .", "The TideSDK team is currently developing a TideSDK Builder app .", "Can you please file an issue github.com TideSDK TideSDK issues https : github.com TideSDK TideSDK issues", "I ve added the sdk for windows and macOs in my fork of TideSDK you can find them here : https : github.com zedissime TideSDK TideSDK downloads sdk windows TideSDK-1.3.1-beta-win-x86.zip", "I ve an older project using TideSDK to maintain .", "And I don t know how can drag the tidesdk windows with javascript .", "With TideSDK you can also use other common scripting languages such as Python PHP or Ruby to harness the skills you already possess as a web developer .", "https : github.com TideSDK TideSDK wiki Enabling-Web-Inspector for macos All the logs are not present in the TideSDK Developper tool .", "I created the issue github.com TideSDK TideSDK issues 190 https : github.com TideSDK TideSDK issues 190 I hope you understand .", "Is TideSDK going away", "you do not need a real daemon or a secondary script since TideSDK can provide on certain extension that inside TideSDK", "The roadmap for TideSDK includes the implementation of CommonJS for 1.4 which aims to provide developers with a more modular development experience using JavaScript .", "Latest version of Wunderlist is not built using TideSDK .", "TideSDK currently does not support Code hiding however the Developers of TideSDK are developing TideKit which is releasing soon with a new CLI app and will provide platform builds .", "Issues some TideSDK users have experienced with HTML5 compliance with websockets angular audio video and CSS3 have been eliminated .", "On OSX I have an old Appcelerator Titanium https : github.com appcelerator-titanium app that I want to migrate it to the new TideSDK platform https : github.com TideSDK TideSDK .", "If i write an desktop app in tidesdk or tide kit will it be possible for users to read my source code just like from ordinary web page or not", "Any news about svg or canvas support in TideSDK", "I used Notification of TideSDK .", "However does CodeIgniter work with TideSDK", "Is it possible to implement i18n in tidesdk application", "TideSDK is my personal choice to go with .", "I m testing the bundling of applications including Ruby scripts using TideSDK via the TideSDK Developer app .", "How I started using TideSDK : .. . .. . When you download the TideSdk you are given a page index.html .", "I m using TideSDK on Mac OS X . .. . .. . I m trying to open a file that contains the dollar-sign on its name .", "NOTE : With the release of TideSDK 1.3.0 the SDK will be installed in a TideSDK folder as opposed to Titanium .", "The TideSDK team is hoping to bundle TideBuilder with the official TideSDK 1.3.0 release .", "there any way to do with tidesdk", "TideKit will have compatible APIs with TideSDK so it can be the same if you are porting a project from TideSDK to TideKit .", "How can I realize this in tideSDK", "TideSDK uses WebKit as underlying technology .", "Is there any way to connect TideSDK with JAVA", "Are these features currently supported in TideSDK 1.3.1", "I am the Project Lead for TideSDK .", "2 . start MyDaemon.php in and write to stdout script Ti.. . commands script - any direct JS code for TideSDK .. . 3 . write any msg to file1 and read from file2 TideSDK will read-write there and execute .. . 4 . write any msg to SQLite DB TideSDK will read DB on JS code Any other way .", "TideSDK remains usable to many .", "How do i bypass this error in TideSDK", "Your only choice is to use TideSDK Developer .", "TideKit was developed by the same core developers that developed TideSDK .", "you are right TideSDK is aging and pretty inactive today .", "I can t seem to find an event for this within TideSDK .", "First I ve read the tidesdk documentations over and over .", "I am using TideSDK Developer to create a new desktop app .", "I have a project I have coded using TideSDK .", "I m making an application to obtain a key using tideSDK with ruby .", "TideSDK support ruby-1.8.7 so I m using ruby-1.8.7 whatever .", "This is nonsensical....TideSDK state to ask questions on here yet no one from TideSDK actually responds .", "I ve fixed this bug in my fork and made pull request : https : github.com TideSDK TideSDK pull 233", "I m testing tidesdk http : www.tidesdk.org .", "Is it possible to use tideSDK to check what applications are running in the Operative System", "I have installed the TideSDK and downloaded the Hello World example but it doesn t launch .", "How I can run MyDaemon.php in background in TideSDK app", "TideSDK show status from MyDaemon.php and have few buttons to control it .", "I want run php from TideSDK like console mode .", "I include feature PHP and use button Package with Runtime in TideSDK Developer .", "And now the TideSDK project has shut down and it is impossible to download this SDK again .", "The TideSDK API itself provides no methods for image-manipulation so far .", "is tidesdk done for it hasn t been updated for 2 years right", "Issue 2 : I try to use .. . .. . But TideSDK can t start UI APP because can t take FULL source in frame .", "In other words what browser would tidesdk interpret the code most likely as .", "The TideSDK issue tracker contains several items tagged as feature requests https : github.com TideSDK TideSDK issues labels Feature+Request page 1 state open so I suggest that you submit your ideas there instead .", "While creating a platform for JavaScript developers much of the core engineering is in a variety of lower level languages that affect the speed of development .", "I have no idea where you have been clear to state that TideSDK will not be updated and the reasons why but it s certainly not on the TideSDk site .", "In TideSDK it is basically the same problem .", "TideSDK is no different than any web app for branding .", "I want to query with tideSDK a MS-SQL database .", "You can use PHP inside of TideSDK .", "ok there are a lot of ways to create storage content on tidesdk .", "There is also TideSDK http : tidesdk.org formally known as Titanium .", "The project is hosted on Github https : github.com TideSDK .", "The heart of TideSDK is an object bridge compiled into the WebKit component .", "Check out the google group : tidesdk@googlegroups.com", "What s the best way to do something like this using TideSDK", "I am using TideSDK to develop a desktop app for windows .", "Or do we have any other options like tideSDK .", "You can develop mobile desktop and web apps with TideKit and you can easily migrate from TideSDK to TideKit .", "In its simplest form it can be used in a similar way to TideSDK for app development but it has much greater capabilities .", "Using TideSDK how can I have a window with no Windows style border and keep it draggable", "We had already witnessed how quickly our technical advantages could be assimilated by competitors to our open-source TideSDK product .", "@Ward Where we left TideSDK unfortunately it did not have support for audio video tags in HTML5 .", "As for me however I m really not interested in any commercial solutions in this space so I think it s truly unfortunate that continuing development of TideSDK as an open-source project was not financially viable .", "Remember that TideSDK uses an old version of webkit .", "I decided to use NW.js instead TideSDK .", "NOTE : TideSDK is completing a transition from the former Titanium Desktop to the rebranded and updated TideSDK .", "I was looking at the way TideSDK uses Ruby internally or which possibilities did TideSDK offered regarding the integration with tools like RVM .", "This is a desktop app tidesdk exe i built with tidesdk it inserts users data into the db and then its supposed to print a copy of their registered info after successfull submission .", "here is the blog post about the comparison how TideKit would be better than TideSDK https : blog.tidekit.com post from-a-desktop-perspective-tidekit-for-tidesdk-developers" ] }
{ "confidence": [ 109.44853210449219, 72.72308349609375, 72.2271728515625, 65.57854461669922, 65.19292449951172, 64.7469711303711, 64.30305480957031, 62.97901153564453, 60.781394958496094, 60.02085876464844, 58.95447540283203, 58.29996871948242, 58.09861755371094, 58.038570404052734, 57.89737319946289, 57.21050262451172, 56.26655960083008, 56.09503936767578, 55.83079528808594, 55.69804763793945 ], "content": [ "Question : I want to develop a desktop app to be used cross-system win mac linux is there a GUI framework that would allow me to write code once for all 3 platforms and have a fully-scriptable embedded web-component I need it to have an API to communicate between app and webpage javascript . I know C JavaScript and a little bit of python . .. . Answer : There is also TideSDK http : tidesdk.org formally known as Titanium . This provides a WebKit HTML JavaScript widget that does pretty much everything you could want including running the Chrome developer tools . .. . .. . EDIT below . Consolidating my update with feedback from the TideSDK developers : .. . .. . TideSDK http : tidesdk.org formerly Titanium Desktop is an open-source software development kit for creating multi-platform desktop apps using HTML5 CSS3 JavaScript and other common scripting languages . The project is hosted on Github https : github.com TideSDK . The main web site has comprehensive documentation and hosts an active developer community . Thousands of developers have used the former Titanium Desktop to develop deskop applications . Perhaps the most recognized applications is Wunderlist http : www.6wunderkinder.com wunderlist .. . .. . TideSDK allows you to use your web development skills to create desktop apps and provides wide range of privileged APIs . You can easily extend the functionality of your app using mature libraries in python php or ruby . The heart of TideSDK is an object bridge compiled into the WebKit component . The bridge allows other scripting languages - python php or ruby - to run on the HTML page using script tags in the DOM just like JavaScript . You can also directly call .py .rb or .php files from within your application . TideSDK can be used with no more than a basic text-editor - it does not need any special tools or an IDE although many developers prefer richer tools . TideSDK includes command-line tools for running your application locally for development and debugging and also to package it into an installer for the OS that you are developing on Windows Mac OSX and Linux are supported . To get all the needed installers a typical TideSDK development-environment will include a physical or virtual-machine for each OS . The TideSDK team is looking to implement a different and better way soon . The TideSDK team is currently developing a TideSDK Builder app . It will provide a GUI for creating running and packaging TideSDK apps . To get developers started faster TideSDK Builder introduces a new feature - Scaffolds . Scaffolds generate all the boiler plate to instantiate a projects with specific patterns of development such as Backbone MVC . Developers can use TideSDK Builder to create import and share scaffolds . The roadmap for TideSDK includes the implementation of CommonJS for 1.4 which aims to provide developers with a more modular development experience using JavaScript . Hello World .. . .. . A TideSDK project consists of some boilerplate code with a Resources folder that contains the core project files . The following illustrates the stucture of a simple hello world app that will run on all supported plaforms : .. . .. . The manifest contains information about the runtime modules used by the project . tiapp.xml provides configuration and default app logo.png is the image that will appear by default in the dock system-tray or in the windows of your app . The following is the contents of the app.js file for the hello world example as it will appear in TideSDK 1.3.0 . Previous versions will have used the Titanium namespace which has been discontinued . Here is the HTML for the same app . It calls the script above . In less than 10 lines of JavaScript code we create a menu adding File and Exit menu items and set it to the main window . A simple callback method is used to pop open a exit confirmation dialog . If the user confirms the app will exit . Background .. . .. . Titanium was developed by Appcelerator http : www.appcelerator.com and made available under the Apache 2 Licence . Originally Appcelerator provided the open-source Titanium Developer to create projects . Later Appcelerator introduced the closed source Titanium Studio an IDE on top of Aptana . While it currently remains possible to develop TideSDK in Titanium Studio a plugin may be required in the future . Andrew : sorry this is not clear to me . A plugin to Titanium Studio Or Aptana Or the TideSDK Appcelerator has supplied an TiStudio SDK to use to use that might assist us in creating a plugin to TiStudio to allow TideSDK to be used through TiStudio Comment : I vouch that TideSDK is a full solution to being able to develop desktop applications without the painful mess of leaning Objective C and C etc.. . Comment : I ve heard of titanium but it looks like they ve made great progress it looks promising I m going to try it thanks Comment : This looks great . How in the world do you compile it I cannot find any information on how to get it from a directory structure to an application . Comment : @preahkumpii : The TideSDK contains a build package script called tibuild.py . On Mac this is under not in Library Application Support Titanium sdk . For Windows see developer.appcelerator.com question 73271 http : developer.appcelerator.com question 73271 how-to-package-your-desktop-app-yourself-ie-not-use-the-cloud . Run this script no args gives you the command-line parameters and help . My command-line is : tibuild.py -r -d build appname Comment : @AndrewAlcock Wow thanks for the explanation . I was using Ti Dev Community with some success for the moment . I am looking forward to when they get a GUI version of TideSDK compiler available .", "Question : I have downloaded the legacy 1.2.0.RC4 from the http : tidesdk.org . What do I do with it following the download . How do I get started .. . Answer : Comprehensive Guides on their Way .. . .. . TideSDK is an open-source software development kit for creating multi-platform desktop apps using HTML5 CSS3 and JavaScript . With TideSDK you can also use other common scripting languages such as Python PHP or Ruby to harness the skills you already possess as a web developer . TideSDK is the best way to create unique desktop apps using simple web technologies . The TideSDK team is currently preparing comprehensive guides to support our users . As they become available the guides will be hosted with the API documentation at : .. . .. . http : tidesdk.multipart.net docs user-dev generated guide .. . .. . Please check back frequently as a number of guides are reaching completion . NOTE : TideSDK is completing a transition from the former Titanium Desktop to the rebranded and updated TideSDK . Therefore the legacy 1.2.0.RC4 will be short lived since TideSDK 1.3.0 is targeted for the end of September 2012 . Despite this the legacy 1.2.0.RC4 will get you started on your desktop app development today . Because there will be no API changes for TideSDK 1.3.0 you can expect everything you create in 1.2.0.RC4 to work in the upcoming release . There will be a namespace change though that you need to be aware of . In the legacy 1.2.0.RC4 the namespace for the API is Titanium . In the upcoming TideSDK 1.3.0 the namespace has been shortened to Ti . To prepare for the namespace change you can add the following to your code : .. . .. . Include this somewhere in your JavaScript before the API calls to the SDK are made . When TideSDK 1.3.0 releases you can just remove this line . To keep up to-date with announcements and timing of the upcoming TideSDK 1.3.0 release please follow us on twitter at : .. . .. . http : twitter.com TideSDK .. . .. . or join our mailing list at : .. . .. . https : groups.google.com forum forum tidesdk .. . .. . Platform Support for 1.2.0.RC4 .. . .. . The legacy 1.2.0.RC4 SDK can be used on the following platforms : .. . .. . MacOSX 10.6.x Snow Leopard with Xcode 3.x .. . Ubuntu 10.10 x86 .. . Ubuntu 10.10 x86-64 .. . Ubuntu 10.10 x86-64 .. . Ubuntu 11.04 x86 .. . Windows 7 x86 .. . Windows 7 x86-64 .. . Windows XP x86 .. . .. . NOTE : The limitation of support for the most recent OS versions is a short term issue that has already been resolved . If you are on a OSX Lion or Mountain Lion a possible short term solution is to install a Windows virtual-machine until TideSDK 1.3.0 reaches a release . TideSDK 1.3.0 will bring updates and upgraded libraries to support the following : .. . .. . Ubuntu 12.04 x86 .. . Ubuntu 12.04 x86-64 .. . MacOSX 10.7.x Lion Xcode 4.x x86-64 .. . MacOSX 10.8.x Mountain Lion Xcode 4.x x86-64 .. . Windows XP x86 .. . Windows 7 x86 .. . Windows 7 x86-64 .. . Windows 8 x86 .. . Windows 8 x86-64 .. . .. . Simple Steps From Download to Packaging .. . .. . The following steps will help you do the following : .. . .. . install the SDK for your platform .. . install a helper app to assist you to create and run your app for development .. . clone and import a Hello World example app to experiment with .. . package an app locally for your platform .. . .. . STEP 1 : Download and extract the SDK .. . .. . To get the SDK visit tidesdk.org and click on the Download 1.2.0.RC4 button . https : github.com TideSDK TideSDK downloads .. . .. . The 1.2.0.RC4 SDK must be extracted into a specific folder for your operating-system : .. . .. . For Mac OSX : .. . .. . On Linux : .. . .. . On on Windows XP : .. . .. . On Windows 7 : .. . .. . The zip file will expand the contents and create overlay some new directories for 1.2.0.RC4 . NOTE : With the release of TideSDK 1.3.0 the SDK will be installed in a TideSDK folder as opposed to Titanium . STEP 2 : Download the TiDev Community App .. . .. . While TideSDK can be used with no more than a basic text-editor using an app to create run and bundle your app is recommended until you learn a bit more about the SDK . The TiDev Community app is suitable for this purpose . While TiDev Community is reaching the end of its useful life TideSDK Builder will soon take its place . The TideSDK team is hoping to bundle TideBuilder with the official TideSDK 1.3.0 release . To get TiDev Community download it from here for your supported platform : .. . .. . http : api.appcelerator.net p pages app page token m4rZLSv6 .. . .. . STEP 3 : Obtain the Hello World Example App .. . .. . For a first app a simple Hello World example is a good introduction . The Hello World app illustrates the the following : .. . .. . The use of the API to create a menu .. . Adding a menu item to a menu with a simple callback to prompt the user to exit the app .. . Displaying content using HTML and CSS . To get the TideSDK-HelloWorld app you can either clone the app if you have git installed or simply download the zip from the following location : .. . .. . https : github.com TideSDK TideSDK-HelloWorld .. . .. . STEP 4 : Importing the Example App into TiDev Community .. . .. . To import the Hello World example app into TiDev click on the Import button at the top left navigate to the folder containing the the app and select it . STEP 5 : Running the Example App .. . .. . To run the Hello World app click on Test Package button in the TiDev menu then click on the Launch App button in the lower left . The Hello World app will start and begin logging to the screen . Debugging statements you include in your code will appear . STEP 6 : Packaging the Example App Locally with the CLI .. . .. . When Appcelerator shifted its focus to mobile they removed the network packaging and update service for Titanium Desktop that was once available . Despite this packaging locally has always been one of the best options for bundling your app for distribution . In fact Appcelerator s service used this same process on the server that you are using locally . Within the legacy SDK a small CLI app tibuild.py is available . You will find tibuild.py in within the root folder of the SDK for your platform . You can use this tool for running your app or bundling it for distribution . tibuild.py has built-in help that can display its available options . To package an app using the CLI : .. . .. . Note : You can only do bundle packaging at the present time . Adjust the path so it is appropriate for your platform . This should build and package your app and create a installer for it . Change dest and package to the directories where you want to have the built app and installation package . You can omit the OS parameter since the builder can only generate builds for the current OS . Additional Information .. . .. . If you need more help while the comprehensive guides are being prepared please post your questions here on stackoverflow or consult our other support channels listed on our site at http : tidesdk.org . Comment : I love how you asked the question and answered it yourself . : . Comment : Go to api.appcelerator.net p pages app page token m4rZLSv6 http : api.appcelerator.net p pages app page token m4rZLSv6 click on Linux Intel 32-bit and .. . access denied What s up Comment : Not sure what is happening with that link for 32-bit . Please report to Appcelerator . Hopefully they can repair the download . We hope to have our own tool out soon so you don t need to rely on TiDev too much longer .", "Question : I have a project I have coded using TideSDK . What is the difference in purpose and support for platforms between TideSDK and TideKit Comment : This is not a StackOverflow question even if you edit it to be a question answer . It s a post for the product documentation instead . Please do not use StackOverflow to promote your product or project that s not what this site is designed to do . Comment : There are technical differences between the two pieces of software this is not promotion but valid question I am answering for our users to assist them in assessing differences in platform support . Comment : @KenWhite We have had this question come up in discussion on twitter and it this is about answering differences . Of course our documentation will spell what platforms we support but it will not clarify differences with other similarly named software which is what this question entails . I would appreciate if you could keep this in mind for those folks that will benefit from the answer i will prepare . Comment : I appreciate your opinion on this but we have folks that will be transitioning between the two types of software . We are making this point so that folks use either TideSDK or TideKit have a clearer understanding of the technical differences between these . We d like this question here to help them . Hope that clarifies this finally . Comment : Sorry but I still think this belongs on your own documentation pages . Voting to close . IMO this question appears to be off-topic because it is a product documentation post that should be on the product site perhaps as part of a FAQ section . .. . Answer : There are key technical differences between TideKit http : tidekit.com and TideSDK http : tidesdk.org despite the similar sounding name . TideKit is an application development platform for desktop web and mobile whereas TideSDK is a desktop SDK Software Development Kit . TideKit was developed by the same core developers that developed TideSDK . They went on to found CoastalForge http : coastalforge.com to create TideKit with the vision of creating for all screens and devices . From the source code of a single project an app can be built and packaged for each device bridging each language its user interfaces and capabilities . As of this date TideKit has been in development and is due to be released . Development can be following on Twitter at https : twitter.com tidekit .. . .. . TideKit is not a single tool piece of software UI or SDK Software Development Kit . It is a central hub for app development . TideKit combines remote software together with local software that you use on your system . Developers write code using their favourite text-editor and interact with TideKit through a CLI Command Line Interface or through interaction with the TideKit app . enter image description here http : i.stack.imgur.com cGX1f.png .. . .. . TideKit provides more than a single approach to development . In its simplest form it can be used in a similar way to TideSDK for app development but it has much greater capabilities . TideKit was designed to create ubiquitous apps for all screens and devices at one time . This is accomplished using CommonJS . You write your project code once then build and package it for virtually all operating systems and devices for mobile web and desktop . Development using TideKit is fully unified for client-server desktop mobile or web . The primary advantages are access ie developing in JavaScript instead of the core languages to get native features development speed everything can be created at a fraction of the time compared to developing for one platform lower development cost and more reach able to create for all platforms to monetize everywhere with a single effort . TideKit is for the whole of app development therefore it differs greatly in platform support that is summarized below . Despite these differences a TideSDK project may be migrated to TideKit with small changes in your code . TideKit .. . .. . Windows XP .. . Windows Vista .. . Windows 7 .. . Windows 8 .. . OSX 10.6 Snow Leopard .. . OSX 10.7 Lion .. . OSX 10.8 Mountain Lion .. . OSX 10.9 Mavericks .. . Ubuntu 12.04 .. . Ubuntu 12.11 .. . Ubuntu 13.04 .. . iOS 6 .. . iOS 7 .. . Android .. . Ubuntu Server .. . RedHat .. . CentOS .. . .. . TideSDK .. . .. . Windows XP .. . Windows Vista .. . Windows 7 .. . Windows 8 .. . OSX 10.6 Snow Leopard .. . OSX 10.7 Lion .. . OSX 10.8 Mountain Lion .. . Ubuntu 12.04 .. . Ubuntu 12.11", "Question : How I can run MyDaemon.php in background in TideSDK app MyDaemon.php - it s my completely ready console software a lot of code run other my php scripts run other software etc . It s endless php script . It must be start after TideSDK APP and live all time before exit while user don t close app . TideSDK show status from MyDaemon.php and have few buttons to control it . Issue 1 : How can I start MyDaemon.php in : .. . .. . What write in path to php from tide Target computer of my users don t have php package . I want run php from TideSDK like console mode . I include feature PHP and use button Package with Runtime in TideSDK Developer . I looked for all files inside TideSDK but there are nothing like php executing file only libs . Issue 2 : I try to use .. . .. . But TideSDK can t start UI APP because can t take FULL source in frame . MyDaemon.php is undless . How can I include IFRAME in ASYNC mode like a real browser I try to use this trick : .. . .. . But it s not work too UI APP started but halted after execute this frame . MyDaemon.php can communicate with TideSDK APP any way : .. . .. . 1 . start bin php -f MyDaemon.php and read-write stdin stdout . MyDaemon.php can write to stdout any commands in JSON format . 2 . start MyDaemon.php in and write to stdout script Ti.. . commands script - any direct JS code for TideSDK .. . 3 . write any msg to file1 and read from file2 TideSDK will read-write there and execute .. . 4 . write any msg to SQLite DB TideSDK will read DB on JS code Any other way . It s important : MyDaemon.php want to start in console other php files Because first process run a lot of childrens for calculating very long tasks . I can ask TideSDK for start this childrens and don t use exec bin php -f second.php in MyDaemon.php . But I don t want to include double PHP binaries to my APP because TideSDK APP already have it It s a lot of extra space in dist . Thank you and sorry for my language . .. . Answer : I think you should use Ti.Process.CreateProcess function where you can receive the output of the command you are using I m using JS syntax for this not php so I don t need to include extra libraries to execute commands or write read operations .. . .. . first you have a command cmd or shell command lets say ls -la www .. . then you need to send all the set of instruction as an array : var cmd ls -la www .. . then pass it to a var using Ti.Process.CreateProcess : var echo Ti.Process.CreateProcess cmd .. . to get the output you could pipe out the content to another set of instructions . the final program should look like this : .. . .. . Instead console.log you can pipe out the command output to your div . also besides main.html you cannot load another scripts besides that . TideSDK is not a web based structured platform where you can reach a secondary page inside of the domain accessing it through url like app : main.html is the only one to be loaded have tried with no luck to call other pages but instead modularize your app to load elements inside of the main page . now creating a daemon is a risk here . You need to be aware that depending on how you refresh the content it could increment severally the CPU usage . I can suggest you to use a javascript loop to a shell command using the content above written . you do not need a real daemon or a secondary script since TideSDK can provide on certain extension that inside TideSDK", "Question : Have just discovered TideSDK and look forward to the upcoming 1.4.0 build . I am utilizing the TideSDK Developer on Windows 7 32-bit and have the HelloWorld app up and running.. . now I am having fun trying lots of CSS3 HTML5 code-snippets to see what works with the current beta release . Trying to use Google webfonts does not seem to work.. . is this correct I saw old discussions about font usage on windows with appcelerator Titanium but don t know the current status . Is this expected to be included in the upcoming release I am very enthused about this project at it s current level of completion it is already amazing I plan to develop a desktop application for Windows Mac after I get a better understanding of TideSDK . I will be using jQuery and designing the app s UI with webpage-like techniques and not having to fight multiple HTML5 CSS3 implementations will be great Thanks for any suggestions about Google font usage . .. . Answer : Although upcoming release may solve font usage issues to include Google fonts I found that @font-face with SVG fonts works with current 1.3.1 TideSDK release . For example download TangerineBold Font Kit from Font Squirrel -- only need the SVG font . Then include the following in your style sheet : .. . .. . and style elements with : .. . .. . Further explanation added 3 19 2013 : I have given more details of custome font usage in TideSDK 1.3.1-beta on my blog here http : www.neologotech.com 2013 03 19 custom-fonts-in-windows-desktop-apps-created-with-tidesdk-1-3-1-beta", "Question : I am interested in creating a desktop application using HTML5+webkit and I d like to be able to build a stand-alone executables for various target platforms like a .exe file for Windows and a .dmg image for Mac OS . I have played around with node-webkit https : github.com shama nodewebkit which seems nice except for the packaging distribution portion . I also stumbled on TideSDK http : www.tidesdk.org but that project seems to be inactive . For example the latest release I saw was a beta from November of 2012 . Yet it seems the core developers have switched to developing TideKit https : www.tidekit.com instead . Does anyone here know if TideKit is intended as a replacement for TideSDK Is TideSDK going away etc . Comment : fyi anyone passing by : TideKit is defunct don t bother . .. . Answer : you are right TideSDK is aging and pretty inactive today . And you re also right we as a core team completely focus on TideKit now . TideKit is the future If you want to know the full story about why we stopped working on TideSDK and started TideKit I recommend you to read our first Q A . There you ll also find an answer about how we compete with node-webkit : .. . .. . https : blog.tidekit.com post your-questions-our-answers-01 .. . .. . We ve just reached the highest HTML5 score any app development platform ever achieved . If you want to know more about builds like the ones you mentioned for Windows and OS X you should read this .. . .. . Desktop Builds https : blog.tidekit.com post from-a-desktop-perspective-tidekit-for-tidesdk-developers Comment : Thanks it s always nice to get an authoritative answer i.e . from a core team member and BTW welcome to StackOverflow : Your product looks very appealing though the hype about HTML5 scores seems moot as one can grab the latest snapshot of webkit chromium bundle it and get 517+ and I wish you and your customers all the best . As for me however I m really not interested in any commercial solutions in this space so I think it s truly unfortunate that continuing development of TideSDK as an open-source project was not financially viable . Comment : @iX3 In fairness TideKit is not a repackaging of chromium but has extensive APIs to build web mobile and desktop apps using HTML5 hybrid and native technologies . Its key feature is the ability to create for virtually all platforms from a single-source of code . The recent 505 HTML score we celebrated is significant . Currently no modern browser wrapper node-webkit or atom implements a score this high at present . We are going further of course . Compliance is a high priority to ensure everyone can work with HTML5 s full capabilities . Demos are coming next . Comment : @fairwinds what do you mean Currently no modern browser .. . implements a score this high at present I just tested my default Chrome 35.0.1916.153 m and got a score of 507 555 at html5test.com http : html5test.com s 4576c0212df46621.html P.S . I realize there are some really cool features TideKit TideSDK and they take a lot of developer pain away which is great . I didn t mean to poo-poo your work just saying that it isn t ideal for me . Comment : @SvenSlootweg We ve been clear to state that TideSDK will not be updated and the reasons why . The work remains available for anyone to use . Its alright you feel the way you do but realize that with any open-source project there are no guarantees of continuity . We ve been public about our intentions and where we are placing our efforts . Comment : @fairwinds It took months after the abandoning for the TideKit banner to appear on the TideSDK site and it still doesn t clearly indicate that the project has been abandoned . I have no idea where you have been clear to state that TideSDK will not be updated and the reasons why but it s certainly not on the TideSDk site .", "Question : I am planning to develop an standalone app that will run on OSX and Windows using Html5 etc . I have been doing some analysis on some of the frameworks that will suite my needs . This is one of the blog that I came across . http : blog.neamlabs.com post 36584972328 2012-11-26-web-app-cross-platform-desktop-distribution .. . .. . This blog is an old one and I felt like tideSDK is promising So I would like to know whether tideSDK is production ready Or do we have any other options like tideSDK . .. . Answer : TideSDK is still in beta therefore it does not exactly provide what you are looking for . We are currently working on something new it is called TideKit . TideKit is a platform you can use to create native apps for web desktop and mobile from a single code base written in JavaScript . It also provides code hiding and everything you need to create a world-class native app for multiple devices not only desktop . If you are interested in TideKit follow us @TideKit on Twitter or watch our short video on YouTube http : www.youtube.com watch v aE7gN-d0GhU Comment : As of now I have few deadlines to meet.So If I go ahead with tideSDK in MAC then I can reuse source code to build the .exe in windows rite . At this point of time I am not worried about the deploying completely . I need to pass the .app and .exe files to my client so that they can use this app in their local machine to communicate with another app that we have already developed and deployed . Please correct me If I said something wrong As I have been not used to tideSDK . Comment : Yes using TideSDK you should be able to reuse your source code across Windows osx and ubuntu .", "Question : I can t seem to see any image handling detail on the TideSDK API http : tidesdk.multipart.net docs user-dev generated api . Is it possible to do image-manipulation Comment : Depends on what you call image-manipulation : .. . Answer : The TideSDK API itself provides no methods for image-manipulation so far . We will upgrade TideSDK to use the latest version of webkit with TideSDK 1.4 in october to give you full HTML5 and CSS3 support along with the HTML5 Canvas which you can use for javascript image-processing . Until then you can try and do image-manipulation with PHPs image functions since in the currently used PHP version GDlib v 2.0.34 is bundled . Find the function docs here : http : de.php.net manual en ref.image.php Comment : That s what I thought . : I just wanted to know if there was an undocumented way aside from the PHP approach . BTW I realized you were the same one who authored github.com Paratron Titanium-Autocomplete https : github.com Paratron Titanium-Autocomplete . Is there any chance of that PhpStorm library being updated to the latest SDK version Comment : Sure we already have a guide about that in our documentation http : tidesdk.multipart.net docs user-dev generated guide ide autocompletion Comment : Any news about svg or canvas support in TideSDK Comment : Hey yes - will propably never come . The team abandoned TideSDK . :", "Question : my plan is to using PHP in Tide . I read the guides and I didn t figured out if its possible to use it with a big application written in Symfony2 or other framework . I just saw this tag but I ve no clue how to startup my Symfony2 app . Is this possible Is there an additional resource to read .. . Answer : You can use PHP inside of TideSDK . Here is a good link-to the documentation on how to use PHP with TideSDK http : tidesdk.multipart.net docs user-dev generated guide using php . I have not used Symfony2 before but let me assure you that using javascript and html5 are two of the easiest languages are . How I started using TideSDK : .. . .. . When you download the TideSdk you are given a page index.html . Use this as your start and then use the link of the documentation I gave you . Please follow of the necessary steps to enable PHP in your project . That is the way that I started my project . Hopefully I helped you get started . Please let me know if I didn t answer your question and you wanted a more specific answer . Also make sure that you when you use the TideSDK Developer you switch the PHP button to on . Comment : Did that help you", "Question : I am interested in creating a desktop application using HTML5+webkit and I d like to be able to build a stand-alone executables for various target platforms like a .exe file for Windows and a .dmg image for Mac OS . I have played around with node-webkit https : github.com shama nodewebkit which seems nice except for the packaging distribution portion . I also stumbled on TideSDK http : www.tidesdk.org but that project seems to be inactive . For example the latest release I saw was a beta from November of 2012 . Yet it seems the core developers have switched to developing TideKit https : www.tidekit.com instead . Does anyone here know if TideKit is intended as a replacement for TideSDK Is TideSDK going away etc . Comment : fyi anyone passing by : TideKit is defunct don t bother . .. . Answer : There is a new kid on the block for this sort of projects : atom-shell https : github.com atom atom-shell Based in nodejs and used to create the great Atom editor https : atom.io .. . .. . Technical differences with node-webkit : https : github.com atom atom-shell blob master docs development atom-shell-vs-node-webkit.md .. . .. . Presentation at JSLA about Native NodeJS Apps : http : vimeo.com 97881078 Comment : atom-shell is now Electron https : github.com atom electron", "Question : I am using TideSDK Developer to create a new desktop app . I m not sure of the differences between TideSDK Developer and TiDev Community 1.3.03 I develop with php language . But I can t use Ti in my project . .. . Answer : TideSDK Developer was stripped down from TiDev Community 1.3 . TiDev community is not compatible with TideSDK and you cannot use it with code using the Ti namespace . Your only choice is to use TideSDK Developer . You must change the namespace on any API reference in a project created using the older TiDev Community to Ti for TideSDK Developer to build the project . Keep in mind TideKit is releasing soon with a new CLI app and will provide platform builds . You can follow recent developments at http : www.tidekit.com . The video of what is coming is here : http : youtu.be aE7gN-d0GhU . This will give you modern tools to use where the experience of creating and your projects is much better .", "Question : I m trying to make some app in TideSDK using Semantic-UI http : semantic-ui.com . When I open my page in Chrome it works correctly : .. . .. . chrome http : krakow45.pl test chrome.png .. . .. . but when I m launching my code with TideSDK it looks like : .. . .. . tide http : krakow45.pl test tide.png .. . .. . How you can see some elements are missing and it isn t work correctly . Here is my HTML : Comment : I m not sure but mybe webkit version in TideSDK is too old Comment : Please include your CSS . A Fiddle would help . .. . Answer : Remember that TideSDK uses an old version of webkit . I m pretty sure you ll have to prefix your CSS3 rules -webkit- . But also keep in mind that all the CSS3 rules cannot be used but for now I haven t encounter major CSS3 issues . Just one thing is bothering me it s the old developper console. . Comment : I decided to use NW.js instead TideSDK . NW.js uses newer or the newest version of webkit . Thank you at all :", "Question : If i write an desktop app in tidesdk or tide kit will it be possible for users to read my source code just like from ordinary web page or not Comment : How are you providing your application Are you handing over your source code Is it compiled into some executable All of this depends on language your using and how you are packaging it provide us more info.. . looking at their homepage it seems tidesdk creates EXECUTABLES so you don t have to worry about people seeing your messy messy code . Comment : Well that was rather a general question i don t have any app yet but at some point i might begin to write commercial desktop app and in such case i would prefer that users couldn t access its source code . .. . Answer : Yes if the user knows where to look . It s not viewable by right clicking the window and selecting source but if they browse to the install directory all the HTML related files are there in broad daylight . You could come up with some strategies to protect them either using encryption or just providing a bootstrapper application which downloads the rest of the source from a server on startup or something like that...but if it s a huge concern of yours you re probably better off using a different platform .", "Question : I am trying to build a simple app using tidesdk but unfortunately as stated here : .. . .. . http : stackoverflow.com a 14207566 1724929 .. . .. . that currently there is no way to protect the source code which is visible to the app users . but after taking a look at wunderlist http : www.wunderlist.com for Windows which is built using tidesdk and .net framework i saw that the source code is not visible also i searched if it were hidden somewhere but i found nothing so any one have an idea how they protect the source code from being visible . is there any tool or something to achive that .. . Answer : Latest version of Wunderlist is not built using TideSDK . They have re-implemented all different versions pure natively on each platform they are supporting . TideSDK currently does not support Code hiding however the Developers of TideSDK are developing TideKit which is releasing soon with a new CLI app and will provide platform builds . It will also provide Code Hiding . You can follow recent developments at http : www.tidekit.com . The video of what is coming is here : http : youtu.be aE7gN-d0GhU . This will give you modern tools to use where the experience of creating and your projects is much better . Comment : i read about tidekit and it seems promising but what about its cost should i buy a licence to use it or it will be freely available just like tidesdk Comment : TideKit would be available at affordable price for everybody . TideKit reservations will be available soon . . stay tuned and follow us on twitter @tidekit for getting latest updates about TideKit .", "Question : Have just discovered TideSDK and look forward to the upcoming 1.4.0 build . I am utilizing the TideSDK Developer on Windows 7 32-bit and have the HelloWorld app up and running.. . now I am having fun trying lots of CSS3 HTML5 code-snippets to see what works with the current beta release . Trying to use Google webfonts does not seem to work.. . is this correct I saw old discussions about font usage on windows with appcelerator Titanium but don t know the current status . Is this expected to be included in the upcoming release I am very enthused about this project at it s current level of completion it is already amazing I plan to develop a desktop application for Windows Mac after I get a better understanding of TideSDK . I will be using jQuery and designing the app s UI with webpage-like techniques and not having to fight multiple HTML5 CSS3 implementations will be great Thanks for any suggestions about Google font usage . .. . Answer : TideSDK current release does contain older webkit . Because of this the latest html5 css3 support may be a bit less . With newer webkit coming in upcoming release its gonna get solved so we should be getting the latest webkit builds on each of the platforms providing maximum standard support . Comment : Thank you for the fast response.. . I ll be watching for the 1.4.0 release Comment : Update : SVG font files can be used with current 1.3.1 release of TideSDK . Free SVG fonts are available from Font Squirrel and elsewhere . For example : @font-face font-family : TangerineBold src : url Tangerine Bold-webfont.svg TangerineBold format svg font-weight : normal font-style : normal", "Question : On OSX I have an old Appcelerator Titanium https : github.com appcelerator-titanium app that I want to migrate it to the new TideSDK platform https : github.com TideSDK TideSDK . Now I can : .. . .. . download and install TideSDK https : github.com TideSDK TideSDK downloads - TideSDK-Developer-1.4.2-osx-x86-64.dmg and TideSDK-1.3.1-beta-osx-x86-64.zip .. . open my current appcelerator project with TideSDK .. . and i Launch The App and ii Package With Runtime then launch .. . .. . But an invocation to Titanium.UI.openFileChooserDialog parseCsvFile options doesn t do anything . Below is what the current code looks like . How can I get a Dialog FileChooser invoked in TideSDK Thanks .. . Answer : The correct command http : tidesdk.multipart.net docs user-dev generated api Ti.UI.UserWindow-method-openFileChooserDialog needs to happen from within a window like this : Comment : Thanks . That did the trick .", "Question : I am planning to develop a cross-platform standalone app to support windows and Linux . TideSDK is my personal choice to go with . But I have been actively following tideSDK tidekit for last 6 months and does not see anything about their product launch . Can we expect tidekit to launch by near future or should we approach some other tool . .. . Answer : TideKit.com and TideKit have been discontinued . This tidekit response mail .. . .. . TideKit was software for developing apps for all platforms simultaneously with a single base of code written in JavaScript . The scope and complexity of the product made it difficult to assemble the platform all at once . This stemmed from a holistic approach to app development for all platforms . While creating a platform for JavaScript developers much of the core engineering is in a variety of lower level languages that affect the speed of development . We considered delivering parts of our platform as we reached milestones but this was not suitable for the start of trials . We were widely criticized for not revealing our technical innovation in advance of our release . In a competitive environment revealing advantages as you go can also mean assimilation as you go . We had already witnessed how quickly our technical advantages could be assimilated by competitors to our open-source TideSDK product . Therefore we held back with a view of delaying the duplication of features by competitors increasing our technical barriers and working to protect our IP and business case until we felt we were ready . In a startup we talk about a Minimum Viable Product MVP . In our case our minimum viable product was much larger and more difficult to achieve . In total approximately three years of research and development was committed with multiple developers working greater than full time hours . A factor that extended the development was an expansion of scope that aimed to lower friction in the app development-process . In Feb 2014 we created a system to queue developers with reservation system for the earliest possible access to TideKit . Our goal was to provide an early trial when it became available . Since the development itself was complex we could not provide a date when ticket holders could start the trial process but it would be following our betas then moving forward as we scaled the platform . We were clear with our language on the site concerning reservations . As a result we expected little confusion about what was being purchased our expectations of timing to market or the terms of purchase for a reservation ticket . Purchasers were not paying for our product at this point but for their position in a queue for a trial of our new technology . We also included a refund policy to ensure the terms of purchase for your ticket were available . The wait has been long but not nearly as long as other difficult engineering challenges including Myo that pre-sold their product and were also delayed before successfully rolling out . Throughout the development cycle we provided updates of our status via posts roadmap page email to our ticket holders and communications on our social channels . We did our best as a team to open ourselves to questions and maintain a social presence . At the end of May 2015 we communicated our strategy to execute a series of focused betas that would have seen the platform revealed publicly and incrementally . We were at a stage that parts of the platform needed developer feedback as we rolled these out consecutively . In the days preparing for our first public beta we recognized the extent to which our brand had been poisoned by our timing to market . A campaign of negativity that had begun several months earlier with followers and ticket holders had taken its toll on our team brand and business . We believed the beta releases would soon bring an end to the negative talk . On July 8 and 9 we faced further eruptions on social media that reached the tipping point . With the discussion no longer about the product nor its future this was far more serious . We failed to bring the product quickly enough for you . As a result we came to the serious decision to discontinue TideKit and dissolve our company . We wish to thank everyone involved that worked on the product and with our team . This includes businesses entrepreneurs and supporters of our vision for app development . Your TideKit Team", "Question : Is it possible planned to build a Win Mac Linux package from within one platform An IDE called RunRev LiveCode allows to deploy to multiple platforms but it supports only HyperCard language afaik it s also possible in Qt .. . .. . a Zotero Standalone Builder https : github.com zotero zotero-standalone-build can be used to bundle Webapp XUL Wrapper https : github.com neam webapp-xul-wrapper into distributable bundles for Mac Windows and Linux .. . .. . would it be possible to use it with TideSDK a Kickstarter project starts for AppJS the maintainers want to launch a cloud service to deploy the app for all platforms in the cloud and then just download the exe dmg or a linux package .. . Answer : It is not possible to build apps on the same platform with TideSDK . A service platform is coming that will solve this issue to make development easier for everyone . We ll make announcements with this available . Comment : any timeframes is it high priority Comment : @StevenPribilinskiy It is and you will see something very soon on this . Comment : Hi has there been any further updates on this build service Comment : @fairwinds Could please provide any updates on this", "Question : I am planning to develop a cross-platform standalone app to support windows and Linux . TideSDK is my personal choice to go with . But I have been actively following tideSDK tidekit for last 6 months and does not see anything about their product launch . Can we expect tidekit to launch by near future or should we approach some other tool . .. . Answer : Just to be clear - you re not expecting to provide a version of the platform for us to use in 2014 but you re committing to releasing a plan in 2014 in which you will let us know when you plan to release the platform which could be 2015 2016 2017 .. . Just trying to get my development options in-place for 2015 and I d like to know if you plan on having something available in 2015 that can be used for development and if so in which half of the year", "Question : null .. . Answer : Has anyone successfully been able to submit an app created with TideSDK to the Windows 8 app-store Any helpful tutorials around Apologies if this question is repetitive - I ve been looking around for resources without much avail . Thanks . Comment : I d ask the TideSDK folks if Windows 8 Store apps is something they ve tested with support . Theoretically it should work it seems all HTML5 JavaScript CSS but there are some restrictions on what you can and can t do in JavaScript wrt to the sandbox model in Windows 8 Store apps . Take whatever kitchen sink sample they have and give it a go in local VS and the WACK - will give you a point of reference at least ." ] }
[ "yes-answer-long", "yes-answer-short" ]
desktop
UNK_RELATION
xmldatasource@xml@83
xmldatasource -- the xmldatasource control is a data source control that presents @placeholder data to data-bound controls .
{ "confidence": [ 55.82244873046875, 54.488136291503906, 49.05657958984375, 47.92523956298828, 46.0471076965332, 46.0471076965332, 45.11894989013672, 45.01759719848633, 44.915767669677734, 43.00694274902344, 42.873538970947266, 42.474639892578125, 41.7421989440918, 41.574710845947266, 41.574710845947266, 41.574710845947266, 41.574710845947266, 41.574710845947266, 39.221595764160156, 38.79387283325195, 38.102210998535156, 38.102210998535156, 38.102210998535156, 38.102210998535156, 38.102210998535156, 38.102210998535156, 38.102210998535156, 38.012115478515625, 37.56223678588867, 36.265384674072266, 33.424774169921875, 33.424774169921875, 33.424774169921875, 33.424774169921875, 33.424774169921875, 33.424774169921875, 33.424774169921875, 33.424774169921875, 33.424774169921875, 33.424774169921875, 33.424774169921875, 33.093162536621094, 33.0438232421875, 32.293434143066406, 31.863296508789062, 30.93749237060547, 30.93749237060547, 30.93749237060547, 30.216550827026367, 29.779743194580078, 29.360946655273438, 29.360946655273438, 29.360946655273438, 29.23923683166504, 28.237350463867188, 27.73434066772461, 27.655593872070312, 27.355762481689453, 27.05534553527832, 27.03830337524414, 26.645099639892578, 26.645099639892578, 26.63903045654297, 26.63903045654297, 26.499732971191406, 26.224424362182617, 25.906963348388672, 25.784931182861328, 25.20162010192871, 24.881752014160156, 24.868484497070312, 24.794384002685547, 24.794384002685547, 24.794384002685547, 24.794384002685547, 24.718448638916016, 24.645885467529297, 24.34095001220703, 24.310779571533203, 24.11180877685547, 23.874670028686523, 23.874670028686523, 23.587108612060547, 22.980470657348633, 22.714340209960938, 22.635597229003906, 22.635597229003906, 22.635597229003906, 22.635597229003906, 22.635597229003906, 22.635597229003906, 22.635597229003906, 22.635597229003906, 22.152755737304688, 21.854736328125, 21.50425910949707, 21.02141571044922, 20.937942504882812, 20.723398208618164, 20.716522216796875 ], "content": [ "I think the control you re looking for is asp : Xml : .. . .. . XmlDataSource is generally used in combination with other data bound controls like TreeViews or Repeaters", "I m using an XMLDatasource to bind to a data grid .", "This xmldatasource is used in an asp.net repeater control to process and display the each property of the book .", "I use XmlDataSource like this : .. . .. . as a datasource to my rotater control .", "to ignore the XMLDataSource tool .", "xmldatasource has no cache", "XmlDataSource nodes are not stored in the viewState like most datasource controls .", "I got a xml file with the below structured content for the menu which i load using XmlDataSource and i am finding it hard and confusing as to how to specify bindings for the asp.net menu when this xmldatasource is the data source for the menu .", "but using a XmlDataSource is this very limited", "I m using XmlDataSource as the datasource for a dropdownlist .", "I recently converted a JasperReport to use the XMLDataSource instead of getting the data from the DB .", "I created an Rss feed reader user control for my Sitefinity web app by using XMLDataSource .", "First add an XPath Data items item attribute to your XmlDataSource then change the li elements in the ItemTemplate to :", "Because we cannot sort the records from the XMLDataSource .", "Should I wrap each XmlDataSource in a using-statement", "Should I wrap each XmlDataSource in a using-statement", "Like this one : using XmlDataSource xds GetXmlDataSource .", "Can it have something to do with xmldatasource is not IEnumberable .", "I want to bind a xml external file to a TreeView but I want to use the same XMLDataSource to fill other controls .", "I am using ASP.NET C and have written a page using the XmlDataSource tool to read an xml file and display the data in a GridView .", "I don t know the exact code to set the xmldatasource to not execute .", "In my application I defined an XMLDataSource in the ASPX : .. . .. . This datasource feeds a grid .", "I first tried using xmldatasource and found out that you can t sort it .", "I have just changed the place of xmldatasource its working now .", "What is the most efficient way to create an XmlDataSource from an XmlReader", "CA2000 says that I should Dispose an XmlDatasource before losing scope .", "The XmlDataSource shouldn t be disposed since you intend to use it in the other method .", "I am changing the file data test.xml multiple times and reloading it into xmldatasource using above code but gridview just displays data of first unchanged test.xml file .", "i m trying to view this rss feed : .. . .. . in a multiple tables using the xmlDatasource asp control and repeater control .. . .. . i can only list all the teams of the document using this : .. . .. . and binding it to the repeater .", "First if you want to use XmlDataSource specifically the answer is to use a XSLT file to specify translations as in this QA : .. . .. . How do I pass a XSLT parameter to a XmlDataSource correctly", "I can set the gridview and a formview I have to false however the xmldatasource still tries to read the file .", "Prior to trying this I defined a default XPath in the XMLDataSource definition and at that point the XMLNode thick line returned this default string .", "I m a bit confused as to why the XPath is not retained at the XMLDataSource afdter I explicitly set it in the earlier function .", "So my question : Is there a way to sort order the records from the XMLDataSource so that they will correctly group without using a XSLT .", "XmlDataSource does not have a mechanism to declare the type of specific attributes or elements in the XML hence everything will be a string .", "In my extremely simplified code sample my Foo method calls GetXmlDataSource which returns an XmlDataSource .", "Do I effectively have two XmlDataSource objects one in the upper method and one in the lower method", "Do I effectively have two XmlDataSource objects one in the upper method and one in the lower method", "Made a simple test project where i try to bind to a xmldatasource in a proto viewmodel .. . .. . If i try to bind a listbox like this .", "When using an XmlDataSource is there good way to handle exceptions that are caused when the remote XML file is unavailable", "Okay so I m pulling in an XML feed from feedburner using an XMLDataSource and a repeater .", "stores this information as properties in a vb file in the APP CODE directory c . loads a form with a gridview and d . populates the gridview with data from an xmldatasource using an XPATH derived from values properties in the vb file .", "Apparently the XmlDataSource does not like https URLs as the DataFile : .. . .. . Write a few extra lines-of-code to download the XML from https source like :", "In fact XmlDataSource works fine with http urls but it did not work with https URL -- got the exact same error you mentioned .", "http : stackoverflow.com questions 6046002 how-do-i-pass-a-xslt-parameter-to-a-xmldatasource-correctly .. . .. . Alternately this post describes how to bind the GridView to the results of a LINQ query using XDocument to load the XML file : .. . .. . http : forums.asp.net t 1627778.aspx 1 Sort+results+from+XMLDataSource", "I have a basic test web form with a DataList and a DetailsView and two XmlDataSource components for each of them .", "But what is the correlating key how do I set a DataKeyField when I use a XmlDataSource to get this to work", "Hi Doing it with ObjectDataSource is easy enough - but you can t do it the same way with XmlDataSource : -", "In the UpdatePanel there is a Repeater with XML data source .", "We are using xml as the data source for the report .", "We are setting up XML data source using below logic .", "In below snippet we provides XML string as data source .", "Double click on your XML-Data-Source and select property binding on the left .", "I am binding a repeater to XmlDataSource binding an image source with a node value like below .. . .. . but sometimes my XML doesn t have this node so i receive an error .. . .. . Object reference not set to an instance of an object .", "Enter a function in to the XML data source file : field like below : .. . .. . There is also a section in the birt wiki https : wiki.eclipse.org Change Database URL at runtime based on Parameter BIRT on how to change the data source at runtime .", "Upon a menu item click the XPath of Repeater s XML data source would be updated and the repeater would display the updated data .", "could you give us example for xml data source", "You need to also bind to your XmlDataSource within your try block.. . .. . .. . ...make sure to remove the DataSourceID property from your repeater and you should be good to go .", "How can I set the DisplayName of a Data Row in data-driven-tests where the data source is a XML and the provider is Microsoft.VisualStudio.TestTools.DataSource.XML .", "My data source looks like : .. . .. . I m wanting to load key-value pairs Folder TabIndex .. . .. . What is the best way to load the data", "But now I want to filter the data bound to CourseDDL based on College Name selected in CollegeDDL .", "But when I select Homoeopathic Medical College in CollegeDDL The data bound to CourseDDL should filter accordingly .", "data is from asp : xmldatasource.... . i get those data from XML file", "I ve tried : @name Data @name Data @name ctrlname .", "Is there something else I can try out to set xml data source in java to birt template .", "I am currently grabbing a remote XML file in a repeater XMLDataSource and the DataFile attribute is being set in the code-behind I have the DataFile dynamically change based on URI parameters such as cat blah etc .", "My sample-data source xml file looks something like below - .. . .. . I want to create a data-driven unit test out of it .", "I m looking for a simple way to load the same data into an array or some other data structure so that I can easily look up the data .", "how can i send the data", "Data File : .. . .. . Report : .. . .. . Subreport :", "You should update the XPath on your XmlDataSource so that you just get a list of Countries independent of Continent : .. . .. . Then set the DataContext of the Grid : .. . .. . After that both bindings of the ListBoxes can be updated to the following : ItemsSource Binding .", "I am getting below error message : .. . .. . A field or property with the name SUMMARY was not found on the selected data source .", "How do I query XML data source in SSRS so that two parent-child hierarchies are returned", "If you try you will just receive error : System.NotSupportedException : The data source does not support sorting .", "I have an XML Data Source which contains a list of key-value pairs .", "yeah Im getting the xml data but i want those data in seperate arrays @Janmejoy .", "I am following this tutorial https : devbank.wordpress.com 2012 04 26 jasper-reports-creating-a-report-from-xml-data-using-xpath-and-list-control to create my reports using iReport .", "Strangely since last week dynamic data is not getting populated from xml .", "I have an XML Data Source : .. . .. . In my page I have wired this up to an asp : XmlDataSource : .. . .. . And bound this to an asp : Repeater : .. . .. . But I am only getting the first item in the items list .", "Especially in your case you will need data that is relational .", "In my code I set the XPath at a specific point in a specific function and then issue a new DataBound on the XMLDataSource causing the grid to update : .. . .. . All of this works a charm but when I attempt to read out the XPAth from within a different function I receive an error message .", "I get nothing .. . .. . If i instead change datacontext to .. . .. . And listbox to .. . .. . Then it works how do i bind to the viewmodel so i can fill it with more than just on xmldatasource .. . .. . If i put a breakpoint on property Report i can see that it is called when i do Binding Reports but the list is still empty .", "When I execute the report the preview don t show the subreport data but if I execute the subreport alone it shows the data correctly .", "I am using an XML dataSource to read the data .", "Selected data is pre-sorted .. . 2 .", "Or would it be easier to load xml data to LINQ or something like that", "http : www.codeproject.com Articles 10427 Convert-XML-Data-to-DataSet-and-Back .. . .. . 2 .", "Let you see this reference that how to bind xml data to treeview in asp.net .", "Pretty much all content will be data driven as it needs to be editable by management .", "It is highly capable of handling multiple transactions with huge amount of data .", "You are quite right the data is most defiantly relational and not small by any means .", "I think we need to see the code that generates data to be able to answer", "Load it into a DataSet with the function .. . .. . with your data you will have a dataset with 2 tables :", "In the code below ItemsToTake is a public property for my user control widget designer .", "The currently accepted answer has one flaw : Whenever there is an attribute of data with the same name as a child element of data the sort will always be performed using as keys the values of the attribute .", "Note that sorting is performed by default assuming text data type .", "I have an UpdatePanel which is triggered by a Menu control MenuItemClick .", "Next step was to right-click the crosstab object in the Report Inspector and select crosstab data which bring up a data config window .", "The 2nd click onward on the menu item would still trigger post backs and the data is correctly returned seen from Firebug but the UpdatePanel is not displaying the data passed back .", "I have one SSRS report which is using XML Data source by using web service ." ] }
{ "confidence": [ 65.49040985107422, 58.708946228027344, 56.66769790649414, 56.465919494628906, 56.10954284667969, 55.29838562011719, 53.44779586791992, 52.5279541015625, 50.64520263671875, 50.22600555419922, 50.050323486328125, 47.68653106689453, 47.54722595214844, 47.469261169433594, 46.69123077392578, 46.31673049926758, 46.25572967529297, 45.07623291015625, 45.00670623779297, 44.27516174316406 ], "content": [ "Question : Using ASP.NET 2.0 i carried out below steps .. . .. . book.xml .. . .. . data.xsl .. . .. . Page .. . .. . Sadly nothing appears in the page I expected a output Hello World . So what is wrong here .. . Answer : I think the control you re looking for is asp : Xml : .. . .. . XmlDataSource is generally used in combination with other data bound controls like TreeViews or Repeaters Comment : +1 How stupid of me lol thanks", "Question : I first tried using xmldatasource and found out that you can t sort it . If you try you will just receive error : System.NotSupportedException : The data source does not support sorting . This will give me exception : Exception Details : System.Web.HttpException : The GridView GridView1 fired event Sorting which wasn t handled . My xml is like this : .. . .. . So what is the best way to get around this issue Or can I handle the sorting event somehow Or would it be easier to load xml data to LINQ or something like that .. . Answer : OK I found a couple possible answers for you . First if you want to use XmlDataSource specifically the answer is to use a XSLT file to specify translations as in this QA : .. . .. . How do I pass a XSLT parameter to a XmlDataSource correctly http : stackoverflow.com questions 6046002 how-do-i-pass-a-xslt-parameter-to-a-xmldatasource-correctly .. . .. . Alternately this post describes how to bind the GridView to the results of a LINQ query using XDocument to load the XML file : .. . .. . http : forums.asp.net t 1627778.aspx 1 Sort+results+from+XMLDataSource", "Question : I have a basic test web form with a DataList and a DetailsView and two XmlDataSource components for each of them . The binding of the DataList to the underlying XML document was easy to set up but I m struggling with getting the DetailsView hooked up . The idea is that there is a master details relationship between the two bindable controls so I guess I should hook onto the OnSelectedItemIndexChanged on the DataList to do the binding of the currently selected item in the DetailsView . But what is the correlating key how do I set a DataKeyField when I use a XmlDataSource to get this to work cheers .. . .. . --larsw .. . Answer : Wow I m doing exactly that right now but using Object Data Source : .. . .. . I am following a great tutorial on that from Matt Berseth http : mattberseth.com check his post http : mattberseth.com blog 2008 04 masterdetail with the gridview.html . It will be almost the same the only thing is that you use other DataSource but the rest is the same Comment : Hi Doing it with ObjectDataSource is easy enough - but you can t do it the same way with XmlDataSource : - Comment : He s using ODS but his loading a XML document try that Download the code and see for your self all data comes from an XML .", "Question : I have an XML Data Source : .. . .. . In my page I have wired this up to an asp : XmlDataSource : .. . .. . And bound this to an asp : Repeater : .. . .. . But I am only getting the first item in the items list . How do I get them all .. . Answer : First add an XPath Data items item attribute to your XmlDataSource then change the li elements in the ItemTemplate to :", "Question : I want to bind a xml external file to a TreeView but I want to use the same XMLDataSource to fill other controls . So first I want to know what s the best way to do that . Because I think that I will limit the datasource in case of applying a XPath or TransformFile to the DataSource and I will not be able to use it in other controls . Next if there s a way of specifying the root node of that xml to bind to the TreeView and if it is possible to hide some of the nodes . Here is what I ve done so far . .. . Answer : The answer to your question is in doing these two things : .. . .. . 1 . Read XML into a reusable object . I could think of DataSet as the best alternative for you . That way data once read into the dataset can be reused to bind other objects as well . Here is link where you can find an example of how to read XML into a data set . http : www.codeproject.com Articles 10427 Convert-XML-Data-to-DataSet-and-Back .. . .. . 2 . The other part is bind the dataset to the tree view here is an example for that : http : www.codeproject.com Articles 25753 Binding-the-ASP-NET-TreeView-to-a-DataSet-or-an-Ob .. . .. . the issue with the second part could be your data set structure may not be appropriate for binding the tree view in that case you can filter the data further . Comment : Why is this the best alternative xmldatasource has no cache", "Question : In my application I defined an XMLDataSource in the ASPX : .. . .. . This datasource feeds a grid . In my code I set the XPath at a specific point in a specific function and then issue a new DataBound on the XMLDataSource causing the grid to update : .. . .. . All of this works a charm but when I attempt to read out the XPAth from within a different function I receive an error message . Debugging shows the XPath expression actually is empty . I attempted to move the creation of the DataSource to code and only then setting the DataSourceID of the grid but that did not work . Prior to trying this I defined a default XPath in the XMLDataSource definition and at that point the XMLNode thick line returned this default string . I m a bit confused as to why the XPath is not retained at the XMLDataSource afdter I explicitly set it in the earlier function . Could someone shed some light on this for me please .. . Answer : XmlDataSource nodes are not stored in the viewState like most datasource controls . You should call databind only once and the control should rebuild itself automatically on postback . I case you want to change datasource you can save the selectedNode form the treeviw in Viewstate and on postback change your dataSource by retrieving the value from viewState before you assign the DataSourceID and call DataBind . Have a look here : .. . .. . http : forums.asp.net t 1437802.aspx 1 Comment : Thanks . The link mentions it s for security reasons which makes sense . Seeing I fill in the xPath manually anyway I am now storing it in a variable and then just use that later down to find the proper node .", "Question : I got a xml file with the below structured content for the menu which i load using XmlDataSource and i am finding it hard and confusing as to how to specify bindings for the asp.net menu when this xmldatasource is the data source for the menu . Xml Content .. . .. . Menu Bindings .. . .. . but i am hit with a error that the specified bindings could not be found . I am sure that menu tag contains the MenuURL and MenuImage field . I am sure you too what am i doing wrong here . .. . Answer : I think your problem is same as mine.just follow this http : www.kynou.com NewKYNOUTutorialEngineWebsite NewKYNOUTutorialEngineTestPage.aspx id 65 tt Binding 20XML 20to 20DataGrid link im sure it will be helpful to you . Comment : I do know how it s done through the DataSet . but using a XmlDataSource is this very limited Comment : You can also use xmldocument class to read xml file to dataset and then go for display data into datagrid from dataset .", "Question : I use XmlDataSource like this : .. . .. . as a datasource to my rotater control . .. . .. . but i get the following exception all the time : .. . .. . https : myurl.xml is not a valid virtual path . Although i tried the link externally and there s an xml file Comment : In fact XmlDataSource works fine with http urls but it did not work with https URL -- got the exact same error you mentioned . .. . Answer : Ignore my previous answer . Apparently the XmlDataSource does not like https URLs as the DataFile : .. . .. . Write a few extra lines-of-code to download the XML from https source like : Comment : then if i have an xml file from url like what i have .What should i do . copy it firstly to a local folder in my server or what Comment : yes I would give that a try download the remote file and save it in a location accessible by asp.net Comment : hmmm there s no way except that why i can t consider this as alive datasource instead of copy the file in my server Comment : Thanks a lot now it works so nice .", "Question : I am using ASP.NET C and have written a page using the XmlDataSource tool to read an xml file and display the data in a GridView . Everything is great when the file is there . However the xml file is generated every hour and if you happen to connect to the page while the file is being updated takes about 2 minutes an error is displayed because the file is not there . As I am using the built-in tools to connect and read the xml is there code that I can use to check if the file-exists and if it does not open the page without the file . I can see that there is code to do an if exists however I can not seem to figure out the part what to do to ignore the XMLDataSource tool . Perhaps I can make a label appear that says to come back in a few minutes but how do I get it to ignore the data reader Comment : I m guessing a bit here but you could a set an empty xml b set null to datasource c don t show the gridview set visible false Comment : I m not sure how much custom logic you can add if you can you could generate the xml file to a file named myxmlfile generating.xml and after it is finished delete the old xml file and rename the new one to the original file name . Then you would just have a very small time when it is not available . Of course you should although handle this case . Comment : I can set the gridview and a formview I have to false however the xmldatasource still tries to read the file . I don t know the exact code to set the xmldatasource to not execute . Comment : @MatthiasG - This is what I am doing however during the time the file is being updated the page does not load . There is a slight window but this still can happen . .. . Answer : Here is my solution . I change variable names to protect the innocent . Many thanks to Jim Mischel.. .", "Question : I recently converted a JasperReport to use the XMLDataSource instead of getting the data from the DB . This was done for performance reasons . One of the requests was to group certain records together . I thought I had it working but this was because my records that were grouped followed sequentially in the XML file I used to test . So they were already grouped ordered in the XML . Now that the report is being used in a Live environment we have picked up that the grouping is not actually working . After doing some searching and reading it seems that this cannot be easily done . Because we cannot sort the records from the XMLDataSource . So my question : Is there a way to sort order the records from the XMLDataSource so that they will correctly group without using a XSLT . I only want to transform the XML as a last resort . Hoping there is another way I can do it . .. . Answer : Why you can t use sort inside iReport see this for example http : community.jaspersoft.com questions 803266 how-print-latest-date-jasper-reports-xml-datasource Comment : Thanks sanBez I was trying to stay away from iReport as it introduced other issues last time I used it . I followed your advice though and sorted by the field I want . But now I am seeing the following error : net.sf.jasperreports.engine.fill.SortedDataSource cannot be cast to net.sf.jasp erreports.engine.data.JRXmlDataSource This is on one of the subreports . Any ideas", "Question : In my extremely simplified code sample my Foo method calls GetXmlDataSource which returns an XmlDataSource . CA2000 says that I should Dispose an XmlDatasource before losing scope . Should I wrap each XmlDataSource in a using-statement Should I use try-catch finally in the lower one and a using in the upper one Do I effectively have two XmlDataSource objects one in the upper method and one in the lower method I m a little fuzzy on language behavior in this one and I want to be a good boy . Comment : your last question : no they are reference-type so its only one . Comment : You should dispose the object in your Foo method when you re done with it . If code-analysis complains about GetXmlDataSource try naming it CreateXmlDataSource and see if it makes a difference . .. . Answer : Should I wrap each XmlDataSource in a using-statement If it goes out of scope inside that method yes you should . You can also use using on variables coming from other methods by the way . Should I use try-catch finally in the lower one Yes and no . The XmlDataSource shouldn t be disposed since you intend to use it in the other method . You should dispose it if you have an exception that will prevent the variable to be passed along . Should I use using in the upper one Yes you should . This code will do the job . Do I effectively have two XmlDataSource objects one in the upper method and one in the lower method No you have one . That is why you shouldn t dispose the lower one . There is a reference passed from one method to another . Comment : Thanks for the edit . You said You can also use using on variables coming from other methods by the way . What do you mean Comment : Like this one : using XmlDataSource xds GetXmlDataSource .", "Question : i m trying to view this rss feed : .. . .. . in a multiple tables using the xmlDatasource asp control and repeater control .. . .. . i can only list all the teams of the document using this : .. . .. . and binding it to the repeater . or finding the groups only .. . .. . but i can t figure out how to find the children of the xpath . i mean if i used nested repeaters one for the groups and the other for the teams how to access the teams info . .. . Answer : .. . asp : XmlDataSource ID XmlDataSource1 runat server XPath rss channel group team asp : XmlDataSource .. . .. . .. . but i can t figure out how to find the children of the xpath . Use : .. . .. . This selects any element that is a child of anu team that is selected by the Xpath expression rss channel group team", "Question : In my extremely simplified code sample my Foo method calls GetXmlDataSource which returns an XmlDataSource . CA2000 says that I should Dispose an XmlDatasource before losing scope . Should I wrap each XmlDataSource in a using-statement Should I use try-catch finally in the lower one and a using in the upper one Do I effectively have two XmlDataSource objects one in the upper method and one in the lower method I m a little fuzzy on language behavior in this one and I want to be a good boy . Comment : your last question : no they are reference-type so its only one . Comment : You should dispose the object in your Foo method when you re done with it . If code-analysis complains about GetXmlDataSource try naming it CreateXmlDataSource and see if it makes a difference . .. . Answer : 1 only wrap the final usage in a using . 2 no a using is enough note that the underlying implementation of using is a try-finally . 3 you have only one object instance .", "Question : i have a below function in which the variable dataCollection hold the dataview having some datas . i need to change the column AllDay in the dataCollection from string datatype to boolean data type . But it does not works.please help me resolve this . thanks in advance.. . Comment : I think we need to see the code that generates data to be able to answer Comment : data is from asp : xmldatasource.... . i get those data from XML file .. . Answer : I don t think it is possible . XmlDataSource does not have a mechanism to declare the type of specific attributes or elements in the XML hence everything will be a string .", "Question : When using an XmlDataSource is there good way to handle exceptions that are caused when the remote XML file is unavailable I m somewhat new to .NET and using C . .. . Answer : I m assuming this has been resolved but am answering it in case someone else has the issue and stumbles upon this post . You need to also bind to your XmlDataSource within your try block.. . .. . .. . ...make sure to remove the DataSourceID property from your repeater and you should be good to go .", "Question : I have a basic test web form with a DataList and a DetailsView and two XmlDataSource components for each of them . The binding of the DataList to the underlying XML document was easy to set up but I m struggling with getting the DetailsView hooked up . The idea is that there is a master details relationship between the two bindable controls so I guess I should hook onto the OnSelectedItemIndexChanged on the DataList to do the binding of the currently selected item in the DetailsView . But what is the correlating key how do I set a DataKeyField when I use a XmlDataSource to get this to work cheers .. . .. . --larsw .. . Answer : I m not sure But look at these links hope to help : .. . .. . http : www.eggheadcafe.com tutorials aspnet d89d1d96-03f1-4784-bbb2-a3db1af393f5 aspnet-datalist-and-data.aspx http : safari.informit.com 9780735625273 index indexview D http : my.safaribooksonline.com 0735621764 index indexview D http : blogs.msdn.com adrianvinca archive 2006 02 15 532449.aspx http : safari.informit.com 9780735625273 index indexview D", "Question : I m using an XMLDatasource to bind to a data grid . I m also using a parameter in my xsl for sorting . I have everything working but it seems I have to bind twice to my data for it to work when I sort . Can anyone tell me why Here is my webform : .. . .. . Here is my code : using System.Web.UI.WebControls .. . .. . Here is my xml file : .. . .. . And here is my xsl file : .. . Answer : You need to add XPath Parcels Parcel to your GridView see below : .. . .. . asp : GridView XPath Parcels Parcel ID GridView1 runat server AllowSorting True AutoGenerateColumns False OnSorting GridView1 Sorting OnPageIndexChanging GridView1 PageIndexChanging", "Question : Made a simple test project where i try to bind to a xmldatasource in a proto viewmodel .. . .. . If i try to bind a listbox like this . I get nothing .. . .. . If i instead change datacontext to .. . .. . And listbox to .. . .. . Then it works how do i bind to the viewmodel so i can fill it with more than just on xmldatasource .. . .. . If i put a breakpoint on property Report i can see that it is called when i do Binding Reports but the list is still empty . UPDATE .. . .. . I can do this binding in code and then it works .. . .. . Why cant i do that in XAML Comment : From your code : this.DataContext myViewModel.Person what is the Person property I don t see it on your viewmodel . Have you meant myViewModel.Reports Comment : Sorry changed it to Reports . It was reports in original code Comment : Can it have something to do with xmldatasource is not IEnumberable . But if that is the case-when i set datacontext it works then there must be some automatic conversion going on in the background .. . Answer : Seems like i had some problems with the understanding of XPath and my general question was how to bind to a dynamic xmldataprovider in a viewmodel with xaml . Solved it like this . XML .. . .. . Window1 .. . .. . Window1.xaml.cs Comment : +1 Thanks for the update it helped to solve my problem .", "Question : null .. . Answer : I created an Rss feed reader user control for my Sitefinity web app by using XMLDataSource . In the code below ItemsToTake is a public property for my user control widget designer . If the user enters 10 then 9 feeds will be displayed on the website . I want to tweak this code the way the number entered by the user matches the number of feeds displaying on the website . The easiest solution I could think of was raising the number by 1 so I did this : .. . .. . but that didn t work . What s the best way to add a number to this property with an operator Comment : Are you trying to add a number to a string ItemsToTake + 1 Because that won t work Comment : I think that s exactly where my confusion is coming from . In my widget designer I thought ItemsToTake is int since it s an input field where I can enter the number of feeds I want to be displayed .", "Question : I am using ASP.NET C and have written a page using the XmlDataSource tool to read an xml file and display the data in a GridView . Everything is great when the file is there . However the xml file is generated every hour and if you happen to connect to the page while the file is being updated takes about 2 minutes an error is displayed because the file is not there . As I am using the built-in tools to connect and read the xml is there code that I can use to check if the file-exists and if it does not open the page without the file . I can see that there is code to do an if exists however I can not seem to figure out the part what to do to ignore the XMLDataSource tool . Perhaps I can make a label appear that says to come back in a few minutes but how do I get it to ignore the data reader Comment : I m guessing a bit here but you could a set an empty xml b set null to datasource c don t show the gridview set visible false Comment : I m not sure how much custom logic you can add if you can you could generate the xml file to a file named myxmlfile generating.xml and after it is finished delete the old xml file and rename the new one to the original file name . Then you would just have a very small time when it is not available . Of course you should although handle this case . Comment : I can set the gridview and a formview I have to false however the xmldatasource still tries to read the file . I don t know the exact code to set the xmldatasource to not execute . Comment : @MatthiasG - This is what I am doing however during the time the file is being updated the page does not load . There is a slight window but this still can happen . .. . Answer : If you try to use File.Exists in this way you re going to be disappointed . Let s say you have code that works in the simplest way : .. . .. . So your program determines that the file-exists . But before DoSomething is called the process that creates the file opens it for exclusive access . Your DoSomething method is then going to fail . So your check for the file s existence was irrelevant . Yes it s a very small window . I can tell you from experience that things do indeed happen within those very small windows . I ve been bitten by code similar to that above . I strongly suggest that you write your code so that it handles the FileNotFoundException or whatever exception that is thrown when the file doesn t exist . For example : .. . .. . Done this way no other process can pull the rug out from under you . You know that the file is there because you have it open . Comment : Thx I tried but I still get the error : protected void Page Load object sender EventArgs e string xmlFile Server.MapPath App Data diskspace.xml try XmlDS.DataFile xmlFile XmlDS.EnableCaching true XmlDS.CacheDuration 6000 XmlDS.CacheExpirationPolicy DataSourceCacheExpiry.Absolute XmlDS.DataBind catch Exception ex lblE.Visible true GV.Visible false FV.Visible false Comment : @user1188241 : What error are you getting Does the code in the catch block actually get executed Comment : Update - I found this method and it works . Istuck it in the try . I just need to do some more testing . XmlDS.GetXmlDocument" ] }
[ "yes-answer-long", "yes-answer-short" ]
xml
UNK_RELATION
spring-ws@web-services@107
spring-ws -- spring-web services is a product of the spring community focused on creating document-driven @placeholder .
{ "confidence": [ 50.960182189941406, 50.84007263183594, 49.75267791748047, 48.92394256591797, 48.55598831176758, 48.468502044677734, 48.30925750732422, 48.12526321411133, 48.04928970336914, 48.00530242919922, 47.39977264404297, 46.671051025390625, 46.671051025390625, 46.671051025390625, 46.165374755859375, 46.069091796875, 45.672584533691406, 45.20600128173828, 45.20600128173828, 44.784603118896484, 44.700355529785156, 44.700355529785156, 44.57578659057617, 44.512386322021484, 44.467369079589844, 44.39697265625, 44.29920196533203, 44.048484802246094, 44.00946044921875, 43.99284362792969, 43.873321533203125, 43.41586685180664, 43.41586685180664, 43.41586685180664, 43.41586685180664, 43.41586685180664, 43.41586685180664, 43.378990173339844, 43.289093017578125, 43.25288391113281, 43.2451057434082, 43.2451057434082, 43.2451057434082, 43.14739990234375, 43.14739990234375, 43.14739990234375, 42.99971008300781, 42.99971008300781, 42.80523681640625, 42.790771484375, 42.75522994995117, 42.706485748291016, 42.54956817626953, 42.54956817626953, 42.197181701660156, 42.09279251098633, 41.94672393798828, 41.87636947631836, 41.87636947631836, 41.87636947631836, 41.87636947631836, 41.87636947631836, 41.87636947631836, 41.87636947631836, 41.87636947631836, 41.87636947631836, 41.86290740966797, 41.86290740966797, 41.86290740966797, 41.86290740966797, 41.86290740966797, 41.86290740966797, 41.86290740966797, 41.86290740966797, 41.754920959472656, 41.7152214050293, 41.540985107421875, 41.45207214355469, 41.439205169677734, 41.2244987487793, 41.2244987487793, 41.18049621582031, 41.117557525634766, 41.117557525634766, 41.04384231567383, 41.04384231567383, 41.04384231567383, 41.04384231567383, 41.04384231567383, 41.04384231567383, 41.04384231567383, 41.04384231567383, 41.04384231567383, 41.04384231567383, 41.04384231567383, 41.04384231567383, 41.04384231567383, 40.96785354614258, 40.79423904418945, 40.49103927612305 ], "content": [ "i m using Spring-WS and have the following spring-ws-servlet.xml file .", "I have decided to use Spring WS 1.5.8 for SOAP services and .. . Spring MVC 3.0 for RESTful services as this is a new feature .", "I am in the process of researching comparing CXF and Spring-WS for web-services", "I am working on creating a web service using Spring-WS .", "Spring Web Services http : static.springsource.org spring-ws site is a dedicated Spring Project using Spring s own Web Service technology whereas Spring Remoting http : static.springsource.org spring docs 3.0.x spring-framework-reference html remoting.html is a common approach of integrating different third party remoting technologies .", "I m running a spring-boot project with spring-ws .", "Maybe these links will be helpful : .. . .. . Step by step Spring-WS http : springtips.blogspot.com 2007 07 step-by-step-spring-ws.html .. . Spring Web Services http : www.javabeat.net 2010 06 introduction-to-spring-web-services .. . Simple Spring Web Services http : www.springbyexample.org examples simple-spring-web-services.html .. . Basic Spring Web Service Tutorial From Contract to Security http : jeromebulanadi.wordpress.com 2010 02 25 basic-spring-web-service-tutorial-from-contract-to-security", "What version of Spring-WS", "BUILD FAILED .. . .. . I am cloning and using the build instructions from the git repository found at spring-projects spring-ws https : github.com spring-projects spring-ws .", "I have successfully used SOAP Spring-WS to create a web service .", "I am new to spring-ws", "Spring-ws 1.5.9 depends on Spring 2.5 based on the pom .", "This package was brought into Spring 3 from Spring-WS and the two will clash .", "Until that happens Spring-WS remains incompatible with the current release of Spring Framework .", "Actually Spring WS doesn t compare with JAX-WS Spring WS is just a minimalistic WS stack .", "I m building a contract-first SOAP web service with spring-ws 2.2.3 .", "I ve looked at the spring-ws-samples-master https : github.com spring-projects spring-ws-samples tree master mtom project on GitHub as well as the spring-ws-samples-master https : github.com spring-projects spring-ws-samples project which has provided some additional insight but isn t completely clear .", "I am working on spring-web services .", "I m stuck on a problem with JAXB Spring Web Services .", "I m implementing Web Service Client using spring-ws .", "Our client is built using spring-ws 2.3.0 .", "Which version of Spring-WS are you using", "That s not a problem with SAAJ but with Spring-WS .", "First you have to check the spring documentation to understand the basics about spring-security for web-services : http : docs.spring.io spring-ws site reference html security.html .", "I m using Spring Web Services to expose a service as a web service .", "The spring-web application has username login spring-security attached to it .", "If my question is not at all related I am just confused between spring-web services vs spring-remoting .", "You are mixing Spring-WS with annotations from JAX-WS package javax.xml.ws .", "I am using spring-dm because setting up spring-ws with the JDK webserver and or with endpoint interceptors requires the use of the spring-ws http : www.springframework.org schema web-services namespace which is not supported http : qnalist.com questions 5374905 bundle-using-camel-spring-ws-failes-to-deploy-in-karaf by blueprint .", "The Xerces implementation in Java 6 is apparently not compatible with Spring Web Services .", "See some details here : .. . .. . Best Practices in Spring Web Services and Java http : www.ddj.com architect 201802027 .. . Spring WS Tutorial http : static.springsource.org spring-ws site reference html tutorial.html .. . What s New in Spring Web Services 1.5 http : blog.springsource.com 2008 03 28 whats-new-in-spring-web-services-15 .", "In Spring-WS you have to write endpoint yourself .", "I am calling a SOAP webservice with Spring-WS .", "Finally we refused the solution with spring-ws security .", "Add it to your spring-ws-security dependency declaration .", "By default Spring-WS uses SAAJ i.e .", "Can jboss 5.1 deploy spring WS projects", "About Spring WS : .. . .. . Spring WS offers only contract-first starting from an XSD Schema .", "I also had similar issue spent several days however in my case issue being Spring WS and Spring versions being incompatible check whether your Spring WS and Spring versions match .", "On the other hand right Spring Integration WS module is fully based on the Spring WS project but it aims to convert everything into Spring Integration Messaging model as fast as possible .", "This is a long shot but I m trying to write a web service client with Spring-WS .", "I have created web service using Spring-WS .", "I am developing a contract-first web service based on Spring-WS .", "I have a spring-ws endpoint as part of a Spring Integration project and I would like to access the Soap Header .", "Is there any way to incorporate JSR303 with Spring WS so that we can validate the request for invalid parameters such as in Spring MVC", "for Spring WS I have .. . .. . for Spring MVC RESTful i have .. . .. . Therefore i should use 2 config files", "This is the way they tell you to do it in Spring-WS reference : .. . .. . http : static.springsource.org spring-ws sites 2.0 reference html tutorial.html tutorial.implementing.endpoint", "CommonsHttpMessageSender http : static.springsource.org spring-ws site apidocs org springframework ws transport http CommonsHttpMessageSender.html are deprecated and not recommended by Spring anymore .", "We are struggling to configure our web app to be able to connect with web-services via Spring WS .", "In addition to skaffman s answer here s how to use Spring-WS 1.5.9 with Spring 3 through Maven : .. . .. . 1 First exclude the OXM dependency of Spring 3 .", "Spring WS supports SOAP WS-Security WS-Addressing .", "This topic http : forum.spring.io forum spring-projects web-services 43481-spring-ws-client-soap-message-logging on Spring forums talk about the same problem as yours .", "Step by step tutorial on - Web Service Client with Spring-WS @ http : justcompiled.blogspot.com 2010 11 web-service-client-with-spring-ws.html", "Please take a look at a related post at : Building a web service with Spring-WS http : justcompiled.blogspot.com 2010 09 building-web-service-with-spring-ws.html", "Regardless of which version branch I have checked out I get the following build failure : .. . .. . What went wrong : Cannot expand ZIP C : Users wsonner spring-ws spring-ws build distributions spring-ws-2.3.0.RELEASE-schema.zip as it does not exist .", "The spring-ws servlet insists on creating its own application context .", "Spring WS security provides support via WebServiceTemplate http : docs.spring.io spring-ws site apidocs org springframework ws client core WebServiceTemplate.html .", "My suspicion is that your issue is related to Spring WS .", "You ll have to use spring-ws-security .", ".. . .. . By looking at spring-ws project I find that : .. . .. . 1 .", "Unfortunately Spring-Ws doesn t have something like this .", "What version of Spring-WS are you using", "The stream is wrapped in a ByteArrayInputStream found in the spring-ws source .", "This is tested with spring-ws 2.1.3 and JBoss AS7 .", "The solution was to drop Spring-WS and instead move to CXF .", "Does spring-ws handle the attachment tranparently", "The Spring doc says same thing here http : docs.spring.io spring-ws site reference html server.html .", "Spring-WS is always contract-first while Spring Remoting is often code-first .", "Here are the common steps to follow to use your existing wsdl with Spring-Ws and Spring-boot .", "Here is every Spring jar in my library : .. . .. . spring-ws-servlet.xml .. . .. . web.xml .. . .. . applicationContext.xml I m not sure that I even need this.. .", "Work was supposed to be completed on Spring-WS 2.0 immediately after Spring 3.0 was released but this hasn t happened .", "That s it you should now be able to use Spring-WS 1.5.9 with Spring 3.x .", "However as I use Spring-WS Spring literally takes care of the entire stuff that happens during marshalling and unmarshalling .", "However as I use Spring-WS Spring literally takes care of the entire stuff that happens during marshalling and unmarshalling .", "Hope below links could help you.. . http : docs.spring.io spring-ws site reference html server.html .. . .. . Spring RESTful web service using only XML config http : stackoverflow.com questions 29911137 spring-restful-web-service-using-only-xml-config", "This is explained here http : docs.spring.io spring-ws site reference html server.html server-automatic-wsdl-exposure in the Spring-WS reference guide .", "Since Spring Webservices 2.2 you can also use Spring s ClientHttpRequestMessageSender http : repo.spring.io libs-milestone-local org springframework ws spring-ws 2.2.0.RC1 spring-ws-2.2.0.RC1-docs.zip api org springframework ws transport http ClientHttpRequestMessageSender.html : .. . .. . no dependency to Apache HTTP Components required", "You can download an example at https : code.google.com p spring-ws-2-0-0-rc2-tutorial downloads detail name spring-ws.zip can 2 q https : code.google.com p spring-ws-2-0-0-rc2-tutorial downloads detail name spring-ws.zip can 2 q", "I have a SOAP web service client written with Spring-WS .", "Can I configure spring-ws to detect jax-ws annotated classes", "Spring-WS is the best option in my experience JAX-WS is too clunky .", "I m trying to write a web service using spring-web service library .", "I have read the Spring doc regarding Securing your Web services with Spring-WS http : static.springsource.org spring-ws site reference html security.html but it looks for me as-if the article is just regarding server-side and not client-side .", "So here is the solution in plain SAAJ : .. . .. . And here is the solution using spring-ws WebServiceMessageCallback http : docs.spring.io spring-ws sites 1.5 reference html client.html d0e3479 based on this thread http : forum.spring.io forum spring-projects web-services 38497-soap-envelope-prefix :", "I need to use Spring WS template to make it work .", "I am attempting to upgrade an app from Spring WS 2.1.1 to 2.3.0 .", "Endpoints section http : docs.spring.io spring-ws site reference html server.html", "I want to know where spring-ws use this marshaller .", "upon reading a bit about Spring WS I am new to this", "we got to declare a MessageDispatcherServlet which is a front-controller in web.xml for Spring WS .", "To configure Spring-WS to use SOAP 1.2 add the following bean definition :", "I m using Spring-WS for Client an try to update to the newest version .", "Of course it would be better to be fixed in the next Spring-WS Version .", "First of all can you remove all the Spring WS security content .", "Instead we want to check for faults as Spring WS does by default .", "i use 2.1.4.RELEASE spring-ws I solved this problem .", "I still see the CachingPayload class in Spring-WS 2.2.4 .", "As explained in the question Spring WS separately deploy web service and bussiness layer http : stackoverflow.com questions 22952721 spring-ws-separately-deploy-web-service-and-bussiness-layer .", "I would suggest to go with Spring WebServiceTemplate .. . .. . WebServiceTemplate - The WebServiceTemplate is the core class for client-side Web service access in Spring-WS .", "I am using spring-web services framework to call some SOAP apis ." ] }
{ "confidence": [ 60.661376953125, 58.57761001586914, 57.914772033691406, 57.730804443359375, 57.31204605102539, 57.06097412109375, 56.87944030761719, 56.87495422363281, 56.65264892578125, 55.2731819152832, 55.0984001159668, 54.824005126953125, 54.23933410644531, 54.0161018371582, 53.77607345581055, 53.497188568115234, 53.41149139404297, 53.38174057006836, 52.79586410522461, 52.78078079223633 ], "content": [ "Question : When trying a simple Web Service Hello World example with just one @Endpoint annotated class the Endpoint is not registered when using the sws : annotation-driven namespace . However by adding the usual context : component-scan everything works well the Endpoint-class is registered correctly . This is only true for the @Endpoint annotation all other annotations @RequestPayload @ResponsePayload @PayloadRoot will be registered by the sws-namespace as expected . Should the @Endpoint annotation not be processed by this namespace as well Comment : Can you tell me the address to this example I am having hard time finding good Spring WS 2 tutorial . .. . Answer : For now use both as in : .. . .. . this finds both @Endpoint and @PayloadRoot @ResponsePayload annotations . This is the way they tell you to do it in Spring-WS reference : .. . .. . http : static.springsource.org spring-ws sites 2.0 reference html tutorial.html tutorial.implementing.endpoint Comment : True however there it s said : ...we also instruct Spring-WS to use annotation-driven endpoints with the sws : annotation-driven element.. . so I understand that the context : cmp-scan was only used for registering components outside the sws-domain . Comment : So is this a bug or by-design I am having the same issue and this answer resolves it . It is just not this way in the examples Pivotal has in their spring documentation . See the 5.4 . Endpoints section http : docs.spring.io spring-ws site reference html server.html Comment : and can you explain me where this marhaller are sets Comment : It s a JAXB marshaller that you need to define and implement . Please see Spring s doc : docs.spring.io spring-ws site reference html oxm.html http : docs.spring.io spring-ws site reference html oxm.html and an example : thoughtforge.net 610 marshalling-xml-with-spring-ws-and-jaxb http : thoughtforge.net 610 marshalling-xml-with-spring-ws-and-jaxb and also : mkyong.com java jaxb-hello-world-example http : www.mkyong.com java jaxb-hello-world-example Comment : but I am not interested in jaxb . I want to know where spring-ws use this marshaller . In example which you post there is nothing about spring-ws mapping it is mention in comments", "Question : I quite didnt get the difference between a regular web service implemented either through spring or axis versus Remoting . If my question is not at all related I am just confused between spring-web services vs spring-remoting . When to go for remoting and when to go with a web service . Appreciate your answer .. . Answer : Spring Web Services http : static.springsource.org spring-ws site is a dedicated Spring Project using Spring s own Web Service technology whereas Spring Remoting http : static.springsource.org spring docs 3.0.x spring-framework-reference html remoting.html is a common approach of integrating different third party remoting technologies . Spring-WS is always contract-first while Spring Remoting is often code-first .", "Question : I am in the process of researching comparing CXF and Spring-WS for web-services I need to function both as a provider and a consumer of WS . In a nutshell I have been told that Spring-WS is more configurable but CXF is easier to get up and running . This question is subjective but will help direct me in my research . What experience do you have with either of these frameworks Have you run into any pitfalls with either framework Have you found any useful features provided by either that is possibly not provided by the other .. . Answer : We have an experience with CXF http : cxf.apache.org and it s predecessor XFire http : xfire.codehaus.org and I can recommend it as solid quick WS creating and executing and reliable framework . Regarding the issues that you can met with CXF see my post Recommended framework for Java Web Services http : stackoverflow.com questions 289977 recommended-framework-for-java-web-services 290205 And I agree with toolkit http : stackoverflow.com users 3295 toolkit that the biggest difference between frameworks are ideologically : what is the first code i.e . interface or contract i.e . wsdl . See some details here : .. . .. . Best Practices in Spring Web Services and Java http : www.ddj.com architect 201802027 .. . Spring WS Tutorial http : static.springsource.org spring-ws site reference html tutorial.html .. . What s New in Spring Web Services 1.5 http : blog.springsource.com 2008 03 28 whats-new-in-spring-web-services-15 .", "Question : I Create Web service with spring-ws Soap and now i want create encryption web service . my applicationContext.xml is : .. . .. . but i has e this error : .. . .. . I got help Spring Web Services 2 Cookbook . but this book use the spring-web service 1.5 but i use spring-web service 2.2.1 i Create web service in spring-boot web service 1.2.5 in the server-side Can help me .. . Answer : I ran into the same error . Essentially this property was removed sometime after 2.0.3 of Spring WS when they decided to upgrade to Apache WSS4J 1.6 and they couldn t figure out how to create a callback handler on Securement actions . So they basically just removed it with no warning or explanation and without updating their documentation . Javadoc for Wss4JSecurityInterceptor http : docs.spring.io spring-ws site apidocs org springframework ws soap security wss4j Wss4jSecurityInterceptor.html .. . .. . Typical move by the Spring folks . Here is an issue in their JIRA tracker https : jira.spring.io browse SWS-849 where they are labeling this as a Feature Improvement slated for 2.3 . Luckily however somebody there posted a potential workaround until this happens . He is creating his own Securement Callback Handler class and his own custom Wss4JSecurityInterceptor class that adds this property . It is worth looking into .", "Question : I am trying to create a new Spring webservice project in Spring Tool Suite STS . I checked this link .. . http : static.springsource.org spring-ws site reference html tutorial.html .. . But this doesn t tell the steps very clearly . Can anyone please share links to some useful resources that show step-by-step how to create a Spring WS project Comment : what is not clear in tutorial Comment : @Jigar Parekh - project structure - unclear file names unclear too .. . Answer : Maybe these links will be helpful : .. . .. . Step by step Spring-WS http : springtips.blogspot.com 2007 07 step-by-step-spring-ws.html .. . Spring Web Services http : www.javabeat.net 2010 06 introduction-to-spring-web-services .. . Simple Spring Web Services http : www.springbyexample.org examples simple-spring-web-services.html .. . Basic Spring Web Service Tutorial From Contract to Security http : jeromebulanadi.wordpress.com 2010 02 25 basic-spring-web-service-tutorial-from-contract-to-security", "Question : Basically there is a back-end application that is exposing both SOAP as well as RESTful services . I have decided to use Spring WS 1.5.8 for SOAP services and .. . Spring MVC 3.0 for RESTful services as this is a new feature . upon reading a bit about Spring WS I am new to this we got to declare a MessageDispatcherServlet which is a front-controller in web.xml for Spring WS . For Spring MVC we should declare a DispatcherServlet which is also a front-controller in web.xml . for both servlets we have different servlet declarations in web.xml . i.e . for Spring WS I have .. . .. . for Spring MVC RESTful i have .. . .. . Therefore i should use 2 config files one named springmvc-servlet.xml and another springsoap-servlet.xml Can this be done .. . Answer : Yes this is fine . You put the MVC-related stuff into one and the WS stuff into another . If they need to share services then it s best to declare a shared context using ContextLoaderListener in web.xml which defines a third context which should contain the shared beans see docs for example of how to set this up http : static.springsource.org spring docs 3.0.x spring-framework-reference html web-integration.html web-integration-common . It s also worth nothing that MessageDispatcherServlet is just a convenient assembly of a standard DispatcherServlet plus a few other components . You can just declare those components yourself and use a DispatcherServlet but that gets quite fiddly . Comment : Thank you : I know how to set up a applicationContext.xml using ContextLoaderListener. .", "Question : Basically there is a back-end application that is exposing both SOAP as well as RESTful services . I have decided to use Spring WS 1.5.8 for SOAP services and .. . Spring MVC 3.0 for RESTful services as this is a new feature . upon reading a bit about Spring WS I am new to this we got to declare a MessageDispatcherServlet which is a front-controller in web.xml for Spring WS . For Spring MVC we should declare a DispatcherServlet which is also a front-controller in web.xml . for both servlets we have different servlet declarations in web.xml . i.e . for Spring WS I have .. . .. . for Spring MVC RESTful i have .. . .. . Therefore i should use 2 config files one named springmvc-servlet.xml and another springsoap-servlet.xml Can this be done .. . Answer : You can download an example at https : code.google.com p spring-ws-2-0-0-rc2-tutorial downloads detail name spring-ws.zip can 2 q https : code.google.com p spring-ws-2-0-0-rc2-tutorial downloads detail name spring-ws.zip can 2 q", "Question : null .. . Answer : I have a web based Spring 4 + Struts2 application based on Tomcat 8 and I want to expose some web-services by jax-ws . Spring solution for expose web service is as below : .. . .. . 1 . Run on a JAVA-EE container . Not good for me as I have tomcat . 2 . Let spring starts a new HTTPServer . That will be a http server which is delivered in JDK . Well I wonder this tiny http server can do my services and also I need to configuring this server with SSL which seems not that easy . 3 . Add the jax-ws-commons jar from http : jax-ws-commons.java.net spring to your container . Now you server can handle web service requests . To me this seems a bad practice at all I should add huge number of unknown jar files the project seems to be not active and in this way I am going to make add some glass fish internal classes to tomcat . Although I want to use the jax-ws and spring core supports this but my environment does not fit well to none of above . .. . .. . By looking at spring-ws project I find that : .. . .. . 1 . There is a MessageDispatcherServlet which can expose services in a servlet environment . 2 . Using spring-ws I should not add any unusual dependency to my project . So with spring-ws I can let Tomcat handle my requests I will keep my dependencies less . However I could not find any way to configure spring-ws project to detect jax-ws annotations . It seems that jax-ws is not supported .. . .. . My questions : .. . .. . 1 . Is there any servlet in spring core that can act as MessageDispatcherServlet This will eliminate the HttpServer .. . 2 . Can I configure spring-ws to detect jax-ws annotated classes", "Question : I am in the process of researching comparing CXF and Spring-WS for web-services I need to function both as a provider and a consumer of WS . In a nutshell I have been told that Spring-WS is more configurable but CXF is easier to get up and running . This question is subjective but will help direct me in my research . What experience do you have with either of these frameworks Have you run into any pitfalls with either framework Have you found any useful features provided by either that is possibly not provided by the other .. . Answer : About Apache CXF : .. . .. . CXF supports several standards including SOAP the WSI Basic Profile WSDL WS-Addressing WS-Policy WS-ReliableMessaging WS-Security WS-SecurityPolicy and WS-SecureConversation . Apache CXF offers both contract-last starting with Java and Contract-first starting with the WSDL approaches . Apache CXF implements JAX-WS and JAX-RS . About Spring WS : .. . .. . Spring WS offers only contract-first starting from an XSD Schema . Spring WS supports SOAP WS-Security WS-Addressing . So at the end I see Spring WS as a minimal web-services framework but consider that it doesn t in my opinion have any advantages over Apache CXF which integrates extremely well with Spring . Between both I d pick up Apache CXF .", "Question : I would like to implement a Spring Web Service which accepts the call notifySmsDeliveryReceipt on our endpoint http : xxx.xx.xx.x : 8088 axis2 services SmsNotificationService . The content of the call will be like thw following : .. . .. . The operation notifySmsDeliveryReceipt should return the following : .. . .. . I have set up a Spring WS project and started with an endpoint . While I don t need someone who could write the code for me I would really appreciate it if anyone could tell me how handleNotifyReceipt should be annotated and what parameter it should receive . I also need help in configuring the service to listen on the given URL and redirect the operation to handleNotifyReceipt . I would also be grateful if anyone could tell me how to return the XML that the caller expects . Thanks in advance . .. . Answer : Hope below links could help you.. . http : docs.spring.io spring-ws site reference html server.html .. . .. . Spring RESTful web service using only XML config http : stackoverflow.com questions 29911137 spring-restful-web-service-using-only-xml-config", "Question : I am in the process of researching comparing CXF and Spring-WS for web-services I need to function both as a provider and a consumer of WS . In a nutshell I have been told that Spring-WS is more configurable but CXF is easier to get up and running . This question is subjective but will help direct me in my research . What experience do you have with either of these frameworks Have you run into any pitfalls with either framework Have you found any useful features provided by either that is possibly not provided by the other .. . Answer : Apache CXF : .. . .. . Key Positives : .. . .. . Most widely used Web Services Standard Now Improvement over AXIS2 which is now gradually being replaced by Apache CXF .. . .. . Intuitive Easy to Use less coding required as compared to AXIS2 .. . .. . Clean separation of front-ends like JAX-WS from the core code .. . .. . Fully compliant with JAX-WS JAX-RS others .. . .. . Best Performance across all available framework with minimum computation overhead .. . .. . Supports wide variety of front-end models .. . .. . Supports both JAX-WS JAX-RS for Restful Services .. . .. . Supports JBI SDO not supported in AXIS2 .. . .. . Compatible with Spring Framework .. . .. . Key Concerns : .. . .. . Does not support Orchestration WS Transactions yet .. . .. . Does not support WSDL 2.0 yet .. . .. . Spring WS : .. . .. . Key Positives : .. . .. . Best in terms of supporting Contract-first Web Services Development Approach .. . .. . Enforces Standards Best Practices by Framework Constraints no way out of it hence limitation as well .. . .. . Supports Spring Annotations as well as JAX-WS .. . .. . Least code from developer s perspective .. . .. . Best Aligned with Spring Technology Stack also similar architectural stack as Spring MVC including Spring Security .. . .. . Key Concerns : .. . .. . Least number of WS- Specifications supported does not fully compliant with JAX-WS .. . .. . Spring offers itself as standard hence other Java-compliant frameworks support better standards support .. . .. . Only support Contract-first Web Services Development Model Comment : Should be mentioned the answer comes from here : dzone.com articles apache-cxf-vs-apache-axis-vs https : dzone.com articles apache-cxf-vs-apache-axis-vs", "Question : I have read the Spring doc regarding Securing your Web services with Spring-WS http : static.springsource.org spring-ws site reference html security.html but it looks for me as-if the article is just regarding server-side and not client-side . Indeed it is working fine for server-side with Wss4jSecurityInterceptor but I need to sign a request to an external Web service . So first question . Am I right and chapter 7 of Spring Web Services documentation just apply to server-side Second . It is possible to add security like signed headers to SOAP requests on client-side with Spring in a way similar simple elegant to how it is done on server-side I have found this question http : stackoverflow.com q 9241259 980472 but it looks like signing is done with Apache CXF and this article http : gleichmann.wordpress.com 2009 03 02 ws-security-using-cert-authentication-with-spring-ws-v-how-to-implement-a-message-signing-client where signing is done in a home made way . Thanks in advance . Comment : Just a clarification : what exactly I want to do is sign the request . .. . Answer : Well I am afraid I am going to answer my own questions : .. . .. . First one : NO . Chapter 7 of Spring Web Services documentation is about both sides client and server . Second one : Acording with the answer to the fisrt question YES as it is described on chapter 7 of Spring Web Services documentation . My error was that I was declaring interceptor in this way : .. . .. . and this interceptors just affect to server-side Web services . For clients it should be done in this way :", "Question : I am using Spring MVC 4 Rest but now as i need to consume a web service i decided to use Spring Ws with Appache Tomcat7 server and I am trying to connect to a third party that is a Bank Api I have to achieve mutual-authentication that is two-way SSL in order to send my Soap Requests .. . .. . 1 . If certificates are placed in the trust store and key store respectively in spring-ws then while trying to connect to https server will the verification and sending certificates happen automatically 2 . What are the steps or procedures to be followed to configure my Spring Ws application to consume a web service over https 3 . If verification and sending is not done automatically then how do i send and verify the certificate before sending the soap request using Spring ws .. . Answer : Spring WS security provides support via WebServiceTemplate http : docs.spring.io spring-ws site apidocs org springframework ws client core WebServiceTemplate.html . There are two kinds of security mechanism SUN s XML and Web Services Security XWSS through XwsSecurityInterceptor and Apache s WSS4J throughWss4jSecurityInterceptor . These are just extension points so you can customize all your security needs ranging from authentication signing validation encryption and decryption . Please also check my answer regarding keystores and truststore set up to your other http : stackoverflow.com questions 37608813 how-does-java-handle-certificates-in-spring-ws question . More reading here XwsSecurityInterceptor http : docs.spring.io spring-ws site reference html security.html security-xws-security-interceptor and Wss4jSecurityInterceptor http : docs.spring.io spring-ws site reference html security.html security-wss4j-security-interceptor . Comment : In Two way SSL configuration is the certificate exchange and verification done by tomcat itself or I need to use a security interceptor for achieving two-way ssl commnication Comment : You can use tomcat for certificate exchange and verification but for authentication signing validation and encryption decryption you ll need the ws-security implementation which spring-ws provides with the interceptors .", "Question : I am in the process of researching comparing CXF and Spring-WS for web-services I need to function both as a provider and a consumer of WS . In a nutshell I have been told that Spring-WS is more configurable but CXF is easier to get up and running . This question is subjective but will help direct me in my research . What experience do you have with either of these frameworks Have you run into any pitfalls with either framework Have you found any useful features provided by either that is possibly not provided by the other .. . Answer : I think the biggest difference is Spring-WS is only contract-first whilst I believe CXF is normally contract-last . http : static.springsource.org spring-ws sites 1.5 reference html why-contract-first.html .. . .. . Contract-last starts with Java code so it is usually easier to get started with . However the WSDL it creates tends to be more fragile . Comment : JAX-WS supports the contract-first approach which is how people doing serious developments are using it I believe . So that s definitely not a good way to differentiate JAX-WS stacks and Spring WS . Actually Spring WS doesn t compare with JAX-WS Spring WS is just a minimalistic WS stack .", "Question : I am in the process of researching comparing CXF and Spring-WS for web-services I need to function both as a provider and a consumer of WS . In a nutshell I have been told that Spring-WS is more configurable but CXF is easier to get up and running . This question is subjective but will help direct me in my research . What experience do you have with either of these frameworks Have you run into any pitfalls with either framework Have you found any useful features provided by either that is possibly not provided by the other .. . Answer : Please take a look at a related post at : Building a web service with Spring-WS http : justcompiled.blogspot.com 2010 09 building-web-service-with-spring-ws.html", "Question : I m using Spring Web Services to expose a service as a web service . In my spring configuration xml file I have a bean which is an instance of DefaultWsdl11Definition . One of the properties that needs to be set is the locationUri . This needs to be a fully qualified Uri but I don t want to have to change this value when the application gets promoted from dev to uat and to production . Spring knows what the web application context root is so is there a variable that I can specify in my configuration file to access it Something like : .. . Answer : May be late but may some other need a solution too : .. . .. . set property in servlet : .. . .. . web.xml .. . .. . The bean declaration in spring-ws-context.xml :", "Question : We are trying to build a web service here . We want the service to be available at axis2 services SmsNotificationService . The operation that will be invoked is notifySmsDeliveryReceipt . The following is Spring s endpoint . The client will invoke the service using this XML . The service needs to return this XML : .. . .. . Tomcat s access log registers a service call but the remote caller received an error : .. . .. . Catalina s log shows the following : .. . .. . The problem may lie in the endpoint not being registered by Spring-WS . Does anyone have any idea how to register an endpoint and declare an operation using Spring-WS .. . Answer : If you are using spring WS then you should define .. . .. . servlet mapping in web.xml file .. . .. . MessageDispatcherServlet scans all beans of Wsdl11Definition in classpath and publish them . Then you need to create a spring configuration file : .. . .. . springws-config.xml Comment : Your answer seems to be correct . The service is now throwing 500 errors . Comment : post your error", "Question : I am brand new to Spring web-services and I keep getting this error : .. . .. . After some digging around it looks like I most likely have a version mismatch between my schemas and jars but I do not see where I m shooting for v3.1 . Here is every Spring jar in my library : .. . .. . spring-ws-servlet.xml .. . .. . web.xml .. . .. . applicationContext.xml I m not sure that I even need this.. . The error is being thrown in spring-ws-servlet.xml whenever it reads a element . Like I said I m brand new to Spring web-services and recognize that there is probably an obvious flaw in my setup and would greatly appreciate any help . Thanks .. . Answer : Solved . Apparently one of my dependencies was bringing in a different version of spring-ws even though it wasn t listed under my referenced libraries . I actually ended up not needing the whole dependency so I simply removed it and now I m not getting any errors . Comment : Do you know which dependency it was I have read your question yesterday before your answer and the only thing I could come up with on google was something similar . Comment : Well the dependency I removed was one written by my company so I can t really say for sure . I m assuming since I still have some 3.0 spring jars in my library that it was just an older version of spring-ws . Comment : Ok I was just curious - : Thanks", "Question : null .. . Answer : I am building spring-ws outside of an Eclipse project by cloning the source and running . gradlew build at the source root in the Windows PowerShell . Regardless of which version branch I have checked out I get the following build failure : .. . .. . What went wrong : Cannot expand ZIP C : Users wsonner spring-ws spring-ws build distributions spring-ws-2.3.0.RELEASE-schema.zip as it does not exist . What I tried : Run with --stacktrace option to get the stack-trace . Run with --info or --debug option to get more log output . BUILD FAILED .. . .. . I am cloning and using the build instructions from the git repository found at spring-projects spring-ws https : github.com spring-projects spring-ws .", "Question : I am trying to create a new Spring webservice project in Spring Tool Suite STS . I checked this link .. . http : static.springsource.org spring-ws site reference html tutorial.html .. . But this doesn t tell the steps very clearly . Can anyone please share links to some useful resources that show step-by-step how to create a Spring WS project Comment : what is not clear in tutorial Comment : @Jigar Parekh - project structure - unclear file names unclear too .. . Answer : Try this one . You can see in the screen-shot that the IDE has the famous Spring logo : http : briansjavablog.blogspot.com 2013 01 spring-web-services-tutorial.html Comment : Here s another which is a little more complete since it fills in a missing part about using mvn eclipse : eclipse to get the STS project file created so that the projects can be imported and worked with in STS : ankeetmaini.wordpress.com 2011 10 24 http : ankeetmaini.wordpress.com 2011 10 24 spring-web-services-2-made-easy Moreover this one does not try to be fancy but is the simplest by far . I recommend this one 1st to get your feet wet then going to the site above for a detailed explanation of what s going on ." ] }
[ "yes-answer-long", "yes-answer-short" ]
web-services
UNK_RELATION
gcdwebserver@ios@60
gcdwebserver -- lightweight gcd based http server for os x @placeholder includes web based uploader webdav server .
{ "confidence": [ 37.66505813598633, 36.423553466796875, 35.67565155029297, 32.432151794433594, 31.40463638305664, 30.86221694946289, 30.86221694946289, 30.181194305419922, 29.728069305419922, 29.38361358642578, 29.0833683013916, 29.0833683013916, 29.069494247436523, 28.90966033935547, 28.817096710205078, 28.523971557617188, 28.523971557617188, 28.523971557617188, 28.523971557617188, 28.33072280883789, 28.27467918395996, 28.27467918395996, 27.997203826904297, 27.935100555419922, 27.935100555419922, 27.743209838867188, 27.647361755371094, 27.59365463256836, 27.59365463256836, 27.59365463256836, 27.59365463256836, 27.59365463256836, 27.153148651123047, 27.086231231689453, 26.801416397094727, 26.543811798095703, 26.543811798095703, 26.543811798095703, 26.543811798095703, 26.291702270507812, 26.291702270507812, 26.291702270507812, 26.291702270507812, 26.291702270507812, 25.936431884765625, 25.936431884765625, 25.936431884765625, 25.936431884765625, 25.936431884765625, 25.936431884765625, 25.862789154052734, 25.862789154052734, 25.608718872070312, 25.40152359008789, 25.09201431274414, 25.09201431274414, 25.05982208251953, 25.057958602905273, 24.997543334960938, 24.925506591796875, 24.925506591796875, 24.714523315429688, 24.358448028564453, 24.20556640625, 24.20556640625, 24.20556640625, 24.20556640625, 24.20556640625, 24.20556640625, 23.943748474121094, 23.849275588989258, 23.704164505004883, 23.704164505004883, 23.704164505004883, 23.704164505004883, 23.704164505004883, 23.704164505004883, 23.704164505004883, 23.704164505004883, 23.704164505004883, 23.63405418395996, 23.55944061279297, 23.39531707763672, 23.390117645263672, 23.338294982910156, 23.338294982910156, 23.057300567626953, 22.95896339416504, 22.95896339416504, 22.81398582458496, 22.80606460571289, 22.52762222290039, 22.473047256469727, 22.337966918945312, 22.337966918945312, 22.10715103149414, 21.973297119140625, 21.973297119140625, 21.973297119140625, 21.973297119140625 ], "content": [ "I have used GCDWebServer for an http server on iOS .", "I am using the GCDWebUploader https : github.com swisspol GCDWebServer web-based-uploads-in-ios-apps .", "I m using GCDWebServer to create a HTTP server on my device .", "I m suspecting a problem with Cordova integration of GCD Web Server .", "Anyone managed to use GCDWebServer on tvos", "GCDWebServer builds on tvOS and the latest pre-release version https : github.com swisspol GCDWebServer has a sample tvOS project .", "After editing the Podfile and run : .. . .. . You can call GCDWebServer in your TV-TARGET and GCDWebServer runs well in your tvOS .", "I ve got GCDWebServer up and running bridged to Swift .", "This is a networking problem not a GCDWebServer one .", "i want to conference about GCD Webserver to my classmates but i don t know how to configure and use it and i don t have mac laptop to test so i need a good tutorial clip about this searching a lot but could not find anything every thing is just about GCD not GCDWebserver", "Here I am using NexPlayer with GCDWebServer my videos are encoded and needs to sync with server .", "Please suggest something or can I use any other server instate of GCDWebServer .", "I am using GCD Server code from Git Hub for http communication in my app .", "See the Advanced asynchronous version in the GCDWebServer README https : github.com swisspol GCDWebServer asynchronous-http-responses for a similar concept .", "I use GCDWebServer precisely WebUploader .", "Are you sure you are keeping the GCDWebServer instance around too", ": let webServer GCDWebServer Additionally as stated I put a break in dealloc .", "In the past I ve used GCDWebServer to handle GET request passing query parameters .", "I did not get far by tweaking GCDWebServer declarations either .", "Where can I change the build target for GCD Web Server and change the link from 7.0 to 9.0", "I have already checked Info plist in GCDWebServer framework but didn t find any variable in GCDWebServer to get Version .", "Check here https : github.com swisspol GCDWebServer gcdwebserver--background-mode-for-ios-apps .", "The problem is unlikely to be with GCDWEBServer itself .", "You can t expect to pass this URL to GCDWebServer and expect the server to magically do something with it .", "I need to send a song from the client device to the server using GCDWebServer technique .", "Just running the basic server works as intended when I am connected to a wifi network using the code below : .. . .. . logs : .. . .. . Visit http : 192.168.1.132 : 8080 in your web browser .. . .. . When I drop wifi and start the app and server I get : .. . .. . GCDWebServer started on port 8080 and reachable at null", "I added GCDWebServer by Cocoapods.I guess the problem caused by Pods GCDWebServer TARGETS.I saw the settings are compatible with iOS building but not with tvOS.Maybe I should try to configure manually .", "GCDWebServer doesn t work if connected with different wifi network .", "In wkWebView which version of GCDWebServer framework is used .", "There is therefore no way to know the version of GCDWebServer programatically .", "In GCDWebServer 3.2.6 and later the version is in the Info.plist file .", "I m trying to make GCDWebServer show static content .", "iOS re-routing requests w GCDWebServer not redirecting http : stackoverflow.com questions 33002143 ios-re-routing-requests-w-gcdwebserver-not-redirecting .. . .. . Thanks", "Such basic usage of GCDWebServer is documented in depth .", "I want to create a server on iOS with GCDWebServer which will accept request to localhost and then draw the data from another url a video file and stream the data to the response .", "See the implementation of GCDWebServerGetPrimaryIPAddress https : github.com swisspol GCDWebServer blob master GCDWebServer Core GCDWebServerFunctions.m .", "I am trying to add GCDWebServer https : github.com swisspol GCDWebServer to a Swift 1.2 project .", "I am using GCDWebServer cocoapod and trying to start static code : .. . .. . GCDWebServer not able to find runWithPort method .", "Try to follow the example listed in the official repository : github.com swisspol GCDWebServer https : github.com swisspol GCDWebServer", "use GCDWebServer when method is GET NSLog request.query is the parameter dictionary I passed that is want I want .", "I ve tried compiling in Xcode 7.1 and I get : .. . .. . Is there some usage inside GCDWebServer of frameworks that tvOS doesn t have", "GCDWebServer is intended to be used by developers who already know about Objective-C and the Mac iOS environment .", "The official README https : github.com swisspol GCDWebServer blob master README.md is the best place to start from .", "When you create a GCDWebServer instance you specify a port so that same port will always be used .", "This will keep your app alive and GCDWebServer won t automatically suspend itself either .", "How can I get the version of GCDWebServer used in wkWebView .", "The version of GCDWebServer as of 3.2.5 and earlier is not available from the Info.plist of the framework for historical reasons .", "Gcdwebserver doesn t work if i connected with different WiFi network .", "You need to pass the path to the directory to serve not the index file to GCDWebServer on initialization .", "But I found in GCDWebServer documentation that we can disable this suspension .", "It seems that GCDWebServer close the first socket immediately .", "This was fixed by https : github.com swisspol GCDWebServer pull 256 .", "Is there another web server library compatible with https for IOS", "When the app is suspended is the server connection technically closed", "Yup the same example code is listed here - github.com swisspol GCDWebServer serving-a-static-website https : github.com swisspol GCDWebServer serving-a-static-website", "In my iOS app I m trying to add a simple GCDWebServer https : github.com swisspol GCDWebServer redirect handler like so : .. . .. . but my url is malformed .", "I am working on gcdwebserver i am sending post request to gcdwebserver sending some params also but in addhandlermatchblock not getting query params please reply .. . .. . code :", "The GCDWebServer ReadMe says the handlers are executed on arbitrary threads within GCD so special attention must be paid to thread-safety and re-entrancy and I think that s my problem .", "I try to create a web server on iPhone to provide urls of images in ablum .", "BTW.I use Cocoapods to install GCDWebServer in my project and I build my tv app with my phone app together but they are different targets .", "I could not find direct examples or descriptions of how this may be done with GCDWebServer but I found request type GCDWebServerDataRequest that appears to be what I would need .", "Is there a way that I can configure GCDWebServer to make this work", "I tried also start web server on custom port but it does not work either .", "I use GCDWebServer run method -addHandlerForMethod : path : requestClass : twice with different parameter path .", "Let GCDWebServer support different paths with same port thank u", "cannot have 2 GCDWebServer instances running in the same port .", "You cannot have 2 GCDWebServer instances running in the same port .", "BTW - GCDWebServer guys why you have dissabled issues on GitHUb", "You will need to fork GCDWebServer on GitHub and customize it to your needs .", "I have a client iOS application that uses GCDWebServer https : github.com swisspol GCDWebServer to serve images and videos stored in the NSSearchPathDirectory.DocumentDirectory folder of the app on my device .", "I want assets library url for my web server .", "In the case of GCDWebServer set the GCDWebServerOption AutomaticallySuspendInBackground option to NO and make sure to start a background task when your app is sent to the background .", "If your app gets frozen while in background be sure to stop GCDWebServer and restart it when your app comes back to the foreground .", "Check the log in Xcode when the app is running it will tell exactly what the IP address and port for GCDWebServer .", "what i have to do if i want GCDWebServer work even with different wifi network .", "What i have to do if i want GcdwebServer work even in different WiFi network", "In any case GCDWebServer doesn t care about what network your device computer running it is on .", "All you need is make sure that your device and the port on which GCDWebServer runs can be reached from the outside world .", "I try to run GCDWebServer in order to access it from the same device on which it is going to work .", "See examples in REASME : github.com swisspol https : github.com swisspol GCDWebServer advanced-example-2-implementing-forms", "The server suspends when the app is in background .", "The easiest way is through GCD e.g .", "I had already add Link Binary With Libraries like your demo project.I create a Bridging-Header file for bridging Swift and GCDWebServer.Wait for a more particular document for tvOS.BTW GCDWebServer is a really nice open-source project .", "I ve read the question about how to open a mobileconfig file stored in the app Unable to open mobileconfig file in Safari ios devices resolved http : stackoverflow.com questions 28926846 unable-to-open-mobileconfig-file-in-safari-ios-devicesresolved I need to do the same in my app but i dont know how to make a server running in background I ve tried with CocoaHTTPServer and GCDWebServer but in both I need wifi connection to make the server .", "GCDWebServer has no built-in API to create multipart messages .", "Then the ionic-framework and its integration with GCDWebServer is misconfigured .", "GCDWebServer automatically implement range support if you use GCDWebServerFileResponse .", "I am running local GCDWebServer in iphone simulator I stored some html files inside document directory right now i want to access that html file through gcdwebserver i am trying but not getting response please help me .. . .. . code :", "You are supposed to pass configuration options using a NSDictionary with the following method from a GCDWebServer instance : .. . .. . Edit : a practical example with an on-the-fly dictionary in Objective-C : .. . .. . Swift code .. . .. . A little tip : if you want to change the GCDWebServer log level you can use the static method :", "But I am not seeing any change in the server suspension .", "Looks like nobody is answering the actual question here : this is not about uploading a photo from iOS to a web server or viewing it in a local UIWebView but about serving that photo using GCDWebServer so that users can view it by connecting to the device using a web browser e.g .", "Specifically this part .. . .. . If the app goes in the background while no HTTP connections are opened GCDWebServer will immediately suspend itself and stop accepting new connections as-if you had called -stop this behavior can be disabled with the GCDWebServerOption AutomaticallySuspendInBackground option .", "Here is the code where the POST handler for the local web server is implemented .", "Taking a cue from the form on the README https : github.com swisspol GCDWebServer advanced-example-2-implementing-forms it says to return the following for the addHandlerForMethod in Objective-C .. .", "If you mean this WKWebView https : developer.apple.com library ios documentation WebKit Reference WKWebView Ref then it s from Apple and has nothing to do with GCDWebServer .", "What I am observing via several tests is that although the network connection hasn t changed the web server hasn t stopped not logged dealloc breakpoints not hit requests queue raised stopped not called delegate methods not hit it simply just stops responding to incoming requests .", "I m getting occasional crashes in my GCDWebServer handlers which access mutable dictionaries .", "In theory the loopback interface should still be active but GCDWebServer doesn t seem to have an option to allow you to specify an interface", "In theory that s all I need in order to make the GCDWebServer class available to Swift .", "However if I try to use it I get : .. . .. . Use of unresolved identifier GCDWebServer .. . .. . I m not sure what I m missing here ." ] }
{ "confidence": [ 45.68531799316406, 43.16876220703125, 39.12869644165039, 39.086612701416016, 38.79290771484375, 37.65782928466797, 37.46319580078125, 36.88266372680664, 36.48739242553711, 36.33555603027344, 36.20010757446289, 36.10304260253906, 35.44525909423828, 35.26664733886719, 34.787513732910156, 34.62139129638672, 34.187068939208984, 33.991981506347656, 33.65068435668945, 33.56953048706055 ], "content": [ "Question : i want to conference about GCD Webserver to my classmates but i don t know how to configure and use it and i don t have mac laptop to test so i need a good tutorial clip about this searching a lot but could not find anything every thing is just about GCD not GCDWebserver .. . Answer : GCDWebServer is intended to be used by developers who already know about Objective-C and the Mac iOS environment . The official README https : github.com swisspol GCDWebServer blob master README.md is the best place to start from . Then open the Xcode project and just look at the code for the apps . There is no video tutorial or blog tutorial that I know of .", "Question : I am new to iOS and swift with some experience in android . I am using the GCDWebUploader https : github.com swisspol GCDWebServer web-based-uploads-in-ios-apps . Its working fine . The server suspends when the app is in background . I am aware of the constraints in iOS Background Execution . I dont want to change that behaviour . But I found in GCDWebServer documentation that we can disable this suspension . Check here https : github.com swisspol GCDWebServer gcdwebserver--background-mode-for-ios-apps . Specifically this part .. . .. . If the app goes in the background while no HTTP connections are opened GCDWebServer will immediately suspend itself and stop accepting new connections as-if you had called -stop this behavior can be disabled with the GCDWebServerOption AutomaticallySuspendInBackground option . How do you set this option . I tried .. . .. . And I get the obvious error : .. . .. . Cannot assign to value : GCDWebServerOption AutomaticallySuspendInBackground is a let constant .. . Answer : You are supposed to pass configuration options using a NSDictionary with the following method from a GCDWebServer instance : .. . .. . Edit : a practical example with an on-the-fly dictionary in Objective-C : .. . .. . Swift code .. . .. . A little tip : if you want to change the GCDWebServer log level you can use the static method : Comment : yes I was able to set the variable this way . But I am not seeing any change in the server suspension . It still does suspend when in background . I am using the webuploader - it wont work that way Will be doing more reading on it . I am adding this as the answer meanwhile . Thank you Comment : Once I got the it working with iOS 7 by disabling the system idle timer : UIApplication sharedApplication .idleTimerDisabled YES . I m not quite sure though if it works correctly with newer iOSes since they introduced a better energy control .", "Question : I am not accessing from a different network . I am just trying to serve files for a hybrid app . Just running the basic server works as intended when I am connected to a wifi network using the code below : .. . .. . logs : .. . .. . Visit http : 192.168.1.132 : 8080 in your web browser .. . .. . When I drop wifi and start the app and server I get : .. . .. . GCDWebServer started on port 8080 and reachable at null Comment : Does your device have a 3G 4G connection If not then when WiFi is off it has no active interfaces . In theory the loopback interface should still be active but GCDWebServer doesn t seem to have an option to allow you to specify an interface Comment : Good point . No 3g 4g on the device . .. . Answer : This is expected behavior although the docs could be more clear on this . - NSURL serverURL is just a convenience method that returns the primary IP address of your device appended with the server port . If your device is not connected to a network it will return nil . See the implementation of GCDWebServerGetPrimaryIPAddress https : github.com swisspol GCDWebServer blob master GCDWebServer Core GCDWebServerFunctions.m . If this method returns returns nil it simply means either the server is not running or it doesn t appear to have an external facing IP i.e . it s only reachable through localhost .", "Question : I m building my app using Ionic Framework and updating it for iOS 9 at this time . My iOS Build Target is set to 9.0 . So I m not sure why it s trying to build for 8.3 . Where can I change the build target for GCD Web Server and change the link from 7.0 to 9.0 enter image description here http : i.stack.imgur.com oZUbD.png Comment : I m getting this exact same error with Reapp.io so the problem is not specific to Ionic . I m suspecting a problem with Cordova integration of GCD Web Server . .. . Answer : It s the opposite : your app minimum deployment-target is set to iOS 7.0 while GCDWebServer in whatever way you are building it in your app CocoaPods Carthage manual.. . has its minimum deployment-target set to 8.3 . Make sure the iOS Deployment Target in the build settings for your project and target s is correctly set to the same value and greater or equal than 8.3 . Comment : My iOS Deployment Target is set to 9.0 but still throws the same errors . Comment : Also I am building this app using the Ionic Framework . So no CocoaPods or Carthage . I guess npm is kind of the equivalent in this case Comment : I disabled the Enable Bitcode setting on my Info tab and that caused many more of the same error to occur . Comment : Then the ionic-framework and its integration with GCDWebServer is misconfigured . The build settings are wrong in that project .", "Question : null .. . Answer : I ve got GCDWebServer up and running bridged to Swift . What I am observing via several tests is that although the network connection hasn t changed the web server hasn t stopped not logged dealloc breakpoints not hit requests queue raised stopped not called delegate methods not hit it simply just stops responding to incoming requests . This would be on tvOS 9.1.1 it is repeatable . I am trying to debug why this is happening but nothing is being logged to indicate a cause . Basically the last thing logged is like : .. . .. . ...which is normal and without any other indication it stops responding to requests with the app fully active and in the fore . Is this an known issue or anything anyone else has experienced on tvOS Comment : Does this happen on the simulator and or device Are you sure you are keeping the GCDWebServer instance around too Comment : haven t tried in the sim and the instance is retained . : let webServer GCDWebServer Additionally as stated I put a break in dealloc . Something is going on but that s not it . Thanks for looking into this Pierre-Olivier . Comment : Additionally i m doing this via the .local hostname not the iP address . After switching to Swifty temporarily and spinning up an NSNetService I am seeing inconsistent name resolving on tvOS...could be related not sure . Comment : You should try in the simulator as this will rule out any network issue since you will be entirely using local host .", "Question : Anyone managed to use GCDWebServer on tvos I ve tried compiling in Xcode 7.1 and I get : .. . .. . Is there some usage inside GCDWebServer of frameworks that tvOS doesn t have Is it fixable I m happy to look into it but if someone already knows it would save me the trouble of repeating the work.. . .. . Answer : GCDWebServer builds on tvOS and the latest pre-release version https : github.com swisspol GCDWebServer has a sample tvOS project . If you use CocoaPods or Carthage and configure it to point to master instead of 3.x it should work . Comment : Yep.I had configure it point to master.But it still give me the same error . Comment : I had already add Link Binary With Libraries like your demo project.I create a Bridging-Header file for bridging Swift and GCDWebServer.Wait for a more particular document for tvOS.BTW GCDWebServer is a really nice open-source project . Comment : I added GCDWebServer by Cocoapods.I guess the problem caused by Pods GCDWebServer TARGETS.I saw the settings are compatible with iOS building but not with tvOS.Maybe I should try to configure manually .", "Question : When the app is suspended is the server connection technically closed When the user foregrounds the app again and the port has been set as 0 how likely is it that it will start with a different port Just wondering what sort of cases to handle when my app has already passed a URL with a specific port to AVFoundation and then backgrounds and foregrounds the app .. . Answer : When you create a GCDWebServer instance you specify a port so that same port will always be used . If you pass 0 then a random one is used each time . Comment : is there any port that is very unlikely to be picked by the OS for future apps if i specify a port and another service is using that port won t it simply fail Comment : You are correct it will fail . In practice though iOS devices are not servers they don t run services like HTTP AFP SSH FTP.. . I m pretty sure all ports are available including lower ones like 80 for typical HTTP .", "Question : I am not accessing from a different network . I am just trying to serve files for a hybrid app . Just running the basic server works as intended when I am connected to a wifi network using the code below : .. . .. . logs : .. . .. . Visit http : 192.168.1.132 : 8080 in your web browser .. . .. . When I drop wifi and start the app and server I get : .. . .. . GCDWebServer started on port 8080 and reachable at null Comment : Does your device have a 3G 4G connection If not then when WiFi is off it has no active interfaces . In theory the loopback interface should still be active but GCDWebServer doesn t seem to have an option to allow you to specify an interface Comment : Good point . No 3g 4g on the device . .. . Answer : serverUrl is null but good ol local host works : .. . .. . localhost : .. . .. . Also available was the bonjour service url that is served up .. . .. . that got things running locally with wifi off .", "Question : I ve read the question about how to open a mobileconfig file stored in the app Unable to open mobileconfig file in Safari ios devices resolved http : stackoverflow.com questions 28926846 unable-to-open-mobileconfig-file-in-safari-ios-devicesresolved I need to do the same in my app but i dont know how to make a server running in background I ve tried with CocoaHTTPServer and GCDWebServer but in both I need wifi connection to make the server . I need to do a local server to simulate a URL without network to lauch the .mobileconfig If anyone can help me I ll be very grateful . Thanks Comment : Discussion in this question about programmatically installing configuration file http : stackoverflow.com questions 2338035 installing-a-configuration-profile-on-iphone-programmatically has comments as late as March 2014 which clearly state that what you are trying to achieve is not possible.. . However i wonder how the new Testflight app by apple does profile validation .. . .. . Answer : You can run a server while your app is in the background but only for a few minutes and iOS can still freeze your app at any time . In the case of GCDWebServer set the GCDWebServerOption AutomaticallySuspendInBackground option to NO and make sure to start a background task when your app is sent to the background . This will keep your app alive and GCDWebServer won t automatically suspend itself either . If your app gets frozen while in background be sure to stop GCDWebServer and restart it when your app comes back to the foreground . Comment : very late here and new to this . How are you setting the value of GCDWebServerOption AutomaticallySuspendInBackground . I am getting an error : Cannot assign to value : GCDWebServerOption AutomaticallySuspendInBackground is a let constant . Comment : I also added this as a question here http : stackoverflow.com questions 38101065 how-to-set-gcdwebserveroption-automaticallysuspendinbackground-to-no . Would be great if you could check it out . Thank you", "Question : I use GCDWebServer precisely WebUploader . When I test it on the iPhone Simulator then everything works but on the device I cannot see web page when I enter e.g . http : 192.168.2.4 : 8080 to the browser . I got Connection timed out from the browser . I am connected with the WiFi to the same network I don t see any errors in the console so what can be wrong I use iOS 8 . Comment : Compare network settings of your Mac iPhone . Comment : What exactly should I compare All WiFi settings are the same . Comment : Are they in same subnet Comment : Yes everything is cofigured via DHCP . .. . Answer : Are you sure you are using the correct port When running on an iOS device the default port is 80 not 8080 . Check the log in Xcode when the app is running it will tell exactly what the IP address and port for GCDWebServer . The fact that you are getting a time out connection however instead of a not found error could mean that something else is preventing the connection from opening . Make sure the app is the active one on your iOS device otherwise the server might be suspended . Also try restarting your iOS device there s a rare bug in iOS where a listening socket previously used by an app can remain stuck for a few minutes even if the app has been killed . If this still doesn t work then it s more than likely a WiFi router problem where traffic is blocked between your computer and your iOS device . Comment : Yes on device I have port 80 app is active . I tried also start web server on custom port but it does not work either . Comment : Then it really sounds like a WiFi router problem : try on a different WiFi network and or try to connect to GCDWebServer running on your computer from another computer or even your iOS device . Comment : You re right it must be something wrong with network . I checked on the other network and it works . Thank you . Comment : All right please accept my answer then :", "Question : I m trying to make GCDWebServer show static content . I have code .. . .. . also i have folder www in root of my Xcode project .. . .. . when server starts it shows me in console that server address is 192.168.1.2 : 8080 . But when i try to open that url in browser i don t see index.html black screen and 404 in console . What am I doing wrong .. . Answer : You need to pass the path to the directory to serve not the index file to GCDWebServer on initialization . Comment : Had some suspicion that I messed with pass . Which one is correct", "Question : I m getting occasional crashes in my GCDWebServer handlers which access mutable dictionaries . The GCDWebServer ReadMe says the handlers are executed on arbitrary threads within GCD so special attention must be paid to thread-safety and re-entrancy and I think that s my problem . Is there a best practice or recommended pattern for accessing mutable properties of the parent object from the handlers I don t know if I can synchronize between threads since I m not creating the handler threads . Also I imagine I could use an asynchronous handler then call a method on the main thread from there then do my work in that method then send the response but that seems more complicated and less efficient than necessary . Here s a simplified version of my code : .. . Answer : Are you mutating your data-dictionary after creating it If so that would explain the crashes . You must prevent concurrent access to your data-dictionary by using locks . The easiest way is through GCD e.g . Comment : This seems to have fixed it . Thanks", "Question : I am doing the functionality of downloading video and playing in offline mode . Here I am using NexPlayer with GCDWebServer my videos are encoded and needs to sync with server . I am using GCDWebServer for offline mode but after some video play its starts buffering . So my question is this is offline server and we already having all data so why its buffering I am not getting this . Please suggest something or can I use any other server instate of GCDWebServer . Comment : I missed that question at the time but just for posterity be sure to look at the Xcode output log when running your app . GCDWebServer when built-in Debug configuration will log extensively telling you what is happening . .. . Answer : Sorry to late reply but I found the solution for my problem . Actually I set some buffering values with NexPlayer as online video playing but as we have a file locally stored we don t want any buffing values to interrupt the process . So I just removed them simply set to 0 and it works perfectly as per expectations . No buffing happy life :", "Question : As per my requirement want to access iOS device photos app file url not file as data for my GCDWebUploader . I want assets library url for my web server . my web-server display all the photos app images and videos on pc browser if document directory.this functionality already done using GCDWebUploader . but I can t find asset url behave like file path . I don t want to copy the photos app files into document-directory and use.but directly access from assets library . I want assets url work same like document directory filepath . please help me for that . .. . Answer : An asset URL looks like this : .. . .. . This is an internal URL to ALAssetsLibrary which means nothing outside of this context . You can t expect to pass this URL to GCDWebServer and expect the server to magically do something with it . Furthermore GCDWebServer by definition can only serve URLs with the HTTP scheme with the hostname matching your iPhone iPad network name and with paths for which you have implemented handlers . For instance if you have implemented a GET handler for the path photos index.html then connecting to your iPhone iPad using your web browser at http : my-device.local photos index.html will call the corresponding handler on GCDWebServer which then can return some content like an HTML web page or an image file . Connecting however to assets-library : asset asset.JPG from your web browser doesn t mean anything and will fail . Connecting to http : my-device.local asset.JPG id CD12228F-0E99-4ABD-999D-6A76F54024E7 ext JPG will also fail if you don t have a GET handler in GCDWebServer for that path . So in a nutshell to serve photos from ALAssetsLibrary using GCDWebServer you can do it as such : .. . .. . 1 . Implement a default handler to catch all GET requests .. . 2 . Implement a handler for GET requests to index.html you must add it to the GCDWebServer instance after the default handler .. . .. . In the implementation of the index.html handler you return an HTML web page that lists the URLs of the photo assets from ALAssetsLibrary each of them having a relative URL link like a href asset.JPG id CD12228F-0E99-4ABD-999D-6A76F54024E7 ext JPG My photo link a the path portion of the asset URL . In the implementation of the default handler you retrieve the path of the GCDWebServerRequest prepend assets-library : asset and that gives you back the original asset URL : assets-library : asset asset.JPG id CD12228F-0E99-4ABD-999D-6A76F54024E7 ext JPG . With this URL you can finally retrieve the asset data i.e . the JPEG image and return it using a GCDWebServerDataResponse don t forget to set the MIME type to image jpeg . Comment : Thanks Pol for your answer . i will try to implement this and if this solve my problem then i will accept this answer . Thanks Again for your Time .", "Question : I m trying to serve a video file as response when certain request hits the server server running on a mobile app . eg : someone goes to http : mylocalip : 8080 video and I want to serve him with a video . This video file can be stored locally or can be external . I started trying to serve a file located on a SMB server so I tried using this code to get the file from the server and returning it I know it s waiting for the whole file to read instead of reading and sending chunks but should work right : .. . .. . However I can t make it work . I always get a broken-pipe error and the web player accessing the web server browsing from the mac and iOS too doesn t play anything . I ve also tried using an embeded iOS player to log the response KxMovie . I get something like this : .. . .. . Using a local player KxMovie from inside the App here appears to be reading the file headers and it gets the right file size and dimensions of the video . However it doesn t play and it ends saying it reached the end of the video without playing it . Just after that WebServer shows an error : .. . .. . Given the fact this is the first time I m dealing with SMB servers I though that maybe I was doing something wrong with the SMB part so I decided to go for a simplified method just for testing . This time I tried to serve a simple mp4 file stored on a remote webserver not SMB . It didn t work either . Finally I tried to serve a local file included in the main Bundle of the App and the same happened : nothing . Here is the code : .. . .. . This is what the log looks like : .. . .. . Here the local Playing I m using inside the app to track the response is able to read things like : .. . .. . I m playing around with tvOS and Xcode 7 for this but I guess it should be ok if I m able to show a regular HTML response.. . so I m sure I m missing something or maybe I missed some framework when installing WebServer I m not using pods Thanks in advance Comment : You have too many moving parts here between SMB video file watch OS web server.. . You should start by serving a regular local file off a Mac app or iPhone app then a video file then over SMB and finally move to watch OS . Comment : Hi Pol thanks for your response . However there is nothing related to watch OS on my code The main problem here after more testing seems to be related to content range since I m able to play every file tested local smb remote etc from Desktop Google Chrome flawlessly However when I try iOS player or OS X Safari it fails.. . telling me something about failed to load resource : plug-in module managed in developer console . I know it s possible to serve some kind of range files with if they are stored locally.. . but what about 3rd party should I download them first locally Comment : You should update the title of this question as it s too generic and not really a question either . Comment : Hi pardon me as its not related to your question but what changes do you make to KxSMB to make it able to build on swift @eiprol .. . Answer : If you want to serve a video file that can play in the browser using the video tag at least on Chrome and Safari you need to implement HTTP range requests . GCDWebServer automatically implement range support if you use GCDWebServerFileResponse . If you use another type of response you would need to implement it yourself based on the byteRange property of the incoming GCDWebServerRequest . You should copy-paste the logic from GCDWebServerFileResponse.m . Comment : I guess that something similar to this would be the approach however since I m trying que read external remote files not stored on the same device than GCDWebServer and serve them as the response to some request I can t use that type without changing it a little bit providing a path as GCDWebServerFileResponse does to serve a file stored on a SMB server would be useless and I should provide instead a method to read that file asynchronously maybe and return NSData . Maybe I should do a hybrid between GCDWebServerFileResponse for byte range GCDWebServerStreamedResponse async read", "Question : I have a client iOS application that uses GCDWebServer https : github.com swisspol GCDWebServer to serve images and videos stored in the NSSearchPathDirectory.DocumentDirectory folder of the app on my device . Upon app-startup I start an instance of GCDWebServer and add a file response handler for my requests : .. . .. . I can verify that while the app is running I can successfully download files from my device : .. . .. . My app talks to a Chromecast device by sending URLs like the one above to a media-channel and the Chromecast receiver app loads and plays the videos at the specified URLs - so far all good . My problem is that I want to implement seeking support for the currently playing video and as soon as I send a seek request to the media-channel I get a Broken pipe error from GCDWebServer and the video playback is interrupted . Log from the server is as follows : .. . .. . My best understanding of the problem is that normal playback works because it is the same as downloading a file from beginning to end and this can be served with a regular GCDWebServerFileResponse however seeking is equivalent to jumping to a different part of the file and I m not sure that reading a file like this would work with my configuration . Is there a way that I can configure GCDWebServer to make this work I know that the problem can be solved because there are several live apps that do this . Do I need to use a server that supports other protocols such as HLS or RTSP Do I need to encode my video files in a particular manner For reference I have also tried another HTTP server called Swifter https : github.com httpswift swifter but I encountered the same problem . .. . Answer : iOS AVPlayer at first requests file size and then asks server for a chunks of data including a desired range in the request . In this answer https : stackoverflow.com questions 37244956 why-does-swifts-avplayer-loads-the-playeritem-for-twice-on-one-play the network activity of AVPlayer is shown and the response status code is 206 i.e . Partial Content . So we need to respond only with desired chunk of data : .. . .. . Please notice that it is important to check whether request.byteRange is defined by invoking request.hasByteRange . Using the code I ve provided I was able to play a video using AVPlayer or web browser and scrubbing seek to time worked perfectly .", "Question : null .. . Answer : I was trying to stream a mp4 video from a remote-server on a iOS device . I somehow got ERROR Error while writing to socket 15 : Broken pipe 32 after a few writes . Not sure where is wrong . Can you kindly give any advice iOS re-routing requests w GCDWebServer not redirecting http : stackoverflow.com questions 33002143 ios-re-routing-requests-w-gcdwebserver-not-redirecting .. . .. . Thanks Rao Comment : I feel the need to send response to the client in didReceiveResponse but not sure how to achieve that .. . Comment : My answer to similar question may help you : stackoverflow.com questions 36651451 https : stackoverflow.com questions 36651451 how-to-implement-video-seek-support-with-an-embedded-http-server-on-ios 37802008 37802008", "Question : I use GCDWebServer precisely WebUploader . When I test it on the iPhone Simulator then everything works but on the device I cannot see web page when I enter e.g . http : 192.168.2.4 : 8080 to the browser . I got Connection timed out from the browser . I am connected with the WiFi to the same network I don t see any errors in the console so what can be wrong I use iOS 8 . Comment : Compare network settings of your Mac iPhone . Comment : What exactly should I compare All WiFi settings are the same . Comment : Are they in same subnet Comment : Yes everything is cofigured via DHCP . .. . Answer : GCDWebServer doesn t work if connected with different wifi network . it only works if both mobile and pc uses same wifi network . what i have to do if i want GCDWebServer work even with different wifi network . @Pol", "Question : My app using GCDWebServer I get a photo from my iPhone album by using AssetsLibrary and I store them in NSDocumentDirectory . I just want to get access Url to this photo to show them in a web page . There is my code : Comment : Hi did you find any solution for this it . .. . Answer : Looks like nobody is answering the actual question here : this is not about uploading a photo from iOS to a web server or viewing it in a local UIWebView but about serving that photo using GCDWebServer so that users can view it by connecting to the device using a web browser e.g . by going to http : my-device.local photo-1234.jpg . The sample code you provided has 2 major issues : .. . .. . You are creating a handler for POST requests while you need to handle GET requests POST is when submitting forms from web browsers while GET is for regular web browsing and getting web pages . Instead of returning the image data you are returning an HTML webpage which contains a URL to the image file locally e.g . file : some path photo-1234.jpg instead of HTTP URL handled by GCDWebServer e.g . http : my-device.local photo-1234.jpg . File URLs do not make sense outside of the device itself and will not work . If you have all the photos as files in your documents folder you can simply add a GET handler to GCDWebServer to serve the contents of the entire documents folder : .. . .. . This is not a very good solution though as it requires copying photos from the assets library into the documents folder which is wasteful . Instead consider dynamically serving the photo assets as I explain in my answer to a related question here : http : stackoverflow.com a 31778726 463432 .", "Question : In wkWebView which version of GCDWebServer framework is used . How can I get the version of GCDWebServer used in wkWebView . I have already checked Info plist in GCDWebServer framework but didn t find any variable in GCDWebServer to get Version . .. . Answer : If you mean this WKWebView https : developer.apple.com library ios documentation WebKit Reference WKWebView Ref then it s from Apple and has nothing to do with GCDWebServer . The version of GCDWebServer as of 3.2.5 and earlier is not available from the Info.plist of the framework for historical reasons . There is therefore no way to know the version of GCDWebServer programatically . In GCDWebServer 3.2.6 and later the version is in the Info.plist file ." ] }
[ "yes-answer-long", "yes-answer-short" ]
ios
UNK_RELATION
hidapi@interface@77
hidapi -- hidapi is a multi-platform library which allows an application to @placeholder with usb and bluetooth hid-class devices on windows linux and mac os x .
{ "confidence": [ 55.22442626953125, 51.76394271850586, 47.821983337402344, 47.47614669799805, 47.38728713989258, 46.51738739013672, 43.92985153198242, 42.97792053222656, 40.739593505859375, 35.75193786621094, 35.23352813720703, 35.23352813720703, 35.23352813720703, 34.65569305419922, 34.48670196533203, 33.56298065185547, 33.43231201171875, 28.859281539916992, 26.539234161376953, 25.812116622924805, 25.644508361816406, 25.618593215942383, 23.142452239990234, 22.985048294067383, 21.921730041503906, 21.921730041503906, 20.585609436035156, 20.5780029296875, 19.76374053955078, 19.31616973876953, 19.223703384399414, 19.223703384399414, 19.138648986816406, 18.92162322998047, 18.8477840423584, 18.469593048095703, 18.110523223876953, 18.06715965270996, 18.052316665649414, 16.730039596557617, 16.441242218017578, 15.857309341430664, 15.704360961914062, 15.461328506469727, 14.723670959472656, 14.546022415161133, 14.546022415161133, 14.203842163085938, 13.989178657531738, 13.225408554077148, 13.225408554077148, 13.225408554077148, 13.225408554077148, 13.225408554077148, 13.225408554077148, 13.225408554077148, 13.225408554077148, 13.225408554077148, 13.225408554077148, 13.225408554077148, 13.225408554077148, 13.225408554077148, 13.225408554077148, 13.225408554077148, 13.225408554077148, 13.225408554077148, 13.225408554077148, 13.225408554077148, 13.225408554077148, 13.225408554077148, 13.225408554077148, 13.225408554077148, 13.225408554077148, 13.225408554077148, 13.225408554077148, 13.225408554077148, 11.889286041259766, 11.889286041259766, 11.889286041259766, 11.889286041259766, 11.889286041259766, 11.889286041259766, 11.889286041259766, 11.889286041259766, 11.889286041259766, 11.889286041259766, 11.889286041259766, 11.889286041259766, 11.889286041259766, 11.889286041259766, 11.889286041259766, 11.889286041259766, 11.889286041259766, 11.889286041259766, 11.889286041259766, 11.889286041259766, 11.889286041259766, 11.889286041259766, 11.889286041259766, 11.889286041259766 ], "content": [ "The same Java hidapi is used which now will make use of the C version hidapi library for Linux a .so file .", "My program makes use of Java hidapi library which is a Java wrapper of the C version hidapi library .dll .", "We haven t tried any HIDAPI .", "In eclipse by adding the Java hidapi to the build path and setting the C hidapi as a native library everything works just fine .", "I am accessing a USB HID Device using python hidapi from a Mac OSX 10.10.5 doing : .. . .. . The HID Feature Report works nicely without problems .", "When making the C version hidapi library for Linux it turns out that I need another library called libusb-1.0 which hidapi needs to deals with the low-level communication .", "The code from hid cython-hidapi that is called is as follows : .. . .. . I am not very familiar with C types or byte level processing .", "I m trying to extract real-time data from a Wacom Inkling http : inkling.wacom.eu .. . .. . Roel Janssen has already examined the packets here https : github.com roelj inklingreader blob master src usb online-mode.c L113-L138 : .. . .. . I m trying to rewrite this code using HID API http : www.signal11.us oss hidapi which has a very minimal API here http : www.signal11.us oss hidapi hidapi doxygen html group API.html .. . .. . I m going to attempt to just use hid write for now but there is maybe a chance this handshake is sending a feature report http : www.signal11.us oss hidapi hidapi doxygen html group API.html gae43ab80f741786ac4374216658fd5ab3 .. .", "I import the eclipse work space add the Java hidapi to the build path as I did in Windows move the C version hidapi library for Linux the .so file into a folder called lib where the .dll version of native library also resides .", "So I install libusb-1.0 now I have a libusb-1.0.so file under usr lib i386-linux-gnu make the C version hidapi library for Linux .", "It is not very clear how to map the parameters that I used in the send feature report of Hidapi to how it is actually used from ctrl transfer in PyUSB .", "I am using the cython-hidapi intereface to read data from a Voltcraft VC870 power meter .", "I ve just started playing with cython-hidapi for testing purposes and I think I know what your issue may be .", "Finally in the source code I add two lines : .. . .. . System.loadLibrary usb-1.0 Call this line A . .. . .. . System.loadLibrary hidapi-jni Call this line B . .. . .. . I run the program as a Java application .", "1 Verify that the Inkling uses HID USB device class .", "I whip out some Cython-hidapi presumably from git : github.com signal11 hidapi.git and upgrade their try.py example code : .. . .. . Guess what", "I have this snippet of code which works fine on Windows and Mac OS X using Python 2.7.6 .", "I was simply trying to connect to a serial device and retrieve some I m not a hidapi expert and had adapted some code from an example I found onlineperiodically updated data from it .", "So I apt-get me some libusbhid-common some cython-dev some libusb-dev some libusb-1.0.0-dev and some libudev-dev and I upgrade the HIDAPI C example code to attempt a tare : .. . .. . And that tares .", "The interface class is used when a USB device can contain more than one function . from https : en.wikipedia.org wiki USB human interface device class In the manual https : www.wacom.com media files store-manuals inkling-manual-english.pdf is said that it is a USB flash drive in this case it uses USB mass storage device class BULK transfer .. . .. . 2 If it is a USB HID device class you can try to get the feature reports if the inkling sends any similar to this website http : libusb.6.n5.nabble.com How-to-get-HID-report-td4628.html .. . .. . libusb get descriptor makes standard GET DESCRIPTOR requests where the bmRequestType field is 0x80 .", "I have a small C program and I test it under bash-it works so I believe until this point everything both libsub-1.0.so and C version hidapi library for Linux libhidapi-jni.so are installed generated correctly and when running the small C program the system is able to find the shared libusb-1.0.so library without explicitly mentioning where libsub-1.0 is which makes sense because libusb-1.0 is installed in a place where the system loader will always search .", "To get the data if first need to send a feature report to the device as thus : .. . .. . On Windows 8.1 and Mac OS X Mavericks this works fine and a non-negative value is returned .", "EDIT : It appears the Inkling exposes a FlashDrive and HID interface so I am guessing this bytecode must be selecting the HID interface and telling it to start sending data .", "It was strange because the wrong char 0x00 worked on Windows but not on Linux .", "I did a few little HID programs in Python over the last weeks with just pyusb and they seem to work very reliably .", "I suppose this is acceptable losses and it s good to know I can bypass the HID stack for this light stuff .", "For more information about how to interpret this descriptor see the HID v1.1 specification from http : www.usb.org developers hidpage .", "So this is one single report you send over USB : .. . .. . This is the relevant part from the HID descriptor : .. . .. . This says that your data for Report ID 0x80 has to be interpreted as 32 times one byte it s meaning is up to the driver I guess .", "The article is about a Dymo scale but the protocol seems somewhat similar : .. . .. . http : steventsnyder.com reading-a-dymo-usb-scale-using-python", "The self s are there because the function and the statements are part of a class which handles the peripheral and share the hdev variable .", "It reports java.lang.UnsatisfiedLinkError : no usb-1.0 in java.library.path at line A .", "It gives : java.lang.UnsatisfiedLinkError : no usb-1.0 in java.library.path at line A .", "Try lsusb -v and check the bDeviceClass or bInterfaceClass field in the output The USB human interface device class can be used to describe both device and interface classes .", "The good news is this cheap Xiamen ELANE.NET load cell powers-up on USB into Report 3 mode barfing its current weight in grams constantly .", "However this same code on Linux returns a negative-number .", "According to this article there is no need to interrogate the scales continuously : .. . .. . http : www.elane.net UserManuals USB 20Interface 20Protocol 20 285-kg 20Model 29.pdf .. . .. . And according to the following article it seems necessary to interrogate several times up to 10 which I suspect may have something to do with the conversion time of the AD .", "The report descriptors are all included in the configuration descriptor so you should be able to fetch the whole configuration descriptor en masse and parse it to extract the report descriptors . .. . .. . Alternatively libusb get descriptor is a very thin layer over libusb control transfer so you could just expand it by hand : .. . .. . more links : - http : eleccelerator.com tutorial-about-usb-hid-report-descriptors http : www.beyondlogic.org usbnutshell usb1.shtml .. . .. . --------------------------------------------------------------------------------- .. . .. . libusb control transfer performs USB control transfers .", "Control transfers are used for command and status operations see this http : libusb.sourceforge.net api-1.0 group syncio.html and this http : www.beyondlogic.org usbnutshell usb4.shtml Control .. . .. . USB control requests are a subtype of USB requests see http : www.beyondlogic.org usbnutshell usb6.shtml .. . .. . usb data seems to be the USB send buffer it is always filled with the data bytes then the libusb control transfer is send .. . .. . This is the commented form of the USB control request http : www.beyondlogic.org usbnutshell usb6.shtml .. . .. . This is the short form of the USB control request .. . .. . So all the byte sequences like x80 x01 x03 x01 x02 x00 x00 x00 are commands codes that are used to configure the Inkling handshake and only the Inkling and the Wacom folks understand.. .", "EDIT : Output of lsusb from Roel I don t have Linux to hand :", "So I think it founds the libusb library however the symbol which should be in libusb is still unresolved .", "Also I found a few indication which might be of use to you .", "I wrote a program in Java with eclipse on Windows .", "And I set the native library to lib by build path - configure build path - libraries tab - native library location .", "Set .jar s native library location to this folder .", "So till this point the two native libraries are : libusb-1.0 under usr lib i386-linux-gnu and hidapi.so under wherever eclipse workspace is lib .", "The DT REPORT descriptor request must indicate that the recipient is an interface which requires bmRequestType to be 0x81 .", "It is a Feature which means that it can configure the device via GET FEATURE SET FEATURE reports over the control endpoint .", "The buff needs to start with the feature report id which is the first parameter passed to get feature report and I don t know that 0x00 is correct here .", "Remain the two libraries where they are add vm argument Run - Run Configuration - Arguments - VM arguments : -Djava.library.path workspace loc : project name lib usr lib i386-linux-gnu .", "Here s its datasheet : .. . .. . http : www.elane.net USBscales List USB Digital Load Cell Commands and Data Format User.pdf .. . .. . I can read that with standard pyusb calls .", "This sample could read the scale.. . .. . .. . http : www.orangecoat.com how-to read-and-decode-data-from-your-mouse-using-this-pyusb-hack .. . .. . .. . if you replace the device lookup with usb.core.find idVendor 0x7b7c idProduct 0x301 .. . .. . I also abuse sudo to run my program bc I decline to muck around with the device permissions and sudo is easy on a Raspberry Pi .", "Using standard pyusb calls I can read my scale s spew like this : .. . .. . That returns a 6 byte array : .. . .. . Now the fun starts when I try to send commands to the scale .", "The command to zero-out the current weight Zero Weight aka tare might be 7 4 2 0 0 0 .", "If I use sample code like https : github.com walac pyusb blob master docs tutorial.rst to find the ENDPOINT OUT endpoint and write to it using either of these lines I can t tare : .. . .. . The symptom is I can put a load on my load cell weigh it with the above .read line then tare then not get a zero when I .read again .", "Okay we re not dead yet .", "To replicate my one success in Python despite how tempting rewriting one small layer of my app in C++ is", "The last line does not tare .", "But it DOES tare if I run it 3 times", "So before I write a loop that calls the tare line over and over until the read returns a level zero could someone check my math and suggest a shortcut", "A raw pyusb solution would work great too .", "Did you check if the write command you issue prompts a reply", "In that case you have to read that .", "This is the initialization code : .. . .. . After that it s just .. . .. . and .. . .. . as necessary .", "EDIT : The PDF you refer to downloads just one page and the command 7 4 2 0 0 0 is not documented in there .", "Is there more complete information available", "While you are correct that neither I nor the Read.. . your Mouse page I linked called set configuration adding your claimed routine did not fix the bug .", "I up-voted it to tell the community it s confirmed not to make things worse .", "I also added a call to usb.util.find descriptor per sourceforge.net p pyusb mailman message 26198542 http : sourceforge.net p pyusb mailman message 26198542 to dig up the output endpoint and write to that .", "The bug remains I must write 3 times for the tare to take .", "Philip I added an edit to the reply with a few more suggestions .", "I have a hard-copy of a Xiamen PDF and I e-searched for about an hour clicking on every PDF on elane.net and couldn t find it .", "About the protocol seems somewhat similar yes I think everyone just packages the same chipset and assumes someone else documented it", "I will report back here if I successfully change the readout from grams to pounds .", "Except then I m worried the low byte will be ounces", "About the time the command takes to sink in when I tare 3x I can see a few leftover readings with the wrong tare before the right ones appear .", "When I tare only once the wrong tare almost always continues .", "However I am trying to port this code to PyUSB and trying to do the same thing on a RaspberryPi .. . .. . But I get a Broken Pipe when executed with root permissions .", "Any help on how this mapping should be made", "Thanks", "http : libusb.sourceforge.net api-1.0 group syncio.html .. . https : github.com walac pyusb blob master docs tutorial.rst", "Your parameters in the dev.ctrl transfer command looks wrong .", "The fact is that dev.ctrl transfer will set several parameters like the direction of the message the lenght and the content of your control message everything is well explain in this link : http : www.beyondlogic.org usbnutshell usb6.shtml SetupPacket .. . .. . So you have to set the parameters in function of your device and what you want to do .", "For exemple in my code and for my device I have this command :", "Is there anyone out there who can look at that bytestream and see what is going on", "But can I code it in a more elegant human-readable form", "EDIT : I have it working", "Both hid write and hid send feature report work", ".. .", "However I would still like to understand what is going on .", "This is rather hacky .", "You have two good choices .", "Thanks for this while I digest the information here I have updated my question mainly to confirm what you said regarding lsusb .", "updated answer.. .", "I believe this means the device did not understand the feature report as sent .", "I initially suspected that the line : .. . .. . was the culprit as chr 0x80 outputs out different values accross my systems .", "But I wonder if anyone can shed any more light as to what s wrong here and suggest a fix .", "What exactly are you trying to do with this device", "You are right and thanks for commenting .", "I was later advised to use 0x05 for the first char as the first char in the feature id has to be the length of the data packet .", "Sometimes worked really didn t work ." ] }
{ "confidence": [ 77.05833435058594, 75.13902282714844, 74.59009552001953, 74.48582458496094, 66.02718353271484, 50.63228988647461 ], "content": [ "Question : null .. . Answer : I have this snippet of code which works fine on Windows and Mac OS X using Python 2.7.6 . I am using the cython-hidapi intereface to read data from a Voltcraft VC870 power meter . To get the data if first need to send a feature report to the device as thus : .. . .. . On Windows 8.1 and Mac OS X Mavericks this works fine and a non-negative value is returned . However this same code on Linux returns a negative-number . I believe this means the device did not understand the feature report as sent . The code from hid cython-hidapi that is called is as follows : .. . .. . I am not very familiar with C types or byte level processing . I initially suspected that the line : .. . .. . was the culprit as chr 0x80 outputs out different values accross my systems . But I wonder if anyone can shed any more light as to what s wrong here and suggest a fix . Comment : I ve just started playing with cython-hidapi for testing purposes and I think I know what your issue may be . The buff needs to start with the feature report id which is the first parameter passed to get feature report and I don t know that 0x00 is correct here . What exactly are you trying to do with this device Comment : You are right and thanks for commenting . I was later advised to use 0x05 for the first char as the first char in the feature id has to be the length of the data packet . It was strange because the wrong char 0x00 worked on Windows but not on Linux . I was simply trying to connect to a serial device and retrieve some I m not a hidapi expert and had adapted some code from an example I found onlineperiodically updated data from it . Comment : Sometimes worked really didn t work . The first byte should be the report ID and the remainder the actual data .", "Question : I m trying to extract real-time data from a Wacom Inkling http : inkling.wacom.eu .. . .. . Roel Janssen has already examined the packets here https : github.com roelj inklingreader blob master src usb online-mode.c L113-L138 : .. . .. . I m trying to rewrite this code using HID API http : www.signal11.us oss hidapi which has a very minimal API here http : www.signal11.us oss hidapi hidapi doxygen html group API.html .. . .. . I m going to attempt to just use hid write for now but there is maybe a chance this handshake is sending a feature report http : www.signal11.us oss hidapi hidapi doxygen html group API.html gae43ab80f741786ac4374216658fd5ab3 .. . Is there anyone out there who can look at that bytestream and see what is going on EDIT : It appears the Inkling exposes a FlashDrive and HID interface so I am guessing this bytecode must be selecting the HID interface and telling it to start sending data . But can I code it in a more elegant human-readable form EDIT : I have it working Both hid write and hid send feature report work .. . However I would still like to understand what is going on . This is rather hacky . EDIT : Output of lsusb from Roel I don t have Linux to hand : .. . Answer : So this is one single report you send over USB : .. . .. . This is the relevant part from the HID descriptor : .. . .. . This says that your data for Report ID 0x80 has to be interpreted as 32 times one byte it s meaning is up to the driver I guess . It is a Feature which means that it can configure the device via GET FEATURE SET FEATURE reports over the control endpoint . For more information about how to interpret this descriptor see the HID v1.1 specification from http : www.usb.org developers hidpage .", "Question : null .. . Answer : I am new to Ubuntu and searched on-line for two days tried a lot of solutions but do not have any luck yet . If anyone can help with this I will appreciate . I wrote a program in Java with eclipse on Windows . My program makes use of Java hidapi library which is a Java wrapper of the C version hidapi library .dll . In eclipse by adding the Java hidapi to the build path and setting the C hidapi as a native library everything works just fine . Now I want to do the same on Ubuntu . The same Java hidapi is used which now will make use of the C version hidapi library for Linux a .so file . When making the C version hidapi library for Linux it turns out that I need another library called libusb-1.0 which hidapi needs to deals with the low-level communication . So I install libusb-1.0 now I have a libusb-1.0.so file under usr lib i386-linux-gnu make the C version hidapi library for Linux . I have a small C program and I test it under bash-it works so I believe until this point everything both libsub-1.0.so and C version hidapi library for Linux libhidapi-jni.so are installed generated correctly and when running the small C program the system is able to find the shared libusb-1.0.so library without explicitly mentioning where libsub-1.0 is which makes sense because libusb-1.0 is installed in a place where the system loader will always search . So I go to eclipse . I import the eclipse work space add the Java hidapi to the build path as I did in Windows move the C version hidapi library for Linux the .so file into a folder called lib where the .dll version of native library also resides . And I set the native library to lib by build path - configure build path - libraries tab - native library location . So till this point the two native libraries are : libusb-1.0 under usr lib i386-linux-gnu and hidapi.so under wherever eclipse workspace is lib . Finally in the source code I add two lines : .. . .. . System.loadLibrary usb-1.0 Call this line A . .. . .. . System.loadLibrary hidapi-jni Call this line B . .. . .. . I run the program as a Java application . It reports java.lang.UnsatisfiedLinkError : no usb-1.0 in java.library.path at line A . So I guess the Java runtime is not able to find where libsub-1.0 is . Just for clarification I already did the following trials none of them worked . 1 . Remain the two libraries where they are add vm argument Run - Run Configuration - Arguments - VM arguments : -Djava.library.path workspace loc : project name lib usr lib i386-linux-gnu . It gives : java.lang.UnsatisfiedLinkError : no usb-1.0 in java.library.path at line A . 2 . Undo 1 . Move libsub-1.0.so to wherever eclipse workspace is lib so now the two .so files are together . Set .jar s native library location to this folder . It gives java.lang.UnsatisfiedLinkError : blablabla : undefined symbol : libusb control transfer at line B . So I think it founds the libusb library however the symbol which should be in libusb is still unresolved . This is really weird . Can anyone help me Thanks in advance .", "Question : I m trying to extract real-time data from a Wacom Inkling http : inkling.wacom.eu .. . .. . Roel Janssen has already examined the packets here https : github.com roelj inklingreader blob master src usb online-mode.c L113-L138 : .. . .. . I m trying to rewrite this code using HID API http : www.signal11.us oss hidapi which has a very minimal API here http : www.signal11.us oss hidapi hidapi doxygen html group API.html .. . .. . I m going to attempt to just use hid write for now but there is maybe a chance this handshake is sending a feature report http : www.signal11.us oss hidapi hidapi doxygen html group API.html gae43ab80f741786ac4374216658fd5ab3 .. . Is there anyone out there who can look at that bytestream and see what is going on EDIT : It appears the Inkling exposes a FlashDrive and HID interface so I am guessing this bytecode must be selecting the HID interface and telling it to start sending data . But can I code it in a more elegant human-readable form EDIT : I have it working Both hid write and hid send feature report work .. . However I would still like to understand what is going on . This is rather hacky . EDIT : Output of lsusb from Roel I don t have Linux to hand : .. . Answer : 1 Verify that the Inkling uses HID USB device class . Try lsusb -v and check the bDeviceClass or bInterfaceClass field in the output The USB human interface device class can be used to describe both device and interface classes . The interface class is used when a USB device can contain more than one function . from https : en.wikipedia.org wiki USB human interface device class In the manual https : www.wacom.com media files store-manuals inkling-manual-english.pdf is said that it is a USB flash drive in this case it uses USB mass storage device class BULK transfer .. . .. . 2 If it is a USB HID device class you can try to get the feature reports if the inkling sends any similar to this website http : libusb.6.n5.nabble.com How-to-get-HID-report-td4628.html .. . .. . libusb get descriptor makes standard GET DESCRIPTOR requests where the bmRequestType field is 0x80 . The DT REPORT descriptor request must indicate that the recipient is an interface which requires bmRequestType to be 0x81 . You have two good choices . The report descriptors are all included in the configuration descriptor so you should be able to fetch the whole configuration descriptor en masse and parse it to extract the report descriptors . .. . .. . Alternatively libusb get descriptor is a very thin layer over libusb control transfer so you could just expand it by hand : .. . .. . more links : - http : eleccelerator.com tutorial-about-usb-hid-report-descriptors http : www.beyondlogic.org usbnutshell usb1.shtml .. . .. . --------------------------------------------------------------------------------- .. . .. . libusb control transfer performs USB control transfers . Control transfers are used for command and status operations see this http : libusb.sourceforge.net api-1.0 group syncio.html and this http : www.beyondlogic.org usbnutshell usb4.shtml Control .. . .. . USB control requests are a subtype of USB requests see http : www.beyondlogic.org usbnutshell usb6.shtml .. . .. . usb data seems to be the USB send buffer it is always filled with the data bytes then the libusb control transfer is send .. . .. . This is the commented form of the USB control request http : www.beyondlogic.org usbnutshell usb6.shtml .. . .. . This is the short form of the USB control request .. . .. . So all the byte sequences like x80 x01 x03 x01 x02 x00 x00 x00 are commands codes that are used to configure the Inkling handshake and only the Inkling and the Wacom folks understand.. . Comment : Thanks for this while I digest the information here I have updated my question mainly to confirm what you said regarding lsusb . Comment : updated answer.. .", "Question : I am accessing a USB HID Device using python hidapi from a Mac OSX 10.10.5 doing : .. . .. . The HID Feature Report works nicely without problems . However I am trying to port this code to PyUSB and trying to do the same thing on a RaspberryPi .. . .. . But I get a Broken Pipe when executed with root permissions . It is not very clear how to map the parameters that I used in the send feature report of Hidapi to how it is actually used from ctrl transfer in PyUSB . Any help on how this mapping should be made Thanks http : libusb.sourceforge.net api-1.0 group syncio.html .. . https : github.com walac pyusb blob master docs tutorial.rst .. . Answer : Your parameters in the dev.ctrl transfer command looks wrong . The fact is that dev.ctrl transfer will set several parameters like the direction of the message the lenght and the content of your control message everything is well explain in this link : http : www.beyondlogic.org usbnutshell usb6.shtml SetupPacket .. . .. . So you have to set the parameters in function of your device and what you want to do . For exemple in my code and for my device I have this command :", "Question : The good news is this cheap Xiamen ELANE.NET load cell powers-up on USB into Report 3 mode barfing its current weight in grams constantly . Here s its datasheet : .. . .. . http : www.elane.net USBscales List USB Digital Load Cell Commands and Data Format User.pdf .. . .. . I can read that with standard pyusb calls . This sample could read the scale.. . .. . .. . http : www.orangecoat.com how-to read-and-decode-data-from-your-mouse-using-this-pyusb-hack .. . .. . .. . if you replace the device lookup with usb.core.find idVendor 0x7b7c idProduct 0x301 .. . .. . I also abuse sudo to run my program bc I decline to muck around with the device permissions and sudo is easy on a Raspberry Pi . Using standard pyusb calls I can read my scale s spew like this : .. . .. . That returns a 6 byte array : .. . .. . Now the fun starts when I try to send commands to the scale . The command to zero-out the current weight Zero Weight aka tare might be 7 4 2 0 0 0 . If I use sample code like https : github.com walac pyusb blob master docs tutorial.rst to find the ENDPOINT OUT endpoint and write to it using either of these lines I can t tare : .. . .. . The symptom is I can put a load on my load cell weigh it with the above .read line then tare then not get a zero when I .read again . Okay we re not dead yet . We haven t tried any HIDAPI . So I apt-get me some libusbhid-common some cython-dev some libusb-dev some libusb-1.0.0-dev and some libudev-dev and I upgrade the HIDAPI C example code to attempt a tare : .. . .. . And that tares . To replicate my one success in Python despite how tempting rewriting one small layer of my app in C++ is I whip out some Cython-hidapi presumably from git : github.com signal11 hidapi.git and upgrade their try.py example code : .. . .. . Guess what The last line does not tare . But it DOES tare if I run it 3 times So before I write a loop that calls the tare line over and over until the read returns a level zero could someone check my math and suggest a shortcut A raw pyusb solution would work great too . .. . Answer : I did a few little HID programs in Python over the last weeks with just pyusb and they seem to work very reliably . Did you check if the write command you issue prompts a reply In that case you have to read that . This is the initialization code : .. . .. . After that it s just .. . .. . and .. . .. . as necessary . The self s are there because the function and the statements are part of a class which handles the peripheral and share the hdev variable . EDIT : The PDF you refer to downloads just one page and the command 7 4 2 0 0 0 is not documented in there . Is there more complete information available Also I found a few indication which might be of use to you . According to this article there is no need to interrogate the scales continuously : .. . .. . http : www.elane.net UserManuals USB 20Interface 20Protocol 20 285-kg 20Model 29.pdf .. . .. . And according to the following article it seems necessary to interrogate several times up to 10 which I suspect may have something to do with the conversion time of the AD . The article is about a Dymo scale but the protocol seems somewhat similar : .. . .. . http : steventsnyder.com reading-a-dymo-usb-scale-using-python Comment : While you are correct that neither I nor the Read.. . your Mouse page I linked called set configuration adding your claimed routine did not fix the bug . I up-voted it to tell the community it s confirmed not to make things worse . I also added a call to usb.util.find descriptor per sourceforge.net p pyusb mailman message 26198542 http : sourceforge.net p pyusb mailman message 26198542 to dig up the output endpoint and write to that . The bug remains I must write 3 times for the tare to take . I suppose this is acceptable losses and it s good to know I can bypass the HID stack for this light stuff . Comment : Philip I added an edit to the reply with a few more suggestions . Comment : I have a hard-copy of a Xiamen PDF and I e-searched for about an hour clicking on every PDF on elane.net and couldn t find it . About the protocol seems somewhat similar yes I think everyone just packages the same chipset and assumes someone else documented it Comment : I will report back here if I successfully change the readout from grams to pounds . Except then I m worried the low byte will be ounces About the time the command takes to sink in when I tare 3x I can see a few leftover readings with the wrong tare before the right ones appear . When I tare only once the wrong tare almost always continues ." ] }
[ "yes-answer-long", "yes-answer-short" ]
interface
UNK_RELATION
maml@markup@24
maml -- maml is an xml @placeholder language used to write windows help files .
{ "confidence": [ 50.24808120727539, 48.40103530883789, 48.097450256347656, 47.93818283081055, 46.757930755615234, 45.58034896850586, 44.48683166503906, 43.31895446777344, 40.35163879394531, 39.668155670166016, 39.668155670166016, 38.44158172607422, 37.17959213256836, 37.015926361083984, 36.86222457885742, 36.86222457885742, 36.86222457885742, 36.86222457885742, 36.83055114746094, 35.10586929321289, 34.95216751098633, 33.685028076171875, 33.685028076171875, 33.343528747558594, 33.279808044433594, 32.9256477355957, 32.32002639770508, 32.223777770996094, 32.166324615478516, 32.09815979003906, 32.06588363647461, 30.798742294311523, 30.10261344909668, 29.280038833618164, 27.565998077392578, 27.23341178894043, 25.727397918701172, 24.312694549560547, 24.145465850830078, 23.185535430908203, 22.940155029296875, 22.664928436279297, 20.99808120727539, 20.827152252197266, 20.650070190429688, 20.249834060668945, 20.154861450195312, 19.678913116455078, 19.616796493530273, 19.228599548339844, 19.11688232421875, 18.968006134033203, 18.67639923095703, 18.112003326416016, 17.94207000732422, 17.94207000732422, 17.843294143676758, 17.782283782958984, 17.492643356323242, 17.051734924316406, 16.864717483520508, 16.860233306884766, 16.76634407043457, 16.76634407043457, 16.61773681640625, 16.61773681640625, 16.61773681640625, 16.37497901916504, 16.228376388549805, 16.042139053344727, 16.032012939453125, 16.032012939453125, 15.939685821533203, 15.517126083374023, 15.505003929138184, 15.367273330688477, 15.338947296142578, 15.079214096069336, 14.452654838562012, 14.452654838562012, 14.452654838562012, 14.452654838562012, 14.452654838562012, 14.452654838562012, 14.452654838562012, 14.452654838562012, 14.452654838562012, 14.452654838562012, 14.452654838562012, 14.452654838562012, 14.452654838562012, 14.452654838562012, 14.452654838562012, 14.452654838562012, 14.452654838562012, 14.452654838562012, 14.452654838562012, 14.452654838562012, 14.452654838562012, 14.452654838562012 ], "content": [ "Or using MAML", "I am generating MAML files for use with Powershell s Get-Help cmdlet .", "Get-Help is failing to look for aliases in the MAML at all when given a MAML file .", "If I include a proper MAML help file e.g .", "These pages are written in XML format called MAML .", "Here it is : https : github.com nightroman Helps .. . .. . The module builds PowerShell MAML help files from PowerShell help scripts .", "Use MAML which seems to be for this purpose .", "However if my MAML is incorrect then so is the MAML used for PowerShell s own core cmdlets because that is where I copied it from considering it to be a reliable source C : Windows System32 WindowsPowerShell v1.0 en-US Microsoft.PowerShell.Commands.Management.dll-help.xml .", "It s not perfect as the generated MAML will require some manual editing but so does the cmdlet help editor you referenced .", "How can I handle this authentication problem to use MAML", "Of course one first thinks that my MAML must be incorrect .", "I m using SandCastle Help File Builder 1.8.0.1 with its MAML content editor .", "Have you used MAML Wiki for this purpose and what have been your learnings", "I had to document my module and did not find any better solution than to create my own MAML help builder .", "I ve created a Powershell script that will generate MAML for cmdlets and functions regardless of whether they part of modules .", "It should still work for binary modules since I m keying off of CommandInfo or FunctionInfo to generate the MAML .", "No longer do you need to maintain a parallel MAML https : en.wikipedia.org wiki Microsoft Assistance Markup Language file by hand", "Editing MAML file in sandcastle and need to have a value appear as italic bold or an identifiable color within code element .", "You would need a Xml Schema or DTD for MAML I assume there is one somewhere in an SDK or such .", "Details please refer to : http : davesexton.com blog blogs blog archive 2008 05 24 maml-migration-the-next-step-in-the-evolution-of-help-authoring.aspx", "There aren t a whole lot of good examples links out there but I m starting to get the hang of MAML .", "Using MAML means a learning curve and I am not sure about how mature it is and what are its advantages disadvantages .", "Right now I m using SHFB to merge API documentation and some conceptual docs into MAML .", "It works rather well for standard XML formats such as Docbook but I don t know how easy it is to find create the needed stylesheets for MAML .", "I m following Sandcastle s MAML guide to link-to documentation pages within my help file exact page I m referencing https : ewsoftware.github.io MAMLGuide html bc490dbf-7d46-432d-a816-3ae16ab6af54.htm .", "This is really not an answer but as you might see from my question http : stackoverflow.com questions 101150 what-would-you-use-to-write-end-user-documentation-for-a-wpf-application I have an interest in experience with MAML in general and particular MAML with regards to end user documentation .", "Finally I found a solution the good people of SandCastle Help File Builder http : shfb.codeplex.com have included an HTML to MAML converter .", "That possibility is even more likely given the fact that through extensive web searching I have yet to find anything remotely like a definitive source for the MAML XML schema .", "There are many good HTML editorsout there - and now I can use one of them and then convert the result to MAML", "Using the latest Sandcastle Help File Builder is it possible to only include MAML XML files and is so what setting needs to be changed because currently I get .. . .. . Error BE0042 : You must specify at least one documentation source in the form of an assembly or a Visual Studio solution project file .", "The MAML reference guide is included with the Sandcastle Styles download : http : sandcastlestyles.codeplex.com and has been IMMENSELY helpful at learning how to format things .", "When I didn t receive any answers I did the evaluation myself and I also decided to use MAML and for the same reasons .", "At this point you have a few decent choices for editing MAML .. . .. . DocProject http : www.codeplex.com DocProject .. . Sandcastle Help File Builder http : www.codeplex.com SHFB .. . .. . I can t speak much to DocProject though it looks nice .", "If have any experience with this it would be great if you could provide your thoughts on your blog about using MAML for end user documentation .", "I m trying to create a link-to a custom extension method using codeEntityReference MAML element and once I build the documentation I m getting the whole codeEntityReference tag content instead of a link-to the whole method .", "According to the MAML Guide http : www.ewoodruff.us mamlguide topic html 65e7e30a-ba03-4e10-b1f2-763a613b6e27.htm the proper way of doing this is to use a code tag with a CDATA section : .. . .. . The contents of the CDATA section will be treated as a literal string and indentation will be preserved .", "It s better than having to write everything as raw XML but doesn t handle things like compiling it to actual help files .. .", "One of them is building help files for several cultures .", "But the key evidence of a problem is that even though some of the PowerShell core cmdlets in that file have aliases they also do not report the aliases when you invoke Get-Help Here s an example : .. . .. . Here s the start of the MAML Definition for the DomainName parameter of Add-Computer --note the aliases defined at the end : .. . .. . Thus Get-Help knows how to report on aliases when it has to do the work itself via reflection but it fails to report on aliases when provided in the aliases attribute of command : parameter .", "Does anyone know of a utility for generating PowerShell cmdlet help files", "The latter is directly used by PowerShell to provide help on your cmdlets when you invoke Get-Help .", "In terms of graphical tools for editing XML PowerShell help PSMAML you can use : .. . .. . PowerShell Cmdlet Help Editor https : pscmdlethelpeditor.codeplex.com Open Source something of a spiritual successor to Cmdlet Help Editor .", "Of course you then lose color highlighting for the specified language .", "I know this is old but Sandcastle supports html as xml .", "After further research I discovered that you cannot use html markup in code element if you specify a supported language in the language attribute .", "I have tried code codeExample and sampleCode language HTML .", "Help scripts are almost WYSIWYG they look very similar to the result help .", "I used Azure Active Directory for authentication as mentioned here http : www.bradygaster.com post writing-a-windows-phone-8-application-that-uses-the-windows-azure-management-libraries-for-on-the-go-cloud-management and everthing works great for me .", "At work we use Sandcastle for creation of help files .", "Color syntax-highlighting is used for supported languages .", "In my case code sample is in XML so I don t care as much about the color .", "Other benefits automatically provided by XmlDoc2CmdletDoc sections in this list refers to the sections of help presented by Get-Help : .. . .. . Each custom type in the Outputs section includes a description .", "Here is the template of help data for commands cmdlet functions scripts and providers :", "Windows Phone currently doesn t support X509Certificate2 .", "Aliases are treated as first-class parameters so you can ask for help on an alias .", "I am using the Sandcastle Help File Builder and would like to include colorized HTML code-snippets in the Conceptual Content .", "HTML Highlighting in SHFB http : i.stack.imgur.com 84oN4.png .. . .. . Please note that in the preview your sample will appear as unhighlighted XML but when you build the documentation everything should like just fine .", "This should work : .. . .. . If you re using Sandcastle Help File Builder you may create your own syntax parser as described here http : www.codeproject.com Articles 16740 Creating-Custom-Build-Components-for-Sandcastle and here http : www.ewoodruff.us shfbdocs Index.aspx topic html c18d6cb6-e4e4-4944-84ee-f867aa6cfb0d.htm although xml is available by default.. . using the XAML filter s generator which is defined here if you want to look at the config :", "I located : http : blogs.msdn.com powershell archive 2007 09 01 new-and-improved-cmdlet-help-editor-tool.aspx .. . .. . Any updated versions", "Does someone knows what files should I modify in the sandcastle styles", "Probably the harder part is that you would need a stylesheet that renders the XML to an display format that can be used by the editor to provide a WYSIWYG view of the document .", "No exactly what I had in mind - I need a WYSIWYG editor to edit documents for the help I m not looking for an XML graphic editor", "Is there a possibility to do this using sandcastle help file builder SHFB", "Get-Help is expecting aliases to be somewhere other than the aliases attribute of command : parameter .", "I m developing a windows-phone app by using Azure Management Libraries in order to manage my Azure Websites .", "Is there any way to make my windows-phone app accessible for anyone who has an Azure Subscription", "There is no X.509Certificate2 class in Windows Phone APIs but you can use the Windows.Security.Cryptography.Certificates namespace to attach the certificate to your HTTP request .", "MyModule.dll-Help.xml then displaying help for a cmdlet s parameter that has one or more aliases might look like this : .. . .. . If on the other hand I remove that help file and reload my module help for the same parameter--now just reflected from the code itself by Get-Help --might look like this : .. . .. . Note the presence of the Aliases property in the second instance and its absence in the first .", "Use some wiki-engine and write documentation wiki style .", "Well at least these editors give you WYSIWYG editing of the text parts of your help files that looks pretty much like the screenshots of Gustavos links .", "When I build the help website format only the topic is included in the TOC but the content is not there .", "I m trying to create a help system that doesn t necessarily include any reflected code sections .", "Finally I solved the issue checking how C compiler generates the XML documentation file for the assembly .", "When I refer to a method in my docs I write something like this : M : MyClass.MyMethod System.String .. . .. . How do I do the same if I need to refer to an extension method", "After your users download the publish setting file they can use that to manage resources described at this post http : www.bradygaster.com post getting-started-with-the-windows-azure-management-libraries .", "But I need to write additional documentation which covers concepts overall architecture working demos etc class diagrams etc .", "I am working on a new library and I am using XML comments for API documentation along with SandCastle which works really well .", "Not sure what tool you are using to compile the docs but the Sandcastle Help File Builder will automatically find and generate an Extensions section for any class that has available extension-methods at the time of compile .", "The problem I am having is that the linkText attribute does not seem to be taken into account even though I m using it in an identical way to the guide I ve even copy pasted the example code and it isn t doing what it claims it should .", "I have a couple sections within my document like so : .. . .. . I can confirm that the links work correctly and each will bring me to the desired page they just display in an undesired way .", "Both of the codeEntityReference lines with a linkText should display the text .", "But instead all of the codeEntityReference links display as MyClass even though one link-to the class page and the other links to the members page .", "It is a little confusing.. .", "Doing it by hand seems a bit tedious.. .", "I can t select a module .", "I have a binary module .", "I have a blog post about it here http : chadwickmiller.spaces.live.com blog cns EA42395138308430 542.entry .. . .. . If you use it and find corrections feel free to update the script on PoshCode http : poshcode.org 1338 .", "I should have indicated that my module was binary .", "Thanks for the post though it really got me going in the right direction .", "No problem .", "Still they are just scripts and this makes a lot of useful features easy .", "I ve been looking at a way to embed the documentation in the snapin module C code and PoshBuild http : poshbuild.codeplex.com is starting to look like my best option .", "It doesn t provide a way to include some of the documentation elements e.g . synopsis and examples but it s still a good option .", "PowerShell HelpWriter https : www.sapien.com software powershell helpwriter Commercial .", "With the advent of the open-source XmlDoc2CmdletDoc https : github.com red-gate XmlDoc2CmdletDoc you can now document your binary PowerShell cmdlets i.e .", "those written in C just like any other C libraries and just like scripted cmdlets those written in PowerShell : use inline documentation comments .", "Just instrument your build so that when you recompile your C project it executes the documentation generator and you get both a module .", "dll and a module . dll-Help.xml .", "And XmlDoc2CmdletDoc even offers a -strict switch to ensure that you have comprehensively documented your cmdlets if you use the switch and you missed something your build will fail as it should .", "The Syntax section includes possible values for enumerated-types ." ] }
{ "confidence": [ 63.52549743652344, 61.78569793701172, 60.717308044433594, 57.74759292602539, 54.666038513183594, 54.46843719482422, 53.94987869262695, 52.00651550292969, 51.075042724609375, 48.995880126953125, 47.00470733642578, 45.373695373535156, 45.02405548095703, 42.25161361694336, 41.69459533691406, 41.38311004638672, 41.240394592285156, 40.77030944824219, 35.653541564941406, 23.929943084716797 ], "content": [ "Question : At work we use Sandcastle for creation of help files . I have been using SandCastleGUI for some time and I m looking for a way to create additional pages in the help file . These pages are written in XML format called MAML . The only problem is that I couldn t find any decent editor for these file-format . I m looking for a WYSIWYG editor to create edit additional documentation pages . Comment : This is really not an answer but as you might see from my question http : stackoverflow.com questions 101150 what-would-you-use-to-write-end-user-documentation-for-a-wpf-application I have an interest in experience with MAML in general and particular MAML with regards to end user documentation . If have any experience with this it would be great if you could provide your thoughts on your blog about using MAML for end user documentation . .. . Answer : You could use a generic XML editor with WYSIWYG support like Oxygen http : www.oxygenxml.com or Serna http : www.syntext.com products serna-free . You would need a Xml Schema or DTD for MAML I assume there is one somewhere in an SDK or such . Probably the harder part is that you would need a stylesheet that renders the XML to an display format that can be used by the editor to provide a WYSIWYG view of the document . It works rather well for standard XML formats such as Docbook but I don t know how easy it is to find create the needed stylesheets for MAML . But generally there is no reason why it couldn t be done . Comment : No exactly what I had in mind - I need a WYSIWYG editor to edit documents for the help I m not looking for an XML graphic editor Comment : Well at least these editors give you WYSIWYG editing of the text parts of your help files that looks pretty much like the screenshots of Gustavos links . It s better than having to write everything as raw XML but doesn t handle things like compiling it to actual help files .. .", "Question : In the process of trying to make the documentation for my PowerShell cmdlets written in C not scripted as complete as possible I made an interesting discovery . If I include a proper MAML help file e.g . MyModule.dll-Help.xml then displaying help for a cmdlet s parameter that has one or more aliases might look like this : .. . .. . If on the other hand I remove that help file and reload my module help for the same parameter--now just reflected from the code itself by Get-Help --might look like this : .. . .. . Note the presence of the Aliases property in the second instance and its absence in the first . Of course one first thinks that my MAML must be incorrect . That possibility is even more likely given the fact that through extensive web searching I have yet to find anything remotely like a definitive source for the MAML XML schema . However if my MAML is incorrect then so is the MAML used for PowerShell s own core cmdlets because that is where I copied it from considering it to be a reliable source C : Windows System32 WindowsPowerShell v1.0 en-US Microsoft.PowerShell.Commands.Management.dll-help.xml . But the key evidence of a problem is that even though some of the PowerShell core cmdlets in that file have aliases they also do not report the aliases when you invoke Get-Help Here s an example : .. . .. . Here s the start of the MAML Definition for the DomainName parameter of Add-Computer --note the aliases defined at the end : .. . .. . Thus Get-Help knows how to report on aliases when it has to do the work itself via reflection but it fails to report on aliases when provided in the aliases attribute of command : parameter . The Question .. . .. . What is the true problem 1 . Get-Help is expecting aliases to be somewhere other than the aliases attribute of command : parameter . 2 . Get-Help is failing to look for aliases in the MAML at all when given a MAML file . If 1 and someone can identify the correct way to specify aliases then there s an easy workaround for my own cmdlets . If 2 .. . time to file an issue on Connect .. . Answer : I had the same issue and have been able to work around it by adding the Aliases into the parameter maml : description section .", "Question : At work we use Sandcastle for creation of help files . I have been using SandCastleGUI for some time and I m looking for a way to create additional pages in the help file . These pages are written in XML format called MAML . The only problem is that I couldn t find any decent editor for these file-format . I m looking for a WYSIWYG editor to create edit additional documentation pages . Comment : This is really not an answer but as you might see from my question http : stackoverflow.com questions 101150 what-would-you-use-to-write-end-user-documentation-for-a-wpf-application I have an interest in experience with MAML in general and particular MAML with regards to end user documentation . If have any experience with this it would be great if you could provide your thoughts on your blog about using MAML for end user documentation . .. . Answer : Finally I found a solution the good people of SandCastle Help File Builder http : shfb.codeplex.com have included an HTML to MAML converter . There are many good HTML editorsout there - and now I can use one of them and then convert the result to MAML", "Question : At work we use Sandcastle for creation of help files . I have been using SandCastleGUI for some time and I m looking for a way to create additional pages in the help file . These pages are written in XML format called MAML . The only problem is that I couldn t find any decent editor for these file-format . I m looking for a WYSIWYG editor to create edit additional documentation pages . Comment : This is really not an answer but as you might see from my question http : stackoverflow.com questions 101150 what-would-you-use-to-write-end-user-documentation-for-a-wpf-application I have an interest in experience with MAML in general and particular MAML with regards to end user documentation . If have any experience with this it would be great if you could provide your thoughts on your blog about using MAML for end user documentation . .. . Answer : Don t know if you are still looking for a solution to this but I ve been looking at help editors and ran across a codeproject article that might be useful . The article can be found at http : www.codeproject.com KB dotnet DocMounter 2 Sandcastle.aspx . It features an editor that might be just what you need .", "Question : I am working on a new library and I am using XML comments for API documentation along with SandCastle which works really well . But I need to write additional documentation which covers concepts overall architecture working demos etc class diagrams etc . I have 2 options : .. . .. . 1 . Use some wiki-engine and write documentation wiki style . 2 . Use MAML which seems to be for this purpose . Using wiki seems safe solution because there are many stable popular and free engines available but API and conceptual documentation will not go hand in hand cross-linking appearance etc . Using MAML means a learning curve and I am not sure about how mature it is and what are its advantages disadvantages . Have you used MAML Wiki for this purpose and what have been your learnings What would you suggest me .. . Answer : Personally I love the freedom of working w a Wiki . At this point you have a few decent choices for editing MAML .. . .. . DocProject http : www.codeplex.com DocProject .. . Sandcastle Help File Builder http : www.codeplex.com SHFB .. . .. . I can t speak much to DocProject though it looks nice . Right now I m using SHFB to merge API documentation and some conceptual docs into MAML . The editor is decent and more than suffices for my needs . I m able to easily set up a table of contents and link between my API and conceptual documents . A good resource to look at for examples is SandcastleStyles http : sandcastlestyles.codeplex.com . As with all things there are some important questions to ask . Do you have any requirements to ship your documentation in one package In my case I needed to ship everything in one nice compiled package . You can t do that w a Wiki but you can do that w Sandcastle . Are you going to be the only person updating the conceptual content Most wikis have a really nice editor and an ability to quickly link between topics . The only tool you need to edit content is a browser which might be a requirement for a less technically-savvy writer . Comment : When I didn t receive any answers I did the evaluation myself and I also decided to use MAML and for the same reasons . You views support my decisions . Comment : Excellent . I m curious to get some of your opinions techniques for cross-linking between the conceptual and the API documentation . How did you end up managing your table of contents Did you ever find a way to nest your generated API documentation in the TOC or is each namespace still a top-level node in the TOC", "Question : Does anyone know of a utility for generating PowerShell cmdlet help files Doing it by hand seems a bit tedious.. . I located : http : blogs.msdn.com powershell archive 2007 09 01 new-and-improved-cmdlet-help-editor-tool.aspx .. . .. . Any updated versions I can t select a module . I have a binary module . .. . Answer : I had to document my module and did not find any better solution than to create my own MAML help builder . Here it is : https : github.com nightroman Helps .. . .. . The module builds PowerShell MAML help files from PowerShell help scripts . Help scripts are almost WYSIWYG they look very similar to the result help . Still they are just scripts and this makes a lot of useful features easy . One of them is building help files for several cultures . Here is the template of help data for commands cmdlet functions scripts and providers :", "Question : Does anyone know of a utility for generating PowerShell cmdlet help files Doing it by hand seems a bit tedious.. . I located : http : blogs.msdn.com powershell archive 2007 09 01 new-and-improved-cmdlet-help-editor-tool.aspx .. . .. . Any updated versions I can t select a module . I have a binary module . .. . Answer : I ve created a Powershell script that will generate MAML for cmdlets and functions regardless of whether they part of modules . It s not perfect as the generated MAML will require some manual editing but so does the cmdlet help editor you referenced . I have a blog post about it here http : chadwickmiller.spaces.live.com blog cns EA42395138308430 542.entry .. . .. . If you use it and find corrections feel free to update the script on PoshCode http : poshcode.org 1338 . Comment : I should have indicated that my module was binary . Thanks for the post though it really got me going in the right direction . Comment : No problem . It should still work for binary modules since I m keying off of CommandInfo or FunctionInfo to generate the MAML .", "Question : null .. . Answer : I m trying to create a help system that doesn t necessarily include any reflected code sections . Using the latest Sandcastle Help File Builder is it possible to only include MAML XML files and is so what setting needs to be changed because currently I get .. . .. . Error BE0042 : You must specify at least one documentation source in the form of an assembly or a Visual Studio solution project file .", "Question : Editing MAML file in sandcastle and need to have a value appear as italic bold or an identifiable color within code element . For example the following does not work : .. . .. . Is it possible to highlight some code that will be referred to later in descriptive paragraph .. . Answer : After further research I discovered that you cannot use html markup in code element if you specify a supported language in the language attribute . Color syntax-highlighting is used for supported languages . If you specify text as the attribute value then you can use html markup such as the span element to specify a background-color . Of course you then lose color highlighting for the specified language . In my case code sample is in XML so I don t care as much about the color .", "Question : I m working on writing some conceptual documentation to our otherwise technical documentation that is being produced in Sandcastle . There aren t a whole lot of good examples links out there but I m starting to get the hang of MAML . If anyone has any excellent resources for looking understanding this I d appreciate it . I was hoping to have my conceptual documentation make reference to some of the types in my Documentation Sources . Is there a way to put something as simple as Type to link-to the documentation that is also in the code EDIT : This was a major problem on my behalf since I m new to it . The best way to link-to a code item is to grab it from the Entities Window . To open the Entities Window go to Window Entities References . From here you can Find the appropriate type method property and drag it into the code from the results . The MAML reference guide is included with the Sandcastle Styles download : http : sandcastlestyles.codeplex.com and has been IMMENSELY helpful at learning how to format things . .. . Answer : You can create a reference from Conceptual Documentation to Reference Documentation by using codeEntityReference . Details please refer to : http : davesexton.com blog blogs blog archive 2008 05 24 maml-migration-the-next-step-in-the-evolution-of-help-authoring.aspx", "Question : I m using SandCastle Help File Builder 1.8.0.1 with its MAML content editor . I want an ordered list starting from a value other than the default of 1 . 10 . Some data .. . .. . 11 . Other data .. . .. . I even tried the following and it does not work as it is from HTML for the OL element : .. . .. . How can I achieve this Does someone knows what files should I modify in the sandcastle styles .. . Answer : The current version of SandCastle supports", "Question : I am using the Sandcastle Help File Builder and would like to include colorized HTML code-snippets in the Conceptual Content . Is this possible and if so how I have tried code codeExample and sampleCode language HTML . The best result so far is to HTML-encode the sample HTML and place it in a .snippets file like so . Then reference it in the .aml file . I would prefer to have it colorized but I can t figure out a way to add the formatting . .. . Answer : According to the MAML Guide http : www.ewoodruff.us mamlguide topic html 65e7e30a-ba03-4e10-b1f2-763a613b6e27.htm the proper way of doing this is to use a code tag with a CDATA section : .. . .. . The contents of the CDATA section will be treated as a literal string and indentation will be preserved .", "Question : I am generating MAML files for use with Powershell s Get-Help cmdlet . I would like to validate them . Can anybody tell me if there s a schema file somewhere that I can validate against .. . Answer : This post http : endpointsystems.spaces.live.com blog cns AFFCF464FE00AB35 235.entry would seem to indicate you can get the schemas from the SandCastle project . I haven t tried this myself so YMMV . Comment : sandcastlestyles.svn.codeplex.com svn Main Source https : sandcastlestyles.svn.codeplex.com svn Main Source SandcastleMAMLGuide Content IntelliSense.aml", "Question : null .. . Answer : Is there a way to create a list of all classes tagged with a specific custom tag in a Sandcastle documentation I m using a custom tag to mark specific behavior in my classes . I mapped this tag in main conceptual.xsl and the content is shown at the documentation sheet of each class . Now I want create a special page as conceptual content in the documentation which shows a list of all classes which are tagged with my custom tag . Is there a possibility to do this using sandcastle help file builder SHFB Perhaps in the .xsl transformations Or using MAML", "Question : null .. . Answer : I m following Sandcastle s MAML guide to link-to documentation pages within my help file exact page I m referencing https : ewsoftware.github.io MAMLGuide html bc490dbf-7d46-432d-a816-3ae16ab6af54.htm . The problem I am having is that the linkText attribute does not seem to be taken into account even though I m using it in an identical way to the guide I ve even copy pasted the example code and it isn t doing what it claims it should . I have a couple sections within my document like so : .. . .. . I can confirm that the links work correctly and each will bring me to the desired page they just display in an undesired way . Both of the codeEntityReference lines with a linkText should display the text . But instead all of the codeEntityReference links display as MyClass even though one link-to the class page and the other links to the members page . It is a little confusing.. .", "Question : I m developing a windows-phone app by using Azure Management Libraries in order to manage my Azure Websites . I used Azure Active Directory for authentication as mentioned here http : www.bradygaster.com post writing-a-windows-phone-8-application-that-uses-the-windows-azure-management-libraries-for-on-the-go-cloud-management and everthing works great for me . But I m getting AuthenticationFailed : A security token exception occurred for the received JWT token error when a different user signs in with his account . Is there any way to make my windows-phone app accessible for anyone who has an Azure Subscription How can I handle this authentication problem to use MAML .. . Answer : The problem is that the application you are creating is allowed to access your resources and not the resources of other subscriptions . I think the only way to do this to use the publish settings file downloading from here https : manage.windowsazure.com publishsettings index client powershell . After your users download the publish setting file they can use that to manage resources described at this post http : www.bradygaster.com post getting-started-with-the-windows-azure-management-libraries . Comment : The problem is beginning at this point . Windows Phone currently doesn t support X509Certificate2 .", "Question : I m developing a windows-phone app by using Azure Management Libraries in order to manage my Azure Websites . I used Azure Active Directory for authentication as mentioned here http : www.bradygaster.com post writing-a-windows-phone-8-application-that-uses-the-windows-azure-management-libraries-for-on-the-go-cloud-management and everthing works great for me . But I m getting AuthenticationFailed : A security token exception occurred for the received JWT token error when a different user signs in with his account . Is there any way to make my windows-phone app accessible for anyone who has an Azure Subscription How can I handle this authentication problem to use MAML .. . Answer : As user2955724 has pointed out you can get the list of subscriptions belonging to an account but you can t manage any resources related to it using Azure AD unless the particular user is in your AD . I faced the same problem and had to resort to using publish settings file . I included a Webview which links to publish settings https : manage.windowsazure.com publishsettings download link . You parse the file and get the certificate and subscription id . There is no X.509Certificate2 class in Windows Phone APIs but you can use the Windows.Security.Cryptography.Certificates namespace to attach the certificate to your HTTP request . Attach this certificate to an instance of HttpBaseProtocolFilter .", "Question : I m trying to create a link-to a custom extension method using codeEntityReference MAML element and once I build the documentation I m getting the whole codeEntityReference tag content instead of a link-to the whole method . A sample of the method would be : .. . .. . And the codeEntityReference would look as codeEntityReference M : SampleProject.ExtensionMethods.SomeExtension T TObject codeEntityReference .. . .. . Above link will produce an output like M : SampleProject.ExtensionMethods.SomeExtension T T . Actually I m getting the following error during documentation build : .. . .. . warning : BuildAssembler : warning : ResolveReferenceLinksComponent : 52e40f26-3dfe-47e0-adf1-09233e98f42e Unknown reference link target M : SampleProject.ExtensionMethods.SomeExtension T T .. . .. . Am I missing something What s wrong there I ve tried to provide the method-reference as : .. . .. . ...but it didn t solve the issue . .. . Answer : Finally I solved the issue checking how C compiler generates the XML documentation file for the assembly . For example a codeEntityReference to my sample extension method would be :", "Question : Does anyone know of a utility for generating PowerShell cmdlet help files Doing it by hand seems a bit tedious.. . I located : http : blogs.msdn.com powershell archive 2007 09 01 new-and-improved-cmdlet-help-editor-tool.aspx .. . .. . Any updated versions I can t select a module . I have a binary module . .. . Answer : With the advent of the open-source XmlDoc2CmdletDoc https : github.com red-gate XmlDoc2CmdletDoc you can now document your binary PowerShell cmdlets i.e . those written in C just like any other C libraries and just like scripted cmdlets those written in PowerShell : use inline documentation comments . No longer do you need to maintain a parallel MAML https : en.wikipedia.org wiki Microsoft Assistance Markup Language file by hand Just instrument your build so that when you recompile your C project it executes the documentation generator and you get both a module . dll and a module . dll-Help.xml . The latter is directly used by PowerShell to provide help on your cmdlets when you invoke Get-Help . And XmlDoc2CmdletDoc even offers a -strict switch to ensure that you have comprehensively documented your cmdlets if you use the switch and you missed something your build will fail as it should . Other benefits automatically provided by XmlDoc2CmdletDoc sections in this list refers to the sections of help presented by Get-Help : .. . .. . Each custom type in the Outputs section includes a description . The Syntax section includes possible values for enumerated-types . The Parameter section includes possible values for enumerated-types . Aliases are documented automatically in the Parameters section . Aliases are treated as first-class parameters so you can ask for help on an alias . You can optionally use a different description for a parameter in the Inputs section as you have for the Parameter section . Web links are automatically rendered in markdown format for possible post-processing to live links . This enhancement is pending . I liked this open-source utility so much I started contributing to it providing several of the above benefits . And I wrote a comprehensive guide to using it entitled Documenting Your PowerShell Binary Cmdlets https : www.simple-talk.com dotnet software-tools documenting-your-powershell-binary-cmdlets just published on Simple-Talk.com .", "Question : I am using the Sandcastle Help File Builder and would like to include colorized HTML code-snippets in the Conceptual Content . Is this possible and if so how I have tried code codeExample and sampleCode language HTML . The best result so far is to HTML-encode the sample HTML and place it in a .snippets file like so . Then reference it in the .aml file . I would prefer to have it colorized but I can t figure out a way to add the formatting . .. . Answer : I know this is old but Sandcastle supports html as xml . I figured I should comment in case anyone else comes across this post as I did . This should work : .. . .. . If you re using Sandcastle Help File Builder you may create your own syntax parser as described here http : www.codeproject.com Articles 16740 Creating-Custom-Build-Components-for-Sandcastle and here http : www.ewoodruff.us shfbdocs Index.aspx topic html c18d6cb6-e4e4-4944-84ee-f867aa6cfb0d.htm although xml is available by default.. . using the XAML filter s generator which is defined here if you want to look at the config :" ] }
[ "yes-answer-long", "yes-answer-short" ]
markup
UNK_RELATION
rijndael@encryption@62
rijndael -- rijndael is a block cipher that won the advanced @placeholder standard competition .
{ "confidence": [ 50.428035736083984, 48.36111068725586, 47.327880859375, 43.538455963134766, 41.92364501953125, 41.92364501953125, 41.92364501953125, 41.47307586669922, 41.26999282836914, 39.72981262207031, 39.72981262207031, 39.48358917236328, 38.795597076416016, 38.795597076416016, 38.74667739868164, 38.556766510009766, 38.53537368774414, 38.53537368774414, 38.0866584777832, 38.0866584777832, 38.0866584777832, 38.0866584777832, 37.81246566772461, 37.81246566772461, 37.53465270996094, 37.1082763671875, 37.10352325439453, 37.10352325439453, 36.766746520996094, 36.766746520996094, 36.125389099121094, 35.87989044189453, 35.87989044189453, 35.87989044189453, 35.87989044189453, 35.87989044189453, 35.78361511230469, 35.78361511230469, 35.18586730957031, 34.89675521850586, 34.89675521850586, 34.89675521850586, 34.89675521850586, 34.89675521850586, 34.89675521850586, 34.89675521850586, 34.60530090332031, 34.37264633178711, 34.37264633178711, 33.872642517089844, 33.74256134033203, 33.74256134033203, 33.71844482421875, 33.5275764465332, 33.5064811706543, 33.412025451660156, 33.28467559814453, 32.89069747924805, 32.89069747924805, 32.89069747924805, 32.89069747924805, 32.89069747924805, 32.89069747924805, 32.89069747924805, 32.75942611694336, 32.32817077636719, 31.947742462158203, 31.90756607055664, 31.90756607055664, 31.90756607055664, 31.90756607055664, 31.90756607055664, 31.90756607055664, 31.90756607055664, 31.90756607055664, 31.90756607055664, 31.90756607055664, 31.90756607055664, 31.90756607055664, 31.90756607055664, 31.90756607055664, 31.90756607055664, 31.729454040527344, 31.58111572265625, 31.58111572265625, 31.309524536132812, 31.04397964477539, 30.769432067871094, 30.7292537689209, 30.7292537689209, 30.7292537689209, 30.7292537689209, 30.7292537689209, 30.649993896484375, 30.326393127441406 ], "content": [ "Rijndael 256 is a block cipher with 256 bit block size .", "It implements the Rijndael block cipher for 16 24 or 32 bytes .", "By Rijndael I assume you really mean AES Advanced Encryption Standard AES is a subset of Rijndael with a block size of 128-bits that is what you need .", "Rijndael algorithm was chosen by the NIST to be the Advanced Encryption algorithm .", "Rijndael AES", "Rijndael AES", "Rijndael is AES .", "The doEncrypt and doDecrypt functions are publically visible but not the function that creates the rijndael cipher .", "Rijndael with 256-bit blocks is non-standard .", "There are a million options for Rijndael in C .", "Rijndael as mentioned on the title .", "OR you ll need to do hard way : validating Phil Fresle s AES Rijndael Block Cipher implementation", "Rijndael AES has a fixed block size of 128 in all implementations .", "Possible duplicate of How to encrypt or decrypt with Rijndael and a block-size of 256 bits", "They used the Rijndael encryption for the password .", "As pointed out in the comments SecureString s have nothing to do with the Rijndael specification and MCRYPT RIJNDAEL 256 is not the same as AES256 which refer Rijndael-128 with a 256-bit key .. . .. . So to solve your problem we just need a function to encrypt a plaintext in ECB cipher mode using Rijndael with a block size of 256 .", "So I guess the implementation of Rijndael in ccrypt is non-standard .", "Essentially it s just standard encrypt decrypt of data using Rijndael .", "rijndael is just the original name for AES.. .", "Remember that AES is only a subset of Rijndael .", "What Rijndael java implementation would that be", "This is exactly the reverse AES is a subset of Rijndael", "Rijndael also supports the block sizes of 128 and 192 bit .", "They have Rijndael AES raw and in block modes CBC etc . .", "The nonce is combined with a fixed four-byte magic number and the resulting 32-byte value is encrypted by one round of the Rijndael block cipher with the given key .", "AES is a subset of Rijndael check this stackoverflow.com questions 748622 http : stackoverflow.com questions 748622 differences-between-rijndael-and-aes", "For Crypto++ it depends on the blocksize used for Rijndael .", "The default aes algorithm is an implementation of Rijndael .", "so I m thinking about using the Rijndael Cipher in PHP for a password manager website I m building .", "I have problems with decrypting strings sent from PHP to Delphi using the rijndael cipher .", "Last time I checked the API doesn t contain Rijndael 256 or any other block cipher with that block size and you cannot force any AES functionality to use a larger block size .", "AES is the same as Rijndael but with some fixed standardised parameters .", "Is there any manual way of implementing Rijndael-256 in Java", "The IV is the result-of encrypting the nonce and password with Rijndael .", "Now we ll decompile the Rijndael CreateEncryptor call .", "Any full AES implementation should be usable as Rijndael .", "As Leigh has suggested I had to make use of Bouncy Castle the light weight API and the Rijndael cipher engine there in .", "I ended up with a function to create an rijndael cipher and functions to encrypt and decrypt a string with a key and ivsalt .", "In the Rijndael AES proposal http : csrc.nist.gov archive aes rijndael Rijndael-ammended.pdf in section 2.1.2 they have chosen m x x 8 + x 4 + x 3 + x + 1 and said it is an irreducible polynomial .", "SecureString has nothing in common with Rijndael AES .", "Also Rijndael and AES aren t quite the same thing .", "You need to find a module that supports Rijndael-256 .", "@PMontgomery please be aware that Rijndael is not exactly AES .", "I want to use rijndael aes128 for encryption in ruby .", "AES Rijndael compatibility between platforms is difficult indeed .", "How to generate Rijndael KEY and IV using a passphrase", "This is a follow up for stackoverflow.com questions 13647456 http : stackoverflow.com questions 13647456 rijndael-cipher-error-in-c-sharp-windows-form", "Net where I can find an example of using the Rijndael algorithm .", "The Delphi Cryptography Page DCP cryptographic components contain an implementation of Rijndael algorithm .", "For certain reasons I need to implement Rijndael de compression with a blocksize of 256 bits instead of AES which uses a block size of 128 bits reason : data is encrypted in PHP using Rijndael.. . .", "This question already has an answer here : .. . .. . How to encrypt or decrypt with Rijndael and a block-size of 256 bits", "http : stackoverflow.com questions 8083144 how-to-encrypt-or-decrypt-with-rijndael-and-a-block-size-of-256-bits", "Any particular reason to call the algorithm Rijndael", "I was going to use Blowfish but after reading that Rijndael is like the gold standard I decided to go with that .", "In PHP you re using Rijndael with a block size of 256 bit rijndael-256 and a key size of 256 bit determined through SHA-256 output .", "http : stackoverflow.com questions 3431950 rijndael-256-encrypt-decrypt-between-c-sharp-and-php .. . Rewrite Rijndael 256 C Encryption Code in PHP http : stackoverflow.com questions 3505453 rewrite-rijndael-256-c-sharp-encryption-code-in-php .. . Rijndael AES decryption C to PHP conversion http : stackoverflow.com questions 8411177 rijndael-aes-decryption-c-sharp-to-php-conversion .. . .. . However I am still having difficulties with my particular case .", "In general I d recommend generating a new key for each message you encrypt with a symmetric cipher like Rijndael and then encrypting that key with an asymmetric algorithm like RSA .", "How do I get 256 bit Rijndael encryption", "So maybe someone more familiar with Rijndael can help me .", "I need to send the login encrypted with RIJNDAEL but I am experiencing problems .", "@Htbaa Crypt : : Rijndael PP is not as mature a module as Crypt : : Rijndael and has some oddities .", "We have a requirement to do some Rijndael development in Java .", "As my company recently found out AES is not quite Rijndael .", "I have a file which is encrypted using Rijndael encryption method .", "the Rijndael block size is always 16 bytes so a 32 byte hex md5 wont work", "I found this Rijndael code to use with classic asp : http : www.frez.co.uk freecode.htm rijndael .. . .. . But I cannot find the same solution for ASP.NET .", "If i just get a cipher with RIJNDAEL CFB PKCS5Padding and try to initialize a IV with 256 bits I get an exception because the block-size is only 128 bits .", "To get rijndael with the 256-bit blocksize you will have to go somewhere else .", "How do I implement mcrypt into python on top of rijndael 128", "I am encrypting a pdf file using the Rijndael algorithm .", "Maybe there are pure JavaScript implementations of Rijndael out there but I don t know any .", "I m trying to decrypt a string encrypted using the Security : : rijndael function of CakePHP .", "One of them converting image to byte array and encrypting with Rijndael .", "This is an implementation of Rijndael Encryption which one of my websites is currently using .", "For Rijndael-256 your code generates an IV with the wrong length .", "I have a project in c Windows that uses Rijndael object .", "I ve tried different Rijndael sizes 128 vs 256 .", "Example : .. . .. . You can use DeriveBytes in any symmetric algorithm not just Rijndael .", "Also use AES nor Rijndael that s not exactly the same thing .", "The Perl code uses Crypt : : CBC with Rijndael and Twofish ciphers .", "or I should find other encryption algorythms like Rijndael", "or I must use another way for encoding for example Rijndael .", "I read wrong Rijndael supports block and key sizes of 128 192 and 256 bits but in AES the block size is always 128 bits .", "DEC implements Rijndael with a block size of 128 bits and key sizes 128 192 and 256 bits .", "According to the available documentation MCRYPT RIJNDAEL 128 corresponds to AES Rijndael with a 128 bit block size regardless of the key size .", "However in perl using Crypt : : Rijndael they note : .. . .. . blocksize .. . The blocksize for Rijndael is 16 bytes 128 bits although the algorithm actually supports any blocksize that is any multiple of our bytes .", "When I remove this code : new IvParameterSpec getIV I get this error : Wrong algorithm : AES or Rijndael required .. . If I change the algorithm to only AES or only Rijndael I get this error : Input length must be multiple of 16 when decrypting with padded cipher .", "Right DEC will not pad your plain text in ECB mode which means the plain text you pass to your function has to have a length that is a multiple of the block size of the cipher 16 for Rijndael AES .", "But I want to convert everything to Rijndael encryption to make passwords also decryptable .", "I m using Rijndael to encrypt some sensitive data in my program .", "Rijndael supports key sizes of 16 24 and 32 bytes and nothing inbetween .", "The other part of the problem was that the DEC implementation is actually 128 bits Rijndael .", "Rijndael ciphers are a variable-length depending on the key used so a VarChar will not work .", "Rijndael isn t equal to AES but instead is AES with some restrictions - fixed block size of 128 bits and some crypto modes not supported .", "mcrypt https : www.npmjs.com package mcrypt and node-rijndael https : www.npmjs.com package node-rijndael come to mind which both are simple wrappers around libmcrypt which you would need to install additionally ." ] }
{ "confidence": [ 59.79703140258789, 54.3636589050293, 51.4387092590332, 50.8213996887207, 50.763755798339844, 50.34346008300781, 49.79372024536133, 48.51515197753906, 46.89828872680664, 46.676265716552734, 46.52898406982422, 46.312843322753906, 44.607669830322266, 44.10355758666992, 43.76966857910156, 43.57448959350586, 43.38551712036133, 43.32691192626953, 43.20689392089844 ], "content": [ "Question : For certain reasons I need to implement Rijndael de compression with a blocksize of 256 bits instead of AES which uses a block size of 128 bits reason : data is encrypted in PHP using Rijndael.. . . How can I change the block-size for a cipher If i just get a cipher with RIJNDAEL CFB PKCS5Padding and try to initialize a IV with 256 bits I get an exception because the block-size is only 128 bits . Comment : You ll probably have to ensure you have the Java JCE unlimited encryption classes installed . They re not part of the typical standard Java distribution because they re illegal in some countries . Comment : allready have them . still cant find out how to get a cipher object with the required blocksize Comment : Then I believe @GregS has the answer . I had believed Rijndael-256 was part of JCE Unlimited Providers but I m used to using my company s somewhat customized Java - which has a JCE provider for it but it may well be private implementation . Comment : You should remove AES from the title AES only have been standardized with 128 bits block . The security of Rijndael with 256 bits blocks is not well studied and could well be way weaker than AES . Whatever reason you had to go with Rijndael with 256 bits blocks wasn t a good one likely . .. . Answer : There is no support in any of the Sun JCE providers for anything other than Rijndael with the 128-bit blocksize : this is AES algorithm . To get rijndael with the 256-bit blocksize you will have to go somewhere else . I suggest the Bouncycastle java http : www.bouncycastle.org java.html library . The RijndaelEngine http : www.bouncycastle.org docs docs1.6 org bouncycastle crypto engines RijndaelEngine.html class has a constructor that accepts a block size in bits . Most people find the PaddedBufferedBlockCipher http : www.bouncycastle.org docs docs1.6 org bouncycastle crypto paddings PaddedBufferedBlockCipher.html class to be more convenient when used with suitable padding e.g .", "Question : Need to communicate with PHP code that decrypts in MCRYPT RIJNDAEL 256 . Is there any way I can use something exactly like MCRYPT RIJNDAEL 256 in Swift Update : It s worth adding that I have been using AES256 because I was under the impression that AES256 and MCRYPT RIJNDAEL 256 were the same thing I understand now that this is not the case Comment : Try RNCryptor https : github.com RNCryptor RNCryptor . Comment : rijndael is just the original name for AES.. . Comment : This may help you gist.github.com tlarevo 63840cdd421937ba9174 https : gist.github.com tlarevo 63840cdd421937ba9174 Comment : I d prefer to not use third-party libraries . Comment : @MaartenBodewes Please be more respectful . There are various reasons OP may not want to use third-party libraries . Yes it s going to be hard if it s not in the core iOS API but you could have said so in a more polite manner . .. . Answer : No you cannot not without using 3rd party libraries . Rijndael 256 is a block cipher with 256 bit block size . Last time I checked the API doesn t contain Rijndael 256 or any other block cipher with that block size and you cannot force any AES functionality to use a larger block size .", "Question : null .. . Answer : so I m thinking about using the Rijndael Cipher in PHP for a password manager website I m building . I was going to use Blowfish but after reading that Rijndael is like the gold standard I decided to go with that . Anyway I was slightly confused about the key which looks like it s the second parameter on mcrypt encrypt . I need to know if the key is binary or hexadecimal and how to go about creating it . Does the key need to be random I ve included some code that I plan on using but bear in mind though that I ll probably be changing it around .", "Question : We have a requirement to do some Rijndael development in Java . Any recommendations for articles libraries etc . that would help us Any pointers to keystore maintenance and how store the keys securely Edit : .. . .. . It would need to be open-source . Essentially it s just standard encrypt decrypt of data using Rijndael . Comment : Rijndael AES .. . Answer : For a great free library I highly recommend BouncyCastle . http : www.bouncycastle.org It is actively maintained high quality and has a nice array of code examples . For reference documentation you ll have to rely more on the general JCE docs . http : java.sun.com j2se 1.5.0 docs guide security jce JCERefGuide.html .. . .. . I can t say what library we use to meet FIPS certification requirements . But there are alternatives to CryptoJ that are much much cheaper . In general I d recommend generating a new key for each message you encrypt with a symmetric cipher like Rijndael and then encrypting that key with an asymmetric algorithm like RSA . These private keys can be stored in a password-protected software-based key store like PKCS 12 or Java s JKS or for better security on smart card hardware token or other crypto hardware module .", "Question : PHP code : .. . .. . mcrypt encrypt MCRYPT RIJNDAEL 256 key to encrypt MCRYPT MODE ECB .. . .. . I need the corresponding powershell code which can produce the same result . I have already tried ConvertTo-SecureString ConvertFrom-SecureString . Powershell Code Not producing correct encryption : .. . .. . The encrypted string is coming out different . Is there a parameter that I am missing Or Is there another module Comment : SecureString has nothing in common with Rijndael AES . It s a windows thing that uses DPAPI . You should instead look at using the .NET AesManaged class . Comment : I ve got no knowledge of PowerShell whatsoever but judging by the param aes variable that you re using you seem to be assuming that you need AES encryption .. . However and this is a common mistake MCRYPT RIJNDAEL 256 is NOT AES only MCRYPT RIJNDAEL 128 is . Comment : @Narf So.. . the 256 in MCRYPT RIJNDAEL 256 refers to block size not key length Comment : @MathiasR.Jessen Yes precisely . : If you need AES-256 just use a 256-bit key with Rijndael-128 . Comment : Thanks for the discussion guys Very helpful . I will try working with AesManaged class . If anyone has a good resource for implementing MCRYPT RIJNDAEL 256 using AesManaged please post it here . Actually I found it here : stackoverflow.com a 14258619 2970271 http : stackoverflow.com a 14258619 2970271 .. . Answer : As pointed out in the comments SecureString s have nothing to do with the Rijndael specification and MCRYPT RIJNDAEL 256 is not the same as AES256 which refer Rijndael-128 with a 256-bit key .. . .. . So to solve your problem we just need a function to encrypt a plaintext in ECB cipher mode using Rijndael with a block size of 256 . For this the obvious choice is the RijndaelManaged https : msdn.microsoft.com en-us library system.security.cryptography.rijndaelmanaged v vs.110 .aspx class . Fortunately the MSDN documentation provides a basic but fully functional example of how to use the RijndaelManaged class and a CryptoStream https : msdn.microsoft.com en-us library System.Security.Cryptography.CryptoStream v vs.110 .aspx to encrypt and decrypt strings - all we need to do is rewrite it in PowerShell and change the block size and cipher mode : .. . .. . The decryption process is almost the same although this time we ll need to reverse it and read the cipher text back through the CryptoStream from the MemoryStream : .. . .. . Rijndael256 in action http : i.stack.imgur.com AzBpq.png Comment : Thanks a lot really appreciate your effort This absolutely works .", "Question : We have a requirement to do some Rijndael development in Java . Any recommendations for articles libraries etc . that would help us Any pointers to keystore maintenance and how store the keys securely Edit : .. . .. . It would need to be open-source . Essentially it s just standard encrypt decrypt of data using Rijndael . Comment : Rijndael AES .. . Answer : Java includes AES out of the box . Rijndael is AES . You don t need any external libraries . You just need something like this : .. . .. . And that s it for encryption decryption . If you are processing large amounts of data then you re better off reading chunks that are multiples of 16 bytes and calling update instead of doFinal you just call doFinal on the last block . Comment : Rijndael isn t equal to AES but instead is AES with some restrictions - fixed block size of 128 bits and some crypto modes not supported . Any full AES implementation should be usable as Rijndael . Comment : This is exactly the reverse AES is a subset of Rijndael Comment : @BrunoRoh e is correct . AES is a subset of Rijndael check this stackoverflow.com questions 748622 http : stackoverflow.com questions 748622 differences-between-rijndael-and-aes Comment : I don t want to edit my answer because these comments were made after it was selected as the right one and I think 3 comments stating that AES is a subset of Rijndael should be enough for anyone to notice I got it backwards .", "Question : null .. . Answer : I have found a source code at stackoverflow on Rinjndael-256 encryption and decryption written in c . It is using custom IV appending some extra string . Now I need a decryption method on Java platform . I have found some source code tried to change and test that . Here is the encryption method on c : .. . .. . The decryption method on java which is not working for me is : .. . .. . Edit 1 : I have implemented the php code for decryption . Is there any manual way of implementing Rijndael-256 in Java As someone said that .. . .. . There is no support in any of the Sun JCE providers for anything other than Rijndael with the 128-bit blocksize .. . .. . I don t have an option to use library Comment : not working for me why what is happening with it errors Comment : First problem : Don t use Encoding.Default anywhere if you want the code to be portable . The last line of your C code should just be return Convert.ToBase64String AESEncrypt.TransformFinalBlock buffer 0 buffer.Length + IV Now it s very unclear where you re getting the IV from in the Java code.. . there s no sign of you taking it off the end of the cipher-text.. . or indeed performing any base64 decoding . Comment : Hint : if you provided a short but complete pair of programs demonstrating the problem we d be able to provide a complete solution.. . Comment : Possible duplicate of How to encrypt or decrypt with Rijndael and a block-size of 256 bits http : stackoverflow.com questions 8083144 how-to-encrypt-or-decrypt-with-rijndael-and-a-block-size-of-256-bits Comment : Rijndael AES", "Question : This question already has an answer here : .. . .. . How to encrypt or decrypt with Rijndael and a block-size of 256 bits questions 8083144 how-to-encrypt-or-decrypt-with-rijndael-and-a-block-size-of-256-bits 1 answer .. . .. . I have the following source code provided by DHL that performs MCRYPT RIJNDAEL 256 and MCRYPT RIJNDAEL 128 encryption in PHP : .. . .. . Which outputs : .. . .. . I need to perform 256 bit Rijndael encryption in Java . I have written the following code : .. . .. . Which is outputting : .. . .. . i.e . It is encrypting it with 128 bit encryption . How do I get 256 bit Rijndael encryption .. . Answer : Found the solution from Artjom . This prints out the following :", "Question : I have a message that is encrypted using PHP before it is stored in MySQL database . I need to be able to decipher this message using node.js javascript . While researching how to do this I came across the crypto https : nodejs.org docs latest api crypto.html module . I tried to use it but I am running into the following error .. . .. . This is how I am trying to decript the message using the crypto module .. . .. . This is how I encrypt the message using PHP .. . .. . This is how I would decrypt the message using PHP .. . .. . How can I correctly decrypt the message using crypto Comment : @BurninLeo where would I find the crypto.js file Comment : When I change the iv value from 32 to this var iv new Buffer 32 binary I get this error Error : Unknown cipher I am not sure if I should pass the number 32 there or not Comment : Sorry I mis-read the error message . Accoring to nodejs.org api https : nodejs.org api crypto.html crypto crypto createcipheriv algorithm key iv E2 80 8C E2 80 8B key and iv must be binary encoded strings or buffers . - i.e . in my opinion 32 is not valid at all . .. . Answer : In PHP you re using Rijndael with a block size of 256 bit rijndael-256 and a key size of 256 bit determined through SHA-256 output . Rijndael also supports the block sizes of 128 and 192 bit . Node.js crypto module only supports AES which is the same as Rijndael with a fixed block size of 128 bit and variable key size 128 192 or 256 bit . It means that you can t recreate the same functionality with Node.js crypto module . You need to find a module that supports Rijndael-256 . mcrypt https : www.npmjs.com package mcrypt and node-rijndael https : www.npmjs.com package node-rijndael come to mind which both are simple wrappers around libmcrypt which you would need to install additionally . It would be probably easier if you could change the PHP code to use AES rijndael-128 . Keep in mind that SHA-256 is a hashing function and not an encryption algorithm . You need to use crypto.createHash algorithm https : nodejs.org api crypto.html crypto crypto createhash algorithm instead of crypto.createDecipheriv to derive the key from a password . .. . .. . Security considerations : .. . .. . When you derive a key you should do that with a random salt and many iterations . Use PBKDF2 bcrypt or scrypt for that . If the password is short less than 20 characters then it would be easy to brute-force . Don t use MCrypt . It s abandonware . PHP and Node.js both support OpenSSL encryption which makes it easier to find compatible ciphers . Still need to select the same mode of operation and padding . Don t use ECB mode . It s not semantically secure . At least use CBC mode with a random Initialization Vector IV . The IV doesn t have to be secret so simply prepend it to the ciphertext . Authenticate your ciphertexts either with an encrypt-then-MAC scheme with a strong MAC like HMAC-SHA256 or use an authenticated mode of operation like GCM or EAX . Comment : @artjimB thank you so much for this great answer . I want to try the node-rijmdael but as you said I need to install libmcrypt first . I don t see a libmcrypt library for npm . How can I install it Comment : It s a native library for linux possibly even windows but I doubt it . Maybe there are pure JavaScript implementations of Rijndael out there but I don t know any . Comment : It shouldn t matter if there s a libmcrypt for Node or not . Comment : @ScottArciszewski in order to install the libraries I must install libmcrypt and I can t figure out on how to use it I am running Node.js on windows . Comment : @MikeA You could just write a minimal PHP script that does this and call that php script from node.js through child-process .", "Question : We have a requirement to do some Rijndael development in Java . Any recommendations for articles libraries etc . that would help us Any pointers to keystore maintenance and how store the keys securely Edit : .. . .. . It would need to be open-source . Essentially it s just standard encrypt decrypt of data using Rijndael . Comment : Rijndael AES .. . Answer : As my company recently found out AES is not quite Rijndael . AES has the restriction that keys MUST be 128 192 or 256 bit - however Rijndael allows for keys that are 160 and 224 as well . As indicated by erickson above BouncyCastle provides a Rijndael object that DOES support the additional key lengths : 128 160 192 224 256 bits . Specifically take a look at the lightweight API . Gnu-crypto is another open-source library - however it also does NOT provide support for 160 and 224 bit keys . So if you are specifically looking for full Rijndael support then BouncyCastle is the only one I ve found so far . Comment : If you need to use the java for android developement although the question does not state that it is worth noting that Bounty Castle has a brother now that gives more flexibility on android known as Spongy Castle which is a derivative. . and quite good actually", "Question : I need a Python implementation of this function - I want to use it on appengine . I am not so good in Python so please help . .. . Answer : Have you tried this one http : wiki.birth-online.de media snippets python rijndael.py also included below It implements the Rijndael block cipher for 16 24 or 32 bytes . You are using the 256 bit 32 byte version of the block cipher . Note that the rijndael.py file only implements the block cipher . The encrypt decrypt functions only handle plaintexts that are precisely the block size . This means that the caller of these functions will have to provide the block cipher mode of operation and the zero padding himself . Example python code from a Java programmer beware : Comment : Note that this uses the old Python API you may want to rewrite it to use real byte arrays for higher python versions . No performance or security review performed just a simple ciphertext verification of the string owlstead against the Bouncy Castle implementation in Java . Look ma I can do Python .", "Question : I have been tasked with converting a C cryptography method to Java and am stuck . I know the C codes works but I am having trouble getting my Java code to work . Here is the C code : .. . .. . And here is my attempt in Java so far : .. . .. . Some More Information .. . .. . For GetIV and GetKey I can guarantee that the results in java are the same I have compared every byte but I am not including those methods because I believe that is sensitive information . I can also guarantee that the input byte is identical and redundantly the same length . Debugging attempts : The current error in Java is ECB mode cannot use IV . When I remove this code : new IvParameterSpec getIV I get this error : Wrong algorithm : AES or Rijndael required .. . If I change the algorithm to only AES or only Rijndael I get this error : Input length must be multiple of 16 when decrypting with padded cipher . The input length starting is 424 and 420 after reading past removing the first 4 bytes . I have verified that the input bytes are the same for Java and C . Where am I going wrong in the Java code .. . Answer : You are getting the error ECB mode cannot use IV because ECB doesn t perform chaining so IV is meaningless . The difference is Java throws an error whereas C just ignores the IV . When I remove this code : new IvParameterSpec getIV I get this error : Wrong algorithm : AES or Rijndael required .. . .. . If I change the algorithm to only AES or only Rijndael I get this error : Input length must be multiple of 16 when decrypting with padded cipher . .. . .. . You had the right idea but you went too far . This error is only to do with the SecretKeySpec which doesn t care about the mode but just the algorithm . Cipher is where you specify mode . Also Rijndael and AES aren t quite the same thing . So start by changing the first few lines to this : .. . .. . Note that since you re using the entire key you don t need the offset and length arguments so you can just do .. . .. . .. . .. . The original C code has some not-so-obvious behavior : .. . .. . When the loop gets to the end of the input it will copy however much is left of it into buffer . Unless the last Read was exactly 1024 bytes there will be residue from the previous loop or from initialization if it gets the whole input with one Read operation after the end of the input . The inner loop decrypts one 16-byte block at a time . In the case of your 420-byte example the last block will consist of the remaining 4 bytes of input and 12 more bytes of garbage . But it s okay because the output.Write only writes bytes number of bytes to truncate the garbage . You will have to replicate this behavior in your Java code . .. . .. . Side note : do you absolutely have to use ECB It s not very secure.. . Comment : Thank you so much . When I applied your changes I got this error Input length not multiple of 16 bytes . Which is similar to the other error I was getting except it doesn t say anything about padding . Comment : I tried removing the last 4 bytes of the input array as well as the first 4 since the last 4 are padding to make the length a multiple of 16 and it pretty much worked there are just some weird characters at the end of the decrypted string.. . Comment : @jlars62 I edited my answer Comment : I forgot to mention you also do not truncate the final result like the original C does output.SetLength output.Length - pad - 4 so that could affect your results too . Comment : Yeah I that not so obvious behavior was the last piece . Once I got converted that to Java it worked Thanks again", "Question : I have 2 websites : one written in classic asp and another written in ASP.NET 1.1 framework . Both applications use a login mechanism to validate user credentials based on a shared database-table . Up to now passwords are stored in a 1-way MD5 hash meaning people must be given a new generated password if they lose the old one . I now want to change this and make the passwords decryptable . I found this Rijndael code to use with classic asp : http : www.frez.co.uk freecode.htm rijndael .. . .. . But I cannot find the same solution for ASP.NET . I tried this but it gives me different encryption and decryption results between the classic asp and ASP.NET code : .. . .. . I think I m doing something wrong with generating the key or iv but I can t find a solution . Comment : We are using the exact same code in a legacy part of our Classic ASP vbScript application to encrypt strings.. . which IMHO is more like obfuscation than encryption . I have took a look at the Classic ASP version with my limited knowledge in cryptography I think the code does not use an IV at all . If someone knows if it is possible to use RijndaelManaged without an Initialisation Vector IV I think it could help a lot . Comment : Why do you want decryptable passwords Why not simply allow a user to generate a new password of their choice .. . Answer : Since ASP classic doesn t have native hash functions you ll probably need to port your MD5 VBScript code to your .NET language or to use a common cryptography component due some error on your legacy code . Comment : MD5 is no problem this has been working for years now both for classic asp and ASP.NET . But I want to convert everything to Rijndael encryption to make passwords also decryptable . Comment : same applies : if those two methods by different algorithms results doesn t match use same algorithm and they will . OR you ll need to do hard way : validating Phil Fresle s AES Rijndael Block Cipher implementation", "Question : I have this bit of PHP that I d like to do the equivalent of in ColdFusion . I think it is just .. . .. . But I have no real way of knowing for sure and it doesn t feel quite right so I wondered if someone out there would be good enough to point me in the right direction . UPDATE : For information this answer http : stackoverflow.com questions 3196846 un-encrypting-re-encrypting-a-coldfusion-encrypted-string-in-php by Mister Dai http : stackoverflow.com users 377852 mister-dai was particularly helpful . So MCRYPT RIJNDAEL 256 actually means block size not the encryption strength http : www.chilkatsoft.com p php aes.asp . The encryption strength is still 256 as the key and salt are generated in PHP using a value that is hashed at sha-256 . This is the encrypt call I have now : .. . .. . encrypt arguments.messageXML instance.key AES CBC PKCS5Padding Base64 ivSalt .. . .. . Unfortunately this blows up because the ivSalt is 32 bytes 256bits in length and AES is only expecting a 16 bytes iv salt . Looking here http : kb2.adobe.com cps 546 e546373d.html main block it would seem that the maximum block size in ColdFusion Java for AES is 16bytes 128bit . I can t seem to see how I can get a 256bit block size . Any help would be greatly appreciated . Comment : When you run the two using the same message do you get the same result Comment : I agree with Dave . But a few things that jump out at me are 1 your encrypt key is missing blank 2 you are not passing an iv and 3 the encryption mode needs to match that used by php Comment : Ah.. . I ve just remembered something about PHP . this- key is like this.key in ColdFusion . So I need to dig around in the rest of the PHP file for the key and the IV salt which should help me make more sense of this . Comment : @Stephen Moretti - You will also need to change the mode as well . IIRC CF defaults to ECB and the php example looks to be using CBC Comment : @Stephen Morretti - If 256 is only supported for Rijndael not AES you might try Bouncy Castle s RijndaelEngine implementation bouncycastle.org specifications.html http : www.bouncycastle.org specifications.html .. . Answer : A couple of thanks should go out before I answer my own question . Thanks to Dave Boyer Mister Dai http : misterdai.wordpress.com Jason Dean http : www.12robots.com and Jason Delmore http : www.cfinsider.com for their help . As Leigh has suggested I had to make use of Bouncy Castle the light weight API and the Rijndael cipher engine there in . I ended up with a function to create an rijndael cipher and functions to encrypt and decrypt a string with a key and ivsalt . The doEncrypt and doDecrypt functions are publically visible but not the function that creates the rijndael cipher . The encryption and decryption functions take a string key and ivSalt returning an encrypted or decrypted string respectively . The createRijndaelBlockCipher takes a key ivSalt a boolean to state whether the cipher will be used to encrypt or decrypt and the block size although the block size is defaulted to 256 bits . The function is fairly well commented so it should make sense . The UDF at the bottom special thanks to Jason Delmore for that nugget ensures that ColdFusion correctly creates a byte array for the decryption . Some other ways of creating byte arrays just don t work or end up with inconsistent results in decryption or throw pad buffer corrupt errors . That s about it really . It took far too much effort when the standard AES encryption uses 128bit blocks and 128 Bit Keys are for classified up to SECRET 192-bit or higher for TOP-SECRET . 256bit blocks and 256bit keys are just a bit over the top . Just because you can doesn t mean you should . Please do remember that MCRYPT RIJNDAEL 256 is the block size and not the encryption level . The encryption level is set by the strength of key that you pass into mcrypt encrypt and increasing the block size does not increase the encryption strength .", "Question : I have data that was encrypted in PHP as follows : .. . .. . I need to decrypt this data in a Python 3 application . I am trying to use PyCrypto but I am open to other libraries . I expect the following to work : .. . .. . My initialization vector is 32 bytes and the following exception is thrown : .. . .. . How can I set PyCrypto to use a 32 byte initialization vector and 32 byte block size Alternatively is there a different library that I can use to decrypt the data Comment : You can t set AES to 32 byte block size because AES is only defined for 16 byte block size . You have to find a Rijndael 256 256 assuming your key is also 32 bytes long implementation for python . Comment : possible duplicate of Python equivalent of PHP s MCRYPT RIJNDAEL 256 CBC http : stackoverflow.com questions 8356689 python-equivalent-of-phps-mcrypt-rijndael-256-cbc . Always fun to see your own answers in a Google search . Comment : Thanks . That appears to implement the block cipher but not the CBC encryption mode . Is there an implementation of CBC that I can use with my 32-byte initialization vectors Comment : It s not that hard to implement CBC and as it is mostly XORing there is little risk of side channel attacks on the mode . PHP padding mode is adding 0..15 zeros till you reach block size . .. . Answer : Thanks to the comments I implemented a suitable solution . I modified rijndael.py in the linked duplicate question to accept bytes rather than strings . I then use it as follows to decrypt 32-byte blocks with the 32-byte initialization vectors . Note that using this rather than PyCrypto is only necessary because libmcrypt incorrectly sets the data block sizes and thus the initialization vector sizes to be equal to the key sizes . As far as I understand data block sizes should always be 128 bits for AES-Rijndael . Comment : Yep AES is Rijndael with a block size of 128 bits and key sizes of 128 192 or 256 bits with the normal amount of rounds and constants . Comment : I m not sure if the decryption routine is correct it only seems to work for a single block . I ll try and correct it and post a solution in the other answer . Comment : Done take a look and don t forget to upvote the other answer Comment : True this answer only works for single blocks . Thanks for the full solution . Comment : @gavinmh love to know the mod you made to accept bytes rather than strings .", "Question : null .. . Answer : I am migrating some code from Perl to C++ . The Perl code uses Crypt : : CBC with Rijndael and Twofish ciphers . The Perl code specifically sets up the ciphers to not prepend any header to the cipher text and use the key I supply literally rather than hash it first : .. . .. . I am looking for a C++ crypto library or libraries that will allow me to configure the ciphers in the same way because the new C++ code needs to interact with data created by the existing Perl code . Any advice on where I should look I ve checked the Crypto++ site wiki but I can t see specific mention of this . Comment : Requests for libs docs reference code are off-topic here . However the question might fit at softwarerecs.stackexchange.com http : softwarerecs.stackexchange.com - please read their help and how-to-ask sections before posting there . Comment : You mentioned crypt++ and it appears to supports TwoFish . So all you need is CBC https : en.wikipedia.org wiki Block cipher mode of operation Cipher Block Chaining .28CBC.29 . This is rather trivial code you could convert from Perl yourself if you had too . Comment : For Crypto++ it depends on the blocksize used for Rijndael . Crypto++ only provides the AES compatible version which uses 128-bit block sizes and not 192-bit or 256-bit block sizes . I believe OpenSSL has the same restriction . Also see Open Source Cryptographic Libraries https : wiki.openssl.org index.php Related Links Open Source Cryptographic Libraries and Other Crypto Libraries http : www.cryptopp.com wiki Related Links Other Crypto Libraries on the OpenSSL and Crypto++ wikis respectively . They provide links to other libraries that may suit your needs . Comment : @ikegami - I had to smile when I read .. . so all you need is CBC . This is rather trivial code . That trivial code has been responsible for a number of leaks and attacks over the years . TLS has moved away from it and now prefers authenticated encryption cipher modes like GCM .", "Question : plain Test .. . .. . After decryption plainText2 should be equal to plaintext .But its not . Encrypt Decrypt methods . Edit : .. . .. . Edit : .. . .. . Im trying to get the encryption-decryption working across windows other client that encrypts and server and android . The windows client is a VC++ app that uses a Rijndael class http : svn.openfoundry.org pcman 2007.06.03 Lite Rijndael.h and android uses http : www.cs.ucdavis.edu rogaway ocb ocb-java Rijndael.java The Windows client has encrypted the data and stored it on the server . I need to build a client for android that fetches the encrypted data decrypt it and display to the user . Im sure im using the correct key to decrypt . Comment : It will be useful to post Utils.padString code as well Comment : What is plainText2 Comment : Its for testing the encryption. . I check the plaintext2 equals plaintext . to make sure that encryption is working correctly. . Comment : What Rijndael java implementation would that be Comment : The line String cipher new String encrypt plainText usually does not make sense and will destroy the ciphertext making decryption impossible . A String can be constructed by decoding a sequence of bytes together with a decoding standard like UTF-8 but not every sequence of bytes can be decoded . ciphertext may be any sequence of bytes therefore your scheme can t work . .. . Answer : AES has a block size of 128 bits i.e 16 bytes . It can only process data in blocks of this size so even though you have told it to use NoPadding it is unable to comply . The most likely thing that is happening here is that the AES implementation you are using is internally padding your four bytes of input up to 16 bytes and encrypting the result . When you decrypt you get the same 16 bytes back out i.e . T e s t and 12 garbage bytes . The output you see supports this : Test followed by 24 symbols . I don t know why it s printing two symbols for each garbage byte but I m guessing it s something to do with interpreting the garbage bytes in unicode . You could see what is going on by printing out the raw byte values of the decrypted blob . The short answer is that NoPadding doesn t make sense for a block cipher or rather if you are going to use NoPadding then you have to pad and unpad things yourself . Comment : I guess No padding indicates that the developer will take care of padding . I pad the data with null 0 chars . while decrypting its my responsibility to remove the extra custom paddings . I fixed this by identifying the first index of null char and returning the preceding substring as plaintext . Comment : My app has to work along side a legacy app so I cannot use other in-built padding options . the C++ legacy app uses 0 for padding .", "Question : I ve been trying to fix ccrypt-j https : github.com chrsoo ccrypt-j a pure-java implementation of the linux ccrypt http : ccrypt.sourceforge.net command . I found there is some problem with the initialization vector IV which makes ccrypt not decrypt anything but its own output . I modified both libraries so that the same nonce is always fed to both implementations of the Rijndael engine however the output IV is always different between implementations i.e . both libraries always have the same result because Rijndael is deterministic but those results are always different . I know the problem is only the way ccrypt generates the IV since : .. . .. . 1 . ccrypt-j-encrypted can be decrypted from ccrypt-j .. . 2 . If I substitute the IV first 32 bytes of the encrypted files with that of a ccrypt-encrypted file ccrypt will decrypt it just fine . Ccrypt uses its own implementation of Rijndael coded in C while ccrypt-j uses Bouncy Castle s implementation . EDIT : 04 01 2016 .. . .. . Because the IV is constructed before any data is encrypted actually any data is even read I believe the problem has to be in the way Rjindael is initialized in both Bouncy Castle and ccrypt s own implementation . I ll try to do the same sequence in both implementations and see what I get . Comment : And what is your question Comment : What could be the reason for this Comment : Well you ve got the sources for both of them . I d compare the IV generation part . Comment : The IV is the result-of encrypting the nonce and password with Rijndael . BC s and ccrypt s Rijndaels are totally different implementations and the flows are quite different . That s why I am here . So maybe someone more familiar with Rijndael can help me . Comment : You d be better off filing bug reports to both projects . .. . Answer : One half-answer .. . .. . if you look at the old ccrypt there are some explanations about IV . if I resume 4 bytes are fixed - magic number - it si c051 for a while . Issues about securities are also discussed : .. . .. . magic number : see that http : ccrypt.sourceforge.net faq.html .. . .. . ccrypt comes from emacs jka-compr : .. . .. . http : www.opensource.apple.com source emacs emacs-51 emacs lisp jka-compr.el .. . .. . In ccrypt the seed is constructed as follows : first a nonce is contructed by hashing a combination of the host name current time process id and an internal counter into a 28-byte value using a cryptographic hash-function . The nonce is combined with a fixed four-byte magic number and the resulting 32-byte value is encrypted by one round of the Rijndael block cipher with the given key . This encrypted block is used as the seed and appended to the beginning of the ciphertext . The use of the magic number allows ccrypt to detect non-matching keys before decryption . magic number there : http : ccrypt.sourcearchive.com documentation 1.7-7 ccryptlib 8c-source.html .. . .. . It seems magic number doesnt change same from 1.1 to 1.10 before I dont know . So what ccrypt is designed to be compatible with precedent versions emacs .. . . It can crypt and decrypt and is widely used . Then problem come from ccrypt-j . what one can see on sourceforge is 2 important things : .. . .. . 1 compatibility .. . .. . Encrypting a file using ccrypt-j .. . .. . TODO .. . .. . Decrypting a file using ccrypt-j .. . .. . TODO .. . .. . so what works really 2 in fact it uses bouncy castle which is well used and surely implements standards well . So conclusion you cant hope ccrypt will-change . then : you can decrypt ccrypt by ccrypt-j .. . .. . but if you want to decrypt by ccrypt you have to limit ccrypt-j .. . .. . I doubt about your assertion because it would be magical If I substitute the IV first 32 bytes of the encrypted files with that of a ccrypt-encrypted file ccrypt will decrypt it just fine . But if it works why not use that ccrypt-j can also decrypt last advice : contact ccrypt-j support .. . .. . hope it helps Comment : 1 . Encrypting a file with ccrypt-j is trivial . They did not fill out those sections in the read.me file but trust me it is trivial . 2 . Bouncy castle has to be correct . I know . So I guess the implementation of Rijndael in ccrypt is non-standard . 3 . My assertion was right provided that the key is always the same . I don t think there is such thing as ccrypt-j support it s just someone uploading an implementation of ccrypt to a personal github .", "Question : I want to use a plug-in for cakephp to store encrypted data in the database . But I want to calculate how much length is necessary for database fields . Here is the encryption code of the plugin : .. . .. . For instance how much field length is necessary for 2000 lengthed raw string input VARCHAR If you need more details here is the All Plug-in Code : .. . .. . https : github.com jmillerdesign Cipher-Behavior-for-CakePHP blob master Model Behavior CipherBehavior.php .. . Answer : Use CakePHP s Security : : encrypt method instead as it is using Rijndael-256 out of the box . Rijndael ciphers are a variable-length depending on the key used so a VarChar will not work . The ciphertext is binary-data and there s no need to encode it so you would use a BLOB field instead ." ] }
[ "yes-answer-long", "yes-answer-short" ]
encryption
UNK_RELATION